DeHackEd / BEX Reference/Thing Block

From Eternity Wiki
Jump to: navigation, search

The DeHackEd Thing block allows you to edit the properties of DOOM's map object types. Map objects are what comprise anything you see with a sprite in DOOM, including enemies, powerups, missiles, decorations, and invisible control objects.

Eternity provides several extensions to the DeHackEd thing block, some of which are considered part of the BEX standard specification. Extended fields will be noted as such in their descriptions.

Back to DeHackEd / BEX Reference

Syntax[edit]

A brief explanation of the syntax description:

Items in angle brackets (< >) are required.

Items in square brackets ([ ]) are optional.

All fields in the block are optional. If a field is not provided, that value of the thing being edited will not change.

A || symbol means that the field can have one of the two listed types of values.

  Thing <dehacked number> [(thing type name)]
  ID # = <number>
  Initial frame = <frame number>
  Hit points = <number>
  First moving frame = <frame number>
  Alert sound = <sound number>
  Reaction time = <number>
  Attack sound = <sound number>
  Injury frame = <frame number>
  Pain chance = <number>
  Pain sound = <sound number>
  Close attack frame = <frame number>
  Far attack frame = <frame number>
  Death frame = <frame number>
  Exploding frame = <frame number>
  Death sound = <sound number>
  Speed = <number>
  Width = <number>
  Height = <number>
  Mass = <number>
  Missile damage = <number>
  Action sound = <sound number>
  # The ability to provide flag lists is a BEX extension
  Bits = <number || flag list>
  Respawn frame = <frame number>      
  # The below fields are Eternity Engine extensions
  Bits2 = <number || flag list>
  Bits3 = <number || flag list>
  Translucency = <number>
  Blood color = <number>   

Explanation of special information:

dehacked number is the DeHackEd number of the thing type that this block edits. The DeHackEd number for a thing type is given in its EDF thingtype definition.

(thing type name) is an optional string which gives a descriptive name to this block. This field is NOT used by Eternity, and can be left off. Its only purpose is to serve as a comment letting you better know which thing type you are editing.

Fields[edit]

ID # = <number>[edit]

Sets the id, or "doomednum", 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 ID number. Things which are not spawned on maps, such as fireballs, can be given an ID of -1.

Initial frame = <frame number>[edit]

Sets the frame which a thing starts in when it is spawned. Monsters generally use this frame to stand still and look for targets. <frame number> must be a valid frame DeHackEd number.

Hit points = <number>[edit]

Sets a thing's maximum amount of life. It is only used for things which can be shot.

First moving frame = <frame number>[edit]

Sets the frame which a monster will jump to when it sees or hears a target. Also called walking frames.

Alert sound = <sound number>[edit]

Sets the sound that a monster will play when it awakens. This sound is also played by missiles when they are shot. <sound number> must be a valid sound number. See the sound number table for details.

Reaction time = <number>[edit]

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.

Attack sound = <sound number>[edit]

Sets a sound used by some monster attacks, including the Lost Soul's charge.

Injury frame = <frame number>[edit]

Sets the frame a thing may randomly enter when it has been injured.

Pain chance = <number>[edit]

Sets the chance out of 255 that this thing will enter its pain state when it is injured. A thing with 0 pain chance will never feel pain, whereas a thing with 255 pain chance will always feel pain. If a thing has a pain chance greater than zero, it should have a valid Injury frame, otherwise it will disappear forever.

Pain sound = <sound number>[edit]

Sets the sound played by the Pain codepointer when this thing uses it. Monsters and the player always call Pain from their Injury frames.

Close attack frame = <frame number>[edit]

If this frame is non-zero, 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.

Far attack frame = <frame number>[edit]

If this frame is non-zero, monsters chasing a target will randomly enter it to perform a missile attack.

Death frame = <frame number>[edit]

When a thing dies normally, it will enter this state. If the state is zero, the thing will disappear forever.

Exploding frame = <frame number>[edit]

If a thing dies by taking enough damage that its health is equal to its negated Hit points value, it will enter this frame instead of its Death frame. This is also known as gibbing, or extreme death. If this frame is zero, the thing will always die normally.

Death sound = <sound number>[edit]

Sound played by the Scream codepointer. Used to play monster death sounds.

Speed = <number>[edit]

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.

Width = <number>[edit]

