Thing

In Doom, things are used to represent players, monsters, pick-ups, and projectiles. Inside the game, these are known as actors. There are three ways to get an actor into your map. Most things are actors, so the names are often used interchangeably. A few things, however, are not actors, such as player start points.

Referencing things

DoomEd numbers are the numbers used in the editor to represent an actor. When the map is loaded, an actor that corresponds to that number will be spawned at the location of that map thing. Although many actors have DoomEd numbers, not all of them do. For instance, a blue key card has a DoomEd number, but a rocket flying through the air does not.

Spawn numbers are the numbers used by specials such as Thing_Spawn to spawn actors in the game once the user has started playing the map. Although DoomEd numbers and spawn numbers both describe actors, they are not interchangeableyou must not use a spawn number on a map thing, and you must not use a DoomEd number for instance as a Thing_Spawn parameter.

Actor Names are the actual names each actor has internally (to test these you may want to try out the summon console command). These are used with the functions SpawnSpot and Spawn which allow you to spawn any actor available with Thing_Spawn and also all other actors (though some actors aren't meant to be spawned) such as cameras, scenery or whatever you might require.

If you create a new actor with the DECORATE lump, you can specify both the spawn number (SpawnID), and the DoomEd number (DoomEdNum). The name you give the new DECORATE item is also its actor name, so you can also spawn it using that.

There is also a third set of numbers used to represent actors that is only important for DeHackEd and similar. These numbers correspond to the order the actors were defined in the vanilla exe. They have no meaning outside of ZDoom's DeHackEd loader and as a result are not a property. In Strife, they were used to identify actor classes in conversations, but ZDoom turned these into the ConversationID property because identical actors had different numbers in the different versions of Strife available.

Specification (Doom format)

BytesData typeDescriptionNotes
0-1Signed shortX position
2-3Signed shortY position
4-5Unsigned shortAngle0=East, 45=NE, 90=North 135=NW, 180=West, 225=SW, 270=South
6-7Unsigned shortTypeSee the list of standard editor numbers
8-9Unsigned ShortSpawn flags

Specification (Hexen format)

BytesData typeDescriptionNotes
0-1Unsigned shortThing IDThis value is used for scripts and specials
2-3Signed shortX position
4-5Signed shortY position
6-7Signed shortZ position
8-9Unsigned shortAngle0=East, 45=NE, 90=North 135=NW, 180=West, 225=SW, 270=South
10-11Unsigned shortTypeSee the list of standard editor numbers
12-13Unsigned shortSpawn flags
14Unsigned byteAction specialAn action to be executed when this thing is destroyed or picked up
15Unsigned byteAction argument 1
16Unsigned byteAction argument 2
17Unsigned byteAction argument 3
18Unsigned byteAction argument 4
19Unsigned byteAction argument 5

Spawn flags

There are several conflicts in the flag list, depending on game. Map translators are used to define how values are associated to flags in a binary map. UDMF allows to solve these conflicts by not using a bitfield array but instead referring to each flag by name. Several flags are only available in this map format.

FlagZ-BitZ-HexD-BitD-HexS-BitS-HexDescriptionUDMF name
EASY00x000100x000100x0001Thing is spawned on skills #1 and #2skill1 + skill2
MEDIUM10x000210x000210x0002Thing is spawned on skill #3skill3
HARD20x000420x000420x0004Thing is spawned on skills #4 and #5skill4 + skill5
AMBUSH30x000830x000850x0020Thing is lying in ambush (AMBUSH flag is set)ambush
DORMANT40x0010Thing is DORMANT until activateddormant
FIGHTER50x0020Thing is spawned when player class #1 is presentclass1
CLERIC60x0040Thing is spawned when player class #2 is presentclass2
MAGE70x0080Thing is spawned when player class #3 is presentclass3
SINGLE80x0100Thing appears in single-player gamessingle
COOPERATIVE90x0200Thing appears in cooperative gamescoop
DEATHMATCH100x0400Thing appears in deathmatch gamesdm
SHADOW110x080080x0100Thing is 25% translucenttranslucent
ALTSHADOW120x100090x0200Thing is invisibleinvisible
FRIENDLY130x200060x0040FRIENDLY monster using Strife logicstrifeally
STANDSTILL140x400030x0008Thing stands still (only useful for specific Strife monsters or friendlies)standing
SECRETThing is a secret pickupcountsecret
NOTSINGLE40x001040x0010Thing does not appear in single player
NOTDEATHMATCH50x0020Thing does not appear in single deathmatch
NOTCOOPERATIVE60x0040Thing does not appear in cooperative
FRIEND60x0040Thing is a friendly monster using MBF logic (remapped to FRIENDLY)friend
BADEDITORCHECK80x0100Thing was placed in a map editor that sets undefined flags
Thing is spawned on skill #1skill1
Thing is spawned on skill #2skill2
Thing is spawned on skill #4skill4
Thing is spawned on skill #5skill5
Thing is spawned on skill #6skill6
Thing is spawned on skill #7skill7
Thing is spawned on skill #8skill8
Thing is spawned on skill #9skill9
Thing is spawned on skill #10skill10
Thing is spawned on skill #11skill11
Thing is spawned on skill #12skill12
Thing is spawned on skill #13skill13
Thing is spawned on skill #14skill14
Thing is spawned on skill #15skill15
Thing is spawned on skill #16skill16
Thing is spawned when player class #4 is presentclass4
Thing is spawned when player class #5 is presentclass5
Thing is spawned when player class #6 is presentclass6
Thing is spawned when player class #7 is presentclass7
Thing is spawned when player class #8 is presentclass8
Thing is spawned when player class #9 is presentclass9
Thing is spawned when player class #10 is presentclass10
Thing is spawned when player class #11 is presentclass11
Thing is spawned when player class #12 is presentclass12
Thing is spawned when player class #13 is presentclass13
Thing is spawned when player class #14 is presentclass14
Thing is spawned when player class #15 is presentclass15
Thing is spawned when player class #16 is presentclass16

UDMF properties

In addition to the UDMF-exclusive spawn flags above, the following properties can only be used on a thing in UDMF mode. Unless otherwise specified, default values for integers and float is 0, and false for booleans. They include:

NameTypeDescription
alphafloatSets the actor's translucency. It is only applicable to Translucent, Add, Subtract and TranslucentStencil render styles. Default is 1.0.
arg0strstringGives a string value to the first argument. This is used for named scripts and Hexen breakable items.
arg1strstringGives a string value to the second argument. This is used by certain Thing spawning specials.
conversationintegerAssigns a conversation ID to the thing. This corresponds to the id property of a conversation, allowing for dialogue trees specific to a given thing rather than to an entire actor class.
fillcolorintegerSets the actor's fillcolor, which is used by the Stencil and TranslucentStencil render styles, as RRGGBB value.
floatbobphaseintegerSets the actors's floatbobphase. Valid phase values are in the 0-63 range. Setting this to -1 will use the actor's own value for the property. Default is -1.
friendlyseeblocksintegerSets the actor's friendlyseeblocks. If this is set to 0 or less, the actor's default for this property as defined in its actor definition is used instead. Default is -1.
gravityfloatSets the actor's gravity. Positive values are multiplied with the class' gravity property value, negative values are used as their absolute. Default is 1.0.
healthfloatSets the actor's health. Positive values are multiplied with the class's Health property and negative values are used as their absolute. If the value is set to 0, the actor spawns dead (useful for resurrectable monster corpses) Default is 1.0.
pitchintegerSets the actor's pitch in degrees (useful for models).
renderstylestringSets the actor's render style, overriding the class's default. Possible values can be:
  • Normal
  • None
  • Add or Additive
  • Subtract or Subtractive
  • Stencil
  • AddStencil
  • TranslucentStencil
  • Translucent
  • Fuzzy
  • OptFuzzy
  • Soultrans
  • Shaded
  • AddShaded
  • Shadow

Default value is an empty string for no change.

rollintegerSets the actor's roll in degrees (useful for models).
scalefloatSets the actor's vertical and horizontal scaling.
scalexfloatSets the actor's vertical scaling.
scaleyfloatSets the actor's horizontal scaling.
scoreintegerSets the actor's score, overriding the class's default.
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.