Script Catalog

NOTICE (Updated 2018-02-23):

I no longer host scripts from this blog – they are now located at my github repository. Most of the scripts below have broken download links and nearly all of them are out of date. I am in process of re-writing them to match the latest OpenBOR engine updates.

In the list below, you will find several items already linked to the library that replaced them. If you do not see a replacement link, I would suggest browsing my my github – you will likely find what you’re looking for.

Thanks,
DC

 

Update log for common script and functions used by all modules. I have found that I often forget which script from identical working copies is the newest version. This should help track them.

License

A copy of or (preferably) link to this license is required for use of the materials below or any other resources provided by Damon Caskey.

 


Event Scripts

Self contained scripts run immediately in response to an engine event. Most will be used to call a user custom defined function.

z_ani

Generic animationscript event script.

z_blank

Blank script file. Allows @cmd tags with entities that do not need user defined functions.

z_block

Universal didblockscript event script.

z_blocka

Universal onblockascript event script.

z_datk

Universal ondoattackscript event script.


Functions

Custom predefined functions to be called by event scripts.

ani0009

Animation switching wrapper. Validates animation before a switch attempt is performed and allows quick use of both available animation switch methods. Handles basic animation switching needs for almost every other function.

ani0012

Specialized animation switch; performs Grabattack2 if opponent is “Bad Brother”. I normally prefer more a more generic approach using parameters, but this is in place already and it does do the job.

Moved to Avalanche repository.

ani0014

If target can be grappled, caller is set to passed animation. Otherwise alternate animation is used if available. If not, nothing is done.

ani0016

Perform alternate animation if target is rising or performing a rise attack.

ani0020

Wrapper to perform animation when triggered by key script.

bind0010

Primary grapple binding function. Binds and sets target entity into desired pose, or sets position and releases.

bind0017

Find preexisting entity with same name and warp to location. Primary use is to spawn self on top of old corpse. Creates effect of a “dead” character standing back up when player continues or has lives remaining; much less jarring then a new copy appearing out of nowhere.

bind0021

Shunt self away from wall if bound entity is inside of it (wall). Prevents getting a bound entity stuck within areas meant to be inaccessible or bounced to infinity by wall functions.

dama0004

Damage caller’s bound entity by index. Differs from dama0001 in that a mode is provided to allow non-lethal damage, and attack types are passed as integers rather than a string.

  • 2010_02_02Fatal Fury Chronicles
    • Authored.
  • 2011_07_19Golden Axe The Hackjob
    • iDam variant now initialized as 0. It seems OpenBOR will occasionally keep the value of a NULL initialized variant in a given script across multiple callings. Such a bug would be virtually impossible to find and eliminate, especially given its inconsistency; it is more pragmatic to simply adapt scripts accordingly. In the case of dama0004, retention of an iDam value of -1 could cause targets to have their hit points reduced to 0 immediately. In turn applied damage would always be lethal regardless of intended amount.

debug0001

A very messy but (to me) invaluable function to view and modify various system values in game. Its most powerful use is to edit grapple move poses during live game play and log the resulting command for use in a model text.

draw0001

Primary setdrawmethod() wrapper. Enables the classic pseudo 3D scaling and rotation effects when entities move about the screen as in many golden age arcade games, particularly the Neo-Geo.

draw0002

Support function for draw0001. Applies ratio parameter to offset parameter, ensuring the result is always a whole number. Main use is to integrate zoom effect with binding (bind adjustments must be whole numbers).

draw0003

Assign a group of draw method parameters to model, to be applied by draw0001.

ht0001

Returns entity’s current height, including current draw adjustment.

jump0003

Enable double jumping, wall jumping, etc.

Replaced by Hansburg library.

jump0005

Enable Mario Brothers style jump height control.

Replaced by Hansburg library.

mode0001

Wrapper to switch entity’s weapon and model name.

mode0002

Find out what weapon models (if any) players have and store them for placement into next level. Originally written to enable the feature in Golden Axe where an animal was retained from previous level, only to automatically run away during bonus stage.

  • 2011_03_29Golden Axe The Hackjob
    • Copied directly from “saveanimal” by Utunnels (contains a previous modification by myself to accommodate Joe & Alex). Will likely need a rewrite to take advantage of new string functions; it currently uses a limited static list and I am enabling playability for nearly every character in the game.

parr0001

Parry functionality. Check for Key timing and apply parry settings accordingly.

path0001

Returns full path of passed entity, minus file name.

path0002

Returns folder of passed entity.

rnd0001

Generate random numbers.

