Difference between revisions of "Thing"

From DoomWiki.org

[unchecked revision][unchecked revision]
m (link to teleporter)
(formatted to use the standard table instead of html + removed section about ZDoom editing (out of place) and reworded a few things)
Line 5: Line 5:
 
==THINGS lump==
 
==THINGS lump==
 
{{Doom level format}}
 
{{Doom level format}}
Level thing data is stored in the <tt>THINGS</tt> lump.
+
Level thing data is stored in the <tt>THINGS</tt> lump.  This format is used by both [[Doom]] and [[Heretic]].
 
{| {{prettytable}}
 
{| {{prettytable}}
 
!Offset
 
!Offset
Line 53: Line 53:
 
|}
 
|}
  
==ZDoom editing==
+
==Hexen Format==
 
+
[[Hexen]] extended upon the things lump.  Hexen things may contain an action special which is executed upon death or pickup of the thing (for monsters and items, respectivley). Hexen format also introduced true [[z-clipping]], allowing placement of monsters on the z-axisFinally, Hexen monsters are also able to have a tag similar to sectorsThis is called the thing ID or TID.
[[Spawn number]]s 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 interchangeable&mdash;you 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.
 
 
 
[[classes|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 (SpawnNum), 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.
 
 
 
===THINGS structure===
 
  
 
{| {{prettytable}}
 
{| {{prettytable}}
Line 80: Line 73:
 
|10||2||DoomEd thing type
 
|10||2||DoomEd thing type
 
|-
 
|-
|12||2||Flags (see below)
+
|12||2||Flags
 
|-
 
|-
|14||1||Hexen/ZDoom special type
+
|14||1||Hexen action special
 
|-
 
|-
 
|15||1||Argument 1
 
|15||1||Argument 1
Line 95: Line 88:
 
|}
 
|}
  
Doom Format things are 10 bytes in size, while Hexen/ZDoom format things are 20 bytes in size.
+
Note that Hexen things are 20 bytes in size; 10 bytes larger than things in Doom.
  
===Flags===
+
===Hexen Flags===
 +
 
 +
{| {{prettytable}}
 +
!bit||hex||description
 +
|-
 +
|0||0x0001||Thing is on skill levels 1 &amp; 2
 +
|-
 +
|1||0x0002||Thing is on skill level 3
 +
|-
 +
|2||0x0004||Thing is on skill levels 4 &amp; 5
 +
|-
 +
|3||0x0008||Thing is deaf
 +
|-
 +
|4||0x0010||Thing is dormant - it will not wake up until it is activated using Thing_Activate
 +
|-
 +
|5||0x0020||Thing appears only to the Fighter class
 +
|-
 +
|6||0x0040||Thing appears only to the Cleric class
 +
|-
 +
|7||0x0080||Thing appears only to the Mage class
 +
|-
 +
|8||0x0100||Thing appears only in single-player games
 +
|-
 +
|9||0x0200||Thing appears only in cooperative games
 +
|-
 +
|10||0x0400||Thing appears only in deathmatch games
 +
|-
 +
|}
 +
 
 +
==Strife Format==
 +
[[Strife]] did not alter the thing structure like Hexen did, however it did make use of the unused flag bits.
  
<table border cellpadding=2>
+
===Strife Flags===
<tr align=center>
+
{| {{prettytable}}
<td>bit</td> <td>hex</td> <td>description</td>
+
!bit||hex||description
</tr>
+
|-
<tr align=left>
+
|0||0x0001||Thing is on skill levels 1 &amp; 2
<td>0</td><td>0x0001</td><td>Thing is on Skill levels 1 &amp; 2</td>
+
|-
</tr>
+
|1||0x0002||Thing is on skill level 3
<tr align=left>
+
|-
<td>1</td><td>0x0002</td><td>Thing is on Skill level 3</td>
+
|2||0x0004||Thing is on skill levels 4 &amp; 5
</tr>
+
|-
<tr align=left>
+
|3||0x0008||Thing stands still (only useful for specific enemies)
<td>2</td><td>0x0004</td><td>Thing is on Skill levels 4 &amp; 5</td>
+
|-
</tr>
+
|4||0x0010||Thing will not appear in single player
<tr align=left>
+
|-
<td>3</td><td>0x0008</td><td>Thing is Deaf</td>
+
|5||0x0020||Thing is deaf
</tr>
+
|-
<tr align=left>
+
|6||0x0040||Thing is a friendly monster
<td>4</td><td>0x0010</td><td>Thing is dormant until activated</td>
+
|-
</tr>
+
|8||0x0100||Thing is 25% translucent
<tr align=left>
+
|-
<td>8</td><td>0x0100</td><td>Thing is in Single Player</td>
+
|9||0x0200||Thing is invisible
</tr>
+
|}
<tr align=left>
 
<td>9</td><td>0x0200</td><td>Thing is in Co-Op</td>
 
</tr>
 
<tr align=left>
 
<td>10</td><td>0x0400</td><td>Thing is in Deathmatch</td>
 
</tr>
 
<tr align=left>
 
<td>11</td><td>0x0800</td><td>Thing is 25% translucent</td>
 
</tr>
 
<tr align=left>
 
<td>12</td><td>0x1000</td><td>Makes the thing invisible</td>
 
</tr>
 
<tr align=left>
 
<td>13</td><td>0x2000</td><td>Friendly monster</td>
 
</tr>
 
<tr align=left>
 
<td>14</td><td>0x4000</td><td>Thing stands still (only useful for specific Strife monsters or friendlies)</td>
 
</tr>
 
</table>
 
  
Strife
 
<table border cellpadding=2>
 
<tr align=center>
 
<td>bit</td> <td>hex</td> <td>description</td>
 
</tr>
 
<tr align=left>
 
<td>0</td><td>0x0001</td><td>Thing is on Skill levels 1 &amp; 2</td>
 
</tr>
 
<tr align=left>
 
<td>1</td><td>0x0002</td><td>Thing is on Skill level 3</td>
 
</tr>
 
<tr align=left>
 
<td>2</td><td>0x0004</td><td>Thing is on Skill levels 4 &amp; 5</td>
 
</tr>
 
<tr align=left>
 
<td>3</td><td>0x0008</td><td>Thing stands still (only useful for specific Strife monsters)</td>
 
</tr>
 
<tr align=left>
 
<td>4</td><td>0x0010</td><td>Thing is not in Single player</td>
 
</tr>
 
<tr align=left>
 
<td>5</td><td>0x0020</td><td>Thing is Deaf</td>
 
</tr>
 
<tr align=left>
 
<td>6</td><td>0x0040</td><td>Friendly monster</td>
 
</tr>
 
<tr align=left>
 
<td>8</td><td>0x0100</td><td>Thing is 25% translucent</td>
 
</tr>
 
<tr align=left>
 
<td>9</td><td>0x0200</td><td>Makes the thing invisible</td>
 
</tr>
 
</table></td>
 
 
[[Category:Doom engine]]
 
[[Category:Doom engine]]

Revision as of 15:27, 30 January 2005

Things represent players, monsters, pick-ups, and projectiles. Inside the game, these are known as actors. They also represent obstacles, certain decorations, player start positions and teleport landing sites. See Thing types for a listing of all 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.

THINGS lump

Doom level format

Level thing data is stored in the THINGS lump. This format is used by both Doom and Heretic.

Offset Size (bytes) Description
0 2 X position
2 2 Y position
4 2 Angle facing
6 2 DoomEd thing type
8 2 Flags

Flags

bit hex description
0 0x0001 Thing is on skill levels 1 & 2
1 0x0002 Thing is on skill level 3
2 0x0004 Thing is on skill levels 4 & 5
3 0x0008 Thing is deaf
4 0x0010 Thing is not in single player

Boom flags

Boom adds the flags:

bit hex description
5 0x0020 Thing is not in deathmatch
6 0x0040 Thing is not in coop
7 0x0080 Friendly monster

Hexen Format

Hexen extended upon the things lump. Hexen things may contain an action special which is executed upon death or pickup of the thing (for monsters and items, respectivley). Hexen format also introduced true z-clipping, allowing placement of monsters on the z-axis. Finally, Hexen monsters are also able to have a tag similar to sectors. This is called the thing ID or TID.

Offset Size (bytes) Description
0 2 Thing id (tid)
2 2 X position
4 2 Y position
6 2 Starting height
8 2 Angle facing
10 2 DoomEd thing type
12 2 Flags
14 1 Hexen action special
15 1 Argument 1
16 1 Argument 2
17 1 Argument 3
18 1 Argument 4
19 1 Argument 5

Note that Hexen things are 20 bytes in size; 10 bytes larger than things in Doom.

Hexen Flags

bit hex description
0 0x0001 Thing is on skill levels 1 & 2
1 0x0002 Thing is on skill level 3
2 0x0004 Thing is on skill levels 4 & 5
3 0x0008 Thing is deaf
4 0x0010 Thing is dormant - it will not wake up until it is activated using Thing_Activate
5 0x0020 Thing appears only to the Fighter class
6 0x0040 Thing appears only to the Cleric class
7 0x0080 Thing appears only to the Mage class
8 0x0100 Thing appears only in single-player games
9 0x0200 Thing appears only in cooperative games
10 0x0400 Thing appears only in deathmatch games

Strife Format

Strife did not alter the thing structure like Hexen did, however it did make use of the unused flag bits.

Strife Flags

bit hex description
0 0x0001 Thing is on skill levels 1 & 2
1 0x0002 Thing is on skill level 3
2 0x0004 Thing is on skill levels 4 & 5
3 0x0008 Thing stands still (only useful for specific enemies)
4 0x0010 Thing will not appear in single player
5 0x0020 Thing is deaf
6 0x0040 Thing is a friendly monster
8 0x0100 Thing is 25% translucent
9 0x0200 Thing is invisible