			    Editing with ZDoom 1.16

			       22 December 1998

Contents
========
 1. Introduction
 2. Some definitions
 3. Textures
 4. DeHackEd support
    > Customizing the obituaries
 5. Music
 6. ANIMATED and SWITCHES lumps
 7. The ANIMDEFS lump
 8. The SNDINFO lump (and ambient sounds)
 9. The MAPINFO lump
10. Changed data structures
    > LINEDEFS
    > THINGS
11. Thing types
12. Setting up monster routes13. ACS scripts
13. ACS scripts
14. Sector specials
15. Action specials
    > Specials for doors
    > Specials for floors
    > Specials for ceilings
    > Specials for floors and ceilings
    > Specials for pillars
    > Specials for stairs
    > Specials for platforms
    > Specials for teleporters
    > Specials for lights
    > Specials for sector properties
    > Specials for things
    > Specials for ACS scripts
    > Miscellaneous specials
16. Key types
17. Means-of-death types
18. Spawnable things
19. Sounds defined in zdoom.wad's SNDINFO


1. Introduction
===============
ZDoom 1.16 supports three level feature sets:

1. A regular Doom level. This is a level designed for Doom or Doom 2 as
   released by id Software.
2. A Boom level. This is a level designed for Team TNT's Doom port, Boom.
3. A ZDoom level. This is a level designed to take advantage of ZDoom's
   features, which are based on Hexen.

BOOM levels are treated just as they are with BOOM with the following
exceptions:

    -Translucent lines always use a fixed amount of translucency.
    -The 242 linedef can be used to set palette blends as well as colormaps.
     Just use a texture name of the form "AARRGGBB" instead of a colormap
     name.
    -Generalized doors can't switch the lighting in a sector between two levels.

It is a good idea to have, at the very least, looked over the Unofficial
DOOM Specs. Other useful documents are the Official Hexen Specs, and the
BOOM reference document. If you don't already have DOOM or Hexen specs (some
editors come with them), you can download them from:

ftp://ftp.cdrom.com/pub/idgames/docs/editing/dmspec16.zip (DOOM specs)
ftp://ftp.cdrom.com/pub/idgames/docs/editing/hexspc09.zip (Hexen specs)

Most of this document discusses editing Hexen-like maps using ZDoom, since
that is where the bulk of the new features apply. Some parts of this
document, however, describe features applicable to both DOOM and Hexen-style
levels (such as ambient sounds).

If you want to make a ZDoom-specific level, you currently have two options
available:

1. Make the level entirely with an editor that supports it (a .wcf file for
   WadAuthor is included; DeeP97 should offer support shortly).
2. Make a regular DOOM level with your favorite editor, convert it with
   zwadconv, and then make any additional changes with an editor that
   supports it.

If an editor supports Hexen editing and is configurable, it should be
possible to edit ZDoom levels with it, although it may take a bit of work
convincing the editor that the game really does work with the Hexen type of
level. For instance, to use WadAuthor to create ZDoom levels, you first need
to run your IWAD through zwadconv to produce an IWAD with Hexen-style
levels. I would recommend saving the new IWAD with a different name, because
if you don't, you won't be able to make non-ZDoom levels, and the IWAD will
only work with ZDoom. Then edit zdoom.wcf to tell it where your modified
IWAD is. If you just want to create BOOM/DOOM levels with a few extra ZDoom
features, you can use zdoomold.wcf instead without going through the trouble
of converting your IWAD, but you'll also miss out on most of the new
features in ZDoom.

Once I have a working DOS port of ZDoom 1.16, I'll also try and produce
configuration files for DOS-based editors like hck to make them work with
ZDoom.


2. Some definitions
===================

Angle	This is a value between 0 and 255 representing a direction and is
	used with some line specials. Some useful values are:

	  0	East		128	West
	 32	Northeast	160	Southwest
	 64	North		192	South
	 96	Northwest	224	Southeast

Tic	A time interval of 1/35 second. There are 35 tics in one second.

Octic	A time interval of 1/8 second. There are 8 octics in one second.
	(This may not be the same as Hexen, since the Hexen specs weren't
	clear on this.)


3. Textures
===========
In ZDoom, textures can now be up to 254 pixels tall and will properly
repeat if they are 1, 2, 4, 8, 16, 32, 64, or 128 pixels tall. These are
special cases that were easy to fix. Other heights will still exhibit the
"tutti-frutti" effect if they need to repeat.

Sky textures taller than 128 pixels can also be used. If a sky texture is at
least 200 pixels tall, it will never be stretched out of proportion to fill
the screen when you look up because it doesn't have to. Please note that the
texture itself must be this tall (not the patch it contains) to avoid
the stretching of the sky. WinTex cannot create textures taller than 128
pixels, so you will need to use another tool such as DeeP97 to create them.


4. DeHackEd support
===================
ZDoom has mostly complete support for DeHackEd patches except for a
few text replacements. Because of changes in the way ZDoom handles sounds,
sound renamings with DeHackEd patches are no longer supported. (But things
can still be given new sounds.)

When ZDoom starts, it will look for a lump in any of the loaded wad files
named "DEHACKED". If it finds one, it treats it as a DeHackEd patch and
automatically loads it. (An alternative patch can also be specified from the
command line with the -deh parameter.)

ZDoom also offers some new flags for things:

    Add to bits Name in DeHackEd    Purpose
    ----------- ----------------    -------
    268435456	28 [ ] Unused	    Stealth Monster
    536870912	29 [ ] Unused	    25% Translucency
    1073741824	30 [ ] Unused	    50% Translucency

To create a thing that is 75% translucent, turn on both 25% and 50%
translucency.

Stealth monsters act just like their normal counterparts with one very
important difference: They're not always visible. They are normally
invisible only become visible when they are attacking, hurt, or dead.

Customizing the obituaries
--------------------------
ZDoom also supports BOOM's .bex patches (see boomdeh.txt). Using a [STRINGS]
block inside a .bex patch, it is possible to modify the obituary messages
printed when a player dies. The following strings are available to be
changed (in addition to the ones supported by BOOM):

    String Name 	Standard Text
    ------------------------------------------------------------------------
    OB_SUICIDE		suicides
    OB_FALLING		fell too far
    OB_CRUSH		was squished
    OB_EXIT		tried to leave
    OB_WATER		can't swim
    OB_SLIME		mutated
    OB_LAVA		melted
    OB_BARREL		went boom
    OB_SPLASH		stood in the wrong spot
    OB_R_SPLASH 	should have stood back
    OB_ROCKET		should have stood back
    OB_KILLEDSELF	killed %hself
    OB_STEALTHBABY	thought %g saw an arachnotron
    OB_STEALTHVILE	thought %g saw an archvile
    OB_STEALTHBARON	thought %g saw a Baron of Hell
    OB_STEALTHCACO	thought %g saw a cacodemon
    OB_STEALTHCHAINGUY	thought %g saw a chaingunner
    OB_STEALTHDEMON	thought %g saw a demon
    OB_STEALTHKNIGHT	thought %g saw a Hell Knight
    OB_STEALTHIMP	thought %g saw an imp
    OB_STEALTHFATSO	thought %g saw a mancubus
    OB_STEALTHUNDEAD	thought %g saw a revenant
    OB_STEALTHSHOTGUY	thought %g saw a sargeant
    OB_STEALTHZOMBIE	thought %g saw a zombieman
    OB_UNDEADHIT	was punched by a revenant
    OB_IMPHIT		was slashed by an imp
    OB_CACOHIT		got too close to a cacodemon
    OB_DEMONHIT 	was bit by a demon
    OB_SPECTREHIT	was eaten by a spectre
    OB_BARONHIT 	was ripped open by a Baron of Hell
    OB_KNIGHTHIT	was gutted by a Hell Knight
    OB_ZOMBIE		was killed by a zombieman
    OB_SHOTGUY		was shot by a sargeant
    OB_VILE		was incinerated by an archvile
    OB_UNDEAD		couldn't evade a revevant's fireball
    OB_FATSO		was squashed by a mancubus
    OB_CHAINGUY 	was perforated by a chaingunner
    OB_SKULL		was spooked by a lost soul
    OB_IMP		was burned by an imp
    OB_CACO		was smitten by a cacodemon
    OB_BARON		was bruised by a Baron of Hell
    OB_KNIGHT		was splayed by a Hell Knight
    OB_SPIDER		stood in awe of the spider demon
    OB_BABY		let an arachnotron get %h
    OB_CYBORG		was splattered by a cyberdemon
    OB_WOLFSS		was no match for the past
    OB_MPFIST		chewed on %s's fist
    OB_MPCHAINSAW	was mowed over by %s's chainsaw
    OB_MPPISTOL 	was tickled by %s
    OB_MPSHOTGUN	chewed on %s's boomstick
    OB_MPSSHOTGUN	was splattered by %s's super shotgun
    OB_MPCHAINGUN	was mowed down by %s
    OB_MPROCKET 	rode %s's rocket
    OB_MPR_SPLASH	almost dodged %s's rocket
    OB_MPPLASMARIFLE	was melted by %s
    OB_MPBFG_BOOM	was splintered by %s's BFG
    OB_MPBFG_SPLASH	couldn't hide from %s's BFG
    OB_MPTELEFRAG	was telefragged by %s
    OB_DEFAULT		died
    OB_FRIENDLY1	mows down a teammate
    OB_FRIENDLY2	checks %p glasses
    OB_FRIENDLY3	gets a frag for the other team
    OB_FRIENDLY4	loses another friend

The name of the player who died is always printed first followed by the
obituary string, except for OB_FRIENDLY? where the name of the killer is
printed instead. The obituary strings can contain special % sequences that
get substituted with something else when the string is printed. These are:

    %g -> he/she/it
    %h -> him/her/it
    %p -> his/her/its
    %s -> name of killer (only works for strings that already have %s above)


5. Music
========
The original Doom could only play music in a format called MUS. ZDoom
can also play these, but it also supports playing MIDI and MOD files
and will automatically recognize them. The specific types of MODs that
ZDoom supports are the same types supported by the MIDAS Digital Audio
System (since ZDoom uses MIDAS for sound):

    4-channel Protracker modules plus 1-32 -channel variants (.MOD)
    1-32 -channel Scream Tracker 3 modules (.S3M)
    2-32 -channel FastTracker 2 modules (.XM)
    1-64 -channel Impulse Tracker modules (.IT)

Currently, it does not support 2.14 format .ITs, so if you want to use
one of them, you will need to convert it with Impulse Tracker.

Large collections of MODs can be found at
ftp.cdrom.com/pub/demos/music/ and ftp.wustl.edu/pub/aminet/mods/, but if
you use any music from there, you should check and make sure that it's okay
with the song's author if you do so.


6. ANIMATED and SWITCHES lumps
==============================
These are the same as the ANIMATED and SWITCHES lumps used by BOOM. Refer
to boomref.txt for details on their format and how to create them.


7. The ANIMDEFS lump
====================
This lump is an alternative to using an ANIMATED lump to define texture and
flat animations. Unlike ANIMATED, it is a normal text file that you can edit
with a regular editor such as Notepad.

Texture animation definitions begin with the line:

    texture <name>

