Editing EDF thing 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 6: | Line 6: | ||
For placing the thing on the map, an integer field called '''doomednum''' must be specified. For forward compatibility it has to be greater than or equal to 20000 or in the 3000-3999 range. Due to how binary WAD files format their THINGS lumps, '''doomednum''' values have to be less than 32767, though textmode representations such as [[ExtraData]] or UDMF solve this limit. | For placing the thing on the map, an integer field called '''doomednum''' must be specified. For forward compatibility it has to be greater than or equal to 20000 or in the 3000-3999 range. Due to how binary WAD files format their THINGS lumps, '''doomednum''' values have to be less than 32767, though textmode representations such as [[ExtraData]] or UDMF solve this limit. | ||
{{See|Thing type flags}} | {{See|Thing type flags}} | ||
{{Backto|EDF}} | {{Backto|EDF}} | ||
==Syntax== | ==Syntax== | ||
thingtype <unique name> | thingtype <unique name> | ||
{ | { | ||
doomednum <number> | doomednum <number> | ||
dehackednum <unique number> | dehackednum <unique number> | ||
inherits <thingtype> | inherits <thingtype> | ||
basictype <basic type qualifier> | basictype <basic type qualifier> | ||
spawnstate <frame> | spawnstate <frame> | ||
seestate <frame> | seestate <frame> | ||
Line 51: | Line 32: | ||
xdeathstate <frame> | xdeathstate <frame> | ||
raisestate <frame> | raisestate <frame> | ||
crashstate <frame> | crashstate <frame> | ||
activestate <frame> | activestate <frame> | ||
Line 65: | Line 45: | ||
spawnhealth <number> | spawnhealth <number> | ||
reactiontime <number> | reactiontime <number> | ||
painchance <number> | painchance <number> | ||
Line 79: | Line 58: | ||
damage <number> | damage <number> | ||
dmgspecial <dmgspecial name> | dmgspecial <dmgspecial name> | ||
damagefactor <damage type>, <floating point number> | damagefactor <damage type>, <floating point number> | ||
damagefactor <damage type>, <floating point number> | damagefactor <damage type>, <floating point number> | ||
... | ... | ||
Line 94: | Line 72: | ||
nukespecial <BEX codepointer mnemonic> | nukespecial <BEX codepointer mnemonic> | ||
droptype <thing type mnemonic> | droptype <thing type mnemonic> | ||
cflags <flag list> | cflags <flag list> | ||
Line 115: | Line 80: | ||
flags3 <flag list> | flags3 <flag list> | ||
flags4 <flag list> | flags4 <flag list> | ||
particlefx <particle effect flag list> | particlefx <particle effect flag list> | ||
translucency <number OR percentage> | translucency <number OR percentage> | ||
translation <number OR translation table lump name> | translation <number OR translation table lump name> | ||
skinsprite <sprite> | skinsprite <sprite> | ||
defaultsprite <sprite> | defaultsprite <sprite> | ||
Line 129: | Line 92: | ||
acs_spawndata {num <number> modes <mnemonic>} | acs_spawndata {num <number> modes <mnemonic>} | ||
'''states''' <[http://zdoom.org/wiki/DECORATE DECORATE]-like heredoc> | |||
} | } | ||
===Explanation of fields=== | ===Explanation of fields=== | ||
Line 147: | Line 99: | ||
:Default = -1 | :Default = -1 | ||
:The identification number, which makes this actor type placeable in maps. Zombieman monsters for example have '''doomednum''' 3004. Objects which don't need to be placed on the map can have '''doomednum''' -1. For EDF, recommended numbers are in the ranges 3000-3999 and 20000 up. Other numbers may be used by future versions of Eternity, so they're not safe to use. | :The identification number, which makes this actor type placeable in maps. Zombieman monsters for example have '''doomednum''' 3004. Objects which don't need to be placed on the map can have '''doomednum''' -1. For EDF, recommended numbers are in the ranges 3000-3999 and 20000 up. Other numbers may be used by future versions of Eternity, so they're not safe to use. | ||
*'''dehackednum''' | *'''dehackednum''' | ||
:Default = -1 | :Default = -1 | ||
:Fake array index number, for Dehacked patch (BEX or DEH file) compatibility. It has to be an unique number if not -1. Safe numbers are from 10000 up. | :Fake array index number, for Dehacked patch (BEX or DEH file) compatibility. It has to be an unique number if not -1. Safe numbers are from 10000 up. | ||
*'''inherits''' | *'''inherits''' | ||
:Default = (nothing) | :Default = (nothing) | ||
:Sets the thing type from which this will copy properties. All of the properties except '''dehackednum''' will be copied from the base actor type. | :Sets the thing type from which this will copy properties. All of the properties except '''dehackednum''' will be copied from the base actor type. | ||
*'''basictype''' | *'''basictype''' | ||
:Default = (nothing) | :Default = (nothing) | ||
Line 234: | Line 179: | ||
====States==== | ====States==== | ||
*'''states''' | *'''states''' | ||
:Default = nothing | :Default = nothing | ||
:Defines frames using [http://zdoom.org/wiki/DECORATE DECORATE]-style state definitions. This means it won't be necessary to define separate [[frame]] blocks for each individual frame. See the DECORATE reference at the ZDoom wiki for documentation on its syntax. Using the '''states''' field instead of any of the ones below results in more concise text, but also the newly created frames won't be accessible from outside (other thingtypes, Dehacked patches or delta structures) | :Defines frames using [http://zdoom.org/wiki/DECORATE DECORATE]-style state definitions. This means it won't be necessary to define separate [[frame]] blocks for each individual frame. See the DECORATE reference at the ZDoom wiki for documentation on its syntax. Using the '''states''' field instead of any of the ones below results in more concise text, but also the newly created frames won't be accessible from outside (other thingtypes, Dehacked patches or delta structures). Also, note that [[List of codepointers|codepointers]] have to be preceded by '''A_'''. The '''misc1''' and '''misc2''' parameters must be represented by the syntax '''offset'''(''misc1'',''misc2''). The DECORATE code has to be implemented via a heredoc: a text string that spans on multiple lines. Unlike a regular string which uses quotation marks, the heredoc is marked by @" and "@ respectively. Example on an imp-like monster (the '=' sign is optional): | ||
states = | states = | ||
@" | @" | ||
Line 263: | Line 205: | ||
TROO L 6 A_Fall | TROO L 6 A_Fall | ||
TROO M -1 | TROO M -1 | ||
XDeath: | XDeath: | ||
TROO N 5 | TROO N 5 | ||
Line 271: | Line 212: | ||
TROO RST 5 | TROO RST 5 | ||
TROO U -1 | TROO U -1 | ||
Raise: | Raise: | ||
TROO ML 8 | TROO ML 8 | ||
Line 277: | Line 217: | ||
goto See | goto See | ||
"@ | "@ | ||
*'''spawnstate''' | *'''spawnstate''' | ||
:Default = S_NULL | :Default = S_NULL | ||
Line 297: | Line 222: | ||
*'''seestate''' | *'''seestate''' | ||
:Default = S_NULL | :Default = S_NULL | ||
:Sets the frame which a monster will jump to when it sees or hears a target during a [[Look]] (monster standing unawakened) check | :Sets the frame which a monster will jump to when it sees or hears a target during a [[Look]] (monster standing unawakened) check. | ||
*'''painstate''' | *'''painstate''' | ||
:Default = S_NULL | :Default = S_NULL | ||
Line 338: | Line 263: | ||
:Default = S_NULL | :Default = S_NULL | ||
:If this frame is not S_NULL, a creature running [[VileChase]] codepointers can perform a resurrection on this actor. When this occurs, the actor will enter this frame along with being restored. | :If this frame is not S_NULL, a creature running [[VileChase]] codepointers can perform a resurrection on this actor. When this occurs, the actor will enter this frame along with being restored. | ||
*'''crashstate''' | *'''crashstate''' | ||
:Default = S_NULL | :Default = S_NULL | ||
Line 377: | Line 299: | ||
:Default = 1000 | :Default = 1000 | ||
:Sets a thing's maximum amount of life. | :Sets a thing's maximum amount of life. | ||
*'''reactiontime''' | *'''reactiontime''' | ||
:Default = 8 | :Default = 8 | ||
Line 414: | Line 333: | ||
*'''damage''' | *'''damage''' | ||
:Default = 0 | :Default = 0 | ||
:This number is used as a damage multiplier when a | :This number is used as a damage multiplier when a missile hits a thing. The damage formula used is: | ||
((rnd % 8) + 1) * | damage = ((rnd % 8) + 1) * missiledamage | ||
:This field is also used as a parameter by some parameterized codepointers, including | :This field is also used as a parameter by some new, parameterized codepointers, including [[BetaSkullAttack]] and [[Detonate]]. | ||
*'''dmgspecial''' | *'''dmgspecial''' | ||
:Default = "none" | :Default = "none" | ||
Line 428: | Line 347: | ||
:*''Whirlwind'' | :*''Whirlwind'' | ||
::The target will have its angle and x/y momenta modified by random amounts. If the current level time has the 5th bit (value 16) set and the target is not a boss (possesses the BOSS flag), the target will be given randomized z momentum up to but no greater than 12 units per tic. When the level time is divisible by 8, the target will be hit directly for 3 damage. | ::The target will have its angle and x/y momenta modified by random amounts. If the current level time has the 5th bit (value 16) set and the target is not a boss (possesses the BOSS flag), the target will be given randomized z momentum up to but no greater than 12 units per tic. When the level time is divisible by 8, the target will be hit directly for 3 damage. | ||
*'''damagefactor''' | *'''damagefactor''' | ||
:This sets up the monster's resistance to various | :This sets up the monster's resistance to various damage types ("means of death"). 0 means invincible, 1 full damage. This property has a distinct syntax: there may be as many ''DamageFactor'' lines as damage resistances. Note that setting the factor to 0 won't prevent monster retaliation. Example of usage: | ||
damagefactor fire, 0.3 | damagefactor fire, 0.3 | ||
damagefactor lava, 0.2 | damagefactor lava, 0.2 | ||
:As seen above, no braces are used, and the arguments are separated by commas. | :As seen above, no braces are used, and the arguments are separated by commas. | ||
*'''topdamage''' | *'''topdamage''' | ||
Line 458: | Line 371: | ||
====Pain/Death Properties==== | ====Pain/Death Properties==== | ||
*'''bloodcolor''' | *'''bloodcolor''' | ||
:Default = 0 | :Default = 0 | ||
Line 501: | Line 386: | ||
Orange 8 | Orange 8 | ||
-------------------------- | -------------------------- | ||
*''' | *'''nukespecial''' | ||
: | :Default = NULL | ||
: | :This field is the name of a special codepointer to call when the player uses the KILLEM cheat to kill all monsters. Currently only two special pointers are provided for this purpose, PainNukeSpec and SorcNukeSpec. These enable monsters with spawn-on-death actions to either spawn enemies early, or not at all. See the Eternity Engine Definitive Codepointer Reference for detailed information. | ||
*'''droptype''' | |||
:Default = NONE | |||
:This field allows the type of thing that is dropped by this thing when it dies to be edited. This field should either be a valid thing type mnemonic, or the special value NONE. | |||
: | |||
: | |||
====Flags==== | ====Flags==== | ||
*'''cflags''' | *'''cflags''' | ||
Line 540: | Line 415: | ||
:Similar to flags, but takes a different set of values with different meanings. See the [[Thing type flags]] List, for the values which can be used in this field. Remember that if whitespace or disallowed characters are used, this field's value must be enclosed in quotation marks. | :Similar to flags, but takes a different set of values with different meanings. See the [[Thing type flags]] List, for the values which can be used in this field. Remember that if whitespace or disallowed characters are used, this field's value must be enclosed in quotation marks. | ||
*'''flags4''' | *'''flags4''' | ||
:Default = "" | :Default = "" | ||
:Similar to flags, but takes a different set of values with different meanings. See the [[Thing type flags]] List, for the values which can be used in this field. Remember that if whitespace or disallowed characters are used, this field's value must be enclosed in quotation marks. | :Similar to flags, but takes a different set of values with different meanings. See the [[Thing type flags]] List, for the values which can be used in this field. Remember that if whitespace or disallowed characters are used, this field's value must be enclosed in quotation marks. | ||
Line 590: | Line 462: | ||
*'''translation''' | *'''translation''' | ||
:Default = 0 | :Default = 0 | ||
:Sets a translation for the thing's sprite. Translation tables are 256-byte lumps which can be used to remap any range of colors in a sprite. When this field defaults, no translation will be used. Otherwise, you may either provide a number to access one of the internal player translation tables, or you may provide the name of a translation lump, which must be found | :Sets a translation for the thing's sprite. Translation tables are 256-byte lumps which can be used to remap any range of colors in a sprite. When this field defaults, no translation will be used. Otherwise, you may either provide a number to access one of the internal player translation tables, or you may provide the name of a translation lump, which must be found between T_START and T_END markers amongst one of the currently loaded wad files. Numeric values for player translations are as follows. All of the player translations remap the pure green range. | ||
Number Color | |||
------------------ | |||
1 Indigo | |||
2 Brown | |||
3 Red | |||
4 Tomato | |||
5 Dirt | |||
6 Blue | |||
7 Gold | |||
8 Felt | |||
9 Black | |||
10 Purple | |||
11 "Vomit" | |||
12 Pink | |||
13 Cream | |||
14 Yellow | |||
------------------ | |||
*'''skinsprite''' | *'''skinsprite''' | ||
:Default = "noskin" | :Default = "noskin" | ||
:The skinsprite field defines a sprite that will be used to override the sprite value in any frame a thing of this type enters. This allows the creation of thingtypes which behave identically but look different without the creation of any new frames. Note that when things are crushed into gibs, the skinsprite is cleared at that time. If an Archvile resurrects such a thing, the proper skinsprite is then restored. | :The skinsprite field defines a sprite that will be used to override the sprite value in any frame a thing of this type enters. This allows the creation of thingtypes which behave identically but look different without the creation of any new frames. Note that when things are crushed into gibs, the skinsprite is cleared at that time. If an Archvile resurrects such a thing, the proper skinsprite is then restored. | ||
*'''defaultsprite''' | *'''defaultsprite''' | ||
:Default = the object's first spawn state's sprite | :Default = the object's first spawn state's sprite | ||
Line 626: | Line 496: | ||
:Default = 1.0 | :Default = 1.0 | ||
:Sets how much the vertical component of the sprite is to be scaled. | :Sets how much the vertical component of the sprite is to be scaled. | ||
====ACS Spawn Data Sub-Block==== | ====ACS Spawn Data Sub-Block==== | ||
*'''acs_spawndata''' | *'''acs_spawndata''' | ||
:Default = (nothing) | :Default = (nothing) | ||
:This specifies the identification number for various parameterized specials, such as | :This specifies the identification number for various parameterized specials, such as Thing_Spawn or Thing_SpawnNoFog. It also limits the number to a game namespace. For example, by default the Zombieman has | ||
acs_spawndata { num 4; modes doom } | acs_spawndata { num 4; modes doom } | ||
:Heretic objects will use | :Heretic objects will use "modes heretic" instead of "modes doom". | ||
[[category:EDF]] | [[category:EDF]] | ||