Tag 666

From DoomWiki.org

Tag 666 is a special tag number used to denote map-specific behaviors in Doom engine games. Tag 666 is invoked not by crossing a linedef, but by killing monsters. The specific behavior is defined in p_enemy.c. The tag's numeric value is a reference to the Number of the Beast from Christian eschatology, a frequently appearing portion of Doom's theme of Hell and demons.

Relevant maps[edit]

Tag 666 can be used in E1M8 of Doom; E4M6 and E4M8 of Ultimate Doom; MAP07 and MAP32 of Doom II; and E1M8, E2M8, E3M8, E4M8 and E5M8 of Heretic.

Tag 666 can also be used in any Doom II WAD that contains Commander Keen figures, no matter which level they are on. Once all the Keens on a level have been killed, all sectors tagged 666 will open as doors.

In Strife, tag 666 may be used in any map that contains a spectre "E", which is the spectre spawned at the death of the Loremaster. When the spectre dies, all sectors tagged 666 will lower to the lowest surrounding floor.

Procedures[edit]

A_KeenDie[edit]

This procedure is called by the death of each Commander Keen present in the level. When the last Keen dies, doors tagged 666 are opened. This procedure was used as part of an Easter egg in MAP32 of Doom II. Note that this routine checks for all things of the same type as the calling monster, rather than checking for the MT_KEEN type directly, so it can easily be given to other monster types via DeHackEd.

A_BossDeath[edit]

This procedure is called by the death of a boss monster. However, it only takes effect if the monster is the last of its type on the level. There are additional restrictions which differ depending on the game and level.

Doom[edit]

E1M8
Executes a lower floor to lowest neighbor (lowerFloorToLowest) action when all barons of Hell are dead.
E2M8
No sector action: level ends when all cyberdemons are dead.
E3M8
No sector action: level ends when all spiderdemons are dead.
E4M6
Executes a blazing door open (blazeOpen) action when all cyberdemons are dead.
E4M8
Executes lowerFloorToLowest when all spiderdemons are dead.

Doom 2[edit]

MAP07
Executes lowerFloorToLowest when all mancubi are dead.
Executes a raise floor by lower texture (raiseToTexture) action on sectors tagged 667 when all arachnotrons are dead.

Heretic[edit]

E1M8
Executes a lower floor action (lowerFloor) when all iron liches are dead.
E2M8
Executes lowerFloor when all maulotaurs are dead and kills all remaining monsters (by calling P_Massacre).
E3M8
Executes lowerFloor when D'Sparil is dead and kills all remaining monsters (redundantly, since D'Sparil's death does the same thing: A_Sor2DthInit calls P_Massacre before A_BossDeath is run, possibly to catch any disciples spawned by a summon cast just before D'Sparil's death).
E4M8
Executes lowerFloor when all iron liches are dead and kills all remaining monsters.
E5M8
Executes lowerFloor when all maulotaurs are dead and kills all remaining monsters.

Strife[edit]

Any Map
Executes lowerFloorToLowest when all spectre Es are dead and at least one player is currently alive.

Difference in behaviour between Doom1 and Ultimate Doom[edit]

The behavior of tag 666 changed with the release of Ultimate Doom. A constraint was added which restricted tag 666 on E1M8 to triggering only on the death of the last baron, rather than the death of any last boss monster. The classic PWAD Doomsday of UAC relied upon the deaths of both the last baron and the last cyberdemon to trigger it, making the PWAD unplayable in most modern source ports. The original behavior is supported in Chocolate Doom, Doomsday and PrBoom through optional compatibility options, and in ZDoom by autodetection of the level.

Specifically, the following code is responsible (A_BossDeath in p_enemy.c):

       switch(gameepisode)
       {
       case 1:
         if (gamemap != 8)
           return;

         if (mo->type != MT_BRUISER)
           return; 
         break;

The code in bold type defines the new constraint.

Similarly, E2M8 and E3M8 level exits were originally activated on death of any last boss monster except barons. The Ultimate Doom restricted these to deaths of cyberdemons and spiderdemons respectively.

Glitches[edit]

Because the special behavior triggers on the final frame of the monster's death animation, it can be preempted by another frame sequence, such as transition to a crushed corpse. For end-level actions, this can leave the player permanently stuck, unless the level also includes a conventional exit.

See also[edit]

Trivia[edit]

The pre-release version 0.99 of Duke Nukem 3D includes a nearly identical tag feature. When the boss of the first episode is killed, tag 6666 is activated in the map. [1]

External links[edit]