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 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. When the map is loaded, the player takes control of the last player start placed in the level.
Most source ports do not alter voodoo doll behavior.
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, they pass a line, triggering a crushing ceiling which crushes a voodoo doll to create a (nearly) instant-death effect.
If a voodoo doll moves over an item, the player obtains that item, since both objects refer to the same player structure in memory. This can be used to create "invisible" caches, as with MAP06 and MAP28 of Plutonia: a hidden voodoo doll stands on a platform which is lowered toward a super shotgun or a BFG respectively, so that the player appears to have picked up those weapons 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. 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.
If the player has the same amount of health as the voodoo doll and the voodoo doll is then attacked until its hit points are reduced to zero, the player dies as normal, effectively killing themselves. Problems occur when the player's health is not equal to that of the voodoo doll, causing strange effects.
If the player had more health than their voodoo doll when the voodoo doll was killed, the player enters a strange "undead" state: they lose their weapon, fall to the floor and cannot move or attack; the status bar face however does not appear dead, and monsters who were already pursuing the player will continue to attack them until the player's health is reduced to zero, causing them to die a second time (and killing them properly). It is possible to restart the level even while the player's health is still positive; in any case, restarting the level (or finishing via type 11 damaging floor) in this undead state is functionally identical to a suicide exit and does not affect the gameplay in any way.
Conversely, if the voodoo doll is damaged to the point of reducing the player's health to zero without killing the voodoo doll, a new class of undead player occurs. Like the other case, the player drops their weapon. The differences start in that the status bar face changes to a dead one, but the screen does not lower. The player can continue to move around and open doors, press switches, trigger linedefs and collect items exactly as if they were alive. Monsters who were already pursuing the player continue to do so, but other monsters cannot target the player until their health becomes 1% or higher. Eventually, when the player takes enough damage so that the remaining health of the voodoo doll is depleted to zero, the normal death sequence takes place. Picking up any health item will "revive" the player, enabling them to awake monsters again, though not restoring the ability to use weapons. Exiting the level with positive health remedies all effects of the undeath, including the use of any weapons and ammo picked up while undead. Otherwise, the player will not only retain all zombie characteristics, but also will lose the ability to pick up objects and becomes unaffected by enviromental hazards, such as crushers and damaging floors - thus, unable to take damage nor heal, becoming permanently trapped in this state.
In coop 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 the corresponding player (damaging the player 2 voodoo doll causes player 2 to be damaged, for example).
The death and respawning of a real player has no effect on the voodoo doll's behavior, 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 attacked and 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 coop 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 (e.g. if the other players entered the level after player 1 disconnected), the voodoo doll will not be spawned.
The player's health is tracked separately by the status bar/HUD system and the actual player object(s) in the playsim. 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" 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.
- 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 site (archived). 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.