Definition Scripts

Table of Contents

MapInfo

The MapInfo script is used to define characteristics of the levels. Currently it only can contain map definitions (note: this doesn’t seem to be up-to-date information, skill definitions can also be tuned using MapInfo).

Map definition

A map definition begins with the “map” keyword. You can also specify standard characteristics for later map definitions by using the word “defaultmap” instead.

map <lumpname> <name>

This keyword begins a map definition.

  • <lumpname> is the name of the lump in wad file.
  • <name> is a nice name displayed when entering or exiting a map (if graphics are not specified) and in automap.

defaultmap

This keyword begins a default map definition.

levelnum <number>

Defines a number of this map that is used in MapTeleport and StartACS specials.

warptrans <number>

Actual map number in case maps are not sequential. A map with ”WARPTRANS 1” is a map where Vavoom running will start the game (from the main menu) in Doom 2 and Hexen. All other values are ignored (there’s no more ”-warp” option and the console command MAP takes the map’s lump name, not number).

next <mapname>

Map to teleport to upon exit of timed deathmatch or with the normal exit action special

Note (for timed deathmatches): In the normal gameplay, there is no linear fashion in which the game progresses from one level to another; you just go through a teleport somewhere on a level, and it takes you to somewhere on another level. For timed deathmatch, the game needs to know what level to proceed to because it isn’t always just the next higher level.

secret <mapname>

Map to teleport to with the secret exit action special

music <lumpname>

MUS or MIDI to play during the level, replaces entries in SNDINFO script

cdtrack <number>

CD track to play during the level

cluster <number>

Defines what cluster this level belongs to, 0 for no-cluster.

The game maps are divided into clusters. When you enter a new cluster, you can never again visit any of the levels from the previous cluster. This makes it so each individual save game only needs to backup map archives for about 6-7 maps, and provides a milestone marker of sorts for gameplay, like an episode — a Hexen backdrop and some text are given at the end of each cluster.

If you don’t enter a cluster, it defaults to 0. Cluster 0 is treated as no-cluster, all maps in cluster 0 are treated as in different clusters.

sky1 <texture> <speed>

Default sky texture; followed by speed

sky2 <texture> <speed>

Alternate sky displayed in Sky2 sectors ; followed by speed

doublesky

parallax sky: sky2 behind sky1

lightning

Keyword indicating the use of lightning on the level flashes from sky1 to sky2 (see also: IndoorLightning special)

skybox <name>

A skybox is used in this level, old sky will be ignored

fadetable <lumpname>

When set to FOGMAP, the level will have fog, other values are ignored

gravity <value>

This parameter can set the gravity of the whole map, you can combine this parameter with the SetGravity special, if it’s not specified its default value is 0. Not that here it uses an integer instead of a float, so “gravity 800” would be the same as not using the argument, “gravity 1600” would double the gravity and “gravity 400” would halve it.

Episode Definitions

An episode definition begins with the word “episode”. You can also clear previous episodes by using the “clearepisodes” word. If there is only one episode, then the player will not be prompted.

episode <maplump>

Substitute the map name of the map that you want the episode to start on for <maplump>. <maplump> can be any lump in the WAD, as long as it is a valid map file.

name <nice name>

This is the episode’s name as text. If you do not provide a picname, then Vavoom will display this text.

picname <piclump>

Replace <piclump> with the graphic lump that you wish to use on episode selection menu screen. If you specify an invalid lump, the invalid graphic image will be used. If you specify “”, no graphic will be used. If you omit this word, then the name that you provided in name will be displayed instead.

key <key>

This sets a shortcut key for the menu selection. Any key on the keyboard is valid.

Note: Vavoom doesn’t implement this currently.

remove

This removes the episode. I don’t see why you would remove an episode that you have just defined, but the option is there.

noskillmenu

Disables the skill menu for this episode, instead it always starts on skill 2.

This is for WADs that implement skill selection by an introduction map.

clearepisodes

This clears all previous episodes. This could be used if you wish to have fewer episodes than are originally present in the IWAD that you are using.

Examples

map 1 "Winnowing Hall"
warptrans 1
next 2
cluster 1
sky1 SKY2 2 ; 2 is the sky scroll speed
sky2 SKY3 0 ; 0 means don't scroll sky
lightning
doublesky
cdtrack 13
map E1M1 "hangar"
next E1M2
secret E1M9
sky1 SKY1 0 ; 0 means don't scroll sky
music D_e1m1
map TOWN "Town of the Apidomb"
warptrans 1
levelnum 1
next CAVE1
cluster 1
skybox town_sky_with_clouds
cdtrack 4
music MD_TOWN
episode e1m1
name "Knee Deep in the Dead"
picname m_epi1
key k

SndInfo

SndInfo contains many sound-related definitions. It allows any sound referred to by its lump name (DSSAWHIT, DSBAREXP, etc) to be associated with any game event sound such as player pain, or death. The names by which the predefined sounds are referred to in SndInfo are fairly self-explanatory, so I will not cover them now.

SndInfo lumps are cumulative. All SndInfo lumps found are read in WAD directory order. This means that you don’t have to (in fact you must not) copy all information from the original SndInfo lump if you want to change something.