Replaced by Eggball library.

run0001

Simple “stop running” function useful for adding a controllable dash movement.

soun0005

Sound catalog and player. Catalogs sounds by tiers and selects sound from group at random. :

  1. entity/sounds folder
  2. global sounds/throwdamage
  3. global sounds

May also play specific sound from group if needed.

soun0009

Sound effect wrapper. Verify sample and last play time, then play sample with location based stereo effect.

velo0001

Wrapper for velocity control.

wall0001

Primary wall function. Damages and bounces self in opposite direction of current X velocity when falling and obstructed by wall/platform. Also provides optional jumping/climbing onto an obstacle along Z axis for AI controlled entities. OpenBOR already allows optional Z jumping, but AI controlled entities always use their full jump height/length and may overshoot if the target platform is small. There are also cases where a custom animation would simply provide greater aesthetics.

  • 2009_10_10 – Fatal Fury Chronicles
    • Authored (wall bounce only). Optional climbing added later (unknown date).
  • 2011_07_22Golden Axe The Hackjob
    • Wall bounce velocity is now a % of original velocity instead of a static value. This adjustment adds nuance to the timing needed for wall juggles. It also improves visual appeal, as a harder impact is now rewarded with a harder bounce. Additionally, victims caught between two walls will no longer infinitely bounce and “climb” upward; the gradual loss of velocity means they will eventually lose momentum and fall as expected.

z_block

Universal ondidblock function.

z_datk

Universal ondoattack function.

z_spawn

Universal onspawn event function.

Ray McDougal Sprite Set Improvement

Animation and sprite color upgrade complete for Ray McDougal. Several improvements were required, as this sprite set is being used as a generic thug. It is imperative to have quality color, animation, and attack technique variety since it will be seen repeatedly.

  1. Sprite set was procured from second game, Fighters History Dynamite. This sequel was missing several animations and had lower quality animation in general then the already sub-par original.
  2. Sprite set featured almost no color separation. Identical shades of blue used for shirt, gloves, pants and shoes. This combined with other shortcuts by original artists such as liberal application of #ffffff and #000000 made alternate palette creation nearly impossible.
    • Solution: Hand color entire sprite set (approximately 270 units) with individually dedicated colors for each portion of the sprite:

      Ray's base palette. All major sectors of the sprite now have dedicated color sets.

  3. Even with all animations combined from both games, animation was still lacking overall. In particular, attack recoils are simply the strike frames played in reverse. This is very jarring when seen next to more painstakingly created sets from other sources.
    • Solution: Combine hand drawing and franken-sprite techniques to create new frames for attack sequences. Most non attack sequences have satisfactory animation.

In addition to the above improvements, Ray also received a “rounding out” of available techniques. Effectively he is now a complete player character with weaker statistics. This is really somewhat overboard given the large number of basic moves available to players, but again as Ray will be seen quite often, I believe he should have a wide array of abilities and tactics to avoid repetition.

Owing to most of the work requiring hand drawing, the total time needed was just over a month. I am pleased with the results however. This should make an effective generic thug to oppose the players without boring them.

Ray combo I

Ray's basic far and close attack chain pre improvement.

Ray McDougal basic attack chain as of 02092011.

Ray's basic far and close attack chains as of 02092011.

Work Log

This is a general work log for my Fatal Fury Chronicles module project. The goal is to replicate game play elements found within SNK’s Fatal Fury series in a side scrolling Final Fight style environment, while presenting the back story in a more cohesive layout. At the start of this log (11292010) the module is in a playable beta state.

11292010

  • Start of work log.
  • Project back under way after being idle for approximately one year.
  • Resolved issue of crashing instantly during menu on newer revisions. Issue turned out to be nothing more then a leftover configuration save file. Module is in beta status; it has one fully playable stage and one test area, but I would like to add more content before releasing any kind of demo.

11302010

  • Andy Bogard now uses randomized sound effect system. See soun0005() function.

12012010

  • Merge old MS Word based work log.

12022010

  • Andy Bogard model scripts converted to latest convention.
  • Terry Bogard model scripts converted to latest convention.
  • AI Ray McDougal model scripts converted to latest convention.
  • Bug fixes.

12032010

  • Cut JUMPDELAY from 18 to 8; too much of a pause before jump executes.
  • Parked cruisers in Sound Beach stage now catch fire immediately when damaged (previously not until destroyed) and sink with scripted velocities instead of offset/base manipulation.

12052010

  • Added entity verify to draw0001(). Previously it would cause immediate shutdown if called on non existent entity.
  • Andy Bogard & Raiden sprite files converted to nameless serial convention.
  • Bug fixes.

12062010

  • All models and sprites in data/misc/effects updated to serial name convention.

12072010

  • Function bind0010() merged from Golden Axe Hackjob.
  • Function dama0004() merged from Golden Axe Hackjob.
  • All models and sprites in data/misc/flash updated to serial name convention, cataloged in master sprite database and moved to data/misc/effects.
  • All models and sprites in data/misc/dust updated to serial name convention, cataloged in master sprite database and moved to data/misc/effects.

12082010

  • Terry Bogard and Ray sprites updated to nameless serial convention. This completes update of all primary models to date.
  • Latest draw0001() and it’s support functions now use target’s current alpha setting instead of an entity var to get and store the blend parameter. Exact same functionality, but with one less wasted variable and one less script parameter to worry about initializing when entities are spawned. I should have spotted it two years ago.
  • Flashes use MP as a sound constant in place of if/list based on alias.
  • Flashes use Nodrop property as random rotation range.
  • All previously uncatalogued sounds removed from main sound folder. Model specific sounds moved to their respective owners still need cataloging.

12092010

  • Script removal. Several spawn scripts are no longer needed; they basically performed the same function with minor differences. Their functionality is now consolidated into spaw0002.c with sound cataloging and free variable application.
    • spaw0003.c
    • spaw0006.c
    • spaw0007.c
    • spaw0008.c
    • spaw0009.c
  • Ray and Raiden’s sounds cataloged. Both still need sound calls upgraded to soun0005.c function.
  • Flash spawning function created (bind0022()).

12102010

  • Flash spawning fully integrated. Required new functions (summ0002() and bind0023) see below.
  • New function: summ0002(void <vEnt> char <cModel> char <cAlias> int <iMap> int <iBlend> int <iX> int <iY> int <iZ> int <iDir> int <iAni> int <iFrame> int <iKill>)

    • Spawns an entity (usually a flash) by name unless <vEnt> has a custom flash defined by the flash model header command, in which case the defined custom flash will be spawned. Location is screen based.
  • New function: bind0023(void <vTarget> char <cModel> char <cAlias> int <iMap> int <iBlend> float <fAX> float <fAY> int <iAZ> int <iDir> int <iAni> int <iFrame> int <iKill>)
    • Spawns an entity (usually a flash) by name and binds to location of <vEnt>. If <vEnt> has a custom flash defined by the flash model header command, the defined custom flash will be spawned instead.
  • Adjusted block push back (bloc0002(), called in z_hit.c). Previously multiple incoming hits could force the blocking character a ridiculous distance across screen.
  • Merging bind0010() functionality:
    • Andy Bogard
      • Grabbackward
      • Grabforward

12132010

  • Imported key0006() from Golden Axe Hackjob and finished updating keyall.c to latest standard. Had missed these earlier; debu0001() cannot work without them.
  • Added font3.png (it’s a copy of font2 for now). Not normally needed in game, but is used by debu0001().
  • Removed final frame from Andy Bogard’s taunts. Idle animations already include transition frames.

12142010

  • Further progress for “bind to target” capability in bind0010(). Only needs velocity application.

12152010

  • debu0001() now includes ability to toggle autozoom from draw0001().
  • key0006() given new parameter <fQnt>. Allows increments/decrements by specified quantity instead of static 1.
  • bind0010() modes rearranged (in progress). See function.

12162010

  • New function: ani0012(void <ent>, int <iH>, int <iFrame>)
    • Skips to <iFrame> if target’s Y axis position is <= <iH>. Allows jump animations to adapt to variable height (i.e. don’t start a full somersault during a short hop).

12172010

  • Taunt/Poses now mapped to Special + Attack + (optional) Direction instead of Pose + (optional) Direction. This cuts action keys back to Attack, Jump, Special, and Backstep. A fifth action key dedicated to poses just seemed cumbersome and didn’t mesh well with the overall control scheme.
  • bind0010() modifications complete. Now accommodates binding based on attacker or defender’s location and automatic adjustments to deal with larger/smaller characters without switching animations.

12182010

  • Separated Work Log from Bug List/Notes. It was getting unwieldy to sift through, and separation will also allow tabbing between “to do” and current progress rather then scrolling. The Bug List/Notes article will probably need breaking down later as well.
  • Updated dama0002() function:
    • Grapple binds are now released correctly when taking damage.
  • Updated pain0001() function:
    • Hit level animation switching now verifies alternate pain animation before applying.
    • Application of hit effects. See effe0001() function.
  • Updated fall0001() function:
    • Hit level animation switching now verifies alternate fall animation before applying.
    • Individual checks broken down to separate if calls for readability.

