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.
- 2010_09_15 – Fatal Fury Chronicles
- Authored.
- 2011_02_25 – Golden Axe The Hackjob
- Import from Fatal Fury Chronicles.
z_blank
Blank script file. Allows @cmd tags with entities that do not need user defined functions.
- 2007_01_01 – Fatal Fury Chronicles
- Authored in Fatal Fury Chronicles.
- 2010_07_12 – Golden Axe The Hackjob
- Import from Fatal Fury Chronicles.
z_block
Universal didblockscript event script.
- 2010_09_11 – Fatal Fury Chronicles
- Authored.
- 2011_02_25 – Fatal Fury Chronicles
- Call reference updated to reflect name change of bloc0001 to z_block.
z_blocka
Universal onblockascript event script.
- 2010_09_12 – Fatal Fury Chronicles
- Authored.
z_datk
Universal ondoattackscript event script.
- 2010_12_31 – Fatal Fury Chronicles
- Authored.
- 2010_02_25 – Fatal Fury Chronicles
- Code moved to and replaced with call for z_datk function.
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.
- 2009_10_09 – Fatal Fury Chronicles
- Authored.
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.
- 2010_04_03 – Golden Axe The Hackjob
- Authored.
- 2011_06_19 – Golden Axe The Hackjob
- Correct typo causing alternate attempt to take place when no animation was available.
ani0016
Perform alternate animation if target is rising or performing a rise attack.
- 2008_xx_xx – Golden Axe The Hackjob
- Authored. Exact date unknown.
- 2011_03_28 – Golden Axe The Hackjob
- #Defined constants.
- General cleanup.
ani0020
Wrapper to perform animation when triggered by key script.
- 2011_06_27 – Golden Axe The Hackjob
- Authored.
bind0010
Primary grapple binding function. Binds and sets target entity into desired pose, or sets position and releases.
- 2008_12_21 – Fatal Fury Chronicles
- Authored.
- 2011_04_21 – Golden Axe The Hackjob
- Minor touch up and commenting.
- 2011_06_29 – Golden Axe The Hackjob
- Added iState parameter to deal with various forms of falling and projectile status. This resolves issue where grappled target would not hit opponents or would unintentionally hit allies.
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.
- 2010_05_02 – Golden Axe The Hackjob
- Authored.
- 2011_06_08 – Golden Axe The Hackjob
- No longer attempts warping to location of previous entity that is off screen.
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.
- 2010_05_15 – Fatal Fury Chronicles
- Authored from remnants of wall fail-safe used in Golden Axe The Hackjob.
- 2011_07_22 – Golden Axe The Hackjob
- Add check to prevent loop freeze when inside a pit.
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_02 – Fatal Fury Chronicles
- Authored.
- 2011_07_19 – Golden 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.
- 2010_09_07 (.pdf) – Golden Axe The Hackjob
- Authored.
- 2011_04_03 – Golden Axe The Hackjob
- Screen offset adjustment.
- Has received several other revisions since first version.
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.
- 2011_03_29 – Golden Axe The Hackjob
- 2012_08_30 – Golden Axe The Hackjob
- Spelling in comments. Link to catalog.
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).
- 2011_03_29 – Golden Axe The Hackjob
- Minor cleanup.
- 2012_09_01 – Golden Axe The Hackjob
- Spelling in comments. Link to catalog.
draw0003
Assign a group of draw method parameters to model, to be applied by draw0001.
- 2011_03_29 – Golden Axe The Hackjob
- Combined constant list.
- Minor cleanup.
ht0001
Returns entity’s current height, including current draw adjustment.
- 2010_12_15 – Fatal Fury Chronicles
- Authored.
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.
- 2011_02_14 – Golden Axe The Hackjob
- Authored.
- 2011_02_17 – Golden Axe The Hackjob
- Options to only switch model or weapon. If “main” passed for model, folder name is used.
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_29 – Golden 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.
- 2011_01_01 – Fatal Fury Chronicles
- Authored.
- 2011_02_25 – Golden Axe The Hackjob
- Import from Fatal Fury Chronicles.
path0001
Returns full path of passed entity, minus file name.
- 2010_06_18 – Fatal Fury Chronicles
- Authored.
- 2011_02_14 – Golden Axe The Hackjob
- Import from Fatal Fury Chronicles.
- 2011_04_03 – Golden Axe The Hackjob
- Cleanup and commenting.
path0002
Returns folder of passed entity.
- 2011_02_14 – Golden Axe The Hackjob
- Authored.
rnd0001
Generate random numbers.
Replaced by Eggball library.
run0001
Simple “stop running” function useful for adding a controllable dash movement.
- 2007_11_03 – Fatal Fury Chronicles
- Authored.
soun0005
Sound catalog and player. Catalogs sounds by tiers and selects sound from group at random. :
- entity/sounds folder
- global sounds/throwdamage
- global sounds
May also play specific sound from group if needed.
- 2010_07_02 – Golden Axe The Hackjob
- Authored. Has received minor updates.
- 2011_04_03 – Golden Axe The Hackjob
- Comment updates.
soun0009
Sound effect wrapper. Verify sample and last play time, then play sample with location based stereo effect.
- 2010_07_02 – Fatal Fury Chronicles
- Authored. Has received several small updates.
- 2011_04_03 – Golden Axe The Hackjob
- Minor comment updates.
velo0001
Wrapper for velocity control.
- 2007_05_06– Illusion And The Falcon
- Authored.
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_22 – Golden 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.
- 2010_12_31 – Fatal Fury Chronicles
- Authored as bloc0001.
- Proximity blocking.
- Authored as bloc0001.
- 2011_02_25 – Fatal Fury Chronicles
- Rename from bloc0001.
z_datk
Universal ondoattack function.
- 2011_02_25 – Fatal Fury Chronicles
- Export from z_datk.c event script.
- Parry functionality.
- Export from z_datk.c event script.
z_spawn
Universal onspawn event function.
- 2011_03_14 – Golden Axe The Hackjob
- Export from z_spawn.c.
- 2011_03_15 – Golden Axe The Hackjob
- #defined constants.
- Logging commented out and some general cleanup.
Hello.DC.
I’m Volcanic.
Like your work very much.
Thank you for the share of your scripts which are very useful to me.
And the recent script ondoattack you added is a charm.
No problem, I’m glad you found them useful! This is only a very tiny portion of my catalog, so as time goes on, there should be plenty more added here.
DC
Update:
constants
ani0014
Hi Damon,
I’m wondering if there is key0006.h available because I have debu0001(.h?) and bind0010.h (#included) ready for slam test. I find your scripts very useful after I’ve learned a lot about scripts, though I have not tried them and am very late to participate in learning them myself (which I should’ve done before).
I noticed some of the links are broken. Is it because some of them are outdated?
I did some reorganizing and that might have broke a few things here and there. That said, most of the scripts here ARE out of date. They are in sore need of a rewrite and one is currently in progress.
Thanks for the response. It seems that key0006.h is probably outdated I assume, though my main concern was about the use of key0006.h only. I look forward to see more updates on the script catalog.