It's new release time everyone! We've a whole ton of changes this time around.
Bug Fixes & Technical
New Features & Updates
Line Item Commands Examples
Here is an example of the line item command system in action. As you can see, in the new version below it is far easier to understand what's going on. Unused parameters are simply ignored, rather than requiring a fake value to be inserted. Order of the commands is irrelevant - arrange them however you like.
For non coders who might worry the large amount of text means more memory used on their favorite platforms - it doesn't work that way. Only the values themselves go into memory, not the text. The new version uses exactly the same amount of memory to load as the old one does. It's simply easier to read for humans and more tenable for us to maintain compatibility going forward.
As time goes on, all new commands will be built with this line item style, and legacy commands will receive updates to support them.
Old method:
New method:
Download
Bug Fixes & Technical
- Clean up and simplify Android video code.
- Add libvpx to Android port.
- Build with MinGW toolchain installed in C:/MinGW if available.
- Android: migrate from libvorbis to tremor.
- Android port 1.4.2
- Fixed all dependencies (source and includes) in Android.mk especially WebM support.
- Test compile worked as it should and, as shown on logs, WebM was detected and is not played.
- Nuke savedata.screen. All of the code using it was confusing to read, and it was broken for custom resolutions (videoMode==255).
- Android: add WebM support and compile with -Werror like the other platforms.
- Recompile libvorbisidec (aka tremor) for Android with proper optimizations.
- Use safe allocation functions for memory allocations. These are thin wrappers around malloc, realloc, etc. that write to the log and exit if an allocation fails, so the caller doesn't have to check whether the returned value is NULL.
- Include globals.h in commands.c.
- ImportCache no longer depends directly on openborscript.c.
- Fix credit bug. Credit count was not being carried across saved games.
- Fixed getentityproperty( {ent}, "aiflag", "walking" ) flag.
- Fixed nograb reset on setidle().
- Fixed bug in searchList(LIST, propname, MAXINDEX). Old one commented and replaced with a new searchList() based on binarySearch. Slightly more complex computation but faster and no bugs.
- Fixed NOSAME bug.
- Fixed strange speedy effect when engine changes continuously lasthitc variant.
- Fixed blocking when using an alternate model (weapon).
New Features & Updates
- ALL animation properties, including collision box data and the associated sub properties (attack/bbox) are now open to script. This is a truly massive addition. Documentation the various properties is in progress. Special thanks to White Dragon for getting this one finished for us!
- New attack box property: {Tag} - Does absolutely nothing on its own (which is the point). Use this to add special flags or tags to attacks that can assist you in scripting.
- Commands with multiple parameters are being broken down into single line items. This will make text files more readable and easier to debug. It will also help to "future proof" commands and avoid conflicts as we go forward. Text examples will be provided below.
- bbox {x} {y} {width} {height} {z}
- bbox.index - Nothing currently. This is in place for future support of multiple bboxes.
- bbox.position.x - See bbox {x}.
- bbox.position.y - See bbox {y}.
- bbox.size.x - See bbox {width}.
- bbox.size.y - See bbox {height}.
- bbox.size.z.1 - See bbox {z1}.
- bbox.size.z.2 - Depth of bbox toward player. When this is defined, z.1 becomes depth into screen.
- attack{#} {x} {y} {right} {down} {damage} {power} {block} {noflash} {pausetime} {z}
- attack.block.cost - See guardcost.
- attack.block.penetrate - See attack{#} {block}.
- attack.counter - See counterattack.
- attack.damage.force - The attack's standard damage output.
- attack.damage.land.force - damageonlanding {value}
- attack.damage.land.mode - damageonlanding {type}
- attack.damage.lethal.disable - This attack cannot finish off the target - only reduce it to 1 HP.
- attack.damage.recursive.force - See DOT {force}.
- attack.damage.recursive.index - See DOT {index}.
- attack.damage.recursive.mode - See DOT {mode}.
- attack.damage.recursive.rate - See DOT {rate}.
- attack.damage.recursive.time - See DOT {time}.
- attack.damage.steal - Damage done by this attack will be added to attackers HP.
- attack.damage.type - Sets attack type. Same as {#} in attack{#}
- attack.effect.block.flash.model - See blockflash.
- attack.effect.block.sound.path - Path to sound that will play when this attack is blocked.
- attack.effect.hit.flash.disable - See noflash.
- attack.effect.hit.flash.model - See hitflash.
- attack.effect.hit.flash.sound - See hitfx.
- attack.index - Currently no effect. This is for future support of multiple attack boxes.
- attack.ground.mode - See otg.
- attack.map.index - See forcemap {map}.
- attack.map.time - See forcemap {time}.
- attack.position.x - See attack{#} {x}.
- attack.position.y - See attack{#} {y}.
- attack.reaction.fall.force - See attack{#} {power}.
- attack.reaction.fall.velocity.x - See dropv {speedx}.
- attack.reaction.fall.velocity.y - See dropv {speedy}.
- attack.reaction.fall.velocity.z - See dropv {speedz}.
- attack.reaction.freeze.mode - Freeze target (requires freezetime). Set forcemap = -1 to apply target's fmap.
- attack.reaction.freeze.time - Time target remains frozen.
- attack.reaction.invincible.time - Time to remain invincible after hit.
- attack.reaction.reposition.direction - See forcedirection.
- attack.reaction.reposition.distance - See grabin {distance}.
- attack.reaction.reposition.mode - See grabin {mode}.
- attack.reaction.pain.disable - See noreflect.
- attack.reaction.pause.time - See attack{#} {pausetime}.
- attack.seal.cost - See seal {energy}.
- attack.seal.time- See seal {time}.
- attack.size.x - See attack{#} {width}.
- attack.size.y - See attack{#} {height}.
- attack.size.z.1 - See attack{#} {z}.
- attack.size.z.2 - Depth of bbox toward player. When this is defined, z.1 becomes depth into screen.
- attack.staydown.rise.time - See staydown {rise}.
- attack.staydown.attack.time - See staydown {riseattack}.
- attack.tag - Neutral integer value not utilized by engine in any way. Use this to add your own custom tags or flags to an attack box for scripting. Protip: OpenBOR script supports bitwise logic - you can store a LOT of information in a single integer if you are careful and plan ahead.
running {speed} {height} {length} {move} {land}- run.jump.continue - See running {land}.
- run.jump.x - See running {length}.
- run.jump.y - See running {height}.
- run.speed.x - Defines running speed, but works like {speedf}. That is to say, float values are accepted and the actual value is applied directly to model's run speed.
- run.move.z - See running {move}.
- bbox {x} {y} {width} {height} {z}
- New default sample: pause.wav . Played when pausing. If the file does not exist beep2.wav will play instead.
- New math functions
- pow({double}, {double})
- asin({double})
- acos({double})
- atan({double})
- ssin({double}) // Not approximated.
- scos({double}) // Not approximated.
- New openborvariant("cheats") - TRUE if cheats are activated, otherwise FALSE.
- Nosame updated.
NOSAME 1
NOSAME 1 2
NOSAME 0 2
The second flag is for color map index. If active it will skip same map ONLY for same players.
- bindentity() updated. Partial binding is now possible. Pass NULL() to any axis you do not want to bind.
- New event script: onblockpscript. Works identically to onblockwscript, but for platforms. Provides the following local vars: self, plane, platform entity.
- New function checkplatformabove({x}, {z}, {y}) - Returns entity pointer of the lowest platform above {y}.
- New function checkplatformabove({x}, {z}, {y_min}, {y_max}) - Returns entity pointer of the first platform between {y_min} and {y_max}.
- Array support updates:
- Decreased size, including for string keyed arrays.
- add({array}, {index}, {value}) - Dynamically increment an array element.
- delete({array}, {index}) - Dynamically remove an array element.
- Filestream updates:
- 3th param for getfilestreamargument({0}, {0}, {"byte"}) to read byte from file.
- 4th param for filestreamappend({savefile}, {200}, {2}, {"byte"}) to write byte from file.
- 4th and 5th params for savefilestream({savefile}, {"testwrite.txt"}, {0}, {path}, {byte}) to save the filestream.
- {path} - Defines custom path to save file.
- {byte} - Write byte write (no newline at EOF)
Line Item Commands Examples
Here is an example of the line item command system in action. As you can see, in the new version below it is far easier to understand what's going on. Unused parameters are simply ignored, rather than requiring a fake value to be inserted. Order of the commands is irrelevant - arrange them however you like.
For non coders who might worry the large amount of text means more memory used on their favorite platforms - it doesn't work that way. Only the values themselves go into memory, not the text. The new version uses exactly the same amount of memory to load as the old one does. It's simply easier to read for humans and more tenable for us to maintain compatibility going forward.
As time goes on, all new commands will be built with this line item style, and legacy commands will receive updates to support them.
Old method:
Code:
# Old method.
attack 90 68 60 34 4 0 0 0 10
dropv 3.5 1.5
frame data/chars/dude/sprite.png
New method:
Code:
# New method.
attack.position.x 90
attack.position.y 68
attack.size.x 60
attack.size.y 34
attack.damage.force 4
attack.reaction.fall.velocity.x 1.5
attack.reaction.fall.velocity.y 3.5
attack.reaction.pause.time 10
frame data/chars/dude/sprite.png
Download