12192010

  • Updated kill0001() function.
    • draw0001() no longer called to reset parent map for effect models (not needed as draw0001() is not used for standard mapping).
    • Entity variable cleaning code replaced with vars0001() function.
  • Updated spaw0002() function.
    • Entity variable cleaning code was missing. Replaced with vars0001() function. Shouldn’t be needed since cleaning is done on entity removal by kill0001(), but adding it anyway in case an unforeseen engine glitch does not allow kill0001() to finish.
    • Random name code replaced with name0001() function (function is identical to original name code).
  • Updated fall0001() function:
    • Application of hit effects. See effe0001() function.
  • Adjusted Ray’s Burn animheight accommodate burn effect.
  • Added SPAIN and SHOCK animation to Ray; shock effect works as designed.
  • On death fatality adjustments in progress. Is komap setting open to script?

12232010

  • New function: draw0006(void <vEnt> void <vMatch>)
    • Enables matching of draw scale between two entities using their height settings. Replaces the “quick and dirty fix” that was in kill0001() for almost two years. Previously the fatality model spawned on burn death was given a static size adjustment of 75% as its sprites were over sized; the adjustment is now automated. An obvious added benefit is that it will also self adjust to match abnormally sized characters with any further amendments.
  • Replaced burn fatality sequence with ball explosion and Komap switching. See kill0001(). A better solution would be to turn Komap off, but due to the engine’s layout this is not yet possible. An engine modification is needed to fix this issue long term, but in game everything works as needed.
    • Look into using hmap property; if available to script, will remove need for static map constant when resetting Komap.
      • 12262010 – property open to script and can be used to replace static map constant as described.

12242010

  • For whatever reason stupidity on my part jump0005() function was embedded in z_movez.h. Function moved to its own file.

12252010

  • Setting for komap in deat0001() now uses hmapl property in place of MAPX constant.
  • Function soun0003() (random KO sounds) removed. Functionality long since replaced by soun0005() and numeric based sound cataloging.

12262010

  • Variables iRemap and iAlpha removed from draw0001() function. There is no need for them as the passing -1 to either as a parameter in setdrawmethod() allows target entity to use its own property setting. Previously setdrawmethod() would override entity’s map and alpha properties, meaning they had to be adjusted through draw0001().
  • New function: targ0002(void <vEnt> int <iAni> int <iType> int <iSType> int <iTD>)
    • Find nearest entity within range of a base entity’s animation range setting that matches type, subtype and throwdamage parameters. Intended use is to replace item based music change and similar Easter eggs, but is useful for finding any specific entity not otherwise detectable with global findtarget() function.
    • Step 1 for replacing item based music switching; detects when user presses key in close proximity to music switching trigger obstacle.
  • Script removal:
    • dust0001.h
      • Was a name based spawn function only used by Sound Beach cruiser to spawn water splash. Water splash can be replicated by another function. General use for script has otherwise long since been replaced by my dust model header additions.
    • dust0002.h
      • Similar to dust0001.h but with numerous parameters added. Functionality similarly replaced by recent additions to engine’s default dust system and was not in use at all.

12282010

  • Andy Bogard’s palette sprites moved to <char>/pals folder and converted to nameless serial. Palette 0015 (black) retouched to match KOF2000.
  • New function: file0001(int <iVar> char <cFile> char <cRow> int <iColumn>)
    • Wrapper for basic text file reading; finds row by text passed through <cRow> and returns value located at column number <iColumn>.
    • Step 2 for replacing item based music switching. Will locate music by by being passed music switch obstacle’s <aggression> value. Desired column will be passed as looping numeric cycle (not complete at this time).

12292010

  • New function: musi0001(void <vEnt> int <iNotch>)
    • Locates text file argument by using target entity’s aggression setting as row search and nodrop as column number. Argument is passed to global playmusic() command and <iNotch> is added to nodrop setting to determine column selected next time function is called on target entity. This allows use of obstacle as an interactive switch in general instead of music only. Furthermore, as aggression is a spawn parameter, the same item can be used for multiple sets of music with no modifications, variables, or additional scripts. Additionally, soun0005() is activated on use, passing the obstacle’s maximum health as sound group. In the same manor as aggression setting, adjusting the heath spawn parameter allows choice of sound effect group without any adjustments to model/scripts.
    • Step 3 for replacing item based music switching; will be added to global keyall.c script.
  • New entity: data/chars/misc/pickups/swit0001
    • Is an inert obstacle made to replace item based music switching and other types of stage interactivity as noted above.
  • Sound effects 100_0 and 100_1 (both are radio tuning sound effects) added, and moved to /swit0001/sounds folder.
  • Music switching upgrade complete.