SndInfo supports the following commands:

  • sound assignment (logicalname lumpname)
    • This does not use a specific command. Just write the two names on one line in the file, the logical name (that’s the name that’s used in the other commands here, in the game or in other lumps that use sound name) first and the lumpname of the sound that is to be used second.
  • $random logicalname { realname1 realname2 realname3 … }
    • Defines a random sound. The newly defined sound can be used like a regular sound but any time it is used one of the sounds specified in the list is randomly selected. The number of sounds in the list is unlimited.
  • $alias aliasname soundname
    • Assigns a second logical name to an already existing sound. The existing sound can also be a random sound or another alias. Any change to the original sound in subsequent SNDINFO lumps is automatically transferred to the new sound.
  • $limit soundname <amount>
    • Specifies that at most <amount> instances can be played at once. A value of 0 means no limit at all.
  • $pitchshift soundname <range>
    • Specifies how much the pitch of the specified sound may be randomly altered when it is played. <range> may be in the range of 0 to 7.
  • $pitchshiftrange <range>
    • Sets a default pitch shift value that is applied to all subsequent sound definitions.
  • $playerreserve soundname
    • Reserves the specified sound name for use by a player. For compatibility with some other ports this command must come before all other player sound definitions and should not be used in PWADs (Note: Vavoom doesn’t have this limitation).
  • $playersound playerclass gender logicalname lumpname
    • Defines a sound used by a player. The logical name must first be reserved with $playerreserve before it can be used here. <playerclass> must be ‘player’ for all games other than Hexen. In Hexen it can be either ‘fighter’, ‘mage’ or ‘cleric’. Gender can be ‘male’, ‘female’ or ‘other’. Here you can find a list of all known player sounds and their meaning.
  • $playersounddup playerclass gender logicalname otherplayersound
    • Defines a sound used by player and copies the sound used from the existing player sound.
  • $playeralias playerclass gender logicalname otherlogicalsound
    • Creates an alias to the existing logical sound.
  • $playercompat playerclass gender logicalname compatibilityname
    • Defines a compatibility alias for a specific player sound. If any sounds with these compatibility names are defined later, they will redefine the corresponding player sounds instead. Likewise, if they are played, they will play the corresponding player sound instead.
  • $ambient index logicalsound type mode <volume>
    • Defines an ambient sound which is played when one of the ambient sound things (14001-14065) is placed in a map. <index> specifies which thing or which parameter for the generic ambient sound thing has to be used. <logicalsound> specifies the sound to be played, <volume> the volume at which it is played.
    • type can be one of the following:
      • point [atten]: Defines a positional sound. The volume at which the sound is played decreases with distance. The optional parameter <atten> specifies how quickly this decrease occurs. Larger values means quicker decreases. The value is specified as a floating point value. The default for <atten> is 1.0.
      • surround: Plays the sound at full volume in surround mode.
      • world: Plays the sound at full volume regardless of distance. The keyword ‘world’ is optional.
    • mode can be one of the following:
      • continuous: Plays the sound as a repeating endless loop.
      • random <minsecs> <maxsecs>: Plays the sound at random intervals. The minimum and maximum length of this interval can be specified in seconds. Both values are floating point numbers.
      • periodic <secs>: Plays the sound at regulat intervals. The length of these intervals is specified in seconds as a floating point value.
  • $map mapnumber musicname
    • This was the way level music was defined in Hexen. It is merely provided for compatibility and should not be used anymore. Level music should be defined in the MAPINFO lump with the rest of the level’s parameters.
  • $musicvolume musicname factor
    • Sets a volume scaling factor for music tracks. This is used to compensate for music that has audibly different volume.
  • $registered
    • This command is defined for Hexen compatibility but completely ignored.
  • $archivepath string
    • This command is defined for Hexen compatibility but completely ignored.

An interesting note: the Vavoom engine supports different player pain sounds depending on health. In Doom, Heretic and Hexen there is only one player pain sound, so it is handled like this in SndInfo:

$playersounddup player male *pain100 *dsplpain
$playersounddup player male *pain75 *pain100
$playersounddup player male *pain50 *pain100
$playersounddup player male *pain25 *pain100

The *pain100 used instead of a lump name for pain75, pain50, and pain25 to refer to tells those sounds to refer to pain100 for a sound lump to play.

If you want, you can change this so that you really have different pain sounds.

SkyBoxes

This script describes how to define skyboxes for use ingame.

Skyboxes are special sky textures drawn similarly to those used in Quake engine games, the game draws a cube filled with the textures used for each side of the cube, these textures can be in any format supported by the Vavoom engine: JPG, PNG, BMP, PCX or TGA.

The script is a simple text file, defining each of the six sides of the cube in a separate segment.

Example:

rock_dawn
{
{
// Right
map textures/skies/rkdawnrt.tga
}
{
// Front
map textures/skies/rkdawnft.tga
}
{
// Left
map textures/skies/rkdawnlf.tga
}
{
// Back
map textures/skies/rkdawnbk.tga
}
{
// Up
map textures/skies/rkdawnup.tga
}
{
// Down
map textures/skies/rkdawndn.tga
}
}