<name> is the name of the first texture in the animation. Whenever you use
this texture on a wall, it will play the animation you define here. After
you tell ZDoom you are defining a texture, you define frames for the
animation with either of these two lines:

    pic <n> tics <time>
    pic <n> rand <min> <max>

<n> Is the texture to use for the frame, with the texture named above being
number 1. Subsequent textures are defined in the order that they appear in
a TEXTURES lump. If tics is used, <time> is the number of tics before the
animation progresses to the next frame. If rand is used, the frame is
displayed for a random amount of time between <min> and <max> tics before
continuing to the next frame.

Flat animations are similar except they begin with the line:

    flat <name>


8. The SNDINFO lump (and ambient sounds)
========================================
ZDoom has support for special lump called "SNDINFO". This is similar to
the SNDINFO lump used by Hexen and is a normal text file embedded inside a
wad file. It can contain two parts: The first part maps long sound names to
the actual lump in a WAD that contain the sounds (logical sound mappings).
The second part defines ambient sounds for use with thing types 14001-14065.
Comments are also possible by beginning them with '//'. Everything after
the comment marker until the end of the line will be ignored by ZDoom.
(If you have used Hexen's SNDINFO lump, note that comments do *not*
begin with ';'.) Unlike in Hexen, SNDINFOs are cumulative and will be
processed in the order they appear in a wad. This means that if you just
want to define a few ambient sounds or redefine a few of the basic game
sounds, you don't need to duplicate the entire contents of the SNDINFO lump
in zdoom.wad.

Logical sound mappings are fairly simple. They are just a logical sound
name followed by the name of the actual sound to play. For example, here is
an excerpt from zdoom.wad's SNDINFO:

    doors/dr1_open		dsdoropn
    doors/dr1_clos		dsdorcls
    doors/dr2_open		dsbdopn
    doors/dr2_clos		dsbdcls
    misc/keytry			dsoof