12312010

  • New script: z_datk
    • Called by most entities as their ondoattack script.
  • Script updates:
    • parr0001:
      • Retool in progress to take advantage of engine features available as of version 2.955.
        • Parry animation.
        • Air Parry animation.
        • Pause for Defender and Attacker
        • Switch direction to face Attacker.
        • 30% MP recovery for Defender.
        • Engine default collision disabled.
      • Remaining:
        • Parry flash.

          • 01012011
        • On screen alert?
        • Adjust timing threshold for parry command? Current timing of 0.3 seconds seems too easy at the moment, but test was in controlled environment with single opponent using a predictable attack.

          • 01012011
  • Raiden:
    • Added Drop Kick.

01012011

  • New Entities:
    • bflash: Block flash.
    • pflash: Parry flash.
    • fflash: Fire flash.
    • eflash: Electric flash.
    • iflash: Indirect flash.
  • All flash models now located in folder data/chars/misc/effects/models/flash.
  • Script updates:
    • parr0001:
      • Parry flash.
      • Check for state (can’t be in pain or blockstun).
      • Command mapping finalized: Press Special within 0.3 seconds or less before incoming attack makes contact.
      • On screen prompt?
  • Ray:
    • Old sound calls replaced with soun0005(). Now fully upgraded to self cataloging random sound system.
    • Aggression speed increased from 130 to 0.
    • Shock fatality.
  • Andy Bogard:
    • Minor bbox correcting in BLOCK animation.

01022011

  • Andy Bogard
    • Additional voice effects.
      • 3_0
      • 3_1
      • 3_2
      • 7_4
      • 26_2
      • 27_1
      • 28_2
      • 28_2
      • 103_1 (Geki Hishoken 2)
      • 111_0 (“hatz”)

01032011

  • Andy Bogard
    • Additional voice effects:
      • 110_1 (Zaneiken 2)
      • 112_0 (“zan”)
      • 113_0 (Speaking to Tung Fu Rue)
      • 114_0 (“Master Tung”)
      • 115_0 (“Geese”)
      • 116_0 (“san”)
      • 117_0 (Max attack unleash)
  • New entities:
    • Hyper sparks:
      • Hyper sparks separated back into individual models. Previously a single model (paus0001) contained animations and palettes for all hyper effects. The idea was to reduce memory consumption. While text files are minimal, each model loads its own copy of any given script. However, by separating each into their own models, the sound cataloging system can be implemented in the same manor as normal models (less confusion). Furthermore, this eliminates need for animation scripts within the hyper spark models; only a one time spawn script is needed. The overall result will be slightly greater memory consumption, but with better run time performance. The latter is of greater concern as this module will not run on a memory shy platform anyway due to sheer quantity of animation.
        • hype0001
        • hype0002
        • hype0003
  • New sound files:
    • /hype0001/11_0
    • /hype0002/11_0
    • /hype0003/11_0

01062011

  • Revamp of projectile system in progress to take advantage of ondoattackscript:
    • Projectile models are to be separated back into individual models (previously they were combined, see hyper sparks in 01032011 entry).
    • Current projectile function proj0002 to be greatly simplified, it currently requires 33 parameters.
    • Addition of numeric indexed global vars (see grapple binding) to track all projectiles?
    • Engine modification:
      • Script access to throwframewait property. It is another excellent candidate for Free Variable use.
      • Script access to custom attack flash. Will greatly simplify and improve efficiency of spawning custom flash entities.

