                            Editing for SMMU
                            ----------------
                                20-3-99

[1-1] Overview
--------------

SMMU is based upon the MBF sources, and therefore contains support
for all standard BOOM and MBF linedef and sector types. Anything they
can do, SMMU can do.

SMMU also contains further support for a number of extra linedef
types which will only work with it.

[1-2] The level header
----------------------

By 'the level header', I mean the wad resource which starts a level.
For example, the level headers for all the original doom levels were
all in the format "mapxy" or "exmy".

In SMMU, the level header can take any name, for example, the SMMU
'start map' has the name "start". Levels with nonstandard names can
be accessed from the console using the "map" command: eg "map start".

[1-3] The level info lump
-------------------------

In original doom, the level header resource was empty: it was always
0 bytes long. This is not to say that it _had_ to be 0 bytes long:
any data in the level header was simply ignored.

In SMMU, the level header is used to hold information about the level.
The format is a simple ascii text file, similar in style to the '.ini'
files which are found in a typical windows directory.

There are a number of sections which hold different types of information,
each begins with a different section header:
        - [level info] : holds information about the level: the name,
                par time, etc. See section [2].
        - [console commands] : anything put in this section will be
                considered a console command and executed when the
                level is loaded.
        - [level commands] : Holds more console commands which are to be
                executed upon the activating of certain types of linedef.
                See section [3].
        - [finale text] : Holds text to be displayed after completing the
                level.

Comments may begin with a '#', ';' or '//'

[2-1] The level info section
----------------------------
The level info section described in section [1-3] contains certain 
information about the level. This is in the format:
        variable = value
The '=' equals sign is not actually neccesary: any '=' sign is simply
ignored.

Legal variables are:
        - levelname : the level name as shown on the automap and in the
                console
        - partime : the par time for the level (the average time it should
                take you to complete it)
        - music : the name of the lump containing the music to be played
                in the background. For example, if the line "music = fragme"
                is put, the music in the lump named "d_fragme" will be
                played.
                *WARNING* the default for this variable is d_runnin
        - sky : the name of the texture to be used for the default "f_sky1"
                sky.
        - creator : put this equal to your name. People can then find
                your name from the console by typing 'creator'
        - interpic : the name of a resource containing a picture to be
                displayed in the background in the intermission screen.
                If not specified, "interpic" is used.
        - nextlevel : the name of the next level to go to after exiting the
                level.

_example_ A typical level info section

[level info]
levelname = chadders' lair
partime = 200
music = d_cheese
creator = Edwin Chadwick 'chadders'
nextlevel = chad2

This sets a number of settings, but uses the default interpic and sky.
The automap shows the level name 'chadders lair', and the par time is
200 seconds (3:20). The music 'd_cheese' is used, and when the player
exits the level, play advances to the next map, 'chad2'.

[3-1] The console commands section
----------------------------------
Four new linedef types are available in SMMU:

linedef #       type                    direction       works in netgame
---------------------------------------------------------------------
2048            WR console command      2way            Yes
2049            WR console command      1way            Yes
2050            WR console command      2way            No
2051            WR console command      1way            No

The sector tag of the linedef is used to link to an entry in the
[console commands] section of the level information lump. The entries
have the format:
        [tag number] = [command]
When the linedef is triggered, the console command denoted by the
sector tag will be executed.

example console commands section:

[console commands]
0 = centremsg Beware the evil cyberdemon!
1 = centremsg I don't think you want to go that way; kill

there could be, for example, a part of the level containing a cyberdemon
with the entrance containing a walkover linedef type 2049, sector tag 0.
When the player enters that area, he trips the linedef, which executes
the command "centremsg Beware the evil cyberdemon!". The message 
"beware the evil cyberdemon" appears in the middle of the screen.

meanwhile, another part of the level might contain a part of the level
you don't want a player to be able to reach. The entrance to this part
could contain a walkover linedef type 2048, sector tag 1. When a player
walks into that area, the message "i don't think you want to go that way"
appears in the middle of the screen and he is promptly killed.

Multiple commands can be placed on one line as shown in the example.
Individual commands are seperated by a ';'.

[3-2] Useful level-editing commands
-----------------------------------

Command                 Description
------------------------------------------------------------------------
centremsg               Display a message in the centre of the screen.
                        Note the british spelling :). A 'centermsg'
                        alias is also available.
playermsg               Display a message in the usual heads up display,
                        rather than in the middle of the screen.
kill                    Kill the player

NB. You may experience a slight delay for certain commands when playing
    network games.