Fixed-point value (multiplied by 65536) 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 2097152, which is equal to 32 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 this to remain absolutely safe.

Height = <number>[edit]

Fixed-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. For purposes of clipping, monsters are 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.

Mass = <number>[edit]

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.

Missile damage = <number>[edit]

This number is used as a damage multiplier when a missile hits a thing. The damage formula used is:

       damage = ((rnd % 8) + 1) * missiledamage
    

This field is also used as a parameter by some new, parameterized codepointers, including BetaSkullAttack and Detonate.

Action sound = <sound number>[edit]

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 Bits3 flags which can alter the behavior of this sound.

Bits = <number || flag list>[edit]

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. In old DeHackEd patches, this field is an integer number. BEX Extensions allow a human-readable string of flag values to be provided instead. See the flag field lists below for more information.

Bits2 = <number || flag list>[edit]

Similar to Bits but takes a different set of values with different meanings. This field is an Eternity extension. See below for more information.

Bits3 = <number || flag list>[edit]

Similar to Bits but takes a different set of values with different meanings. This field is an Eternity extension. See below for more information.

Respawn frame = <frame number>[edit]

If this frame is non-zero, an Archvile can perform a resurrection on this creature. When this occurs, the creature will enter this frame.

Translucency = <number>[edit]

This field is an Eternity extension which allows fine, customizable control over a thing's translucency. The value of this field may range from 0 to 65536, with 0 being completely invisible, and 65536 being normal. Consider the following example:

       Thing 2 (Trooper)
       Translucency = 32768
    

Trooper objects will be 50% translucent in this example, since 32768 is half of 65536. Note this effect is mutually exclusive of BOOM-style translucency. If this value is not 65536, and the BOOM translucency flag is turned on, the flag will be turned off at run-time, and this field will take precedence.

Blood color = <number>[edit]

This field is an Eternity extension. 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:

     Blood color       Number
    --------------------------
     Red (normal)        0
     Grey                1
     Green               2
     Blue                3
     Yellow              4
     Black               5
     Purple              6
     White               7
     Orange              8
    --------------------------

BEX Extension: Thing Flag Lists[edit]

This is actually something you can use to hack your DeHackEd file to be more understandable and modifiable. Note that once you do this you won't be able to bring it back into DeHackEd.

If you've altered a thing's bits at all, you'll see a line like:

 Bits = 205636102

That horrible number is why we are providing some mnemonics instead. All you need to do is to put the appropriate ones of the following mnemonics on the line where the big number is, and it'll be read in and converted to the number for you. Some valid example lines:

 Bits = SOLID+SHOOTABLE+NOBLOOD
 ...
 Bits = NOBLOCKMAP | NOGRAVITY
 ...
 Bits = SPECIAL, COUNTITEM

which converts to Bits = 524294 but you didn't have to figure that part out. Just use a plus, '|', comma, or whitespace between the mnemonics. Below are mnemonic lists, along with a bit of explanation of each, and the phrase that's used in Dehacked to describe them. If there are any disagreements between the 2 definitions, ours wins.

