My fork of Stratagus https://github.com/Wargus/stratagus
Definition of animation variable: v_<unit_variable.tag>, where unit_variable - any variable(you can also use user defined variables) of the current unit, tag - variable's tag(Value,Max,Increase,Enable,Percent). Example: v_HitPoints.Value Percent returns the proportion between Value and Max in range 0..100 t_<unit_variable.tag> - same as previous, but refers to unit's current goal unit(target in attack animation, mine in resource etc.). If goal doesn't exist, returns 0. p_<playernum.property[.argument]> - where playernum - player's number(you can use "this" to refer the unit's player), property - player's property(see the GetPlayerData function for more information), optional <argument> - specifies the property's argument(need for resources and unit-types) Examples: p_1.TotalUnitLimit p_this.Resources.gold r_<value> - returns the random value between 0 and <value> Though if vaiable couldn't be reconized, game will try to convert it into integer constant(0 will be returned if convertation fails). [+]New actions in animations: (modified) "spawn-missile <missile-type> <startx> <starty> <destx> <desty> <flags>" - spawns <missile-type> relative to the current unit adding <startx> and <starty> to position. <destx> and <desty> specify the missile's destination point. Could be used as more configurable replacement to the standard "attack" action. <flags> used to configure the action, you should specify it separated by points: "damage" - missile will generate damage, values are taken from the action unit. "totarget" - missile will ignore <destx> and <desty> and will fly to unit's current goal. "pixel" - missile will use pixel coordinates instead of tile coordinates, useful for more accurate missile placing. "reltarget" - the source of missile will be the unit's current target, so all parameters will be calculated depending of target's parameters, not source's(even the "totarget" will shot the missile back to source unit). Through the damage parameters are always taken from the source unit. "ranged" - missile will check the current max and min attack ranges from the unit("reltarget" inverses logic) "spawn-unit <unit-type> <offx> <offy> <range> <player>" - spawn <unit-type> relative to the current unit adding <offx> and <offy> to position. <range> specifies the maximum distatnce from the source unit. Example: "spawn-unit unit-something 2 1 v_AttackRange.Value this" "if-var <lvalue> <rvalue> <condition> <state>" - jump animation frame to label <state>, if <lvalue> is <condition> to <rvalue> Possible conditions are: 1 - greater or equal 2 - greater 3 - less or equal 4 - less 5 - equal 6 - not equal Example: this code will show different animation frames depending of unit's current health: Still = {"if-var v_HitPoints.Percent 50 3 damaged50", "frame 0", "wait 1", "frame 0", "wait 1","goto end", "label damaged50", "frame 1", "wait 1", "frame 1", "wait 1", "label end"} "set-var <var> <mod> <value>" - sets the current unit's <var> variable. <mod> specifies, how should be <value> applied to <var>: 1 - <value> will be added to <var>'s current value. 2 - <value> will be subtracted from <var>'s current value. 3 - <var>'s current value will be multiplied to <value>. 4 - <var>'s current value will be divided to <value>. 5 - <var>'s current value will be divided to <value> and remainder will be taken as value. Warning: if <value> = 0 in 4 and 5, the game will bomb out with a error. "set-player-var <player> <var> <value> <mod>[ <argument>]" - sets the <player>'s <var>. The <value> and <mod> are used same as in set-var. Optional <argument> - specifies the <var>'s argument(need for resources and unit-types) "die[ <deathtype>]" - causes unit to die. If <deathtype> is set, unit will play his extra death animation depending on <deathtype>, if he has one. [-]Health states in animations are removed, should use "if-var" animation to do this. Patch frpm Cybermind |
||
---|---|---|
.bzr-builddeb | ||
cmake/modules | ||
debian | ||
doc | ||
gameheaders | ||
metaserver | ||
po | ||
src | ||
tools | ||
.bzrignore | ||
CMakeLists.txt | ||
COPYING | ||
README |
________________________________README_________________________________ _________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine Read 'doc/index.html' for general information and license information. Read 'doc/install.html' for Stratagus installation instructions. Read 'doc/changelog.html' for the Stratagus changelog.