01112011

  • New function: debu0002 void <vEnt>
    • Uses script access of attack/bbox properties to display collision boxes during gameplay.
    • Includes temporary sub function shap0001() to perform draw actions.
  • Model updates:
    • Andy Bogard:
      • Updated collision boxes using new debug capability for following animations:
        • attack2
        • attack3
        • attack4
        • attack5
        • attack6
        • attack7
        • attackbackward
        • attackdown
        • attackup
        • block
        • blockpain
        • blockpain3
        • blockpain4
        • bpain
        • burn
        • cant
        • charge
        • chargeattack
        • death
        • duck
        • faint
        • fall
        • fall3
        • fall5
        • fall6
        • fall7
        • fall8
        • fall9
        • follow1
        • follow4
        • follow5
        • follow6
        • follow7 (switched to editor)
        • follow70
        • follow71
        • follow72
        • follow8
        • follow80
        • follow81
        • follow82
        • follow83
        • follow84 (Sidestep Up attack)
        • follow85
        • follow86
        • follow87
        • follow88 (check purpose)
        • follow89
        • follow92
        • forwardjump
        • freespecial
      • Consolidated death animations; removal of following:
        • death11
        • death6
        • death7
        • deaht8
      • Counter block impact remnant removal (long since replaced with dodge and parry).
        • follow2
      • Tall target alternate for Shiranui Spider Clutch removed. Updated bind allows auto adjusting to opponent’s height.
        • follow3

01122011

  • Model updates:
    • Andy Bogard:
      • Updated collision boxes using new debug capability for following animations:
        • freespecial10  (Shoryudan) *LF
        • freespecial12 (Zaneiken)
        • freespecial13 (Shippu Oken)
        • freespecial14 (Gen’ei Shiranui)
        • freespecial15 (Gen’ei Shiranui – Shimo Agito)
        • freespecial16 (Gen’ei Shiranui – Uwa Agito)
        • freespecial17 (Yami Abse Geri)
        • freespecial18 (Cho Reppa Dan)
        • freespecial19 (Bakushin)
        • freespecial2 (Plane Force Up)
        • freespecial21(Ku Bakushin)
        • freespecial3 (Plane force Down)
        • freespecial4 (Plane shift attack up)
        • freespecial40 (Low Step Attack)
        • freespecial41 (Low Dash Attack)
        • freespecial42 (Low Step Attack II – Low side kick)
        • freespecial43 (Low Step Attack III – Low palm strike)
        • freespecial5 (Plane shift attack Down)
        • freespecial6 (Hishoken)
        • freespecial7 (Geki Hishoken)
        • freespecial8 (Ku Ha Dan)
        • freespecial9 (Zaneiken)
        • get
        • grab
        • grabattack
        • grabattack2
        • grabbed
        • grabup
        • idle
        • idle2
        • idle3
        • idle4
        • jump
        • jumpattack
        • jumpsttack2
        • jumpsttack3
        • jumpdelay
        • jumpforward
        • jumpland
      • Low Dash Attack is now shoulder ram. Old low dash attack (a lunging low palm strike) will be used for SDM attack.

01132011

  • Model updates:
    • Andy Bogard:
      • Updated collision boxes using new debug capability for following animations:
        • pain
        • pain2
        • run
        • runattack
        • runjump
        • runjumpattack
        • runslide
        • slide
        • special2
        • walk
      • Sidesteps now have invincible start up.
    • Ray
      • Updated collision boxes using new debug capability for following animations:
        • attack1
        • attack2
        • attack3
        • attack4
        • attackbackward
        • attackdown
        • attackup
        • blockpain
        • blokcpain2
        • blockpain3
        • blockpain4
        • bpain
        • burn
        • chargeattack (wheel kick)
        • fall
        • fall2
        • fall3
        • fall5
        • fall8
        • fall9
        • slide
      • Renamed follow40 to Slide.

01172011

  • Color separation in progress for Ray model. Original model used 16 color sprites with white as a highlight and inappropriate color sharing. New color layout provides 64 colors, separated into individual groups for hair, skin, shirt, pants, gloves and shoes.
    • Complete:
      • aapa0000
      • aapa0011
      • 0001 through 0035

02092011

Free Variables

List of outdated or superfluous model and global level values used as script parameters in place of their intended purpose. The idea is simple enough: The variables exist in the engine anyway, so why not save a kilobyte or two and use them instead of adding more to a script?

*Used as normal otherwise.

  1. MP*
    • Projectile priority for obstacle types. See prjo0001() function.
  2. Throwdamage
    • Custom Subtype:
      • 0 = Human Male.
      • 1 = Human Female.
      • 2 = Mechanical.
      • 3 = Music change.
      • 21 = Default value.
  3. Speed*
    • Manual zoom adjustment for flash effects. See spawn0002.c script.
  4. Alpha*
    • Function draw0001() reads in entity’s current alpha setting and uses it as alpha/blend parameter when applying settings to setdrawmethod().
      • 12262010 – Removed. No longer needed as passing -1 to the alpha parameter of setdrawmethod() allows entity’s current alpha property to be used instead.
  5. Nodrop*
    • Flash effects pass random number from 0 through <nodrop> to ADROTATE (results in single random rotation on spawn).
  6. Flash
    • If <Noatflash> parameter is set ( != 0), Flash effects will spawn <Flash> model as a secondary effect. If <Noatflash> is not -1, the secondary model will have its animation set to follow+<Noatflash>. See spaw0002.c for details.
  7. Guardpoints
    • Parameter to identify and differentiate one shot entities (flash & dust) from each other. This allows a single spawn script to deal with most one shot entities and still treat them uniquely (i.e. a dust entity uses a splash animation when out of Z bounds in a beach stage, but a flash entity does not).
  8. Nodrop
    • Music Switching
      • Music text file stream column position marker. See musi0001() function.
  9. Aggression
    • Music switching
      • Music text file stream row position marker. See musi0001() function.
  10. Max Health
    • Music switching
      • Sound effect to play when music switch takes place. See musi0001() function.

