MAPINFO/Episode definition

From ZDoom Wiki
Jump to navigation Jump to search

An episode definition begins with the keyword "episode". You can also clear previous episodes by using the "clearepisodes" keyword. All an episode does is offer a choice when starting a new game; elements such as endgame text or picture are defined in a cluster. The Doom and Heretic episodes have therefore each a corresponding cluster definition. If there is only one episode, then the player will not be prompted to select it when starting a new game.

Episode commands

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. It should be specified before any episode definitions and outside any other block.

episode <maplump> { properties }
episode <maplump> teaser <maplump> { properties }

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. Instead of a map lump, you can also use &wt@01. Using this will make the episode start at the map using warptrans 1 as defined in MAPINFO.
You can also specify a second maplump with the teaser keyword as above to tell ZDoom what map to use if the first is unavailable. This is used by Strife to determine which map to start at based on whether you're playing the Strife demo or the full version. It has limited usage inside PWADs.

Episode properties

The following properties are supported within an episode definition:

Property Description
Name = "<nice name>" This is the episode's name as text. If you do not provide a PicName, then ZDoom will convert this name to a graphic for you. If the given name starts with $, ZDoom will first try to interpret it as a keyword for the LANGUAGE lump.


Lookup = "<keyword>" Alternatively, instead of Name, Lookup can be used to go seek the name in a LANGUAGE lump.


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 property, then the name that you provided in Name will be converted into a graphic and used instead.


Key = "<key>" This sets a shortcut key for the menu selection. Any key on the keyboard is valid.


Remove This removes the episode that has just been defined.


NoSkillMenu Disables the skill menu for this episode; instead, the episode starts at the skill marked with the DefaultSkill flag (or the median skill if no default is available). This is useful for WADs that implement skill selection by an introduction map.


Optional Indicates that this episode should only appear in the list if the map lump specified after the episode keyword is present in the loaded IWAD/PWAD(s). This is used for the fourth episode of Ultimate Doom.


Extended Indicates that this episode should only appear in the list if the EXTENDED lump is present in a loaded WAD file. This is used for the fourth and fifth episodes of Heretic: Shadow of the Serpent Riders.


Intro { ... } Specifies an introduction cutscene to play for this episode. This block supports the following commands:
  • Video = "<videoname>"
Sets the video for the cutscene to play. This must be the full name of the video file, which consists of the path to the file, its name and extension, e.g "graphics/videos/coolvideo.ivf". For a list of supported video formats, see Video format.
  • Function = "<functionname>"
Specifies a ZScript function for the cutscene to run, rather than a video. This ZScript function needs to be static, have no return type, and take a ScreenJobRunner as its sole argument.
  • Sound = "<soundname>"
Specifies the sound that should play during the cutscene. This uses the logical name of a sound. (Verification needed) By default, GZDoom will instead look for an identically named OGG, FLAC, MP3, OPUS, or WAV file in the same directory as the video.
  • SoundID = <id>
Specifies the ID of the sound to play during the cutscene. The default is -1. (Need more info) (Verification needed)
  • FPS = <value>
Sets the framerate to play the cutscene at. This only works with ANM video.
  • Delete
Deletes the cutscenes' function and assigned video. The cutscene will still be defined, but will simply not play anything.
  • Clear
Clears the cutscene definition.

Examples

Normal episode definition:

episode e1m1
{
   picname = "M_EPI1"
   key = "k"
}

Episode starting at map with Warptrans 1:

episode "&wt@01"
{
   name = "My cool episode"
   key = "m"
}