================================================================================
Killing Time Mapping Information
================================================================================

--------------------------------------------------------------------------------
UDMF and BSP info
--------------------------------------------------------------------------------

Killing Time Resurrected uses the UDMF (Universal Doom Map Format) standard, 
which is compatible with such editors as Ultimate Doom Builder. Maps *must* have
a pre-calculated BSP tree provided, which must be in ZNODES format. zdbsp can be
used with the following command line, which was used during production of the 
remaster:

   zdbsp.exe -c -X -o"output.wad" "input.wad"

The KTR UDMF namespace value is "KillingTime".

Aside from standard UDMF fields for the Doom namespace, the following are 
supported:
* Mapthings:
  arg0 through arg4
  id
* Linedefs:
  arg0 through arg4
* Sectors
  xpanningfloor
  ypanningfloor
  xpanningceiling
  ypanningceiling

Other information can be derived from the provided UDB configuration.

--------------------------------------------------------------------------------
How to Load Custom Maps
--------------------------------------------------------------------------------
   
A map should be named "MAPxy.wad" with "xy" being a number between 00 and 99 in 
order for all KTR engine features to function properly. To load a custom level,
do one of the following:

1. Use the -wadfile command line parameter to add the file directly to the game.
2. Enable the developer cvar in the KEX Engine and place the wad file in the 
   same directory as the executable.
3. Add the wad file to the root of a KPF (standard zip file) using either store
   or deflate storage methods, and either:
   3a. Use -file command line parameter to add the KPF to the game, or
   3b. Place the KPF file into a "mods" subdirectory created where the game's
       executable file is placed.

--------------------------------------------------------------------------------
Linedefs
--------------------------------------------------------------------------------

Line and sector types supported by KTR are largely the same as the Jaguar 
version of Doom, with the following additions:

New line specials:
110 : Line becomes non-blocking if the player can unlock the LockDef with ID
      equal to the line's tag. The line will be set to blocking when the map is 
      first loaded even if it is not initially marked with the BLOCKING flag.
      
900 : SR Do clock effect. This is used to rotate certain movies, an effect which 
      is under the control of scripting. The "ClockState" ScriptBasicValue will 
      be created if it does not already exist, and will be set to the current 
      step number of the animation defined for the clock face texture, as uint
      value type.

901 : W1 Enter Dev Room. This is used to trigger an achievement in the remaster.
902 : W1 Finish Hedge Maze. This is used to trigger an achievement in the 
      remaster.

1000 - 1199 : SR Lower Floor tagged same as line special - 1000, if player can 
   activate the LockDef with ID == line tag.

1200 - 1299 : S1 Spawn Actor with ednum == line tag in sector with tag equal to
   line special - 1200. Actors will be spawned at all teleport destinations 
   within the target sector.
   
1300 : W1 Lower Floor

1400 : W1 Lower Floor to lowest surrounding, and move Ceiling with Floor

1500 - 1599 : W1 Spawn Actor with ednum == line tag in sector with tag equal to 
   line special - 1500. Actors will be spawned at all teleport destinations 
   within the target sector.

1600 - 1699 : SR Raise Floor tagged same as line special - 1600, raise by the 
   line's tag. The line special will change to 1700 + (special - 1600) after 
   activation.
   
1700 - 1799 : SR Lower Floor tagged same as line special - 1700, lower by the 
   line's tag. The line special will change to 1600 + (special - 1700) after 
   activation.
   
9700 - 9799 : WR Teleport to MAPxy, with xy == special - 9700. Teleport to 
   sector in destination map with tag matching line, if sector in destination 
   map contains a teleport destination.

Extended exit line behaviors:

Line types 52 WR Exit Level, SR 11 Exit Level, and SR 51 Exit Secret Level, if 
provided a non-zero tag, will attempt to exit to the MAPxy level with xy == tag.
If the tag is zero, and nextlevel or nextsecret (for type 51) are specified as
non-zero values in MapInfo, then that value will be used. If both fields are 0,
then the next level in numeric order will be used (ie, MAP01 -> MAP02). The 
player will always spawn at the first player start point when using these line
specials.

If the destination map does not exist, nothing will happen.

--------------------------------------------------------------------------------
Sectors
--------------------------------------------------------------------------------

New sector specials:
16 : Instant death (10000 damage per tic)

191 : If the player touches the floor of this sector, they will be teleported
   to the same position relative to the sector's block box in a sector with 
   special 192. This will only occur if a linedef can be found in the level 
   which has special 1600 + sector tag.
   
192 : If the player touches the floor of this sector, they will be teleported
   to the same position relative to the sector's block box in a sector with 
   special 191. This will only occur if a linedef can be found in the level
   which has special 1700 + sector tag.
   
861 : Water sector (player view is lowered, makes wading sounds)
862 : Water death sector (player is inflicted with 10000 damage, makes drowning 
      sound)
863 : Falling water death sector (player screams while falling; otherwise like 
      862)

Floor panning and ceiling panning values are supported, as this was a feature 
added in the original PC/Mac version of the game. The same names are used for 
these fields as in (G)ZDoom-compatible source ports, so editor support is 
automatic.

--------------------------------------------------------------------------------
Things
--------------------------------------------------------------------------------

Some thing types use UDMF argument values:

MusicTrans (ednum 2700) - Argument 0 is the music ID. When the player enters a 
   sector with this thing in it, the music will attempt to change to the music 
   with that ID.
   
SwingingDoor (ednum 10003) - Generates a 3D swinging door. Argument 0 means to 
   flip the door if it is 1. Argument 1 is the DoorDef ID.
   
TessMovie (ednum 2800) - Argument 0 is the movie ID to play.

It is possible to utilize thing IDs with AngelScript scripting; though they are 
not used by the vanilla game's logic, they are fully supported.
