Editing EDF thing reference

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 1: Line 1:
Thing types define monsters, lamps, control points, items, etc -- anything that moves, occupies space, can display a sprite, or is useful for singling out locations. Things have unique names, or mnemonics, for easy identification. They're referenced in several places by their name, such as the console command ''Summon'', or [[List of codepointers|action functions]] dealing with spawning things (such as [[Spawn]] or [[MissileAttack]]).
Thing types define monsters, lamps, control points, items, etc -- anything that moves, occupies space, can display a sprite, or is useful for singling out locations.  


If a thing type's mnemonic is not unique, the latest definition of a thing type with that mnemonic replaces any earlier ones. Like most other identifiers in EDF (but not lump names or subnames), thing type mnemonics are completely case-insensitive.
Each thing type must be given a unique mnemonic in its definition's header, and this is the name used to identify the thing type elsewhere. Each field in the thing type definition is optional. If a field is not provided, it takes on the default value indicated below the syntax information. Fields may also be provided in any order.  


New objects, created via EDF files or wad lumps, can be later tweaked with Dehacked (BEX) patches, if they're given a unique '''dehackednum''' entry. For forward compatibility, the '''dehackednum''' has to be greater than or equal to 10000.
If a thing type's mnemonic is not unique, the latest definition of a thing type with that mnemonic replaces any earlier ones. See the information below for more on this. Thing type mnemonics are completely case-insensitive. This means that a thing type defined with a mnemonic that differs from an existing one only by case of letters will overwrite the original type.  


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.
Note that the order of thing type definitions in [[EDF]] is not important. For purposes of DeHackEd, the number used to access a thing type is now defined in the type itself. For the original thing types, these happen to be the same as their order.  


If you want to know the base game thing types from Doom, you can look on the [https://github.com/team-eternity/eternity/blob/master/base/doom/things.edf list of Doom thing types].
User thing types that need to be accessible from [[DeHackEd]] or by parameterized codepointers can define a unique DeHackEd number, which for purposes of forward compatibility, should be greater than or equal to 10000 and less than 32768. User types not needing access via DeHackEd or by parameterized codepointers can be given a DeHackEd number of -1. If a thingtype with a DeHackEd number of -1 is used by name in a misc or args field using the "thing:" prefix, it will be automatically assigned a unique DeHackEd number by the game engine. The previous behavior was to post a warning message and replace the thing with the "Unknown" type. This largely removes the need for users to assign and keep track of DeHackEd numbers.
 
{{See|Thing type flags}}
{{See|thinggroup}}. Some of the customization should be set in '''thinggroup''' blocks, which group multiple things. Most notably, infighting control. There are also flags and '''damagefactor''' "immune" (see this page) settings.
{{Backto|EDF}}
 
==Eternity Alfheim syntax==
For versions of Eternity from Alfheim up, EDF thingtypes support the following syntax. Make sure to add:
setdialect("ALFHEIM")
before using this syntax:
thingtype <unique name> : <inherited thingtype>, <doomednum>, <dehackednum>
{
  <other attributes>
}
===Header properties===
* ''<inherited thingtype>'' must be a value, even if the thingtype doesn't inherit from anything else. In that case, it must be '''Mobj''', which is a placeholder value belonging to no real thingtype.
* ''<doomednum>'' and ''<dehackednum>'' can be -1 if not used. If both are -1, they can be omitted, leaving just this:
thingtype <unique name> : <inherited thingtype> {<attributes>}
* If header properties are used, the pre-Alfheim '''inherits''', '''doomednum''' and '''dehackednum''' attributes are not used.


==Syntax==
==Syntax==
  thingtype <unique name> [: <parent type> [, <doomednum> [, <dehackednum>]]]
  thingtype <unique mnemonic>
  {
  {
   doomednum             <number>
   doomednum       = <number>
   dehackednum           <unique number>
   dehackednum     = <unique number>
   inherits               <thingtype>
   inherits       = <thing type mnemonic>
  compatname            <name>
   basictype       = <basic type name>
   basictype             <basic type qualifier>
    
    
  // NOTE: for this section, see the "states" field below and use it instead of these.
   spawnstate     = <frame mnemonic>
   spawnstate             <frame>
   seestate       = <frame mnemonic>
   seestate               <frame>
   painstate       = <frame mnemonic>
   painstate             <frame>
   meleestate     = <frame mnemonic>
  dmg_painstates        {<damage type>, <frame>, ...}
   missilestate   = <frame mnemonic>
  dmg_painstates.add    {<damage type>, <frame>, ...}
   deathstate     = <frame mnemonic>
  dmg_painstates.remove  {<damage type>, ...}
   xdeathstate     = <frame mnemonic>
   meleestate             <frame>
   raisestate     = <frame mnemonic>
   missilestate           <frame>
   crashstate     = <frame mnemonic>
   deathstate             <frame>
  dmg_deathstates        {<damage type>, <frame>, ...}
  dmg_deathstates.add    {<damage type>, <frame>, ...}
  dmg_deathstates.remove {<damage type>, ...}
   xdeathstate           <frame>
   raisestate             <frame>
  healstate              <frame>  // since Feb 21 2016
   crashstate             <frame>
  activestate            <frame>
  inactivestate          <frame>
  seesound              <sound>
  attacksound            <sound>
  painsound              <sound>
  deathsound            <sound>
  activesound            <sound>
  activatesound          <sound>
  deactivatesound        <sound>
  spawnhealth            <number>
  gibhealth              <number>
  reactiontime          <number>
  painchance            <number>
  speed                  <number OR floating-point number>
  fastspeed              <number OR floating-point number>
  radius                <floating-point number>
  height                <floating-point number>
  correct_height        <floating-point number>
  mass                  <number>
  respawntime            <number>
  respawnchance          <number>
  damage                <number>
  dmgspecial            <dmgspecial name>
  aimshift              <number>
   
   
   damagefactor          <damage type>, <floating point number>|immune
   seesound        = <sound mnemonic>
   damagefactor          <damage type>, <floating point number>|immune
  attacksound    = <sound mnemonic>
   ...
   painsound      = <sound mnemonic>
  deathsound      = <sound mnemonic>
   activesound    = <sound mnemonic>
   
   
   topdamage              <number>
   spawnhealth    = <number>
   topdamagemask         <number>
   reactiontime    = <number>
   mod                    <MOD name OR number>
  painchance      = <number>
   obituary_normal        <string>
  speed          = <number> OR <floating-point number>
   obituary_melee        <string>
  fastspeed      = <number> OR <floating-point number>
  radius         = <floating-point number>
   height          = <floating-point number>
  correct_height  = <floating-point number>
  mass            = <number>
   respawntime    = <number>
   respawnchance  = <number>
   
   
   bloodcolor             <number>
   damage          = <number>
   nukespecial            <BEX codepointer mnemonic>
  dmgspecial      = <dmgspecial name>
   droptype              <thing type mnemonic>
  damagefactor    = <number>
  topdamage      = <number>
  topdamagemask  = <number>
  mod             = <MOD name> OR <number>
   obituary_normal = <string>
   obituary_melee  = <string>
   
   
   bloodbehavior          <action>, <behavior>
   bloodcolor      = <number>
  clearbloodbehaviors
   nukespecial    = <BEX codepointer mnemonic>
  bloodtype.normal      <name>
   droptype       = <thing type mnemonic>
  bloodtype.impact      <name>
   bloodtype.rip          <name>
   bloodtype.crush       <name>
   
   
   cleardropitems
   cflags          = <flag list>
   dropitem              <type>, [, <chance> [, <amount> [, <toss>]]]
   addflags        = <flag list>
   dropitem.remove       <type>
   remflags       = <flag list>
   collectionspawn        <thingtype> [, <spchance> [, <coopchance> [, <dmchance>]]]
   flags          = <flag list>
   itemrespawnat          <thingtype>
  flags2          = <flag list>
  flags3          = <flag list>
  flags4          = <flag list>
   particlefx      = <particle effect flag list>
   
   
   cflags                <flag list>
   translucency    = <number> OR <percentage>
  addflags              <flag list>
   translation    = <number> OR <translation table lump name>
   remflags              <flag list>
   skinsprite      = <sprite mnemonic>
  flags                  <flag list>
   defaultsprite  = <sprite mnemonic>
   flags2                <flag list>
   alphavelocity  = <floating-point number>
   flags3                <flag list>
   xscale          = <floating-point number>
   flags4                <flag list>
   yscale          = <floating-point number>
   flags5                <flag list>
   particlefx            <particle effect flag list>
   
   
  translucency          <number OR percentage>
   acs_spawndata   = <number>
  translation            <number OR translation table lump name>
  tranmap                <lump name>
  skinsprite            <sprite>
  defaultsprite          <sprite>
  alphavelocity          <floating-point number>
  xscale                <floating-point number>
  yscale                <floating-point number>
   acs_spawndata         {num <number> modes <mnemonic>}
  pickupeffect
  {
    effects              <effect1>, ...
    changeweapon        <weapon>
    message              <text>
    sound                <sound>
    flags                <flags>
  }
  clearpickupeffect
  firstdecoratestate    <frame>
  states                <[[DECORATE state syntax]] heredoc>
  }
  }
===Explanation of fields===
===Explanation of fields===
====ID / Type Info====
*'''doomednum'''
: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.
:NOTE: you can just use the first number following the inherited class, in the title. Just remember to start the script with <code>setdialect("alfheim")</code>.
*'''dehackednum'''
: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.
:NOTE: you can use the second number following the inherited class in the title. For this, you also need <code>setdialect("alfheim")</code>.
*'''inherits'''
*'''inherits'''
:Default = (nothing)
:No default value
: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 type will inherit values. See the Thing Type Inheritance section below for full information on how thing type inheritance works.  
:NOTE: you can use the class in the title properties after the colon, instead of '''inherits''' in the '''thingtype''' body. You also need <code>setdialect("alfheim")</code>.
*'''compatname'''
:Default = (nothing)
:Sets a "compatible name" useful for [[ACS]] scripts copied from GZDoom mods or for cross-port usage. Typically the need for this is because of ACS scripts assuming thingtype names from GZDoom, and in the base Eternity definitions, '''compatname''' is set to names which GZDoom uses for its thingtypes.
:Setting this flag is not needed and shouldn't be done in mods.
*'''basictype'''
*'''basictype'''
:Default = (nothing)
:No default value
:'''Basictype''' is a list of common flags used in Doom and derived games. Using '''basictype''' instead of setting individual flags is encouraged, in order to keep up with Eternity engine updates. Other flags may be subsequently added or removed with '''addflags''' or '''remflags'''. See the [[Thing type flags]] page for a full list. The '''basictype''' mnemonics follow:
:Sets the basic type of this thingtype definition. Basic types are not thingtypes, but are engine-defined sets of flags and states which an object can adopt as its default values for the corresponding flag and state fields. Use of basictypes is encouraged because thingtypes using them can automatically adapt to occasionally necessary changes to monsters and other thing categories that involve the addition of new thingtype flag values. This is a table of all currently existing basictypes and the values that they impart upon thingtypes:  
:*''Monster''
:*''Monster''
::An ordinary walking monster with no fancy features.
::Purpose: An ordinary walking monster with no fancy features.
::'''cflags''' "SOLID+SHOOTABLE+COUNTKILL+FOOTCLIP+SPACMONSTER+PASSMOBJ"
::cflags = SOLID|SHOOTABLE|COUNTKILL|FOOTCLIP|SPACMONSTER|PASSMOBJ  


:*''FlyingMonster''
:*''FlyingMonster''
::An ordinary flying monster.
::Purpose: An ordinary flying monster.
::'''cflags''' "SOLID+SHOOTABLE+COUNTKILL+NOGRAVITY+FLOAT+SPACMONSTER+PASSMOBJ"
::cflags = SOLID|SHOOTABLE|COUNTKILL|NOGRAVITY|FLOAT|SPACMONSTER|PASSMOBJ  


:*''FriendlyHelper''
:*''FriendlyHelper''
::A player helper with maximum friendliness options.
::Purpose: A player helper with maximum friendliness options.
::'''cflags''' "SOLID+SHOOTABLE+COUNTKILL+FRIEND+JUMPDOWN+FOOTCLIP+WINDTHRUST+SUPERFRIEND+SPACMONSTER+PASSMOBJ"
::cflags = SOLID|SHOOTABLE|COUNTKILL|FRIEND|JUMPDOWN|FOOTCLIP|WINDTHRUST|SUPERFRIEND|SPACMONSTER|PASSMOBJ  


:*''Projectile''
:*''Projectile''
::A standard projectile.
::Purpose: A standard projectile.
::'''cflags''' "NOBLOCKMAP+NOGRAVITY+DROPOFF+MISSILE+NOCROSS"
::cflags = NOBLOCKMAP|NOGRAVITY|DROPOFF|MISSILE|NOCROSS  


:*''PlayerProjectile''
:*''PlayerProjectile''
::A projectile for use by players.
::Purpose: A projectile for use by players.
::'''cflags''' "NOBLOCKMAP+NOGRAVITY+DROPOFF+MISSILE+NOCROSS+SPACMISSILE"
::cflags = NOBLOCKMAP|NOGRAVITY|DROPOFF|MISSILE|NOCROSS|SPACMISSILE  


:*''Seeker''
:*''Seeker''
::A missile prepared to be fired by homing missile codepointers.
::Purpose: A missile prepared to be fired by homing missile codepointers.
::'''cflags''' "NOBLOCKMAP+NOGRAVITY+DROPOFF+MISSILE+NOCROSS+SEEKERMISSILE"
::cflags = NOBLOCKMAP|NOGRAVITY|DROPOFF|MISSILE|NOCROSS|SEEKERMISSILE  


:*''SolidDecor''
:*''SolidDecor''
::A solid decorative item.
::Purpose: A solid decorative item.
::'''cflags''' SOLID
::cflags = SOLID  


:*''HangingDecor''
:*''HangingDecor''
::A hanging decorative item that is passable even without 3D object clipping.
::Purpose: A hanging decorative item that is passable even without 3D object clipping.
::'''cflags''' "SPAWNCEILING+NOGRAVITY"
::cflags = SPAWNCEILING|NOGRAVITY  


:*''SolidHangingDecor''
:*''SolidHangingDecor''
::A solid hanging decorative item.
::Purpose: A solid hanging decorative item.
::'''cflags''' "SOLID+SPAWNCEILING+NOGRAVITY"
::cflags = SOLID|SPAWNCEILING|NOGRAVITY  


:*''ShootableDecor''
:*''ShootableDecor''
::A shootable decorative item.
::Purpose: A shootable decorative item.
::'''cflags''' "SOLID+SHOOTABLE+NOBLOOD"
::cflags = SOLID|SHOOTABLE|NOBLOOD  


:*''Fog''
:*''Fog''
::A fog item such as telefog or item fog.
::Purpose: A fog item such as telefog or item fog.
::'''cflags''' "NOBLOCKMAP+NOGRAVITY+TRANSLUCENT+NOSPLASH"
::cflags = NOBLOCKMAP|NOGRAVITY|TRANSLUCENT|NOSPLASH  


:*''Item''
:*''Item''
::A collectable item. Doesn't count towards the item score.
::Purpose: A collectable item. Doesn't count.
::'''cflags''' SPECIAL
::cflags = SPECIAL  


:*''ItemCount''
:*''ItemCount''
::A collectable item. Counts for item score.
::Purpose: A collectable item. Counts for item %.
::'''cflags''' "SPECIAL+COUNTITEM"
::cflags = SPECIAL|COUNTITEM  


:*''TerrainBase''
:*''TerrainBase''
::A TerrainTypes base item.
::Purpose: A TerrainTypes base item.
::'''cflags''' "NOBLOCKMAP+NOGRAVITY+NOSPLASH"
::cflags = NOBLOCKMAP|NOGRAVITY|NOSPLASH  


:*''TerrainChunk''
:*''TerrainChunk''
::A TerrainTypes chunk item.
::Purpose: A TerrainTypes chunk item.
::'''cflags''' "NOBLOCKMAP+DROPOFF+MISSILE+LOGRAV+NOSPLASH+NOCROSS+CANNOTPUSH"
::cflags = NOBLOCKMAP|DROPOFF|MISSILE|LOGRAV|NOSPLASH|NOCROSS|CANNOTPUSH  


:*''ControlPoint''
:*''ControlPoint''
::An inert control point.
::Purpose: An inert control point.
::'''cflags''' "NOBLOCKMAP+NOSECTOR+NOGRAVITY"
::cflags = NOBLOCKMAP|NOSECTOR|NOGRAVITY
::'''spawnstate''' S_TNT1  
::spawnstate = S_TNT1  


:*''ControlPointGrav''
:*''ControlPointGrav''
::An control point that is subject to gravity. Because of this, it's not considered inert.
::Purpose: An inert control point that is subject to gravity.
::'''cflags''' "DONTDRAW+NOSPLASH"
::cflags = DONTDRAW|NOSPLASH
::'''spawnstate''' S_TNT1
::spawnstate = S_TNT1  


====States====
*doomednum
*'''firstdecoratestate'''
:Default = -1
:Sets the first frame in a sequential list of dummy frames that use the internal Decorate-style defined '''states''' of this actor for [[EDF delta structures|framedelta]] compatibility. It's not required unless the intention is to make the Decorate states of this thing accessible from other thing types. Default games' (Doom, Heretic) thing types use externalized frames for all thing types, for compatibility.
:Sets the ID used to identify this thing type in maps. For example, when a map calls for a thing with ID 2003, the game engine will find the thing type which has that number in this field. Every thing that will be spawned on maps must have a unique doomednum. Things which are not spawned on maps, such as fireballs, can be given the default doomednum of -1.
*'''states'''
:For purposes of forward compatibility, user-defined thing types should use doomednums greater than or equal to 20000 and less than 32768. All other doomednum ranges are considered to be reserved as outlined here. The purposes of various blocks may be relaxed in the future for purposes of internal use, so these are only rough guidelines provided for completeness.  
{{see|DECORATE state syntax}}
    Doomednum Range    Usage
: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), unless you use the '''firstdecoratestate''' field as well. Like normally, [[List of codepointers|codepointers]] may or may not be preceded by '''A_'''. 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):
        0                No-op, no thing will be spawned at all
states =
        1 - 4999        Original DOOM things and some extensions
  @"
    5000 - 5999        BOOM-style control points
  Spawn:
    6000 - 6999        Reserved for port use
      TROO AB 10 A_Look
    7000 - 7999        Things translated from other games
      loop
    8000 8999        Reserved for port use
  See:
    9000 9999        zdoom-style control points
      TROO AABBCCDD 3 A_Chase
     10000 - 19999        Reserved for port use
      loop
     20000 - 32767        Reserved for EDF
  Pain:
*spawnstate
      TROO H 2
      TROO H 2 A_Pain
      goto See
  Melee:
  Missile:
      TROO EF 8 A_FaceTarget
      TROO G 6 A_TroopAttack
      goto See 
  Death:
      TROO I 8
      TROO J 8  A_Scream
      TROO K 6
      TROO L  6  A_Fall
      TROO M -1
      stop
  XDeath:
      TROO N    5
      TROO O    5 A_XScream
      TROO P    5
      TROO Q    5 A_Fall
      TROO RST 5
      TROO U  -1
      stop
  Raise:
      TROO ML 8
      TROO KJI 6
      goto See
  "@
:A "fast" flag is now allowed between the tics and action function of DECORATE states (along with the pre-existing "bright" flag) which determines if that state halves its "tics" value when the game is in -fast or Nightmare skill. Example (from demon's states):
  states
  @"
  See:
     SARG AABBCCDD 2 fast A_Chase
     loop
  Melee:
    SARG EF 8 fast A_FaceTarget
    SARG G  8 fast A_SargAttack
    goto See
  Pain:
    SARG H 2 fast
    SARG H 2 fast A_Pain
    goto See
  "@ 
*'''spawnstate'''
:Default = S_NULL
:Default = S_NULL
:Sets the frame which a thing starts in when it is spawned. Monsters generally use this frame to stand still and look for targets. If the object is supposed to have any dynamic purpose or be visible, do not leave the '''spawnstate''' at S_NULL.
:Sets the frame which a thing starts in when it is spawned. Monsters generally use this frame to stand still and look for targets.  
*'''seestate'''
*spawnhealth
:Default = 1000
:Sets a thing's maximum amount of life. It is only used for things which can be shot.  
*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. If an object is alive and has a seestate, it is considered ''sentient'' by certain game mechanics.
:Sets the frame which a monster will jump to when it sees or hears a target. Also called walking frames, or first moving frame.
*'''painstate'''
*seesound
:Default = none
:Sets the sound that a monster will play when it awakens. This sound is also played by missiles when they are shot. (Note: "none" is a special mnemonic for no sound)  
*reactiontime
:Default = 8
:Sets an amount of time that a thing must wait under certain circumstances. Monsters use this value as a means to control their rate of attack. This value is also used as an internal field for varying purposes, but those uses are not editable.
*attacksound
:Default = none
:Sets a sound used by some monster attacks, including the Lost Soul's charge.  
*painstate
:Default = S_NULL
:Default = S_NULL
:Sets the frame a thing may randomly enter when it has been injured. If set to S_NULL, the creature will be removed instantly from the game if the random check succeeds.
:Sets the frame a thing may randomly enter when it has been injured.  
*'''dmg_painstates'''
*painchance
:Default = (nothing)
:Default = 0
:This is a list of one or more damagetype/frame pairs, enclosed in braces. For example:
:Sets the chance out of 255 that this thing will enter its painstate when it is injured. A thing with 0 painchance will never feel pain, whereas a thing with 255 painchance will always feel pain. If a thing has a painchance greater than zero, it should have a valid painstate, otherwise it will disappear forever.  
dmg_painstates
*painsound
{
:Default = none
    Fire, S_HPLAY_FPAIN1,
:Sets the sound played by the Pain codepointer when this thing uses it. Monsters and the player always call Pain from their painstate.  
    Lava, S_HPLAY_LPAIN1
*meleestate
}
makes the actor go to frame S_HPLAY_FPAIN1 when damaged by fire, or to S_HPLAY_LPAIN1 when harmed by lava. It defaults to its '''painstate''' if the damage is of another nature. The damage type of an actor is set up through the '''mod''' field.
*'''dmg_painstates.add'''
*'''dmg_painstates.remove'''
:Can be used for derived actor types, who can have more or fewer specialized pain states than their ancestors. ''Dmg_painstates.add'' has the same format as ''dmg_painstates'', but ''dmg_painstates.remove'' only lists the damagetypes. For example:
dmg_painstates.remove
{
    Fire, lava
}
makes them get hurt normally from fire or lava, without going to special pain states.
*'''meleestate'''
:Default = S_NULL
:If this frame is not S_NULL, monsters will have a slightly lower range attack probability and when they are within about 64 units of their target, they will enter this frame to perform a melee attack.
*'''missilestate'''
:Default = S_NULL
:Default = S_NULL
:If this frame is not S_NULL, monsters chasing a target will randomly enter it to perform a missile attack.
:If this frame is not S_NULL, monsters chasing a target will attempt to close to melee range quickly. When they determine they are within 64 units of their target, they may randomly enter this frame to perform a melee attack.  
*'''deathstate'''
*missilestate
:Default = S_NULL
:Default = S_NULL
:When a thing dies normally, it will enter this state. If the state is S_NULL, the thing will disappear forever.
:If this frame is not S_NULL, monsters chasing a target will randomly enter it to perform a missile attack.  
*'''dmg_deathstates'''
*crashstate
*'''dmg_deathstates.add'''
*'''dmg_deathstates.remove'''
:Defaults = (nothing)
:These three properties work similar to ''dmg_painstates*'', in that they allow the object to enter special frames depending on the damage type suffered, but if they die. The formats are the same.
*'''xdeathstate'''
:Default = S_NULL
:If a thing dies by taking enough damage that its health is equal to its negated spawnhealth value (or negated 0.5 spawnhealth value in Heretic), it will enter this frame instead of its deathstate. If this frame is S_NULL, the thing will always die normally.
*'''raisestate'''
: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.
*'''healstate''' (since Feb 21 2016)
:Default = S_NULL
:Sets the frame to jump to if, during a [[VileChase]] frame, the thing encounters a corpse and raises it. If not set (or set to S_NULL), it will actually default to S_VILE_HEAL1, same as in Doom.
*'''crashstate'''
:Default = S_NULL
:Default = S_NULL
:When a thing with this state dies and then subsequently hits the ground, it will enter this state. If this state S_NULL, it is not used.
:When a thing with this state dies and then subsequently hits the ground, it will enter this state. If this state S_NULL, it is not used.
*'''activestate'''
*deathstate
:Default = S_NULL
:Default = S_NULL
:State to enter when triggered by the '''Thing_Activate''' parameterized special.
:When a thing dies normally, it will enter this state. If the state is S_NULL, the thing will disappear forever.  
*'''inactivestate'''
*xdeathstate
:Default = S_NULL
:Default = S_NULL
:State to enter when triggered by the '''Thing_Deactivate''' parameterized special.
:If a thing dies by taking enough damage that its health is equal to its negated spawnhealth value, it will enter this frame instead of its deathstate. This is also known as gibbing, or extreme death. If this frame is S_NULL, the thing will always die normally.  
 
*deathsound
====Sounds====
*'''seesound'''
:Default = none
:Sets the sound that a monster will play when it awakens. This sound is also played by missiles when they are shot. (Note: "none" is a special mnemonic for no sound)
*'''attacksound'''
:Default = none
:Sets a sound used by some monster attacks, including the Lost Soul's charge, or melee attacks.
*'''painsound'''
:Default = none
:Sets the sound played by the Pain codepointer when this thing uses it.
*'''deathsound'''
:Default = none
:Default = none
:Sound played by the Scream codepointer. Used to play monster death sounds.  
:Sound played by the Scream codepointer. Used to play monster death sounds.  
*'''activesound'''
*speed
:Default = none
:Sets the sound used by a thing when it is wandering around. A thing is given a 3 out of 256 chance (1.17%) of making this sound every time it calls the Chase codepointer. There are some new flags3 flags which can alter the behavior of this sound.
*'''activatesound'''
:Default = none
:Sound to play when triggered by the '''Thing_Activate''' parameterized special.
*'''deactivatesound'''
:Default = none
:Sound to play when triggered by the '''Thing_Deactivate''' parameterized special.
====Basic Stats====
*'''spawnhealth'''
:Default = 1000
:Sets a thing's maximum amount of life.
*'''gibhealth''' ''number''
:gibhealth overrides the gamemode default behavior for determining the negative amount of health at which a thing uses its "extreme" death state rather than its normal one. This is ordinarily defined in terms of the spawnhealth (Doom and Strife thingtypes gib at -spawnhealth; Heretic and Hexen thingtypes gib at -(spawnhealth/2).
:If an inheriting thingtype changes its spawnhealth, it will "lose" the inherited definition of gibhealth from its parent. If changing spawnhealth when inheriting from a thingtype that customizes gibhealth, be sure to re-customize the gibhealth in the inheriting thingtype.
*'''reactiontime'''
:Default = 8
:Sets an amount of time that a thing must wait under certain circumstances. Monsters use this value as a means to control their rate of attack. This value is also used as an internal field for varying purposes, but those uses are not editable. 
*'''painchance'''
:Default = 0
:Sets the chance out of 255 that this thing will enter its painstate when it is injured. A thing with 0 painchance will never feel pain, whereas a thing with 255 painchance will always feel pain. If a thing has a painchance greater than zero, it should have a valid painstate, otherwise it will disappear forever.
*'''speed'''
:Default = 0
:Default = 0
:Value used by monsters as a movement delta per walking frame. The monster will move by an amount relative to this value each time it uses the Chase codepointer. For missiles, this value is a fixed-point number (multiplied by 65536), and represents a constant speed by which the missile advances every game tic. Missile speed is not affected by the missile frame durations, whereas monster walking speed is.
:Value used by monsters as a movement delta per walking frame. The monster will move by an amount relative to this value each time it uses the Chase codepointer. For missiles, this value is a fixed-point number (multiplied by 65536), and represents a constant speed by which the missile advances every game tic. Missile speed is not affected by the missile frame durations, whereas monster walking speed is.
:This field also supports floating-point values. When a floating-point value is provided, it will be translated into the corresponding fixed-point value. This means that a value of 10.0 is equivalent to the integer value 655360 (10*65536). It is NOT equivalent to 10. This distinction is very important. Small integer speed values are appropriate for monsters, whereas floating-point values will be suitable only for missiles.  
:This field also supports floating-point values. When a floating-point value is provided, it will be translated into the corresponding fixed-point value. This means that a value of 10.0 is equivalent to the integer value 655360 (10*65536). It is NOT equivalent to 10. This distinction is very important. Small integer speed values are appropriate for monsters, whereas floating-point values will be suitable only for missiles.  
*'''fastspeed'''
*radius
:Default = 0
:When the game is switched into Nightmare difficulty or -fast mode is active, all thing types with a non-zero fastspeed will have their speed fields changed to their fastspeed value. This enables editing of the -fast speed of projectiles and monsters. For detailed information on speed, see the speed field itself above. Note: as of EDF 1.2, this field also supports floating-point numbers, with the same meaning as that for the speed field.
*'''radius'''
:Default = 20.0
:Default = 20.0
:Floating-point value that represents the radius of this thing type. A thing can fit into corridors which are at least as wide as this value times two, plus one unit (ie a thing with radius 32 can fit into a 65-wide hallway). The maximum value this field *should* have is 64.0 units. However, the game breaks its own rule here, giving several monsters radii up to 128 units. These monsters, which include the Mancubus, Arachnotron, and Spider Demon, exhibit clipping errors which enable other things to walk into them, and which can cause some moving sectors to malfunction. Avoid giving things radii larger than 64.0 to remain absolutely safe.  
:Floating-point value that represents the radius of this thing type. A thing can fit into corridors which are at least as wide as this value times two, plus one unit (ie a thing with radius 32 can fit into a 65-wide hallway). The maximum value this field *should* have is 64.0 units. However, the game breaks its own rule here, giving several monsters radii up to 128 units. These monsters, which include the Mancubus, Arachnotron, and Spider Demon, exhibit clipping errors which enable other things to walk into them, and which can cause some moving sectors to malfunction. Avoid giving things radii larger than 64.0 to remain absolutely safe.  
*'''height'''
*height
:Default = 16.0
:Default = 16.0
:Floating-point value that represents the height of this thing type. A thing can fit into areas which are of this exact height or taller. Note that in DOOM, this value is only used to see where a monster can fit relative to walls and floor/ceiling heights. For purposes of clipping against other things, monsters were considered to be infinitely tall. However, Eternity's extended 3D object clipping enables this field to also be used to allow or disallow things to pass over, under, or stand on this thing.  
:Floating-point value that represents the height of this thing type. A thing can fit into areas which are of this exact height or taller. Note that in DOOM, this value is only used to see where a monster can fit relative to walls and floor/ceiling heights. For purposes of clipping against other things, monsters were considered to be infinitely tall. However, Eternity's extended 3D object clipping enables this field to also be used to allow or disallow things to pass over, under, or stand on this thing.  
*'''correct_height'''
*correct_height
:Default = 0.0
:Default = 0.0
:Floating-point value that represents a height for this thing type which is corrected for 3D object clipping. When 3D object clipping is enabled and the comp_theights variable is set to off, objects which have a non-zero correct_height field will begin to use this value for their height instead of the normal height field. If an object has the 3DDECORATION flags3 bit set, it will still clip missiles at its original height instead of at this value, so that playability of old maps is not altered. This field will generally only be necessary for old DOOM objects, which have now been assigned correct_height values in the default things.edf module. Use for new objects is discouraged; instead, set the height field above to the proper value.
:Floating-point value that represents a height for this thing type which is corrected for 3D object clipping. When 3D object clipping is enabled and the comp_theights variable is set to off, objects which have a non-zero correct_height field will begin to use this value for their height instead of the normal height field. If an object has the 3DDECORATION flags3 bit set, it will still clip missiles at its original height instead of at this value, so that playability of old maps is not altered. This field will generally only be necessary for old DOOM objects, which have now been assigned correct_height values in the default things.edf module. Use for new objects is discouraged; instead, set the height field above to the proper value. *mass
*'''mass'''
:Default = 100
:Default = 100
:Normal integer value that serves as a mass factor for this object. Mass affects the amount of thrust an object is given when it is damaged, the amount of effect an archvile's attack can have on it, and for bouncing objects, the rate at which they fall. Objects with a mass less than 10 will cause small terrain hits when landing on terrain that supports small splashes.
:Normal integer value that serves as a mass factor for this object. Mass affects the amount of thrust an object is given when it is damaged, the amount of effect an archvile's attack can have on it, and for bouncing objects, the rate at which they fall. Objects with a mass less than 10 will cause small terrain hits when landing on terrain that supports small splashes.  
*'''respawntime'''
*damage
:Default = 420
:Sets the number of gametics before the monster may respawn. A tic is 1/35 of a second.
*'''respawnchance'''
:Default = 4
:Sets the chance out of 255 that the monster may respawn after respawntime has passed. The check is done for each tic that the monster isn't blocked.
====Damage Properties====
*'''damage'''
:Default = 0
:Default = 0
:This number is used as a damage multiplier when a [[Thing type flags|MISSILE]] or SKULLFLY actor hits a SHOOTABLE. The damage formula used for impact damage is:  
:This number is used as a damage multiplier when a missile hits a thing. The damage formula used is:  
       ((rnd % 8) + 1) * damage    
       damage = ((rnd % 8) + 1) * missiledamage    
:This field is also used as a parameter by some parameterized codepointers, including [[Scratch]], [[BetaSkullAttack]] and [[Detonate]].
:This field is also used as a parameter by some new, parameterized codepointers, including BetaSkullAttack and Detonate.  
*'''dmgspecial'''
*topdamage
:Default = "none"
:The dmgspecial field allows specification of a special action that will be taken when this object is involved in damaging another object as the inflictor (an inflictor is the object actually doing the damage, and not necessarily the object that is blamed for the damage). Supported values and their meanings are as follows:
:*''none''
::This is the default value. No special action is taken; the object is normal when damaging other things.
 
:*''MinotaurCharge''
::If the thing is flying like a skull (has flags bit SKULLFLY set), it will inflict a large amount of thrust on the target along the vector of the impact, will hit it directly for ((rnd % 8) + 1) * 6 damage, and if the target is a player, the player's controls will be frozen for 14 + (rnd % 8) gametics. When the thing is not in SKULLFLY mode, normal damage is done by all attacks.  
 
:*''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.
 
*'''aimshift''' ''number''
:If in the range of 0 to 24, this value overrides the "shift" amount that enemies of this object experience while trying to aim at it due to effects like SHADOW, GHOST, and TOTALINVISIBLE. A larger number in this field makes enemies more inaccurate when aiming at this creature. The default value of -1 means that no aiming inaccuracy is experienced *except* what may be incurred from what flags this monster has. A value larger than 24 will, on the other hand, override the creature's flags and cause enemies to experience no inaccuracy due to to those flags (so for example a creature inheriting from Spectre and setting its aimshift to 25 will behave as though it does not have the SHADOW flag other than for rendering purposes). Values of 20 and 21 are used by the various built-in flag effects.
 
*'''damagefactor'''
:This sets up the monster's resistance to various [[EDF damagetype reference|damage types]] ("means of death"). 0 means invincible (''but still suffering pain''), 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 lava, 0.2
:As seen above, no braces are used, and the arguments are separated by commas.
:You can also use the '''immune''' keyword to make a thingtype truly immune to certain damage types, preventing any reaction or infighting. Example:
damagefactor fire, immune
 
*'''topdamage'''
:Default = 0
:Default = 0
:This number is a constant amount of damage inflicted on any shootable object that stands on top of this object when 3D object clipping is active. This is useful for objects such as torches and flaming barrels. The frequency of damage is determined by the topdamagemask field.
:This number is a constant amount of damage inflicted on any shootable object that stands on top of this object when 3D object clipping is active. This is useful for objects such as torches and flaming barrels. The frequency of damage is determined by the topdamagemask field. New to EDF 1.7.  
*'''topdamagemask'''
*topdamagemask
:Default = 0
:Default = 0
:This number determines how often a thing with a non-zero topdamage field burns objects that are standing on top of it. This number should be a power of two minus 1 to work properly, such as 1, 3, 7, 15, or 31 (31 would be approximately once per second and is used by DOOM's nukage sector types). New to EDF 1.7.  
:This number determines how often a thing with a non-zero topdamage field burns objects that are standing on top of it. This number should be a power of two minus 1 to work properly, such as 1, 3, 7, 15, or 31 (31 would be approximately once per second and is used by DOOM's nukage sector types). New to EDF 1.7.  
*'''mod'''
*activesound
:Default = UNKNOWN (0)
:Default = none
:Originally standing for "Means of Death", this field allows you to associate a '''[[damagetype]]''' to an inflictor (such as projectile) thing type. Then, you'll be able to make other thing types resistant to the given damage type by using the '''damagefactor''' field. You can give them specific pain or death states as well. Damage types also have the role in multiplayer to specify what obituaries are shown depending on which weapon the player uses.
:Sets the sound used by a thing when it is wandering around. A thing is given a 3 out of 256 chance (1.17%) of making this sound every time it calls the Chase codepointer. There are some new flags3 flags which can alter the behavior of this sound.
:The mnemonics were initially hard-coded, but are now available inside ''base\things.edf'' as '''damagetype''' blocks. Notice that the default damage types (means of death) have been differentiated for each player attack, as well as for the various slime types and whatnot, so as to have the obituaries differentiated. Monsters don't need new damage types to have new obituaries, because these are defined within the '''thingtype''' block. See the two fields below.
*flags
*'''obituary_normal'''
:Default = ""
:Default = empty
:This field controls a number of thing type properties using bit flags, where each bit in the field stands for some effect, and has the value of being either on or off. See the Thing Flag List documentation in the Eternity DeHackEd/BEX Reference, and also see the Bits Mnemonics section 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.
:Defines the obituary seen by players when killed by a projectile or other miscellaneous attack by a monster. If the obituary is not defined for this type, it will simply read that the player died. Note that you are only allowed to specify an obituary starting immediately after the player's name. If you want an obituary to say "Player was flamed", then simply make the obituary read "was flamed".  
*flags2
*'''obituary_melee'''
:Default = ""
:Default = empty
:Similar to flags but takes a different set of values with different meanings. See the Thing Flag List documentation in the Eternity DeHackEd/BEX Reference, and also see the Bits2 Mnemonics section 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.
:Defines the obituary seen by players when killed by a monster's melee attack. If the obituary is not defined for this type, it will simply read that the player died. Note that you are only allowed to specify an obituary starting immediately after the player's name. If you want an obituary to say "Player was stabbed mercilessly", then simply make the obituary read "was stabbed mercilessly".
*flags3
:Default = ""
:Similar to flags, but takes a different set of values with different meanings. See the Thing Flag List documentation in the Eternity DeHackEd/BEX Reference, and also see the Bits3 Mnemonics section 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.  
*cflags
:Default = ""
:New to EDF 1.2, this field allows specification of all the thing's flag values in one single flag list. When this field is defined, the 3 normal flags fields above are ignored. You can use one or the other in any definition, but not both in the same definition. The only caveat to this field is that the flags bit "SLIDE", which has no effect, cannot be specified in this field. If SLIDE is used, it will activate the flags3 bit with the same name, which has the expected effect. All other flags will be assigned to their appropriate internal fields as normal. See the DeHackEd documentation listed in the fields above for full information on flag list format and flag mnemonics.  
*addflags
:Default = ""
:New to EDF 1.2, this field specifies a combined list of flags to be added to the thing's existing flags values (this works the same as the cflags field above). Flags in this list are "turned on" in the thing. If flags are listed here which are already "on," there is no effect on those flags. This field is most useful within thingdelta sections and in concert with thing type inheritance.  
*remflags
:Default = ""
:New to EDF 1.2, this field specifies a combined list of flags to be subtracted from the thing's existing flags values (this works the same as the cflags field above). Flags in this list are "turned off" in the thing, as if they had never been listed. If flags are listed here which are not already "on," there is no effect on those flags. This field is most useful within thingdelta sections and in concert with thing type inheritance. This field will be applied *AFTER* the addflags field is applied, so it could potentially turn off flags turned on by that field.  
*raisestate
:Default = S_NULL
:If this frame is not S_NULL, an Archvile can perform a resurrection on this creature. When this occurs, the creature will enter this frame.
*translucency
:Default = 65536 (100%)
:This field allows fine, customizable control over a thing's translucency. This field accepts two types of values. First, it may be given an integer value in the range of 0 to 65536, with 0 being completely invisible, and 65536 being normal. Alternatively, beginning with EDF 1.3, you can provide a percentage value to this field indicating the amount of the foreground sprite that is blended with the background. A percentage value must be a base 10 integer between 0 and 100, with the final digit followed immediately by a '%' character (percent sign).  


====Pain/Death Properties====
:Note this effect is mutually exclusive of BOOM-style translucency. If this value is not 65536 (or 100%), and the BOOM translucency flag is turned on for the same thing type, the flag will be turned off at run-time, and this field will take precedence.  
*'''nukespecial'''
*bloodcolor
: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.
*'''cleardropitems'''
:The '''cleardropitems''' flag, if present, removes ALL dropitems from a thingtype. This is applied *before* any dropitem or droptype fields defined within this thingtype itself. This allows removing all inherited dropitems at once. This field is a flag and does not accept any value. Its presence in a thingtype is not inheritable (things which inherit from this type must again specify cleardropitems if they want to in turn remove any items this type added).
*'''dropitem ''type'', [, ''chance'' [, ''amount'' [, ''toss'']]]'''
:dropitem defines a Doom- or Heretic-style drop item; any number of dropitems can be defined. All are dropped when an enemy dies, subject to possible randomization.
:*''type'': name of EDF thing type to spawn
:*''chance'': If specified, chance between 0 and 255 to spawn this drop, 0 being no chance and 255 being 100%.
:*''amount'': If specified, overrides the '''dropamount''' field of an '''ammoeffect''' definition. Does not affect any other item effect type. If zero, this field is ignored.
:*''toss'': Flag value. If specified as +toss, the item is a Heretic-style item drop which will be thrown out during the A_Fall action function with randomized velocity. If this flag is not specified, or is specified as -toss, the item is a Doom-style drop item which will be spawned on the floor as soon as the dying thing has reached 0 health.
:Note: The older '''droptype''' field is still supported, and defines a Doom-style dropitem (100% chance, no dropamount override, and never tossed).
*'''dropitem.remove'''
:removes from this thingtype's dropitem list the named EDF thingtype. Useful when inheriting.
*'''collectionspawn''' ''thingtype'' [, ''spchance'' [, ''coopchance'' [, ''dmchance'']]]
:collectionspawn defines a thingtype at which THIS thingtype will select one instance out of all instances on the map at which to spawn itself at level start. This attribute is used by the Heretic Fire Mace. See the example in [https://github.com/team-eternity/eternity/blob/master/base/heretic/things.edf#L3213 Heretic's things.edf] on how it's used.
:Explanation of collectionspawn multivalue properties:
:*''thingtype'': Name of the EDF thingtype at which to spawn at random. If this is invalid, this collectionspawn definition will be disregarded.
:*''spchance'': if specified, chance this item will spawn at all in single player, from 0 to 255. Default is 255.
:*''coopchance'': if specified, chance this item will spawn at all in coop mode, from 0 to 255. Default is 255.
:*''dmchance'': if specified, chance this item will spawn at all in deathmatch mode, from 0 to 255. Default is 255.
*'''itemrespawnat''' ''thingtype''
:itemrespawnat defines an EDF thingtype at which this thingtype will respawn if it becomes subject to Heretic-style item respawning.
 
=====Blood properties=====
*'''bloodcolor'''
:Default = 0
:Default = 0
:Allows this thing type to have differently colored blood when particle blood effects are enabled (this does not currently have any effect on blood sprites). Currently available blood color values are as follows:  
:Allows this thing type to have differently colored blood when particle blood effects are enabled (this does not currently have any effect on blood sprites). Currently available blood color values are as follows:  
Line 501: Line 284:
     Orange              8
     Orange              8
     --------------------------
     --------------------------
 
   
*'''bloodbehavior'''
*fastspeed
:Syntax: '''bloodbehavior''' ''action'', ''behavior''
:Default = 0
:A '''thingtype''' can have one or more of these entries. ''Action'' can be one of: '''shot''', '''impact''', '''rip''' or '''crush'''. ''Behavior'' can be one of: '''Doom''', '''Heretic''', '''HereticRip''', '''Hexen''', '''HexenRip''', '''Strife''' or '''crush'''. Setting this will override game's default settings, which for Doom are respectively ('''Doom''', '''Heretic''', '''HereticRip''', '''crush''') and for Heretic are ('''Heretic''', '''Heretic''', '''HereticRip''', '''crush'''). Due to Doom having no innate impact or rip attacks, it borrows the behaviors from Heretic. The meanings of the actions are as such:
:When the game is switched into Nightmare difficulty or -fast mode is active, all thing types with a non-zero fastspeed will have their speed fields changed to their fastspeed value. This enables editing of the -fast speed of projectiles and monsters. For detailed information on speed, see the speed field itself above. Note: as of EDF 1.2, this field also supports floating-point numbers, with the same meaning as that for the speed field.  
:*'''shot''': from bullet (hitscan) attacks.
*nukespecial
:*'''impact''': from projectiles with the '''DRAWSBLOOD''' flag (Heretic projectiles commonly have this).
:Default = NULL
:*'''rip''': from projectiles with the '''RIP''' flag (Heretic's powered dragonclaw attack has this).
: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.  
:*'''crush''': from crushing surfaces (except for polyobjects).
*particlefx
:The behaviors assigned to each action can be:
:*'''Doom''': spawns the given blood objects with a small vertical speed of 2 and lowers the tic count of the first frame. If damage is less than 9, it will jump to Decorate state '''Blood3''' (or if missing, '''dehackednum''' 92). If damage is between 9 and 12, it will jump to Decorate state '''Blood2''' (or if missing, '''dehackednum''' 91).
:*'''Heretic''': similar to the '''Doom''' behavior, but without the state transition or randomization, and with a random horizontal spread.
:*'''HereticRip''': spawns the blood object at a slight distance away from inflictor or (if missing) target, clears it of gravity and propels it in a direction of inflictor/target's speed. It will also randomly increase the duration of the first state by 0-3.
:*'''Hexen''': like '''Heretic''' but with even more spread.
:*'''HexenRip''': like '''HereticRip''' but with gravity (won't add '''NOGRAVITY''').
:*'''Strife''': similar to Doom but with no duration randomization and with transitions to '''Blood2''', '''Blood1''', '''Blood0''' for damages 0-6, 7-9 or 10-13 respectively.
:*'''crush''': blood splat will be spread horizontally.
 
====Flags====
*'''cflags'''
:Default = ""
:This field allows specification of all the thing's flag values in one single flag list. When this field is defined, flags, flags2, flags3 and flags4 are ignored. The only caveat to this field is that the '''flags''' bit "SLIDE", which has no effect, cannot be specified in this field. If SLIDE is used, it will activate the '''flags3''' bit with the same name, which has the expected effect. All other flags will be assigned to their appropriate internal fields as normal. See the [[Thing type flags]] for their descriptions.  
 
*'''addflags'''
:Default = ""
:This field specifies a combined list of flags to be added to the thing's existing flags values (this works the same as the cflags field above). Flags in this list are "turned on" in the thing. If flags are listed here which are already "on," there is no effect on those flags. This field is most useful within thingdelta sections and in concert with thing type inheritance.
*'''remflags'''
:Default = ""
:This field specifies a combined list of flags to be subtracted from the thing's existing flags values (this works the same as the cflags field above). Flags in this list are "turned off" in the thing, as if they had never been listed. If flags are listed here which are not already "on," there is no effect on those flags. This field is most useful within thingdelta sections and in concert with thing type inheritance. This field will be applied '''AFTER''' the addflags field is applied, so it could potentially turn off flags turned on by that field.  
 
*'''flags'''
:Default = ""
:This field controls a number of thing type properties using bit flags, where each bit in the field stands for some effect, and has the value of being either on or off. 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.
*'''flags2'''
: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.  
*'''flags3'''
: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.
*'''flags4'''
: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.
*'''flags5'''
: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.  
*'''particlefx'''
:Default = 0
:Default = 0
:This field is a flag field with syntax identical to the flags, flags2, and flags3 fields, but which accepts the following values which control what persistent particle effects are associated with objects of this type:  
:This field is a flag field with syntax identical to the flags, flags2, and flags3 fields, but which accepts the following values which control what persistent particle effects are associated with objects of this type:  
Line 564: Line 310:
     WHITEFOUNTAIN  0x00070000    White fountain
     WHITEFOUNTAIN  0x00070000    White fountain
     --------------------------------------------------------
     --------------------------------------------------------
:Note that the fountain flag values cannot be combined with each other. Doing so will simply result in another one of the existing fountain colors.    
   
:The DRIP effect requires parameters to be specified in a thing's [[ExtraData]] mapthing block. The parameters to this effect are as follows:  
:Note that the fountain flag values cannot be combined with each other. Doing so will simply result in another one of the existing fountain colors.  
 
:The DRIP effect requires parameters to be specified in a thing's ExtraData mapthing block. The parameters to this effect are as follows:  
:*args 0: color (palette index from 0 to 255)  
:*args 0: color (palette index from 0 to 255)  
:*args 1: particle width/height in pixels  
:*args 1: particle width/height in pixels  
Line 576: Line 324:
      
      
     # multiple effects
     # multiple effects
     particlefx = BFG+GREENFOUNTAIN
     particlefx = BFG|GREENFOUNTAIN
      
      
     # if there are spaces or disallowed characters, you must use quotations
     # if there are spaces or disallowed characters, you must use quotations
     particlefx = "BFG + GREENFOUNTAIN"
     particlefx = "BFG + GREENFOUNTAIN"
   
*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.
*mod
:Default = UNKNOWN (0)
:Special Means of Death flag for this thing type. Currently supported values follow below. The use of numbers in this field is now considered deprecated. Please use the descriptive textual MOD names in all new EDF projects.
    Mod Name    Number
    ------------------
    UNKNOWN      0
    FIST          1
    PISTOL        2
    SHOTGUN      3
    CHAINGUN      4
    ROCKET        5
    R_SPLASH      6
    PLASMA        7
    BFG          8
    BFG_SPLASH    9
    CHAINSAW      10
    SSHOTGUN      11
    SLIME        12
    LAVA          13
    CRUSH        14
    TELEFRAG      15
    FALLING      16
    SUICIDE      17
    BARREL        18
    SPLASH        19
    HIT          20
    BFG11K_SPLASH 21
    BETABFG      22
    BFGBURST      23
    PLAYERMISC    24
    GRENADE      25
   
:Specifying this field is not necessary for most thing types. It IS highly useful for controlling the obituaries triggered by player projectiles, however. Some of the values above are not fully supported yet. Eventually the LAVA type will cause fire death animations for things which define them.
*obituary_normal
:Default = empty
:Defines the obituary seen by players when killed by a projectile or other miscellaneous attack by a monster. If the obituary is not defined for this type, it will simply read that the player died. Note that you are only allowed to specify an obituary starting immediately after the player's name. If you want an obituary to say "Player was flamed", then simply make the obituary read "was flamed".
*obituary_melee
:Default = empty
:Defines the obituary seen by players when killed by a monster's melee attack. If the obituary is not defined for this type, it will simply read that the player died. Note that you are only allowed to specify an obituary starting immediately after the player's name. If you want an obituary to say "Player was stabbed mercilessly", then simply make the obituary read "was stabbed mercilessly".
*translation
: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 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
    ------------------
   
*dmgspecial
:Default = "none"
:The dmgspecial field allows specification of a special action that will be taken when this object is involved in damaging another object as the inflictor (an inflictor is the object actually doing the damage, and not necessarily the object that is blamed for the damage). Supported values and their meanings are as follows:


====Graphic Properties====
:*none
*'''translucency'''
::This is the default value. No special action is taken; the object is normal when damaging other things.  
:Default = 65536 (100%)
:This field allows fine, customizable control over a thing's translucency. This field accepts two types of values. First, it may be given an integer value in the range of 0 to 65536, with 0 being completely invisible, and 65536 being normal. Alternatively, beginning with EDF 1.3, you can provide a percentage value to this field indicating the amount of the foreground sprite that is blended with the background. A percentage value must be a base 10 integer between 0 and 100, with the final digit followed immediately by a '%' character (percent sign).  


:Note this effect is mutually exclusive of BOOM-style translucency. If this value is not 65536 (or 100%), and the BOOM translucency flag is turned on for the same thing type, the flag will be turned off at run-time, and this field will take precedence.  
:*MinotaurCharge
::If the thing is flying like a skull (has flags bit SKULLFLY set), it will inflict a large amount of thrust on the target along the vector of the impact, will hit it directly for ((rnd % 8) + 1) * 6 damage, and if the target is a player, the player's controls will be frozen for 14 + (rnd % 8) gametics. When the thing is not in SKULLFLY mode, normal damage is done by all attacks.  


*'''translation'''
:*Whirlwind
:Default = 0
::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.  
: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 either inside the '''translations''' folder inside a [[PKE]], or between T_START and T_END markers inside a [[Doom Wiki:WAD|wad]]. Numeric values for player translations are as follows. All of the player translations remap the pure green range:
:*1: indigo
:*2: brown
:*3: red
:*4: tomato
:*5: dirt
:*6: blue
:*7: gold
:*8: sea
:*9: black
:*10: purple
:*11: orange
:*12: pink
:*13: cream
:*14: white
 
*'''tranmap'''
:Default: not used
:This is a [[translucency map]] lump name to use to render the thing. NOTE: it should NOT be between T_START and T_END. Useful if you want custom translucency effects, not easily available with simple parameterized means.


*'''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.  
:NOTE: for any use of '''skinsprite''', you need to add the sprite to the '''spritenames''' list, e.g. <code>spritenames += { SPRT }</code> (for a sprite named <code>SPRT</code>)
*dehackednum
*'''defaultsprite'''
:Default = -1
:Default = the object's first spawn state's sprite
:As explained above, this is the number which must be used to refer to this thing type in DeHackEd patches. -1 means that the thing type is not accessible from DeHackEd. User-defined thing types should currently only use DeHackEd numbers between 10000 and 32768, or simply use -1 if no DeHackEd functionality is required. This number must be unique unless it is -1. As of EDF 1.6, if a thing with a DeHackEd number of -1 is used in a misc or args field, it will be automatically allocated a unique number by the game engine.
:Controls the remapping behavior of skins for objects that use more than one sprite. Any frame not using the defaultsprite is ignored for remapping by the skin. If not set, the defaultsprite is adapted from the object's first spawn state.
*'''alphavelocity'''
:Default = 0.0
:If nonzero, the thing's opacity (alpha value) will raise up to full solidity, or lower to full invisibility, depending on '''alphavelocity''''s sign and quantity per tic. If the '''CYCLEALPHA''' [[Thing type flags|flag]] is set, the thing will cycle between visibility and invisibility with this speed.
*'''xscale'''
:Default = 1.0
:Sets how much the horizontal component of the sprite is to be scaled.
*'''yscale'''
:Default = 1.0
:Sets how much the vertical component of the sprite is to be scaled.
 
====Pick-up effect====
*'''pickupeffect'''
:You can define the details of an item with the '''SPECIAL''' [[Thing type flags|flag]] in this block. See the [[pickupeffect|standalone block definition]] for explanation of the available fields.
*'''clearpickupeffect'''
:If added, it will clear the previous '''pickupeffect''' definition from an inherited '''thingtype''' or when using a '''thingdelta'''. By default it will be copied.
 
====ACS Spawn Data Sub-Block====
*'''acs_spawndata'''
:Default = (nothing)
: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 }
:Heretic objects will use '''modes heretic''' instead of '''modes doom'''. To make it work for any game mode, use '''modes all''' or simply omit it. You shouldn't need to use '''modes''' in any custom mod unless it's available for more than one game.
:'''num''' must be between 0 and 255 inclusive.
[[category:EDF]]
 
==References==
This document has content from:
*New Bifrost features, on Eternity website: http://eternity.mancubus.net/text/bifrost_docs.txt
*Old documentation
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)

Templates used on this page: