Voodoo doll
From DoomWiki.org
Voodoo doll is the term used when multiple "Player start" Things exist for the same player on a level. When the level is loaded, each extra player start will have a dormant "zombie" player at its coordinates. If these dormant players are damaged in any way, the actual player will suffer identical damage (hence the name "voodoo doll"). The PWAD selfdead.wad is possibly the earliest published map that contains a voodoo doll. Any other things that happen to the voodoo doll also affect the player's screen. For example, if a voodoo doll falls off a large ledge, the screen will lower momentarily as if they are landing.
Creation of a Voodoo doll inside of a map is trivial; it is as simple as placing more than one player start for the same player inside of a map.
Most source ports do not alter voodoo doll behaviour.
Contents
Special effects
Voodoo dolls can be used for tricks in maps, most notably as "instant-death teleporters". This can be used to implement effects similar to the "bottomless pits of death" that appear in most platform games.
An example of this can be found on TNT:Evilution MAP30. At the start of this level, the player must navigate a path across a grid of platforms. Walking onto the wrong platform causes the player to teleport over a voodoo doll and telefrag himself.
Also there is another special effect to simulate the effect of the player falling too far. As the player falls into the depths of a deep pit he often passes a line which triggers a crushing ceiling which crush the Voodoo Dolls to create an instant death effect.
If a voodoo doll moves over an item, the player obtains that item. This can be used to create "invisible" caches, as with MAP28 of Plutonia: a hidden voodoo doll stands on a platform which is lowered toward a BFG, so the player appears to have picked up the BFG by stepping on a panel.
In Boom compatible source ports and Doomsday, as well as in Heretic, Hexen and Strife, voodoo dolls can be placed on conveyor belts and used to trigger walk linedefs. Through this, a limited form of scripting is possible, as the doll can trigger various actions in sequence. counter.wad demonstrates how this can be used to simulate the effects of electronic circuits by implementing a binary ripple counter composed of conveyor belts and voodoo dolls.
Zombie players
If a voodoo doll's hit points are reduced to zero, the player will die; this will happen even if the player's actual health is still greater than zero, in which case a strange result occurs: the player loses his weapon, falls to the floor and cannot move or attack, but the status bar face does not appear dead, and monsters will continue to attack the player until his health is reduced to zero, causing the player to "die" a second time. The player may restart the level as though he were dead even while his health is greater than zero, and exiting the level in this living-dead state is functionally identical to a suicide exit.
The reverse occurs if the voodoo doll is damaged to the point of reducing the player's health to zero, without killing the voodoo doll. In this case, the player's weapon lowers as though he were dead, but the player does not fall to floor and can continue to move around and open doors, collect items, etc, exactly as if he were alive. Monsters that were already active continue to chase and attack the player, but inactive monsters cannot be awoken by the player. The player will properly die if he sustains "real" (non-voodoo) damage equal to or greater than the damage done to the voodoo doll to cause this state. Picking up any health item will allow the player to awaken monsters and immediately ends the damage incongruity, allowing the player to die normally if his health is subsequently reduced to zero, but the player will not regain the ability to use weapons until exiting the level with greater than zero health, which restores all normal abilities. Exiting the level with zero health in this zombie state will instead cause the player to permanently lose the ability to pick up items and use weapons.
Multiplayer
In co-op games, a voodoo doll will be spawned for each player that has a duplicate player start (if only the Player 1 start is duplicated, there will only be a Player 1 voodoo doll). Each voodoo doll is linked to its own player (damaging the Player 2 voodoo doll causes Player 2 to be damaged, for example).
The death and respawning of a real player has not effect on the voodoo doll's behaviour, however the death of the voodoo doll will cause the real player to not go through the normal death animation, becoming a standing corpse. This standing corpse can be "re-killed", which will not harm the real player. Dead voodoo dolls do not respawn, so any tricks involving the death of a voodoo dolls will only work once.
Many maps contain only a Player 1 voodoo doll, which causes two problems for co-op multiplayer:
- Actions affecting the voodoo doll will only affect player 1, regardless of which player caused the action.
- If Player 1 is not present at the start of the level (eg, if the other players entered the level after Player 1 disconnected), the voodoo doll will not be spawned.
Technical
The player's health is tracked separately from the hit points of the player object(s). Normally this is never noticed, because damaging the player object causes the player's health to be reduced by the same amount, so the numbers should always be identical. When there are multiple player objects, however, the hit points of one or both of those objects will not always match the player's health. For most purposes, Doom considers the player to be dead when the player object's hit points are reduced to zero, regardless of player health; but for other purposes, Doom regards a player with zero health as being dead, regardless of the state of the player object, leading to the "zombie player" behaviour.
Undefined behavior
Voodoo dolls can lead to undefined behavior in some extremely exotic situations. If a voodoo doll with full or near-full health is damaged just enough to kill the real player, but collects a Megasphere or other health item immediately thereafter, it is possible for the player to change to an undefined weapon. This bug is caused by an assumption made by the A_Lower codepointer function in the player's weapon, which makes the decision that any ongoing weapon change made while the player has greater than 0 health must have originated from a player's key press. In the original DOS version of the game, this bug only causes your weapon to permanently disappear, due to the values which are read at the out-of-bounds location. However, due to the fact that it makes illegal memory accesses, its effects vary in every source port that has not fixed the bug, including anything from crashes to appearing to have an unrelated sprite as a weapon.
Examples
- The map Civilian.WAD (file info) features two voodoo dolls to help the player achieve the undead state, and also has an "antidote" for it: taking the berserk pack, then exiting the level, will restore all normal abilities.
- A demonstration from Lee Killough's archive. ZOMBIE.WAD contains a voodoo doll trap which reduces the player's health to exactly 0%, and ZOMBIE1.LMP through ZOMBIE4.LMP show various ways this can affect gameplay.