In Doom, a sprite is a series of images that can be used to display a thing. In the original Doom, adding or changing sprites (and flats) was a big pain in the rear involving making patches to the IWAD. ZDoom rectified this, and you can now easily add new sprites to your PWADs.
Sprite image names have the format:
where NNNN is an arbitrary name for the sprite, F is a letter specifying the frame position (walking1, walking2, shooting, etc), and A specifies the angle.
There are three "reserved" sprite names that have specific effects.
- TNT1 A
- Originally introduced by TeamTNT in Boom, TNT1 frame A is an invisible sprite. Even if graphics are provided (for example, a TNT1A0 lump), it will remain invisible. For actors needing to be invisible, you are advised to use TNT1 instead of other solutions (such as the oft seen NULL) which are not as reliable.
- ---- A
- This sprite is interpreted as "keep previous sprite". The frame letter is irrelevant, so A is generally used. An example is the GenericFreezeDeath state in Actor. To be parsed correctly, this name requires to be within quotes (e.g., "----" A -1).
- #### #
- This sprite is interpreted as ----, but with the difference that it allows overriding selectively either the sprite or the letter, or both. Using #### for the sprite means "keep previous sprite" and using # for the letter means "keep previous letter". An example is the GenericFreezeDeath state in Actor. To be parsed correctly, this name requires to be within quotes (e.g., "####" "#" -1).
You can have 29 frames of animation for any one sprite name, one for each letter of the alphabet plus [, \ or ]. For example POSSA1 is the first walking frame of the zombie trooper, POSSG1 is the pain frame (the animations themselves can be controlled with DEHACKED or DECORATE ).
If you require additional frames beyond [\], you can simply create a new sprite name. For instance, after using POSS]0, it would make sense to use POS2A0.
Sprites can also be defined in TEXTURES.
Generally, items and decorations have only one angle, denoted by a 0 (zero) after their frame letter. E.g. BON1A0 will be used to represent the health bonus no matter which angle you are looking at it from. Moving actors such as monsters and players typically have eight rotations in the original games. ZDoom however allows you to have up to 16 rotations for each sprite. Here is a table that shows what character to use for each angle:
|Sprite angle keys
for each amount
e.g POSSA9 would be used to represent the trooper at an angle of 22.5 degrees. POSSAA is the trooper from a 67.5 degree angle.
Every sprite image can have one alternative mirrored position. Simply add another frame letter and angle notation after the first in the image name. For example, for POSSA2A8, the actual image with this name will be flipped to show the trooper from the 315 degree angle.
Conflicting sprite names
ZDoom supports Doom/Doom II, Heretic, Hexen, and Strife. Enemies or items from any of these games can be brought into any other game. However, this brings to light the fact that some sprites have the same name in one game as another sprite in another game. For example, the Doom Cacodemon uses sprites named HEAD*, but the Heretic Iron Lich uses the same name. To avoid conflicts and allow all sprites to coexist peacefully, a change was made to ZDoom which changes the name of the sprite ZDoom will look for, so long as it is looking at a PWAD. (That way the original IWADs will still work unchanged.)
Sprites are renamed as follows:
BLOD → BLUD (this makes it the same as Doom's blood sprite) HEAD → LICH
ARM1 → AR_1 ARM2 → AR_2 ARM3 → AR_3 ARM4 → AR_4 BARL → ZBAR BLOD → BLUD (this makes it the same as Doom's blood sprite) CAND → BCAN EGGM → PRKM GIBS → POL5 (this makes it the same as Doom's gib sprite) ROCK → ROKK SUIT → ZSUI TRE1 → ZTRE TRE2 → TRES WATR → HWAT MNTRF → MNTRU (these lines make MNTRG → MNTRV the minotaur attack MNTRH → MNTRW frames the same as MNTRI → MNTRX in Heretic to avoid MNTRJ → MNTRY having to patch the MNTRK → MNTRZ actor itself) ARTIINVU → ARTIDEFN (this separates it from INVU → DEFN Heretic's invulnerability item)
ARM1 → ARM3 ARM2 → ARM4 BAR1 → BARC BARL → BBAR BLST → MAUL BLOD → BLUD (this makes it the same as Doom's blood sprite) CNDL → KNDL LOGG → LOGW MISL → SMIS PMAP → SMAP POT1 → MPOT SHRD → SHAR SHT2 → MPUF SPID → STLK TLMP → TECH TRE1 → TRET TRCH → TRHL VASE → VAZE
The upshot of this is that if you want to include custom Iron Lich graphics, you will now use the new sprite, LICH*, rather than HEAD*. If you then wanted to include Cacodemon graphics, you could safely add HEAD* graphics and there will be no conflicts.