The names on the left are the logical sound names, and the names on the
right are the lumps they represent. Logical sound names must not start with
a dollar sign ($), and if they contain spaces, must be enclosed in quotes
("). Logical sound names are not case-sensitive, so "misc/keytry" and
"Misc/KeyTry" are considered to be the same thing. Sound lumps do not need
to begin with the letters "ds", which is different from Doom.

It is safe to have more than one logical sound reference the same sound
lump, and in fact, I do this with several sounds in zdoom.wad.

Commands all begin with a dollar sign ($). Currently, only one is
defined: $AMBIENT.

$AMBIENT
--------
Ambient is used to define an ambient sound and attach it to a map
thing. There are two different types of ambient sounds available: point
and world. Point sounds are attached to specific map things and will
only be heard by the player when he is near the map thing. World sounds
can be heard no matter where on the level a player is. Using either
type of ambient sound in your levels requires that you define them with
the $ambient command in the SNDINFO lump and also that you include a
corresponding thing on all maps that you want to use them. In the case
of point sounds, the thing is used as the exact location for the sound.
For world sounds, the presence of a thing indicates that that sound
should be played on that level. (Thus you can define several world
sounds and only have a few of them play on any given level.)

Both Heretic and Hexen use world sounds, while point sounds are new to
ZDoom.

The $ambient command has six parts. These are:

1. The command itself ($ambient).

2. The ambient sound it defines (1-64). ZDoom supports up to 64 ambient
   sounds, and this number is used to indicate which of those 64 this
   command is describing. To use this ambient sound in a map, add 14000
   to this number, and use that as the type of the thing in your level
   editor. (Refer to your level editor's documentation if you don't now
   how to use things that aren't in the original Doom.) For instance,
   if this number is 1, then use a map thing of 14001 anywhere you want
   this sound to be used.

3. The sound's logical name. This must have already been defined with a
   logical sound mapping (see above). By using the same logical name
   with different ambient sounds, it is possible to use the same sound
   with different parameters. (See demo.wad for an example of this.)

4. The sound's type. This can be either "point" or "surround". "Point"
   indicates that this should be a point sound, while "surround"
   indicates that this is a world sound that should be played on the
   surround channel. The type can also be omitted entirely which
   indicates that this is a normal world sound.

5. How frequently the sound is played. This can be "continuous",
   "periodic", or "random".
   
   Continuous means that the sound should be continously played (not
   recommended for world sounds, but possible anyway).
   
   Periodic indicates that the sound should be played at a specific
   interval and is followed by the number of seconds that should elapse
   between repeats of the sound.

   Random indicates that the sound will repeat at a random interval. It
   is followed by two numbers indicating the minimum number of seconds
   that must elapse before the sound is played again and the maximum
   number of seconds that may pass before the sound is again played (in
   that order).

6. The sound's relative volume (0.0-1.0). 0.0 means that the sound is
   silent and never played. 1.0 means full volume. For point sounds,
   this is the volume that the sound will be played at when the player
   is standing right next to the corresponding thing. The further away
   the player is, the quieter the sound becomes. For world sounds, this
   is the volume that the sound will be played at no matter where the
   player is standing.

That may be confusing, so I will describe the first two $ambient definitions
in demo.wad in an attemp to make their use easier to understand:

    $AMBIENT 1 ForceFieldHum POINT CONTINUOUS 1.0

This line defines ambient sound 1. It uses the logical sound ForceFieldHum.
The logical name is folled by the word "point," so ZDoom knows that this is
a point sound, and it will play it at any thing of type 14001 (or 14065 with
first parameter of 1) on the map. Following this is "continuous," which
indicates that the sound will automatically repeat when it finishes. The 1.0
at the end of the line means that the sound is played at full volume.

    $AMBIENT 2 Scream RANDOM 20.0 50.0 1.0

This line defines ambient sound 2. It uses the logical sound Scream. Because
the sound's type is omitted, it is treated as a normal world sound that will
be audible throughout the entire map. The next part is "random 20.0 50.0."
This means that the sound will repeat in a random time interval no shorter
than 20 seconds and no longer than 50 seconds. The 1.0 at the end means that
the sound will be played at full volume.

The MAPINFO lump
================
ZDoom supports a special MAPINFO lump that can be used to define special
characteristics for the different maps in a wad. This lump contains two
types of entries: map definitions and cluster definitions which are
indicated by the keywords "map" and "clusterdef" respectively. Everything
following one of these keywords up until the next "map" or "clusterdef" is
considered to be part of the definition for a specific map or cluster.

A map definition begins with the word "map":

map <maplump> <nice name>
    Substitute the name of the map in the wad for <maplump>, and the map's
    nice name (shown in the automap) for <nice name>. If <nice name>
    contains spaces, it must be enclosed in quotation marks ("). <Maplump>
    can be *any* lump in the wad, but since most editing utilities will only
    recognize maps of the form MAP?? or E?M?, you should probably stick to
    those if you want to be able to edit the levels easily.

After the map line, the following properties can be specified:

levelnum <levelnum>
    This is the map's identification number that is used to identify it to
    the Teleport_NewMap special. If the map's name is of the form MAPxx,
    then it will automatically have a levelnum of xx unless you specify
    differently. (i.e. MAP23's levelnum will be 23 unless you set it to
    something else.) 

next <maplump>
    <maplump> is the name of the map to move to when the normal exit
    (Exit_Normal special) is used. This is also the map to travel to when
    the timelimit or fraglimit is hit in a deathmatch game. This should be
    the name of the map in the wad and not the map's nice name.

secretnext <maplump>
    <maplump> is the name of the map to move to when the secret exit is
    used. This should be the name of the map in the wad and not the map's
    nice name.

    Nextmap and secretmap also accept the special EndGame? names that
    indicate that ZDoom should end the game instead of continuing to another
    level. These are:

    	EndGameC: The cast finale for Doom II.
	EndGame1: Displays the picture used after episode 1.
	EndGame2: Displays the picture used after episode 2.
	EndGame3: The bunny scroller after episode 3.
	EndGame4: Displays the picture used after episode 4.

    Note that using these will not display any text. To do that, use an
    "exittext" for this level's cluster. (See clusterdef below.)

cluster <number>
    <number> is the cluster that this map belongs to. See the clusterdef
    description below for more details.

sky1 <texture> <scrollspeed>
    <texture> is the name of the texture to use for the sky. <scrollspeed>
    is the rate at which the sky moves left or right (useful for clouds on
    windy maps). To keep the sky from moving, use a value of 0.0; to move it
    left, use a positive value; and to move it right, use a negative value.
    This is the number of steps that the sky moves each tic.

sky2 <texture> <scrollspeed>
    Doesn't work yet. Would be used for parallax skies if it did.

fade <color>
    <color> is the color that things fade to the further away or "darker"
    they are. Normally, this is black, so that things seem darker as they
    get further away. To simulate fog (ala Hexen), set this to a gray
    instead. Other colors are also supported, but may not necessarily look
    very good.

    <color> can be either the name of a color (such as red or cyan) or a
    color descriptor of the form "RR GG BB". For example, to set the fade to
    red, both of the following will work:
	fade red
	fade "ff 00 00"

    To find a good fade within the game, you can use the testfade console
    command.

outsidefog <color>
    This is like fade except that the <color> fade is only applied to
    sectors with a sky ceiling and not all sectors on the map.

titlepatch <patch>
    This is the name of a graphic to display on the intermission screen for
    this level (such as CWILV00). It should contain the name of the level.
    If this is omitted, the intermission screen will create a graphic for.

par <partime>
    Partime is the number of seconds shown as the level's par in the
    intermission screen.

music <musiclump>
    <musiclump> is the name of the song to play while the player is playing
    the level.

nointermission
    This indicates that when the current level is finished, ZDoom should
    continue immediately to the next level without showing the intermission
    screen.

doublesky
    Doesn't work yet. Would be used for parallax skies if it did.

nosoundclipping
    This indicates that sounds should not be clipped on the current level no
    matter how far away they are. I can't say that it's terribly useful, but
    it is the behavior Doom used on maps E1M8, E2M8, E3M8, and E4M8.

allowmonstertelefrags
    This indicates that monsters can telefrag each other or the player on
    the level. Normally, monsters will never telefrag anything.

map07special
    This level wants the special feature of Doom II MAP07. In this case,
    when every mancubus on the level dies, any sectors tagged 666 will have
    their floors lower to the next lowest floor, and when every arachnotron
    on the level is dead, any sectors tagged 667 will have their floors
    raised by the height of their lower textures.

baronspecial
    After every Baron of Hell on this level has died, a special action will
    be triggered.

cyberdemonspecial
    After every Cyber Demon on this level has died, a special action will be
    triggered.

spidermastermindspecial
    After every Spider Mastermind on this level has died, a special action
    will be triggered.

    The above three specials should also be used with one of the following
    three special actions:

specialaction_exitlevel
    Exits the level after all of the specified monsters have died.

specialaction_opendoor
    After all of the specified monsters have died, opens any doors tagged
    666 with blazing speed.

specialaction_lowerfloor
    After all of the specified monsters have died, lowers the floors of all
    sectors tagged 666 to the next lowest floor.

lightning
    Not implemented.

fadetable <colormap>
    This is a colormap to use instead of COLORMAP in sectors without any
    special fade or light color.

A cluster definition begins with the word "clusterdef". For purposes of
ZDoom, clusters are used to displays messages when moving between maps.

clusterdef <cluster>
    <Cluster> is the cluster that this clusterdef defines. A cluster of 0 is
    used internally to mean "no cluster" and should be avoided.

After clusterdef, the following properties are valid:

entertext <message>
    <message> is a message to be displayed when the player has just finished
    a level in another cluster and is entering a level in this cluster.

exittext <message>
    <message> is a message to be displayed when the player has just finished
    a level in a different cluster from the next one. If the next level's
    cluster has an entertext defined, then it will be shown instead of this
    cluster's exittext.

music <musiclump>
    This is the music to play while either the entertext or exittext of this
    cluster is displayed. For Doom I, this is normally D_VICTOR, and for
    Doom II, this is normally D_READ_M.

flat <flatlump>
    This is the name of the flat to use as a background while this cluster's
    entertext or exittext is displayed.

hub
    Indicates that this cluster is a hub. When leaving a hub, the game will
    remember the contents of the level when the player left it and restore
    the level to that state when the player returns to it. Moving to a
    different cluster will cause the game to forget the state of the levels
    in this hub in order to save memory. Each level a player visits in a hub
	uses memory, so it's probably a good idea not to have too many levels
	in a single hub.


10. Changed data structures
===========================

ZDoom uses the same basic map data as DOOM, but with two exceptions: The
LINEDEFS and THINGS lumps have been expanded to a form compatible with
Hexen. ZDoom decides which format these lumps use by checking to see if the
map has a BEHAVIOR lump. If it does, then the LINEDEFS and THINGS lumps are
treated using the Hexen format, otherwise they use the normal DOOM format.

LINEDEFS
--------
A LINEDEFS lump consists of a series of 16-byte records. Each record is
structured as follows:

    Offset  Size    Label	Meaning
    ------------------------------------------------------------------------
    0	    word    v1		Line's start vertex
    2	    word    v2		Line's end vertex
    4	    word    flags	Line's flags (see below)
    6	    byte    special	Line's special type
    7	    byte    args[0]	Line special's first argument
    8	    byte    args[1]	Line special's second argument
    9	    byte    args[2]	Line special's third argument
    10	    byte    args[3]	Line special's fourth argument
    11	    byte    args[4]	Line special's fifth argument
    12	    word    sidenum[0]	Line's front sidedef number
    14	    word    sidenum[1]	Line's back sidedef number

The meanings of the bits in the linedef's flags field are:

    Bit	    Hex Equiv	Meaning
    -----------------------------------------------------------------------
    0	    0x0001	Blocks players and monsters
    1	    0x0002	Blocks monsters only
    2	    0x0004	Line is two-sided
    3	    0x0008	Upper texture is unpegged
    4	    0x0010	Lower texture is unpegged
    5	    0x0020	Secret line (drawn as one-sided in automap)
    6	    0x0040	Blocks sounds
    7	    0x0080	Never draw this line on the automap
    8	    0x0100	Always draw this line on the automap
    9	    0x0200	This line's special is repeatable
    10-12   0x1c00	This line's activation type (see below)
    13	    0x2000	Line can be activated by monsters (and players)
    14	    0x4000	Use passthrough
    15	    0x8000	Blocks everything (including gunshots and missiles)

Each line special can have one of the following activation types:

    Value   Flag Value	Meaning
    ------------------------------------------------------------------------
    0	    0x0000	Activated when a player crosses line
    1	    0x0400	Activated when a player uses line
    2	    0x0800	Activated when a monster crosses line
    3	    0x0c00	Activated when a projectile hits the line
    4	    0x1000	Activated when a player bumps the line
    5	    0x1400	Activated when a projectile crosses the line
    6	    0x1800	Reserved
    7	    0x1c00	Reserved

THINGS
------
A THINGS lump consists of a series of 20-byte records. Each record is
structured as follows:

    Offset  Size    Label	Meaning
    ------------------------------------------------------------------------
    0	    short   thingid	Thing's id
    2	    short   x		Thing's x location
    4	    short   y		Thing's y location
    6	    short   z		Thing's z location relative to floor/ceiling
    8	    short   angle	Thing's facing angle (in degrees)
    10	    short   type	Thing's type
    12	    short   flags	Thing's flags (see below)
    14	    byte    special	Thing's special
    15	    byte    args[0]	Special's first argument
    16	    byte    args[1]	Special's second argument
    17	    byte    args[2]	Special's third argument
    18	    byte    args[3]	Special's fourth argument
    19	    byte    args[4]	Special's fifth argument

Note that in this case, the thing's angle is specified in degrees with 0
being east and larger values proceed counterclockwise. The angle given here
will be rounded down to a 45 degree increment.

Under normal circumstances, the thing's special will be executed when the
thing dies, this allowing you to perform some special action upon killing a
monster.

The meanings of the bits in the thing's flags field are:

    Bit	    Hex Equiv	Meaning
    -----------------------------------------------------------------------
    0	    0x0001	Thing will appear on easy skill setting (0/1)
    1	    0x0002	Thing will appear on medium skill setting (2)
    2	    0x0004	Thing will appear on hard skill setting (3/4)
    3	    0x0008	Thing is deaf
    4	    0x0010	Thing is dormant (will not react until activated)
    5	    0x0020	Reserved
    6	    0x0040	Reserved
    7	    0x0080	Reserved
    8	    0x0100	Thing appears in single-player games
    9	    0x0200	Thing appears in cooperative games
    10	    0x0400	Thing appears in deathmatch games
    11	    0x0800	Reserved
    12	    0x1000	Reserved
    13	    0x2000	Reserved
    14	    0x4000	Reserved
    15	    0x8000	Reserved


11. Thing types
===============
ZDoom supports all the thing types of DOOM/DOOM II plus the following:

    Type	Name
    ------------------------------------------------------------------------
    4001	Player 5 start
    4002	Player 6 start
    4003	Player 7 start
    4004	Player 8 start
    5001	BOOM point pusher
    5002	BOOM point puller
    9001	Map spot
    9013	Map spot with gravity
    9024	Path node (next, delay)
    9044	Teleport destination that remembers its vertical position
    9050	Stealth Arachnotron
    9051	Stealth Archvile
    9052	Stealth Baron of Hell
    9053	Stealth Cacodemon
    9054	Stealth Chaingunner
    9055	Stealth Demon
    9056	Stealth Hell Knight
    9057	Stealth Imp
    9058	Stealth Mancubus
    9059	Stealth Revenant
    9060	Stealth Shotgunner
    9061	Stealth Pistol Guy
    14001-14064 Ambient sounds 1-64 (one for each sound)
    14065	Ambient sound 0 or sounds 0-255

If ZDoom encounters any things that it does not understand, it will print a
warning to the console when the level loads and transform them into an
exclamation mark symbol so that you can see where they are.

In Hexen mode, teleport destinations (types 14 and 9044) are found by their
thing ids. In Doom mode, they are still found by looking in a tagged sector.

In Hexen mode, the first argument of 14065 is used to determine the ambient
sound that it represents. Thus, it can be used to represent one of 256
ambient sounds. In Doom mode, it always represents ambient sound 0.

12. Setting up monster routes
=============================
Monster routes are controlled through the use of path nodes (type 9024).
A path node ignores its special and assigns special meaning to its
arguments; the first argument identifies the next node in the path, and the
second argument specifies how long (in seconds) a monster should wait at
this node before proceeding to the next one. Because special arguments are
only one byte in size, you are effectively limited to 255 path nodes per
map. Hopefully this won't be a problem.

To set a monster on a path, you have two options: use the Thing_SetGoal
special in a script or on a line to send a monster or group of monsters to a
node, or set a monster's special to Thing_SetGoal. If a monster's special is
Thing_SetGoal, and the tid specified for the special is 0, the monster will
be sent to the node automatically when the level is loaded, and its special
will be ignored if it dies.


13. ACS scripts
===============
Go read the official Hexen specs, section 4. It gives a much more thorough
explanation of scripting than I could hope to. Scripting with ZDoom is just
like scripting for Hexen and even uses Hexen's acs utility to compile
scripts.

The only significant difference is that scripts should include "zcommon.acs"
instead of "common.acs" so that they can get definitions appropriate for
ZDoom instead of Hexen. This file just includes three others:

    zspecial.acs
    zdefs.acs
    zwvars.acs


14. Sector specials
===================
In DOOM mode, these are the same as the sector types used by BOOM with the
following four new specials:

    21	Light_Phased
    22	LightSequenceStart
    23	LightSequenceSpecial1
    24	LightSequenceSpecial2

In Hexen mode, the sector specials available are:
    1	Light_Phasde
    2	LightSequenceStart
    3	LightSequenceSpecial1
    4	LightSequenceSpecial2

	These specials deal with phased lightning ("moving lights").  Two
	different ways to go about doing phased lighting:  automatic, or
	by-hand.  The automatic method is (obviously) more convenient, but
	the by-hand method is more flexible.  Light_Phased is the by-hand
	special.  Place it on a sector, then set the sector's lightlevel to
	a phase index (0-63).  As you place the special on nearby sectors,
	increment the index for each sector.

	Or, to use the LightSequence specials, just place the
	LightSequenceStart special on a sector.  Then, for each additional
	sector, alternate between LightSequenceSpecial1 &
	LightSequenceSpecial2. The resulting phased lighting will appear to
	move toward the sector marked with LightSequenceStart.

	For instance, if you wanted phased lightning to flow up a staircase,
	you could either place Light_Phased on each step, and change the
	phase index (lightlevel) accordingly.  Or, you could place
	LightSequenceStart on the bottom step (and set that step's
	lightlevel to something mid-ranged), and then let the game calculate
	the phase indices for each step by placing the LightSequenceSpecial
	specials on all other steps.  Note that for the LightSequenceSpecial
	specials to have proper lighting, set their lightlevels to zero,
	which causes it to use the previous sector's lightlevel. Hence, that
	"nice value" which was placed on the first step will iterate through
	all the other steps.  If a step's lightlevel is not zero, then that
	value will filter down to all other steps after it.

    26	Stairs_Special1
    27	Stairs_Special2

	These specials are used by the stair building line specials
	Stairs_BuildDown, Stairs_BuildUp, Stairs_BuildDownSync, and
	Stairs_BuildUpSync. The are not used by the Generic_Stairs and
	Stairs_BuildUpDoom specials, which follow the normal Doom convention
	for building stairs.

	To build stairs using any of the four stair-builders listed above,
	set the first sector's type to Stairs_Special1. Then alternate
	between Stairs_Special2 and Stairs_Special1 for the remaining
	sectors you want in the staircase.

    65	dLight_Flicker
    66	dLight_StrobeFast
    67	dLight_StrobeSlow
    68	dLight_Strobe_Hurt
    69	dDamage_Hellslime
    71	dDamage_Nukage
    72	dLight_Glow
    74	dSector_DoorCloseIn30
    75	dDamage_End
    76	dLight_StrobeSlowSync
    77	dLight_StrobeFastSync
    78	dSector_DoorRaiseIn5Mins
    80	dDamage_SuperHellslime
    81	dLight_FireFlicker

	These are the same sector specials as Doom, except that they are
	numbered beginning at 65 instead of 1.

    201	Scroll_North_Slow
    202	Scroll_North_Medium
    203	Scroll_North_Fast
    204	Scroll_East_Slow
    205	Scroll_East_Medium
    206	Scroll_East_Fast
    207	Scroll_South_Slow
    208	Scroll_South_Medium
    209	Scroll_South_Fast
    210	Scroll_West_Slow
    211	Scroll_West_Medium
    212	Scroll_West_Fast
    213	Scroll_NorthWest_Slow
    214	Scroll_NorthWest_Medium
    215	Scroll_NorthWest_Fast
    216	Scroll_NorthEast_Slow
    217	Scroll_NorthEast_Medium
    218	Scroll_NorthEast_Fast
    219	Scroll_SouthEast_Slow
    220	Scroll_SouthEast_Medium
    221	Scroll_SouthEast_Fast
    222	Scroll_SouthWest_Slow
    223	Scroll_SouthWest_Medium
    224	Scroll_SouthWest_Fast

	These specials scroll the sector's floor in the diraction and speed
	indicated and also carry anything on it in the same direction. These
	are intended mainly for compatibility with Hexen levels because they
	also exhibit the odd Hexen behavior of carrying things faster than
	they scroll the floor.

The bitfields BOOM uses for generalized sectors are also available, but have
been assigned different bits:

    Bit	    Hex Equiv	Meaning
    ------------------------------------------------------------------------
    8-9	    0x0300	Damage amount (see below)
    10	    0x0400	Sector is a secret
    11	    0x0800	Friction can be controlled in this sector
    12	    0x1000	BOOM pusher effects work in this sector

Using the BOOM bitfields, four damage amounts are possible:

    Value   Use		Amount
    ------------------------------------------------------------------------
    0	    0x0000	No damage
    1	    0x0100	5 units of damage per 31 tics
    2	    0x0200	10 units of damage per 31 tics
    3	    0x0300	20 units of damage per 31 tics


15. Action Specials
===================
In DOOM mode, a linedef's special can be any of the specials supported by
BOOM. Go see boomref.txt for a list of those.

In Hexen mode, the following specials can be set in a thing or linedef's
special field:

    Specials for doors
    ------------------
    10:Door_Close (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the door closes

	Lowers the ceiling of all affected sectors to the floor. If tag is
	0, then the sector on the line's back side is used.

    11:Door_Open (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the door opens

	Raises the ceiling of all affected sectors to four units below the
	lowest surrounding ceiling. If tag is 0, then the sector on the
	line's back side is used.

    12:Door_Raise (tag, speed, delay)
	tag:	Tag of affected sector
	speed:	How quickly the door moves
	delay:	Tics until door closes

	Raises the ceiling of all affected sectors to four units below the
	lowest surrounding ceiling. After the door is opened, it will be
	closed again after delay tics. If tag is 0, then the sector on the
	line's back side is used.

    13:Door_LockedRaise (tag, speed, delay, lock)
	tag:	Tag of affected sector
	speed:	How quickly the door moves
	delay:	Tics until door closes (0 if never)
	lock:	Required key (see key types below)

	Raises the ceiling of all affected sectors to four units below the
	lowest surrounding ceiling if the player has the proper key. After
	the door is opened, it will be closed again after delay tics. If tag
	is 0, then the sector on the line's back side is used.

    249:Door_CloseWaitOpen (tag, speed, delay)
	tag:	Tag of affected sector
	speed:	How quickly the door moves
	delay:	Octics until door opens

	Closes the specified door, and opens it again after delay octics
	have passed. If tag is 0, then the sector on the line's back side is
	used.

    202:Generic_Door (tag, speed, kind, delay, lock)
	tag:	Tag of affected sector
	speed:	How quickly the door moves
	kind:	What type of door this is
	delay:	Octics until door is automatically closed/opened
	lock:	Required key, if any (see key types below)

	This special encapsulates BOOM's generalized doors. Kind can be one
	of four values:

	Kind	Meaning
	--------------------------------------------------------------------
	0	Raise door and close it after delay octics
	1	Open door and leave it open
	2	Close door and open it after delay octics
	3	Close door and leave it closed

	If tag is 0, then the sector on the line's back side is used.

    Specials for floors
    -------------------
    20:Floor_LowerByValue (tag, speed, height)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	height:	Amount to lower floor by

	Lowers a tagged sector's floor by height units. If tag is 0, then
	the sector on the line's back side is used.

    36:Floor_LowerByValueTimes8 ()
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	height:	Amount to lower floor by

	Lowers a tagged sector's floor by (height * 8) units. If tag is 0,
	then the sector on the line's back side is used.

    66:Floor_LowerInstant (tag, arg1, height)
	tag:	Tag of affected sector
	arg1:	Unused
	height:	Height of move

	Instantly lowers the floor of the affected sectors by (height * 8)
	units. If tag is 0, then the sector on the line's back side is used.

    21:Floor_LowerToLowest (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves

	Lowers a tagged sector's floor to the height of the lowest
	surrounding floor. If tag is 0, then the sector on the line's back
	side is used.

    241:Floor_LowerToLowestTxTy (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves

	Lowers a tagged sector's floor to the height of the lowest
	surrounding floor and uses the trigger change model to give it a new
	picture and special. If tag is 0, then the sector on the line's back
	side is used.

    242:Floor_LowerToHighest (tag, speed, adjust)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	adjust:	Amount of difference from target height + 128

	Lowers a tagged sector's floor to the height of the highest
	surrounding floor + adjust - 128. So if you want the floor to lower
	to the height of the highest surrounding floor, use an adjust of
	128. If you want it to lower to 8 units below the other floor, use
	an adjust of 120. Similar for other values of adjust. If tag is 0,
	then the sector on the line's back side is used.

    22:Floor_LowerToNearest (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves

	Lowers a tagged sector's floor to the height of the highest
	surrounding floor. If tag is 0, then the sector on the line's back
	side is used.

    23:Floor_RaiseByValue (tag, speed, height)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	height:	Amount to raise floor by

	Raises a tagged sector's floor by height units. If tag is 0, then
	the sector on the line's back side is used.

    35:Floor_RaiseByValueTimes8 (tag, speed, height)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	height:	Amount to raise floor by

	Raises a tagged sector's floor by (height * 8) units. If tag is 0,
	then the sector on the line's back side is used.

    67:Floor_RaiseInstant (tag, arg1, height)
	tag:	Tag of affected sector
	arg1:	Unused
	height:	Height of move

	Instantly raises the floor of the affected sectors by (height * 8)
	units. If tag is 0, then the sector on the line's back side is used.

    24:Floor_RaiseToHighest (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves

	Raises a tagged sector's floor to the height of the highest
	surrounding floor. If tag is 0, then the sector on the line's back
	side is used.

    25:Floor_RaiseToNearest (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves

	Raises a tagged sector's floor to the height of the next higher
	surrounding floor. If tag is 0, then the sector on the line's back
	side is used.

    238:Floor_RaiseToLowestCeiling (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves

	Raises a tagged sector's floor to the height of the lowest
	surrounding ceiling. If tag is 0, then the sector on the line's back
	side is used.

    239:Floor_RaiseByValueTxTy (tag, speed, height)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	height:	Amount to raise floor by

	Raises a tagged sector's floor by height units and uses the trigger
	change model to give it a new picture and special. If tag is 0, then
	the sector on the line's back side is used.

    240:Floor_RaiseByTexture (tag, speed)
	tag:	Tag of affectod sectors
	speed:	How quickly the floor moves

	Raises a tagged sector's floor by the height of the shortest lower
	texture on its defining linedefs. If tag is 0, then the sector on
	the line's back side is used.

    28:Floor_RaiseAndCrush (tag, speed, crush)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	crush:	Amount of damage to apply
	
	Raises the floor to a height of 8 units below the ceiling and
	applies crushing damage to anything standing on it. If tag is 0,
	then the sector on the line's back side is used.	

    46:Floor_CrushStop (tag)
	tag:	Tag of affected sector

	Stops a crushing floor.

    68:Floor_MoveToValueTimes8 (tag, speed, height, neg)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	height:	Absolute height of the move
	neg:	Whether or not the destination height is negative

	Moves the floor of affected sectors to an absolute height of
	(height * 8) units. If the destination height is negative, then neg
	should be 1, otherwise it should be 0 for a positive height. If tag
	is 0, then the sector on the line's back side is used.

    138:Floor_Waggle (tag, amp, freq, offset, time)
	tag:	Tag of affected sector
	amp:	Amplitude of the waggle (in 1/8 of a unit)
	freq:	Frequency of the waggle
	offset:	Phase offsect of the waggle
	time:	How many tics the waggle lasts

	"Waggles" the floor of the affected sectors in a sine wave.

    250:Floor_Donut (ptag, pspeed, sspeed)
	ptag:	Tag of the pillar in the center of the donut
	pseed:	How quickly to lower the pillar
	sspeed:	How quickly to raise the surrounding sector's floor

	Performs a "donut" action on the specified sectors.

    235:Floor_TransferTrigger (tag)
	tag:	Tag of affected sector

	Transfers the floor picture and sector special from one sector to
	another using the trigger change model.

    236:Floor_TransferNumeric (tag)
	tag:	Tag of affected sector

	Transfers the floor picture and sector special from one sector to
	another using the numeric change model.

    200:Generic_Floor (tag, speed, height, target, flags)
	tag:	Tag of affected sector
	speed:	How quickly the floor moves
	height:	Height of the move (for types that use it)
	target:	How to determine the floor's destination height
	flags:	Flags for the move

	This special encapsulates BOOM's generalized floors. Flags are:

	Value	    Meaning
	--------------------------------------------------------------------
	0 (0x00)    No change
	1 (0x01)    Zero sector's special
	2 (0x02)    Change sector's floor picture
	3 (0x03)    Change sector's special
	4 (0x04)    Use numeric model if set, trigger model if not
	8 (0x08)    Raise floor if set, lower it if not
	16 (0x10)   Cause crushing damage if set

	Target can be one of the following:

	Value	Target
	--------------------------------------------------------------------
	0	Height units above/below current height
	1	Highest surrounding floor
	2	Lowest surrounding floor		
	3	Nearest surrounding floor
	4	Lowest surrounding ceiling
	5	This sector's ceiling
	6	Height units determined by shortest lower texture on sector

	If tag is 0, then the sector on the line's back side is used.

    Specials for ceilings
    ---------------------
    40:Ceiling_LowerByValue (tag, speed, height)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	height:	Amount to lower ceiling by

	Lowers a tagged sector's ceiling by height units. If tag is 0, then
	the sector on the line's back side is used.

    41:Ceiling_RaiseByValue (tag, speed, height)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	height:	Amount to raise ceiling by

	Raises a tagged sector's ceiling by height units. If tag is 0, then
	the sector on the line's back side is used.

    199:Ceiling_LowerByValueTimes8 (tag, speed, height)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	height:	Amount to lower ceiling by

	Lowers a tagged sector's ceiling by (height * 8) units. If tag is 0,
	then the sector on the line's back side is used.

    198:Ceiling_RaiseByValueTimes8 (tag, speed, height)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	height:	Amount to raise ceiling by

	Raises a tagged sector's ceiling by (height * 8) units. If tag is 0,
	then the sector on the line's back side is used.

    193:Ceiling_LowerInstant (tag, arg1, height)
	tag:	Tag of affected sector
	arg1:	Unused
	height:	Amount to lower ceiling by

	Instantly lowers a sector's ceiling by (height * 8) units. If tag is
	0, then the sector on the line's back side is used.

    194:Ceiling_RaiseInstant (tag, arg1, height)
	tag:	Tag of affected sector
	arg1:	Unused
	height:	Amount to lower ceiling by

	Instantly raises a sector's ceiling by (height * 8) units. If tag is
	0, then the sector on the line's back side is used.

    252:Ceiling_RaiseToNearest (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves

	Raises a ceiling to the height of the nearest surrounding ceiling.
	If tag is 0, then the sector on the line's back side is used.	

    192:Ceiling_LowerToHighestFloor (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves

	Lowers a ceiling to the height of the highest floor sorrounding it.
	If tag is 0, then the sector on the line's back side is used.

    253:Ceiling_LowerToLowest (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves

	Lowers a ceiling to the height of the lowest surrounding floor. If
	tag is 0, then the sector on the line's back side is used.

    254:Ceiling_LowerToFloor (tag, speed)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves

	Lowers a ceiling to the height of the floor underneath it. If tag is
	0, then the sector on the line's back side is used.

    69:Ceiling_MoveToValueTimes8
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	height:	Absolute height of the move
	neg:	Whether or not the destination height is negative

	Moves the ceiling of affected sectors to an absolute height of
	(height * 8) units. If the destination height is negative, then neg
	should be 1, otherwise it should be 0 for a positive height. If tag
	is 0, then the sector on the line's back side is used.

    42:Ceiling_CrushAndRaise (tag, speed, crush)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	crush:	Amount of damage to apply

	Lowers and raises the ceiling of the affected sectors continually,
	applying crushing damage to anything underneath it. The ceiling
	will rise at half the speed at which it lowers. If tag is 0, then
	the sector on the line's back side is used.

    45:Ceiling_CrushRaiseAndStay (tag, speed, crush)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	crush:	Amount of damage to apply

	Lowers the ceiling of the affected and applies crushing damage to
	anything underneath it, then raises the ceiling back up to its
	original height. The ceiling will rise at half the speed at which it
	lowers. If tag is 0, then the sector on the line's back side is
	used.

    43:Ceiling_LowerAndCrush (tag, speed, crush)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	crush:	Amount of damage to apply

	Lowers the ceiling of affected sectors and applies crushing damage
	to anything under it. If tag is 0, then the sector on the line's
	back side is used.

    195:Ceiling_CrushRaiseAndStayA (tag, dspeed, uspeed, crush)
	tag:	Tag of affected sector
	dspeed:	How quickly the ceiling moves down
	uspeed:	How quickly the ceiling moves back up
	crush:	Amount of damage to apply

	Lowers the ceiling of the affected and applies crushing damage to
	anything underneath it, then raises the ceiling back up to its
	original height. If tag is 0, then the sector on the line's back
	side is used.

    196:Ceiling_CrushAndRaiseA (tag, dspeed, uspeed, crush)
	tag:	Tag of affected sector
	dspeed:	How quickly the ceiling moves down
	uspeed: How quickly the ceiling moves back up
	crush:	Amount of damage to apply

	Lowers and raises the ceiling of the affected sectors continually,
	applying crushing damage to anything underneath it. If tag is 0,
	then the sector on the line's back side is used.

    197:Ceiling_CrushAndRaiseSilentA (tag, dspeed, uspeed, crush)
	tag:	Tag of affected sector
	dspeed:	How quickly the ceiling moves down
	uspeed: How quickly the ceiling moves back up
	crush:	Amount of damage to apply

	Lowers and raises the ceiling of the affected sectors continually,
	applying crushing damage to anything underneath it. If tag is 0,
	then the sector on the line's back side is used. Crushers started
	with this special will only make noise when they reach the top or
	bottom of their strokes.

    255:Ceiling_CrushRaiseAndStaySilA (tag, dspeed, uspeed, crush)
	tag:	Tag of affected sector
	dspeed:	How quickly the ceiling moves down
	uspeed:	How quickly the ceiling moves back up
	crush:	Amount of damage to apply

	Lowers the ceiling of the affected and applies crushing damage to
	anything underneath it, then raises the ceiling back up to its
	original height. If tag is 0, then the sector on the line's back
	side is used. Crushers started with this special will only make
	noise at the top and bottom of their strokes.

    44:Ceiling_CrushStop (tag)
	tag:	Tag of affected sector

	Stops a crushing ceiling.

    201:Generic_Ceiling (tag, speed, height, target, flag)
	tag:	Tag of affected sector
	speed:	How quickly the ceiling moves
	height:	Height of the move (for types that use it)
	target:	How to determine the ceiling's destination height
	flags:	Flags for the move

	This special encapsulates BOOM's generalized ceilings. Flags are:

	Value	    Meaning
	--------------------------------------------------------------------
	0 (0x00)    No change
	1 (0x01)    Zero sector's special
	2 (0x02)    Change sector's ceiling picture
	3 (0x03)    Change sector's special
	4 (0x04)    Use numeric model if set, trigger model if not
	8 (0x08)    Raise ceiling if set, lower it if not
	16 (0x10)   Cause crushing damage if set

	Target can be one of the following:

	Value	Target
	--------------------------------------------------------------------
	0	Height units above/below current height
	1	Highest surrounding ceiling
	2	Lowest surrounding ceiling
	3	Nearest surrounding ceiling
	4	Highest surrounding floor
	5	This sector's floor
	6	Height units determined by shortest upper texture on sector

	If tag is 0, then the sector on the line's back side is used.

    205:Generic_Crusher (tag, dspeed, uspeed, silent, crush)
	tag:	Tag of affected sector
	dspeed:	How quickly the ceiling lowers
	uspeed:	How quickly the ceiling raises
	silent:	Set this to 1 to prevent the crusher from making noise
	crush:	Amount of damage to apply

	This special encapsulates BOOM's generalized crushers. It is the
	same as Ceiling_CrushAndRaiseA except that it takes an argument to
	control the "noisiness" of the crusher.

    Specials for floors and ceilings
    --------------------------------
    95:FloorAndCeiling_LowerByValue (tag, speed, height)
	tag:	Tag of affected sector
	speed:	Speed of the move
	height:	Amount to move

	Moves both the floor and ceiling of the affected sectors down by
	(height * 8) units.

    96:FloorAndCeiling_RaiseByValue (tag, speed, height)
	tag:	Tag of affected sector
	speed:	Speed of the move
	height:	Amount to move

	Moves both the floor and ceiling of the affected sectors up by
	(height * 8) units.

    251:FloorAndCeiling_LowerRaise (tag, fspeed, cspeed)
	tag:	Tag of affected sector
	fspeed:	Speed to move the floor
	cspeed:	Speed to move the ceiling

	Lowers the sector's floor to the lowest surrounding floor and raises
	its ceiling to the highest surrounding ceiling.

    245:Elevator_RaiseToNearest (tag, speed)
	tag:	Tag of affected sector
	speed:	How fast the elevator moves

	Raises the floor and ceiling of the tagged sector so that its floor
	aligns with the floor of the next higher sector while keeping the
	same amount of distance between the floor and ceiling.

    246:Elevator_MoveToFloor (tag, speed)
	tag:	Tag of affected sector
	speed:	How fast the elevator moves

	Moves the floor and ceiling of the tagged sector so that its floor
	aligns with the floor of the sector the activating linedef is
	facing, while keeping the same amount of distance between the floor
	and ceiling.

    247:Elevator_LowerToNearest (tag, speed)
	tag:	Tag of affected sector
	speed:	How fast the elevator moves

	Lowers the floor and ceiling of the tagged sector so that its floor
	aligns with the floor of the next lower sector while keeping the
	same amount of distance between the floor and ceiling.

    Specials for pillars
    --------------------
    29:Pillar_Build (tag, speed, height)
	tag:	Tag of affected sector
	speed:	Speed of the build
	height:	Height (relative to floor) where the floor and ceiling meet

	Raises the floor of a sector and lowers its ceiling so that they
	meet. The speed argument controls the speed of whichever part of the
	pillar has to move further, and the other part will have its speed
	set so that it arrives at its destination at the same time. If
	height is 0, then the floor and ceiling will meet halfway between
	their original positions.

    94:Pillar_BuildAndCrush (tag, speed, height, crush)
	tag:	Tag of affected sector
	speed:	Speed of the build
	height:	Height (relative to floor) where the floor and ceiling meet
	crush:	Amount of damage to apply

	This is the same as Pillar_Build except that it will also aply
	crushing damage to anything blocking the pillar from closing.

    30:Pillar_Open (tag, speed, fdist, cdist)
	tag:	Tag of affected sector
	speed:	Speed of the open
	fdist:	How far the floor should lower
	cdist:	How far the ceiling should rise

	Opens a pillar. If fdist is 0, then the pillar's floor will lower to
	the lowest surrounding floor. Similarly, if cdist is 0, then the
	pillar's ceiling will rise to the highest surrounding ceiling. The
	speed argument controls the speed of whichever part of the pillar
	has to move further, and the other part will have its speed set so
	that it arrives at its destination at the same time.

    Specials for stairs
    -------------------
    26:Stairs_BuildDown (tag, speed, height, delay, reset)
	tag:	Tag of first sector in staircase
	speed:	How quickly the steps lower
	height:	Height of each step
	delay:	Number of tics the staircase waits between steps
	reset:	Tics until the stairs return to their original heights
		(0 if never)

	Builds a staircase in sectors marked with the Stairs_Specials.

    27:Stairs_BuildUp (tag, speed, height, delay, reset)
	tag:	Tag of first sector in staircase
	speed:	How quickly the steps rise
	height:	Height of each step
	delay:	Number of tics the staircase waits between steps
	reset:	Tics until the stairs return to their original heights
		(0 if never)

	Builds a staircase in sectors marked with the Stairs_Specials.

    31:Stairs_BuildDownSync (tag, speed, height, reset)
	tag:	Tag of first sector in staircase
	speed:	How quickly the first step lower
	height:	Height of each step
	reset:	Tics until the stairs return to their original heights
		(0 if never)

	Builds a staircase in sectors marked with the Stairs_Specials. Each
	step moves at a different speed so that they all reach their
	destination heights at the same time.

    32:Stairs_BuildUpSync (tag, speed, height, reset)
	tag:	Tag of first sector in staircase
	speed:	How quickly the first step raise
	height:	Height of each step
	reset:	Tics until the stairs return to their original heights
		(0 if never)

	Builds a staircase in sectors marked with the Stairs_Specials. Each
	step moves at a different speed so that they all reach their
	destination heights at the same time.

    217:Stairs_BuildUpDoom (tag, speed, height, delay, reset)
	tag:	Tag of first sector in staircase
	speed:	How quickly the steps rise
	height:	Height of each step
	delay:	Number of tics the staircase waits between steps
	reset:	Tics until the stairs return to their original heights
		(0 if never)

	Builds a staircase. The sectors that make up the staircase are
	determined using the normal Doom mechanism.

    204:Generic_Stairs (tag, speed, height, flags, reset)
	tag:	Tag of first sector in staircase
	speed:	How quickly the steps move
	height:	Height of each step
	flags:	controls direction and ignorance of floor textures
	reset:	Tics until the stairs return to their original heights
		(0 if never)

	This special encapsulates BOOM's generalized stairs. The sectors of
	the staircase are determined as they are in BOOM. If bit 0 of flags
	is set (0x01), the stairs are built up, otherwise they build down.
	If bit 1 is set (0x02), then the determination of stair sectors
	ignores differences floor textures. If a line activates this
	special, and the line is marked as repeatable, then the direction
	the stairs build will alternate between up and down each time the
	special is activated.

    Specials for platforms
    ----------------------
    60:Plat_PerpetualRaise (tag, speed, delay)
	tag:	Tag of affected sector
	speed:	Speed of move
	delay:	Tics between rise and falls

	Starts a perpetual raise platform with a lip of 8 units. If tag is
	0, then the sector on the line's back side is used.

    207:Plat_PerpetualRaiseLip (tag, speed, delay, lip)
	tag:	Tag of affected sector
	speed:	Speed of move
	delay:	Tics between rise and fialls
	lip:	Amount of floor to leave showing when plat is lowered

	Starts a perpetual raise platform. If tag is 0, then the sector on
	the line's back side is used.

    61:Plat_Stop (tag)
	tag:	Tag of affected sector

	Stops a perpetual raise platform.

    62:Plat_DownWaitUpStay (tag, speed, delay)
	tag:	Tag of affected sector
	speed:	Speed of move
	delay:	Tics before going back up

	Lowers a plat, waits, and then raises it back to its original
	position. This is the same as using Plat_DownWaitUpStayLip with a
	lip of 8. If tag is 0, then the sector on the line's back side is
	used.

    206:Plat_DownWaitUpStayLip (tag, speed, delay, lip)
	tag:	Tag of affected sector
	speed:	Speed of move
	delay:	Tics between rise and fialls
	lip:	Amount of floor to leave showing when plat is lowered

	Lowers a plat, waits, and then raises it back to its original
	position. If tag is 0, then the sector on the line's back side is
	used.

    63:Plat_DownByValue (tag, speed, delay, height)
	tag:	Tag of affected sector
	speed:	Speed of move
	delay:	Tics before going back up
	height:	Amount to lower by

	Lowers a plat by (height * 8) units, waits, and then raises it back
	to its original position. If tag is 0, then the sector on the line's
	back side is used.

    65:Plat_UpByValue (tag, speed, delay, height)
	tag:	Tag of affected sector
	speed:	Speed of move
	delay:	Tics before going back down
	height:	Amount to raise by

	Raises a plat by (height * 8) units, waits, and then lowers it back
	to its original position. If tag is 0, then the sector on the line's
	back side is used.

    64:Plat_UpWaitDownStay (tag, speed, delay)
	tag:	Tag of affected sector
	speed:	Speed of move
	delay:	Tics before going back down

	Raises a plat, waits, and then lowers it back to its original
	position. If tag is 0, then the sector on the line's back side is
	used.

    228:Plat_RaiseAndStayTx0 (tag, speed)
	tag:	Tag of affected sector
	speed:	Speed of move

	Raises a plat, sets its floor texture to match the floor texture on
	the front side of the triggering line, and sets the plat's sector
	special to zero. If tag is 0, then the sector on the line's back
	side is used.

    230:Plat_UpByValueStayTx (tag, speed, height)
	tag:	Tag of affected sector
	speed:	Speed of move
	height:	Amount to raise by
	
	Raises a plat by (height * 8) units, and sets its floor texture to
	match the floor texture on the front side of the triggering line. If
	tag is 0, then the sector on the line's back side is used.

    231:Plat_ToggleCeiling (tag)
	tag:	Tag of affected sector

	Switches a plat between lowered and touching the ceiling. If tag is
	0, then the sector on the line's back side is used.

    203:Generic_Lift (tag, speed, delay, type, height)
	tag:	Tag of affected sector
	speed:	Speed of move
	delay:	Tics before reversing direction
	type:	Specifies what type of plat this is
	height:	Distance to move if target is 0.

	This special encapsulates BOOM's generalized lifts. Type can be one
	of the following values:

	Value	Target
	--------------------------------------------------------------------
	0	Plat_UpByValue
	1	Plat_DownWaitUpStay
	2	Plat_DownToNearestFloor
	3	Plat_DownToLowestCeiling
	4	Plat_PerpetualRaise

    Specials for teleporters
    ------------------------
    70:Teleport (tid)
	tid:	Thing ID of the destination spot

	Teleports the activating thing to a new location.

    71:Teleport_NoFog (tid)
	tid:	Thing ID of the destination spot

	Teleports the activating thing to a new location, but without fog or
	a delay, and preserves the thing's facing angle relative to the
	triggering line and the destination spot.

    74:Teleport_NewMap (map, pos)
	map:	Levelnum of the map to teleport to.
	pos:	Corresponds to destination player start spot arg0

	Teleports the player to a new map and to the player start spot whose
	arg0 matches pos.

    75:Teleport_EndGame

	Ends the game, but only with DOOM II.

    243:Exit_Normal (pos)
	pos:	Corresponds to destination player start spot arg0

	Teleports the player to the next map defined for this map in MAPINFO
	and to the player start spot whose arg0 matches pos.

    244:Exit_Secret (pos)
	pos:	Corresponds to destination player start spot arg0

	Teleports the player to the secret map defined for this map in
	MAPINFO and to the player start spot whose arg0 matches pos.

    215:Teleport_Line (thisid, destid, flip)
	thisid:	Line ID of this line
	destid: Line ID of destination line
	flip:	Set this to 1 to flip the teleported thing 180 degrees

	Silently teleports a thing between two lines. A pair of lines with
	this special can share the same id (thisid and destid are the same)
	because a line will never teleport to itself. This special also
	behaves like Line_SetIdentification by setting the line ID of the
	any lines it is used on.

    Specials for lights
    -------------------
    110:Light_RaiseByValue (tag, value)
	tag:	Tag of affected sector
	value:	Amount to raise the light by

	Increases the light level in a sector by value.

    111:Light_LowerByValue (tag, value)
	tag:	Tag of affected sector
	value:	Amount to lower the light by

	Decreases the light level in a sector by value.

    112:Light_ChangeToValue (tag, value)
	tag:	Tag of affected sector
	value:	New light level

	Sets the light level in a sector to value.

    113:Light_Fade (tag, value, tics)
	tag:	Tag of affected sector
	value:	New light level
	tics:	How long the light takes to fade to the new level

	Changes the light level in a sector gradually over a period of time
	until it reaches value.

    114:Light_Glow (tag, upper, lower, tics)
	tag:	Tag of affected sector
	upper:	Upper light level
	lower:	Lower light level
	tics:	How long to change between two light levels

	Continuously fades the light level in a sector between upper and
	lower.

    115:Light_Flicker (tag, upper, lower)
	tag:	Tag of affected sector
	upper:	Upper light level
	lower:	Lower light level

	Switches the light level in a sector between upper and lower at
	random intervals between approximately 0.2 and 1.8 seconds.

    116:Light_Strobe (tag, upper, lower, u-tics, l-tics)
	tag:	Tag of affected sector
	upper:	Upper light level
	lower:	Lower light level
	u-tics:	Time to stay at upper light level
	l-tics:	Time to stay at lower light level

	Switches the light level in a sector between upper and lower at the
	given intervals.

    232:Light_StrobeDoom (tag, u-tics, l-tics)
	tag:	Tag of affected sector
	u-tics:	Time to stay at upper light level
	l-tics:	Time to stay at lower light level

	The is the same as Light_Strobe except that upper is whatever the
	sector's light level is right now, and lower is whatever the lowest
	light level in the surrounding sectors is. If the surrounding
	sectors are at the same light level as the affected sector, then
	lower is 0.

    233:Light_MinNeighbor (tag)
	tag:	Tag of affected sector

	Sets the light level of a sector to match the lowest light level
	found in one of its neighboring sectors.
	
    234:Light_MaxNeighbor (tag)
	tag:	Tag of affected sector

	Sets the ligt level of a sector to match the highest light level
	found in one of its neighboring sectors.

    Specials for sector properties
    ------------------------------
    212:Sector_SetColor (tag, r, g, b)
	tag:	Tag of affected sector
	r:	Amount of red in the light
	g:	Amount of green in the light
	b:	Amount of blue in the light

	Sets the color of light in a sector. By default, sectors have white
	light (red, green, blue are all 255). If a sector's color is changed
	during gameplay, another sector should already have the desired
	color (possibly by using an open script to set the color of a dummy
	sector that the player will never see). This is because there can be
	a noticable delay while the game constructs the tables for a color
	for the first time.

	You can use the testcolor console command to test a color from
	within the game.

    213:Sector_SetFade (tag, r, g, b)
	tag:	Tag of affected sector
	r:	Amount of red to fade to
	g:	Amount of green to fade to
	b:	Amount of blue to fade to

	Sets the color that lights in the tagged sectors fade to. By
	default, this is whatever the level's fadeto is specified as being
	in a MAPINFO lump, or black, if it doesn't specify a fadeto. The
	note about changing a sector's color during the middle of gameplay
	also applies here.

	You can use the testfade console command to test a fade from within
	the game.

    214:Sector_SetDamage (tag, amount, mod)
	tag:	Tag of affected sector
	amount:	Amount of damage to applay
	mod:	Means-of-death identifier (See below after this section)

	Sets the amount of damage done to a player in a sector. This is
	in addition to whatever is specified by the sector's special. Damage
	amount below 20 will only hurt the player if he doesn't have an
	environment suit. Damages between 20-49 will occasionally hurt the
	player even with an environment suit on. Damages of 50 and above
	will always hurt the player unless he is in god mode.

    216:Sector_SetGravity (tag, ipart, fpart)
	tag:	Tag of affected sector
	ipart:	Integral part of the gravity multiplier
	fpart:	Fractional part of the gravity multiplier

	Sets the amount of gravity in a sector. The actual formula used is
	sv_gravity * (ipart + fracpart * 0.01). SV_Gravity is a cvar that
	defines "normal" gravity. So Sector_SetGravity (1, 0, 50) would set
	a sector to half normal gravity, Sector_SetGravity (1, 2, 0) would
	be double normal gravity, Sector_SetGravity (1, 1, 0) would be
	normal gravity, etc.

    219:Sector_SetFriction (tag, amount)
	tag:	Tag of affected sector
	amount:	Amount of friction

	Only valid during initialization. Sets a sector's friction. If
	amount is 0, then the amount of friction is determined by the
	line's length (just like BOOM's 223 linedef). If amount is in the
	range 1-200, it sets the amount of friction directly.

    218:Sector_SetWind (tag, amount, angle, useline)
	tag:	Tag of affected sector
	amount:	Stregth of the wind
	angle:	Angle the wind blows
	useline:Get strength and angle from the line instead?

	Only valid during initialization. If useline is 1, this behaves just
	like BOOM's 224 linedef. If useline is 0, then the magnitude and
	angle parameters are used instead of the size and orientation of
	the line.

    220:Sector_SetCurrent (tag, amount, angle, useline)
	tag:	Tag of affected sector
	amount:	Strength of the current
	angle:	Angle the current flows
	useline:Get strength and angle from the line instead?

	Only valid during initialization. If useline is 1, this behaves just
	like BOOM's 225 linedef. If useline is 0, then the magnitude and
	angle parameters are used instead of the size and orientation of
	the line.

    Specials for things
    -------------------
    72:ThrustThing (angle, force)
	angle:	Byte angle to thrust the thing
	force:	How far to thrust the thing

	Thrusts the thing that activated the special.

    73:DamageThing (amount)
	amount:	Amount of damage to do

	Hurts the thing that activated the special.

    248:HealThing (amount)
	amount: Amount of health to give

	Gives health to the thing that activated the special, but will not
	give it more than its maximum amount.

    130:Thing_Activate (tid)
	tid:	Thing ID of the thing to activate

	Removes the dormant flag from a monster so that it will be able to
	take damage and attack the player.

    131:Thing_Deactivate (tid)
	tid:	Thing ID of the thing to deactivate

	Sets the dormant flag of a monster so that it won't be able to take
	damage or attack the player.

    132:Thing_Remove (tid)
	tid:	Thing ID of the thing to remove

	Removes the specified thing from the map.

    133:Thing_Destroy (tid)
	tid:	Thing ID of the thing to destroy

	Kills the specified thing.

    134:Thing_Projectile (tid, type, angle, speed, vspeed)
	tid:	Thing ID of the map spot to spawn the projectile at
	type:	Type of projectile to spawn
	angle:	Byte angle of the projectile
	speed:	Speed of the projectile in the x-y plane
	vspeed:	Vertical speed of the projectile (always upward)

	Spawns a projectile.

    136:Thing_ProjectileGravity (tid, type, angle, speed, vspeed)
	tid:	Thing ID of the map spot to spawn the projectile at
	type:	Type of projectile to spawn
	angle:	Byte angle of the projectile
	speed:	Speed of the projectile in the x-y plane
	vspeed:	Vertical speed of the projectile (always upward)

	Spawns a projectile and subjects it to gravity.

    135:Thing_Spawn (tid, type, angle)
	tid:	Thing ID of the map spot to spawn the thing at
	type:	Type of thing to spawn
	angle:	Byte angle for the thing to face

	Spawns a thing.

    137:Thing_SpawnNoFog (tid, type, angle)
	tid:	Thing ID of the map spot to spawn the thing at
	type:	Type of thing to spawn
	angle:	Byte angle for the thing to face

	Spawns a thing without the teleporter fog.

    229:Thing_SetGoal (tid, goal, delay)
	tid:	Thing ID of monster to send to a path node
	goal:	Thing ID of the destination path node
	delay:	Tics before the monster starts moving toward the path node

	Causes a monster to start following a path beginning with the
	specified path node. If tid is 0, Thing_SetGoal can be used as a
	monster's special to automatically start it walking toward a goal
	when it is spawned.

    Specials for ACS scripts
    ------------------------
    80:ACS_Execute (script, map, s_arg1, s_arg2, s_arg3)
	script:	Script to execute
	map:	Map which contains the script
	s_arg1:	First argument passed to the script
	s_arg2:	Second argument passed to the script
	s_arg3:	Third argument passed to the script

	Executes the specified script. A map value of zero indicates that
	the script is on the current map. If the script is on a different
	map, then the execution of the script will be delayed until the
	player enters the map that contains it. Only one copy of a script
	can be running at a time when started with this special.

	If the specified script was previously executed but then suspended,
	then execution will begin at the point immediately after where it
	was suspended instead of starting over again at the beginning.

    226:ACS_ExecuteAlways (script, map, s_arg1, s_arg2, s_arg3)
	script:	Script to execute
	map:	Map which contains the script
	s_arg1:	First argument passed to the script
	s_arg2:	Second argument passed to the script
	s_arg3:	Third argument passed to the script

	Like ACS_Execute, this special starts a script. However, it will
	allow multiple instance of a script to run simultaneously. The down
	side is that any scripts started with this special cannot be
	suspended or terminated with ACS_Suspend or ACS_Terminate. This is
	intended to be used from inside another script only, where you want
	to have one script do something at the same time as a "subtask" and
	it doesn't matter if there are more than one script running at once.

    83:ACS_LockedExecute (script, map, s_arg1, s_arg2, lock)
	script:	Script to execute
	map:	Map which contains the script
	s_arg1:	First argument passed to the script
	s_arg2:	Second argument passed to the script
	lock:	Required key, if any (see key types below)

	Executes the specified script if the player has the right key. A map
	value of zero indicates that the script is on the current map. If
	the script is on a different map, then the execution of the script
	will be delayed until the player enters the map that contains it.
	Only one copy of a script can be running at a time when started with
	this special.

	If the specified script was previously executed but then suspended,
	then execution will begin at the point immediately after where it
	was suspended instead of starting over again at the beginning.


    81:ACS_Suspend (script, map)
	script:	Script to suspend
	map:	Map which contains the script

	Suspends execution of a script until an ACS_Execute or
	ACS_LockedExecute special starts it. If the specified script is not
	currently running, then it will be immediately suspended the next
	time it is run.

    82:ACS_Terminate (script, map)
	script:	Script to suspend
	map:	Map which contains the script

	Terminates execution of the specified script.

    Miscellaneous specials
    ----------------------
    121:Line_SetIdentification (lineid)
	lineid:	Identification number for this line

	Used to identify this line for certain specials and ACS commands.

    208:TranslucentLine (lineid, amount)
	lineid:	Line ID of lines to make translucent (0 for this line)
	amount:	How translucent the line should be [0..255].

	Sets the amount of translucency for all matching lines (including
	itself). If lineid is 0, it only sets the translucency of the line
	it is on. Like Line_SetIdentification, this special sets the line's
	id. Amount controls how opaque the line is:

	      0- 63 => 25%
	     64-127 => 50%
	    128-191 => 75%
	    192-255 => 100%

    100:Scroll_Texture_Left (speed)
    101:Scroll_Texture_Right (speed)
    102:Scroll_Texture_Up (speed)
    103:Scroll_Texture_Down (speed)
	Scrolls a texture in the given direction.

    221:Scroll_Texture_Both (lineid, left, right, down, up)
	lineid:	Line ID of line to scroll (must be 0 for now)
	left:	Speed to scroll left
	right:	Speed to scroll right
	down:	Speed to scroll down
	up:	Speed to scroll up

        Scrolls a texture both horizotally and vertically. Currently only
        valid during initialization and only if lineid is 0. The other four
	parameters determine how quickly the texture scrolls in each
	direction.

    225:Scroll_Texture_Offsets
	Scrolls a line's texture based on its left and right offsets.

    222:Scroll_Texture_Model (lineid, scrollbits)
    223:Scroll_Floor (tag, scrollbits, 0=scroll:1=carry:2=both, x-move, y-move)
    224:Scroll_Ceiling (tag, scrollbits, 0, x-move, y-move)
	All three are only valid during initialization and behave like
	various BOOM scrollers. Scrollbits determines how the scroll works:
	    bit 0 (1)	Displacement scroller
	    bit 1 (2)	Accelerative scroller
	    bit 2 (4)	Use this linedef to get dx and dy
	Bit 2 is only used by Scroll_Floor and Scroll_Ceiling. Scroll_Floor
	can also only scroll the flat, only carry objects, or scroll and
	carry objects depending on what it's third argument is set to.
	Scroll_Ceiling should have the corresponding argument set to 0.
	x-move and y-move are only used if scrollbits does not indicate to
	use the linedef to determine the scroll rate. 128 is subtracted from
	these values to determine the actual direction and rate of scroll.
	(So 128 would be no scroll.) Otherwise, the linedef's length and
	orientation determine the scroll rate and direction.

    209:Transfer_Heights (tag)
	tag:	Tag of affected sector

	This is BOOM's 242 linedef. It is used to divide a sector into
	upper, lower, and middle regions. The drawn heights of the tagged
	sector's floor and ceiling come from the heights of the sector on
	the line's front side. The line's texture names can be used to
	specify a specify a special color map or palette blend to be used
	in those ranges. Palette blends are of the form "AARRGGBB". You can
	use the testblend command to find a good blend from inside the game.
	(See boomref.txt for more details.)

    210:Transfer_FloorLight (tag)
	tag:	Tag of affected sector

	The amount of lighting on the tagged sector's floor will be the same
	as the lighting in the sector that this line faces.

    211:Transfer_CeilingLight (tag)
	tag:	Tag of affected sector

	The amount of lighting on the tagged sector's ceiling will be the
	same as the lighting in the sector that this line faces.

    120:Radius_Quake (intensity, duration, damrad, tremrad, tid)
	intensity:  Strength of earthquake [1..9]
	duration:   Duration in tics
	damrad:	    Radius of damage in 64x64 cells
	tremrad:    Radius of tremor in 64x64 cells
	tid:	    Thing ID of map thing(s) for quake foci

	Creates an earthquake at the specified foci (map spots).

    227:PointPush_SetForce (tag, tid, amount, useline)
	tag:	Tag of sector containing the point pusher/puller
	tid:	Thing ID of the point pusher/puller
	amount:	Strength of the point pusher/puller
	useline:Set to 1 to use the line's length to determine strength

	Only valid during initialization. Sets the amount of force for a
	point pusher or puller. If tag is non-zero it looks for point
	pusher/pullers in the tagged sectors. Otherwise, it looks for them
	by their tids. If useline is 1, then the amount of force is
	determined by the length of the linedef. Otherwise, the amount
	parameter is used.

    237:ChangeCamera (tid, who)
	tid:	Thing ID of the camera to use (0 for normal player's view)
	who:	Set to 1 if the view change should effect all players

	Causes a player's view to move to a camera. If tid is 0, then the
	player's view is restored to a spot inside his head. If who is 0,
	only the player who activated the special has his view changed,
	otherwise, everyone's view changes.


16. Key types
=============

These are the numbers to use for the ACS_LockedExecute and Door_LockedRaise
specials:

    Value   Key
    ------------------------------
    0	    none
    1	    any key
    2	    red key card
    3	    blue key card
    4	    yellow key card
    5	    red skull key
    6	    blue skull key
    7	    yellow skull key
    8	    all six keys

Add 128 to any of the above values if skull keys and key cards will both
work equally well for opening a lock.


17. Means-of-death types
========================

The following means-of-death identifiers are suitable for use with the
Sector_SetDamage special:

    Value   Identifier
    ----------------------------------
    0	    MOD_UNKNOWN
    12	    MOD_WATER
    13	    MOD_SLIME
    14	    MOD_LAVA
    15	    MOD_CRUSH
    16	    MOD_TELEFRAG
    17	    MOD_FALLING
    18	    MOD_SUICIDE
    19	    MOD_BARREL
    20	    MOD_EXIT
    21	    MOD_SPLASH
    22	    MOD_HIT


18. Spawnable things
====================

The following things can be spawned with the Thing_Spawn, Thing_SpawnNoFog,
Thing_Projectile, and Thing_ProjectileGravity specials. They can also be
used with the thingcount() command in an ACS script.

    Value   Identifier
    -----------------------------
    0	    T_NONE
    1	    T_SHOTGUY
    2	    T_CHAINGUY
    3	    T_BARON
    4	    T_ZOMBIE
    5	    T_IMP
    6	    T_ARACHNOTRON
    7	    T_SPIDERMASTERMIND
    8	    T_DEMON
    9	    T_SPECTRE
    10	    T_IMPFIREBALL
    11	    T_CLIP
    12	    T_SHELLS
    19	    T_CACODEMON
    20	    T_REVENANT
    21	    T_BRIDGE
    22	    T_ARMORBONUS
    23	    T_STIMPACK
    24	    T_MEDKIT
    25	    T_SOULSPHERE
    27	    T_SHOTGUN
    28	    T_CHAINGUN
    29	    T_ROCKETLAUNCHER
    30	    T_PLASMAGUN
    31	    T_BFG
    32	    T_CHAINSAW
    33	    T_SUPERSHOTGUN
    51	    T_PLASMABOLT
    53	    T_TRACER
    68	    T_GREENARMOR
    69	    T_BLUEARMOR
    75	    T_CELL
    85	    T_BLUEKEYCARD
    86	    T_REDKEYCARD
    87	    T_YELLOWKEYCARD
    88	    T_YELLOWSKULLKEY
    89	    T_REDSKULLKEY
    90	    T_BLUESKULLKEY
    98	    T_TEMPLARGEFLAME
    100	    T_STEALTHBARON
    101	    T_STEALTHKNIGHT
    102	    T_STEALTHZOMBIE
    103	    T_STEALTHSHOTGUY
    110	    T_LOSTSOUL
    111	    T_VILE
    112	    T_MANCUBUS
    113	    T_HELLKNIGHT
    114	    T_CYBERDEMON
    115	    T_PAINELEMENTAL
    116	    T_WOLFSS
    117	    T_STEALTHARACHNOTRON
    118	    T_STEALTHVILE
    119	    T_STEALTHCACODEMON
    120	    T_STEALTHCHAINGUY
    121	    T_STEALTHSERGEANT
    122	    T_STEALTHIMP
    123	    T_STEALTHMANCUBUS
    124	    T_STEALTHREVENANT
    125	    T_BARREL
    126	    T_MANCUBUSSHOT
    127	    T_ROCKET
    128	    T_BFGSHOT
    129	    T_ARACHNOTRONPLASMA
    130	    T_BLOOD
    131	    T_PUFF
    132	    T_MEGASPHERE
    133	    T_INVULNERABILITY
    134	    T_BERSERK
    135	    T_INVISIBILITY
    136	    T_IRONFEET
    137	    T_COMPUTERMAP
    138	    T_LIGHTAMP
    139	    T_AMMOBOX
    140	    T_ROCKETAMMO
    141	    T_ROCKETBOX
    142	    T_BATTERY
    143	    T_SHELLBOX
    144	    T_BACKPACK
    145	    T_GUTS
    146	    T_BLOODPOOL
    147	    T_BLOODPOOL1
    148	    T_BLOODPOOL2
    149	    T_FLAMINGBARREL
    150	    T_BRAINS


19. Sounds defined in zdoom.wad's SNDINFO
=========================================

The following is just the contents of the SNDINFO lump found in zdoom.wad.
The long sound names on the left can be used in ACS commands that play
sounds.

//=========================================================================
//
// PLAYER SOUNDS
//
//=========================================================================

misc/unused			dsskldth	// Sounds just like dsoof

player/male/death1		dspldeth
player/male/death2		dspldeth
player/male/death3		dspldeth
player/male/death4		dspldeth
player/male/xdeath1		dspdiehi
player/male/pain100_1		dsplpain
player/male/pain100_2		dsplpain
player/male/pain75_1		dsplpain
player/male/pain75_2		dsplpain
player/male/pain50_1		dsplpain
player/male/pain50_2		dsplpain
player/male/pain25_1		dsplpain
player/male/pain25_2		dsplpain
player/male/grunt1		dsnoway
player/male/land1		dsoof
player/male/jump1		dsjump
player/male/gibbed		dsslop
player/male/fist		dspunch

player/female/death1		dsfldeth
player/female/death2		dsfldeth
player/female/death3		dsfldeth
player/female/death4		dsfldeth
player/female/xdeath1		dsfdiehi
player/female/pain100_1		dsflpain
player/female/pain100_2		dsflpain
player/female/pain75_1		dsflpain
player/female/pain75_2		dsflpain
player/female/pain50_1		dsflpain
player/female/pain50_2		dsflpain
player/female/pain25_1		dsflpain
player/female/pain25_2		dsflpain
player/female/grunt1		dsfnoway
player/female/land1		dsfoof
player/female/jump1		dsfjump
player/female/gibbed		dsslop
player/female/fist		dspunch

player/cyborg/death1		dscldeth
player/cyborg/death2		dscldeth
player/cyborg/death3		dscldeth
player/cyborg/death4		dscldeth
player/cyborg/xdeath1		dscdiehi
player/cyborg/pain100_1		dsclpain
player/cyborg/pain100_2		dsclpain
player/cyborg/pain75_1		dsclpain
player/cyborg/pain75_2		dsclpain
player/cyborg/pain50_1		dsclpain
player/cyborg/pain50_2		dsclpain
player/cyborg/pain25_1		dsclpain
player/cyborg/pain25_2		dsclpain
player/cyborg/grunt1		dscnoway
player/cyborg/land1		dscoof
player/cyborg/jump1		dscjump
player/cyborg/gibbed		dsslop
player/cyborg/fist		dspunch

//
// Weapons
//

weapons/sawup			dssawup
weapons/sawidle			dssawidl
weapons/sawfull			dssawful
weapons/sawhit			dssawhit
weapons/pistol			dspistol
weapons/shotgf			dsshotgn
weapons/shotgr			dssgcock
weapons/sshotf			dsdshtgn
weapons/sshoto			dsdbopn
weapons/sshotc			dsdbcls
weapons/sshotl			dsdbload
weapons/chngun			dspistol
weapons/rocklx			dsbarexp
weapons/rocklf			dsrlaunc
weapons/plasmaf			dsplasma
weapons/plasmax			dsfirxpl
weapons/bfgf			dsbfg
weapons/bfgx			dsrxplod

//=========================================================================
//
// MONSTER SOUNDS
//
//=========================================================================

misc/gibbed			dsslop

// Zombie man

grunt/sight1			dsposit1
grunt/sight2			dsposit2
grunt/sight3			dsposit3
grunt/active			dsposact
grunt/pain			dspopain
grunt/death1			dspodth1
grunt/death2			dspodth2
grunt/death3			dspodth3
grunt/attack			dspistol

// Shotgun guy

shotguy/sight1			dsposit1
shotguy/sight2			dsposit2
shotguy/sight3			dsposit3
shotguy/active			dsposact
shotguy/pain			dspopain
shotguy/death1			dspodth1
shotguy/death2			dspodth2
shotguy/death3			dspodth3
shotguy/attack			dsshotgn

// Archvile

vile/sight			dsvilsit
vile/active			dsvilact
vile/pain			dsvipain
vile/death			dsvildth
vile/raise			dsslop
vile/start			dsvilatk
vile/stop			dsbarexp
vile/firestrt			dsflamst
vile/firecrkl			dsflame

// Revenant

skeleton/sight			dsskesit
skeleton/active			dsskeact
skeleton/pain			dspopain
skeleton/melee			dsskepch
skeleton/swing			dsskeswg
skeleton/death			dsskedth
skeleton/attack			dsskeatk
skeleton/tracex			dsbarexp

// Fatso

fatso/sight			dsmansit
fatso/active			dsposact
fatso/pain			dsmnpain
fatso/attack			dsmanatk
fatso/death			dsmandth
fatso/attack			dsfirsht
fatso/shotx			dsfirxpl

// Chainguy

chainguy/sight1			dsposit1
chainguy/sight2			dsposit2
chainguy/sight3			dsposit3
chainguy/active			dsposact
chainguy/pain			dspopain
chainguy/death1			dspodth1
chainguy/death2			dspodth2
chainguy/death3			dspodth3
chainguy/attack			dsshotgn

// Imp

imp/sight1			dsbgsit1
imp/sight2			dsbgsit2
imp/active			dsbgact
imp/pain			dspopain
imp/melee			dsclaw
imp/death1			dsbgdth1
imp/death2			dsbgdth2
imp/attack			dsfirsht
imp/shotx			dsfirxpl

// Demon

demon/sight			dssgtsit
demon/active			dsdmact
demon/pain			dsdmpain
demon/melee			dssgtatk
demon/death			dssgtdth

// Spectre

spectre/sight			dssgtsit
spectre/active			dsdmact
spectre/pain			dsdmpain
spectre/attack			dssgtatk
spectre/death			dssgtdth

// Cacodemon

caco/sight			dscacsit
caco/active			dsdmact
caco/pain			dsdmpain
caco/death			dscacdth
caco/attack			dsfirsht
caco/shotx			dsfirxpl

// Baron of Hell

baron/sight			dsbrssit
baron/active			dsdmact
baron/pain			dsdmpain
baron/melee			dsclaw
baron/death			dsbrsdth
baron/attack			dsfirsht
baron/shotx			dsfirxpl

// Hell Knight

knight/sight			dskntsit
knight/active			dsdmact
knight/pain			dsdmpain
knight/death			dskntdth

// Lost Soul

skull/active			dsdmact
skull/pain			dsdmpain
skull/melee			dssklatk
skull/death			dsfirxpl

// Spider Mastermind

spider/sight			dsspisit
spider/active			dsdmact
spider/pain			dsdmpain
spider/attack			dsshotgn
spider/death			dsspidth
spider/walk			dsmetal

// Arachnotron

baby/sight			dsbspsit
baby/active			dsbspact
baby/pain			dsdmpain
baby/death			dsbspdth
baby/walk			dsbspwlk
baby/attack			dsplasma
baby/shotx			dsfirxpl

// Cyber Demon

cyber/sight			dscybsit
cyber/active			dsdmact
cyber/pain			dsdmpain
cyber/death			dscybdth
cyber/hoof			dshoof

// Pain Elemental

pain/sight			dspesit
pain/active			dsdmact
pain/pain			dspepain
pain/death			dspedth

// Wolfenstein SS

wolfss/sight			dssssit
wolfss/active			dsposact
wolfss/pain			dspopain
wolfss/death			dsssdth

// Commander Keen

keen/pain			dskeenpn
keen/death			dskeendt

// Boss Brain

brain/sight			dsbossit
brain/pain			dsbospn
brain/death			dsbosdth
brain/spit			dsbospit
brain/cube			dsboscub
brain/spawn			dsfirxpl


//=========================================================================
//
// WORLD SOUNDS
//
//=========================================================================

world/barrelx			dsbarexp
world/quake			dsquake

//
//
// Platform Sounds
//

plats/pt1_strt			dspstart
plats/pt1_stop			dspstop
plats/pt1_mid			dsstnmov

//
// Door Sounds
//

doors/dr1_open			dsdoropn
doors/dr1_clos			dsdorcls
doors/dr2_open			dsbdopn
doors/dr2_clos			dsbdcls
misc/keytry			dsoof

//=========================================================================
//
// MISCELLANEOUS SOUNDS
//
//=========================================================================

misc/secret			dssecret
misc/w_pkup			dswpnup
misc/p_pkup			dsgetpow
misc/i_pkup			dsitemup
misc/spawn			dsitmbk
misc/chat			dsradio	// Doom 2 chat sound
misc/chat2			dstink	// Chat sound for everything else

switches/normbutn		dsswtchn
switches/exitbutn		dsswtchx

misc/teleport			dstelept
