Editing DECORATE state syntax

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 19: Line 19:
           <tics> := [0-9]+
           <tics> := [0-9]+
           <flagslist> := <flag><flagslist>
           <flagslist> := <flag><flagslist>
             <flag> := "bright" | "fast" | "offset" '(' <x> ',' <y> [',' "interpolate"] ')' | nil
             <flag> := "bright" | "fast" | nil
           <action> := <name>
           <action> := <name>
                     | <name> '(' <arglist> ')'
                     | <name> '(' <arglist> ')'
Line 92: Line 92:
*''frame_letters'': this is one or more letters corresponding to the sprite frame index. Include more than one letter if you want a sequence of frames with the same properties (duration, flags and action).
*''frame_letters'': this is one or more letters corresponding to the sprite frame index. Include more than one letter if you want a sequence of frames with the same properties (duration, flags and action).
*''tics'': the duration, in tics (1/35 seconds), of each frame. Do not use value 0 in loops. Setting value -1 will cause the thing to stop at that frame, without going forward.
*''tics'': the duration, in tics (1/35 seconds), of each frame. Do not use value 0 in loops. Setting value -1 will cause the thing to stop at that frame, without going forward.
*''flags_list'': zero or more flags, separated by spaces. The flags can be:
*''flags_list'': zero or more flags, separated by spaces. Currently the flags are '''bright''', which causes the sprite to be full bright in any place, and '''fast''', which makes the frame take half as long on fast skill levels (used in Doom by the demons).
**'''bright''': causes the sprite to be full bright in any place;
**'''fast''': makes the frame take half as long on fast skill levels (used in Doom by the demons);
**'''offset'''(''x'', ''y''[, '''interpolate''']): useful for weapon HUD sprites, causes the image to be offset by the exact amount of ''x'' and ''y'' from the center-bottom, overriding the current bob amount. Under Doom, ''x'' must be nonzero for both offsets to have effect; under other games, each of them needs to be nonzero for each of them to have effect — otherwise the offset will be preserved from the previous frame. You can override the 0 condition choice (Doom/non-Doom) in [[gameproperties]]. Beware that ''y'' has the origin at 32. An offset of (0, 32) keeps the weapon at the origin, but because of Doom's rules, you may need to have (1, 32) or (-1, 32) instead. Do note that this '''offset''' vector has been available in vanilla Doom as well, modifiable under [[DeHackEd]], and it is the same thing as the '''misc1''' and '''misc2''' [[frame]] fields, which means these work as parameters for several [[MBF]] [[codepointers]]. However, currently you cannot use strings or other expressions in ''x'' and ''y'', unlike when using the full '''frame''' section or the '''cmp''' specifier. In the classic games original designs, only Hexen has used '''offset''', in order to animate its melee weapons.
::If '''interpolate''' is added, it causes the movement between offsets to be smooth. By default interpolation is disabled when '''offset''' is specified.
*''action'': this can be a [[List of codepointers|codepointer]], optionally followed by a list of arguments enclosed by parentheses. Make sure to include strings in double quotes (""). Conventionally, from ZDoom, and based on the Doom source code in general, codepointers are prefixed with '''A_''', but it is not required here.
*''action'': this can be a [[List of codepointers|codepointer]], optionally followed by a list of arguments enclosed by parentheses. Make sure to include strings in double quotes (""). Conventionally, from ZDoom, and based on the Doom source code in general, codepointers are prefixed with '''A_''', but it is not required here.


Line 102: Line 98:
Some codepointers, such as [[CounterJump]], [[Jump]] and so on let the calling thing jump to specific frames. For the frame name parameter, just use the label name.
Some codepointers, such as [[CounterJump]], [[Jump]] and so on let the calling thing jump to specific frames. For the frame name parameter, just use the label name.


The MBF-based [[RandomJump]] uses the '''misc1''' and '''misc2''' frame fields as parameters. Since the DECORATE style syntax currently only supports '''misc1''' and '''misc2''' through the '''offset''' specifier, you are better off using [[Jump]], which uses args, is based on ZDoom's implementation and only works for DECORATE state syntax. Other codepointers, such as [[CounterJump]], work well both for non-DECORATE and DECORATE syntax. Certain codepointers such as [[CounterSwitch]] aren't designed for DECORATE state syntax however.
The MBF-based [[RandomJump]] uses the '''misc1''' and '''misc2''' frame fields as parameters. Since the DECORATE style syntax currently doesn't support '''misc1''' and '''misc2''', you have to use [[Jump]], which uses args, is based on ZDoom's implementation and only works for DECORATE state syntax. Other codepointers, such as [[CounterJump]], work both for non-DECORATE and DECORATE syntax. Certain codepointers such as [[CounterSwitch]] aren't designed for DECORATE state syntax however.


===Keywords===
===Keywords===
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: