Editing EDF state reference
From Eternity Wiki
Jump to navigationJump to search
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 1: | Line 1: | ||
The Frame EDF block allows definition of each individual actor frame in Eternity, independent from the thing types. Frames are commonly referred to by name in the [[thingtype]] definitions. Their data structure resembles the Dehacked "Frame" block, but is expanded upon, and uses different keywords. | The Frame EDF block allows definition of each individual actor frame in Eternity, independent from the thing types. Frames are commonly referred to by name in the [[thingtype]] definitions. Their data structure resembles the Dehacked "Frame" block, but is expanded upon, and uses different keywords. | ||
{{see|List of codepointers}} | {{see|List of codepointers}} | ||
{{see|DECORATE state syntax}} | {{see|DECORATE state syntax}} | ||
{{backto|EDF}} | {{backto|EDF}} | ||
=Syntax= | |||
==Expanded form== | |||
The following is the expanded, uncompressed frame definition. It is seldom needed to be specified this way in Eternity, unless [[delta structures]] are employed, which use these keywords. Instead, the compressed frame definitions are preferred. | The following is the expanded, uncompressed frame definition. It is seldom needed to be specified this way in Eternity, unless [[delta structures]] are employed, which use these keywords. Instead, the compressed frame definitions are preferred. | ||
Line 22: | Line 20: | ||
particle_event <particle event identifier> | particle_event <particle event identifier> | ||
args { <argument value>, ... } | args { <argument value>, ... } | ||
+ | +decorate | ||
dehackednum <integer unique number> | dehackednum <integer unique number> | ||
} | } | ||
==Compressed form== | |||
This form allows frames to be conveniently written on one line without becoming difficult to read. | This form allows frames to be conveniently written on one line without becoming difficult to read. | ||
frame <unique mnemonic> {cmp "sprite|frame|bright|tics|action(arg, ...)|nextframe|p_event|misc1|misc2"} | frame <unique mnemonic> {cmp "sprite|frame|bright|tics|action(arg, ...)|nextframe|p_event|misc1|misc2"} | ||
Line 37: | Line 33: | ||
Note that dehackednum is not supported inside the '''cmp''' field, but unless Dehacked patch support is intended, it's not required. | Note that dehackednum is not supported inside the '''cmp''' field, but unless Dehacked patch support is intended, it's not required. | ||
===Examples=== | |||
''These frames do not exist in the original game and are only referenced for example purposes'' | ''These frames do not exist in the original game and are only referenced for example purposes'' | ||
Line 45: | Line 41: | ||
frame monster_thinkdecide {cmp "MONS|D|*|0|[[RandomJump]]|monster_withdraw|*|monster_engage|100"} | frame monster_thinkdecide {cmp "MONS|D|*|0|[[RandomJump]]|monster_withdraw|*|monster_engage|100"} | ||
Here, the frame takes 0 tics, as it uses a frame-scripting action (see the '''tics''' description), the next frame is explicitly named (so this definition can be placed anywhere in the file), and the '''misc1''', '''misc2''' parameters of RandomJump are specified individually - see below. | Here, the frame takes 0 tics, as it uses a frame-scripting action (see the '''tics''' description), the next frame is explicitly named (so this definition can be placed anywhere in the file), and the '''misc1''', '''misc2''' parameters of RandomJump are specified individually - see below. | ||
==Fields== | |||
*'''sprite''' | *'''sprite''' | ||
:Default: BLANK | :Default: BLANK | ||
Line 73: | Line 67: | ||
:Default: 0 | :Default: 0 | ||
:This is the first argument, used by certain [[list of codepointers|codepointers]] which were inherited from MBF, see their enumeration above. | :This is the first argument, used by certain [[list of codepointers|codepointers]] which were inherited from MBF, see their enumeration above. | ||
*'''misc2''' | *'''misc2''' | ||
:Default: 0 | :Default: 0 | ||
:This is the second argument used by some MBF inherited codepointers. | :This is the second argument used by some MBF inherited codepointers. | ||
*'''particle_event''' | *'''particle_event''' | ||
:Default: pevt_none | :Default: pevt_none | ||
Line 91: | Line 83: | ||
*'''+decorate''' | *'''+decorate''' | ||
:This keyword, if included in the frame definition, will let the parser know that this frame is part of a sequence of externalized [[DECORATE state syntax|Decorate]]-defined frames from the '''states''' heredoc of [[thingtype]], starting from the one declared by '''firstdecoratestate''' of [[thingtype]]. | :This keyword, if included in the frame definition, will let the parser know that this frame is part of a sequence of externalized [[DECORATE state syntax|Decorate]]-defined frames from the '''states''' heredoc of [[thingtype]], starting from the one declared by '''firstdecoratestate''' of [[thingtype]]. | ||
*'''dehackednum''' | *'''dehackednum''' | ||
:Default: -1 | :Default: -1 | ||
:Specifies what number to be used if Dehacked patches are used to tweak the gameplay defined by an EDF code. Safe user values are greater than or equal to 10000. | :Specifies what number to be used if Dehacked patches are used to tweak the gameplay defined by an EDF code. Safe user values are greater than or equal to 10000. | ||
---- | ---- | ||
''Back to [[Editing reference]]'' | ''Back to [[Editing reference]]'' | ||
[[category:EDF]] | [[category:EDF]] |