Variants List

Listing of known global variants used in Golden Axe Remake. Many of these are holdovers from Utunnels original scripts and can be eliminated or replaced with value retrieval.

Note this is not an accurate count, as some name strings are created by inserting a relevant index to simulate an array. Binding, shadow trails, and auxiliary damage system all operate in this manor. The door spawn system appears to use a similar technique, but it is a carry over from Utunnels coding that I have not yet viewed in detail. I would also like to convert the names to Hungarian Notation, but for now I think best to leave them be.

  1. corpse
  2. adder
  3. snake
  4. inscreen
  5. a_npc
  6. p
  7. dummy
  8. al_npc
  9. wake
  10. smallexp_count
  11. largeexp_count
  12. bbdelay
  13. g_npc
  14. “player”+index+”mp” (index = player index)
  15. darkone
  16. sleep
  17. levelminz
  18. levelmaxz
  19. t_npc
  20. doorindex
  21. “doortimer”+ind (ind = door index. Unknown how index is assigned).
  22. “doorspawn”+index
  23. “dooralias”+index
  24. “doormap”+index
  25. release
  26. pal
  27. maxpal
  28. sdx
  29. sdz
  30. addtime
  31. darkskeleton
  32. “trailer”+k+”.s”
  33. “trailer”+k+”.x”
  34. “trailer”+k+”.z”
  35. “trailer”+k+”.a”
  36. “trailer”+k+”.f”
  37. “trailer”+k+”.c”
  38. “trailer”+k+”.color”
  39. “trailer”+k+”.alpha”
  40. “trailer”+k+”.m”
  41. pot0
  42. pot1
  43. runanimal
  44. bbdelay
  45. countdown
  46. cstring
  47. player0mp
  48. player1mp
  49. player2mp
  50. “pot”+(c%100)
  51. doortimer1
  52. doorspawn1
  53. doormap1
  54. doortimer2
  55. doorspawn2
  56. dooralias1
  57. dooralias2
  58. doormap2
  59. switch
  60. etime
  61. time1
  62. time2
  63. vSelf + “.bind.” + iIndex (grappling binds)
  64. “hit”+i+”.a”
  65. “hit”+i+”.c”
  66. “hit”+i+”.t”
  67. “hit”+i+”.d”
  68. “hit”+i+”.k”
  69. “hit”+i+”.o”
  70. debug_bind0010_iMode
  71. debug_bind0010_iIndex
  72. debug_bind0010_iPose
  73. debug_bind0010_iX
  74. debug_bind0010_iY
  75. debug_bind0010_iZ
  76. debug_bind0010_iDir
  77. debug_bind0010_iFrame
  78. debug_bind0010_Rebind

Select Screen Shenanigans

Original select screen in Golden Axe Remake was functional, but insufficient for needs of Golden Axe Hackjob. Primary concerns were the following:

  • Main selectable characters each having to accommodate for the others colors within their palettes. This severely limited color choices. For example, Ax could not be given the 2p color palette from Golden Axe The Duel. Doing so required changing his weapon colors, which were shared with Tyris Flare’s clothing.
  • No true carousel effect. While characters were displayed in a ring, they simply swapped location when cycled instead of rotating as in the arcade original.
  • No name display. At no point are characters ever identified. While not a great issue for the the original characters, this is a problem when introducing others.
  • No accommodation for extra characters. It would be rather jarring and unprofessional looking for alternate choices to be inserted into selection cycle when not appearing in “ring” of visible choices.
  • Non selected characters are “burned” when a choice is confirmed. The fire effect used lacks transparency and thematically does not match the various improved effects used throughout the module.

To solve this problem, I decided to use a series of blank silhouettes to serve as the carousel. As characters are cycled, the blank silhouettes rotate in place, then the front silhouette is replaced by current selection. This would allow infinite addition of selectable characters while maintaining the theme.

The original plan was for the silhouettes to be displayed by a separate entity, with rotation direction determined by left/right key press. Unfortunately scripted spawns during the selection screen results in a shutdown. Attempts to make use of the summonentity/spawnentity command also proved unsuccessful; during selection screen these commands are ignored.

This only left having the silhouettes be part of main entity. Main issue was adding a color for the silhouettes to characters with palettes firmly established. I worked around the problem by using the entry 255 in each character’s palette as the silhouette color. In addition to getting around the laborious process of “inserting” a color to existing palettes, it also meant only the palette images needed modification as opposed to every single sprite.

Having the silhouettes displayed within main entity also solved any timing issues, though it did mean rotation would always be in same direction. I was worried unidirectional rotation would look jarring, but in practice it works quite well. The rotation itself is achieved by a “brute force” approach; a series of sprites drawn to give the illusion of a carousel are played as part of the “wait” animation. The memory consumption is minimum however, as the rotating silhouette sprites are reused by every selectable character.

Name display is also part of the main entity, and its color issue was solved in the same manor, except with use of  color entry 254.

The burn effect was the last problem to overcome, but was easily solved. It is achieved by launching a non moving projectile on selection confirmation. While it would have been impossible to use this method for the silhouettes due to timing issues, it works perfectly for burning and allows use of transparency.

As a last touch, the location of each character was widened for more room and player 1 was placed in the center (this module allows 3 players). Player 2 is on the far left, player 3 on the far right. Along with improving aesthetics, by making these changes I have added yet another obstacle to any short sighted attempts at Dreamcast porting.

Bug List

Known Bugs/Issues:

Major

  • Characters cannot use jump attack while holding left/right. 07122010 – Direction key check, and by extension disabling of other keys was for both hold & press. Removed hold check.
  • Ax’s Powerbomb and Gutbuster always KO opponent regardless of remaining HP. 07122020 – Copy and paste errors switched drop and damage properties.
  • Enemy life meter remains on screen after being KO’d by Ax’s Piledriver. 07122010 – Damage and bind release were occurring on same frame.
  • Thieves do not giggle when idle. 07122010 – Old sound command was still in place. Replaced with soun0005() function.
  • Meat carrying thieves are not remapping to green. 07122010 – Alternate palettes were typo’d as “palette”.
  • Bad sound reference: Error, soun0009; Sample: – data/sounds/punch3.wav, Model: amachick. 07152010 – Caused by remnants of older sound scripts. Removed and replaced with current system.
  • Amazon never performs axe throw. 08082010 – Was previously disabled for debugging and never re-enabled.
  • While in throw bind, character can hit enemies as well as allies. This appears to be an engine bug with projectilehit property, but needs thorough review.
  • Wall fail-safe and wall throws triggering when on top of wall/platform. 08072010 – Fixed by adding check for current base of self for wall alt and bound for fail-safe.
  • Alex’s bow shot causing shutdown. Error reports attempting to set animation for effe0002, even though projectile is effe0001. 08072010 – Caused by combination of backward compatibility in projectile function and new select screen burn effect. If model level projectile is defined, script function projectile() ignores its own model parameter and uses model level projectile instead. Fixed by moving burn effect entity from model level to animation level.

Minor

  • Sound system, soun0005() in particular works as designed but is extremely sub optimal with several loops and no sanity clauses.
  • Characters hit by attacks when in throw bind appear very briefly out of place. Not technically a bug. It is due to large offsetting difference caused by small sprites and the need to keep actual locations well above ground while visually near, on, or in it. Resolved.

To Do:

  • Add headband to Ax Battler’s portrait (so color selection is visible during game play screen).
  • Add sound effect when picking up magic jars and food.
  • Auto platform jump working on improper animations.
  • Upgrade grappling scripts to new index based type.
  • Fix alternate attacks against thieves.
  • Fix collision boxes for rise attack.
  • Second attack in attack string not hitting at very close range.
  • Add wall alts for grappling.
  • Upgrade weapon models to new standard.
  • Fix palettes to allow remapping.
  • Replace particle effects for magic.
  • Upgrade sound effects to new random based script type.
  • Add startframe and landframe to RUNATTACK.
  • Add grab alternate to special.
  • Replace flashing based shock and burn animations with remap + particle effect.
  • Add dust effect to jumps and landings.
  • Add jump grappling options.
  • Replace old forward throw with powerbomb.