The SWITCHES lump is a Boom feature for defining additional switches. Although some modern editors such as SLADE 3 allow to create and edit this lump directly in binary form, the original method devised by TeamTNT involved creating a text file and converting it with a small utility called swantbls (switch and animation tables). SWITCHES lumps are supported by all Boom compatible ports and Doomsday.
SWITCHES lumps are not cumulative; only the last one loaded will be used.
SWITCHES is a series of 20 byte entries:
|9 bytes||Null-terminated name of the "off" texture.|
|9 bytes||Null-terminated name of the "on" texture.|
|2 bytes||16 bit int specifying which IWADs this switch works with:|
The last entry, with a 0 in its final two bytes, is not used.
If a switch is defined while its textures are not present, the vanilla engine will complain, which is why this tiered approach was adopted by id Software originally, and also why Doom II contains some identical switch definitions that are never used in its maps; they correspond to switches from Doom that were dummied out to prevent errors.
The swantbls tool converts a plain text file into an ANIMATED and SWITCHES lump. The format of the plain text file prior to conversion is as follows (quoth defswani.dat):
# This file is input for SWANTBLS.EXE, it specifies the switchnames # and animated textures and flats usable with BOOM. The output of # SWANTBLS is two lumps, SWITCHES.LMP and ANIMATED.LMP that should # be inserted in the PWAD as lumps. # #switches usable with each IWAD, 1=SW, 2=registered DOOM, 3=DOOM2 [SWITCHES] #epi texture1 texture2 1 SW1BRCOM SW2BRCOM ...
#animated flats, spd is number of frames between changes [FLATS] #spd last first 8 NUKAGE3 NUKAGE1 ...
#animated textures, spd is number of frames between changes [TEXTURES] #spd last first 8 BLODGR4 BLODGR1 ...