Bits Mnemonics[edit]

 Mnemonic      Bit mask     Meaning / Dehacked phrase
 ------------------------------------------------------------------
 SPECIAL       0x00000001 - Object is a collectable item.
                                 "Can be picked up"
 SOLID         0x00000002 - Blocks other objects.
                                 "Obstacle"
 SHOOTABLE     0x00000004 - Can be targetted and hit with bullets, missiles.
                                 "Shootable"
 NOSECTOR      0x00000008 - Invisible but still clipped -- see notes.
                                 "Total invisibility"
 NOBLOCKMAP    0x00000010 - Inert but displayable; can hit but cannot be hit.
                                 "Can't be hit"
 AMBUSH        0x00000020 - Deaf monster.
                                 "Semi-deaf"
 JUSTHIT       0x00000040 - Internal, monster will try to attack immediately; see notes.
                                 "In pain"
 JUSTATTACKED  0x00000080 - Internal, monster takes at least 1 step before attacking; see notes.
                                 "Steps before attack"
 SPAWNCEILING  0x00000100 - Thing spawns hanging from the ceiling of its sector.
                                 "Hangs from ceiling"
 NOGRAVITY     0x00000200 - Thing is not subject to gravity.
                                 "No Gravity"
 DROPOFF       0x00000400 - Thing can walk over tall dropoffs (> 24 units).
                                 "Travels over cliffs"
 PICKUP        0x00000800 - Thing can pick up items -- see notes.
                                 "Picks up items"
 NOCLIP        0x00001000 - Thing is not clipped, can walk through walls.
                                 "No clipping"
 SLIDE         0x00002000 - No effect -- see notes.
                                 "Slides along walls"
 FLOAT         0x00004000 - Monster may move to any height; is flying.
                                 "Floating"
 TELEPORT      0x00008000 - Don't cross lines or look at teleport heights.
                                 "Semi-no clipping"
 MISSILE       0x00010000 - Thing is a missile, explodes and inflicts damage when blocked.
                                 "Projectiles"
 DROPPED       0x00020000 - Internal, item was dropped by a creature and won't respawn.
                                 "Disappearing weapon"
 SHADOW        0x00040000 - Use fuzz draw effect like spectres, also causes aiming inaccuracy.
                                 "Partial invisibility"
 NOBLOOD       0x00080000 - Object puffs instead of bleeds when shot.
                                 "Puffs (vs. bleeds)"
 CORPSE        0x00100000 - Internal, object is dead and will slide down steps.
                                 "Sliding helpless"
 INFLOAT       0x00200000 - Internal, monster is floating but not to target height -- see notes.
                                 "No auto-leveling"
 COUNTKILL     0x00400000 - Can be targetted, adds 1 to kill percent when it dies -- see notes.
                                 "Affects Kill %"
 COUNTITEM     0x00800000 - Item adds 1 to item percent when collected.
                                 "Affects Item %"
 SKULLFLY      0x01000000 - Internal, special handling for flying skulls -- see notes.
                                 "Running"
 NOTDMATCH     0x02000000 - Thing will not be spawned at level start when in Deathmatch.
                                 "Not in deathmatch"
 TRANSLATION1  0x04000000 - Use translation table for color (players)'.
 (aka TRANSLATION)               "Color 1 (gray/red)"
 
 TRANSLATION2  0x08000000 - Second bit for color translation;
 (aka UNUSED1)                   "Color 2 (brown/red)"
                                 
 TOUCHY        0x10000000 - Thing dies on contact with any solid object of another species;
 (aka UNUSED2)                    MBF Extension, see notes.
 BOUNCES       0x20000000 - Thing may bounce off walls and ceilings;
 (aka UNUSED3)                    MBF Extension, see notes.
 FRIEND        0x40000000 - All things of this type are allied with player;
 (aka UNUSED4)                    MBF Extension.
 
 TRANSLUCENT   0x80000000 - Apply BOOM-style translucency to sprite;
                                  BOOM Extension, see notes.
 ------------------------------------------------------------------                                   

Notes on Bits values:

NOSECTOR:[edit]

This flag has some odd side effects. For a pure total invisibility effect, use the new DONTDRAW flag in the Bits2 field.

JUSTHIT:[edit]

This flag is for internal AI use, applying it to a thing will have more or less no effect.

JUSTATTACKED:[edit]

As above.

PICKUP:[edit]

Only the player should possess this flag. If monsters try to pick up items, results will be undefined. This may change in the future.

SLIDE:[edit]

This flag has absolutely no effect and is never used anywhere. For compatibility, it must remain this way. A new flag, SLIDE, in the Bits3 field, DOES have this effect, however, and is used by the player object and Heretic pods, by default.

INFLOAT:[edit]

This flag is for internal AI use only.

COUNTKILL:[edit]

This flag actually has two effects. If a monster does not have the COUNTKILL flag, other monsters may ignore it, and some other engine features will not work properly for it. This is generally undesirable. A new Bits3 flag KILLABLE, used by the Lost Soul by default, allows monsters to behave normally even without having this flag.

SKULLFLY:[edit]

This flag is for internal AI use only.

TOUCHY:[edit]

This new MBF extension allows things to instantly die if any solid thing of a differing species touches it. Note that for purposes of this effect, Lost Souls and Pain Elementals are considered to be the same species.

BOUNCES:[edit]

This flag declares that the thing is bouncy. The exact behavior of the thing can be modified by combining this with other flags in the following manners:

BOUNCES + MISSILE:[edit]

Object bounces off of floors and ceilings only.

BOUNCES + NOGRAVITY:[edit]

Object bounces off all surfaces without losing momentum, unless its also a missile.

BOUNCES + FLOAT:[edit]

Without NOGRAVITY, allows monsters to jump to reach their target.

BOUNCES + FLOAT + DROPOFF:[edit]

Allows even higher bouncing / jumping.

BOUNCES:[edit]

When the flag is alone, without MISSILE, it allows the object to bounce off all surfaces, losing momentum at each contact. It can also roll up and down steps. This is highly realistic.

TRANSLUCENT:[edit]

This thing will use the global BOOM translucency level for its sprite. If general translucency is off, it will draw normally. This effect is mutually exclusive with the new Eternity extension for translucency. If the latter is enabled, this flag will be turned off by the game at run-time.


Bits2 Mnemonics (Eternity extension)[edit]

 Mnemonic      Bit mask     Meaning
 ------------------------------------------------------------------
 LOGRAV        0x00000001 - Thing experiences low gravity; see notes.
 
 NOSPLASH      0x00000002 - Thing cannot trigger TerrainTypes.
 
 NOSTRAFE      0x00000004 - Thing never uses advanced strafing logic.
 
 NORESPAWN     0x00000008 - Thing will not respawn in nightmare mode.
 
 ALWAYSRESPAWN 0x00000010 - Thing will respawn at any difficulty level.
 
 REMOVEDEAD    0x00000020 - Thing removes itself shortly after death; see notes.
 
 NOTHRUST      0x00000040 - Thing is unaffected by push/pull, wind, current, or conveyors.
 
 NOCROSS       0x00000080 - Thing cannot trigger crossable special lines.
 
 JUMPDOWN      0x00000100 - Thing, when friendly, can jump down to follow player.
 
 PUSHABLE      0x00000200 - Thing is pushable by other moving things.
 
 MAP07BOSS1    0x00000400 - Thing must be dead for MAP07 tag 666 special.
 
 MAP07BOSS2    0x00000800 - Thing must be dead for MAP07 tag 667 special.
 
 E1M8BOSS      0x00001000 - Thing must be dead for E1M8 tag 666 special.
 
 E2M8BOSS      0x00002000 - Thing must be dead for E2M8 end-level special.
 
 E3M8BOSS      0x00004000 - Thing must be dead for E3M8 end-level special.
 
 BOSS          0x00008000 - Thing is a boss; roars loud and is invincible to blast radii.
                               
 E4M6BOSS      0x00010000 - Thing must be dead for E4M6 tag 666 special.
 
 E4M8BOSS      0x00020000 - Thing must be dead for E4M8 tag 666 special.
 
 FOOTCLIP      0x00040000 - Thing lowers when on liquid terrain.
 
 FLOATBOB      0x00080000 - Thing floats up and down on z axis.
 
 DONTDRAW      0x00100000 - Thing is totally invisible; enemies cannot see player.
 
 SHORTMRANGE   0x00200000 - Thing has a shorter than normal missile range.
 
 LONGMELEE     0x00400000 - Thing has a longer than normal melee range.
 
 RANGEHALF     0x00800000 - Thing considers itself to be half as far from target.
 
 HIGHERMPROB   0x01000000 - Thing has a higher missile attack probability.
 
 CANTLEAVEFLOORPIC
               0x02000000 - Thing can only move into sectors with the same flat.
 
 SPAWNFLOAT    0x04000000 - Thing spawns with a randomized z coordinate.
 
 INVULNERABLE  0x08000000 - Thing is invulnerable to damage less than 10000 points.
 
 DORMANT       0x10000000 - Thing is invulnerable and inert until activated by script; see notes.
 
 SEEKERMISSILE 0x20000000 - Indicates that this thing may be used as a homing missile; see notes.
 
 DEFLECTIVE    0x40000000 - When paired with REFLECTIVE, thing will reflect at a wide angle.
 
 REFLECTIVE    0x80000000 - Thing reflects missile projectiles; see notes.
 ------------------------------------------------------------------                                   

Notes on Bits2 values:

LOGRAV:[edit]

Has no effect on BOUNCY things

REMOVEDEAD:[edit]

Things with this flag also cannot respawn in Nightmare mode. Do not give the player this flag.

DORMANT:[edit]

Does not function as expected unless a thing is spawned on the map at startup with the DORMANT mapthing flag set in the level itself. It cannot be switched on and off freely.

SEEKERMISSILE:[edit]

This flag is used by reflection code to check if a missile is being used as a homing missile. When a homing missile with this flag is reflected, its tracer target will be set to the thing that fired it, so that it will properly home on its originator instead of its original target.

REFLECTIVE:[edit]

Does not impart invulnerability, and unless paired with that flag, the object will take damage before bouncing the projectile back.

Bits3 Mnemonics (Eternity extension)[edit]

 Mnemonic      Bit mask     Meaning
 ------------------------------------------------------------------
 GHOST         0x00000001 - Thing is a Heretic-style ghost; enemies may not see player.
 THRUGHOST     0x00000002 - Missiles with this flag pass through GHOST objects.
 NODMGTHRUST   0x00000004 - Things aren't thrusted when damaged by this thing.
 ACTSEESOUND   0x00000008 - Thing may make see sound instead of active sound; 50% chance.
 LOUDACTIVE    0x00000010 - Thing makes its active sound at full volume.
 E5M8BOSS      0x00000020 - Thing is a boss on Heretic level E5M8.
 DMGIGNORED    0x00000040 - Other things will not fight this thing if damaged by it.
 BOSSIGNORE    0x00000080 - Things won't fight other species with this flag.
 SLIDE         0x00000100 - Thing can slide against walls; see notes.
 TELESTOMP     0x00000200 - Thing can telefrag other things.
 WINDTHRUST    0x00000400 - Thing is affected by Heretic-style wind sectors; see notes.
 
 FIREDAMAGE    0x00000800 - Reserved; currently has no effect.
 
 KILLABLE      0x00001000 - Thing doesn't count for kill %, but is still an enemy; see notes.
 
 DEADFLOAT     0x00002000 - Flying thing won't drop to the ground when killed.
 
 NOTHRESHOLD   0x00004000 - Thing has no threshold for acquiring a new target.
 
 FLOORMISSILE  0x00008000 - Missile can step up/down any height changes when on ground.
 
 SUPERITEM     0x00010000 - Item respawns only if the "super items respawn" DMFLAG is on.
 
 NOITEMRESP    0x00020000 - Item never respawns, and will not be crushed.
 
 SUPERFRIEND   0x00040000 - Thing never attacks other friends when friendly.
 
 INVULNCHARGE  0x00080000 - Thing is invulnerable when SKULLFLY flag is set.
 
 EXPLOCOUNT    0x00100000 - Missile will not explode if Counter 1 < Counter 2.
                            Counter 1 will be incremented at each explosion attempt.
                            
 CANNOTPUSH    0x00200000 - Thing cannot push things with the PUSHABLE flag.
 
 TLSTYLEADD    0x00400000 - Thing uses additive translucency style.
 
 SPACMONSTER   0x00800000 - Thing can activate parameterized line specials which bear
                            the MONSTER activation flag.
                            
 SPACMISSILE   0x01000000 - Thing can activate parameterized line specials which bear
                            the MISSILE activation flag.
 
 NOFRIENDDMG   0x02000000 - Thing will not be damaged by things with the FRIEND flag.
 
 3DDECORATION  0x04000000 - Thing is a decoration which, when 3D object clipping is
                            active, will NOT use its corrected height, even if one
                            is specified in its EDF thingtype definition.
 ALWAYSFAST    0x08000000 - Thing has -fast/Nightmare mode attack speed behavior in
                            any difficulty level.
                            
 PASSMOBJ      0x10000000 - Thing is fully treated with respect to 3D object clipping.
                            All monsters and other moving solid things should have this
                            flag.
                            
 DONTOVERLAP   0x20000000 - This thing type prefers not to overlap with other things
                            vertically when possible.
 ------------------------------------------------------------------

Notes on Bits3 values:

SLIDE:[edit]

As noted in the documentation for Bits flag SLIDE, it does nothing. This flag, however, actually works, and is used by the player and by Heretic pods.

WINDTHRUST:[edit]

This controls only which things are affected by the new Heretic wind special, controlled by control linedef type 293. Any thing type with this flag will experience thrust relative to the angle and magnitude of the control linedef when it is anywhere within a tagged sector.

KILLABLE:[edit]

As noted in the documentation for Bits flag COUNTKILL, enemies without that flag normally suffer severe side-effects. This new flag generalizes what was previously a special case for the Lost Soul, and allows enemies which don't count toward the kill percentage to be otherwise normal.