ROTTen Editor v1.0 Documentation



Contents
1. About ROTTen Editor
2. List of files
3. Using the editor
4. Command reference
4.1. Built
4.2. Edit
4.3. Help
4.4. New
4.5. OPEn
4.6. OPTions
4.7. Status
4.8. Quit
4.9. Wads
5. Editor reference
5.1. Planes
5.2. Status bar
5.3. Keys
6. More about levels
6.1. Game and combat levels
6.2. Level flags
6.3. Level environment
6.4. Hints
7. The initialization file
8. The plane definition files



1. About ROTTen Editor
ROTTen Editor is a fully working level editor for Rise of the Triad from
Apogee. You can use all features of the game and you can create both game
and combat levels.

The program is freeware, so it is free of charge and you can give it to all
your friends. The author is not responsible for any damage caused by use or
misuse of the program.

The program comes with the full source code. It was written in Borland Pascal
version 7.0. The source code is completly uncommented and undocumented.
You can do whatever you want with the source, but if you use any of it
(which I doubt :), please credit me.

If you distribute the program, use the original zip file with all the files
included as listed in the next chapter.

Rutger van Eerd
rutgere@stack.nl
http://www.stack.nl/~rutgere



2. List of files
The zip file should contain the following files.
	
File(s)         Description
-----------------------------------------------------------------------------
rotten.exe      The program.
rotten.ini      The initialization file.
rotten.pal	The program palette.
rotten.fon	The program font.
rotten.doc	This file.
wall.def	Wall plane definition file.
sprite.def	Sprite plane definition file.
info.def	Info plane definition file.

rotten.rtl	Example game levels.
rotten.rtc	Example combat levels.

rotten.pas	The main program source file.
redefs.pas	Definition file utilities source file.
reedit.pas	Editor source file.
reglbls.pas	Global definitions source file.
regraph.pas	Graphics utilities source file.
reinput.pas	Input utilities source file.
relvls.pas	Level utilities source file.
rewads.pas	Wad utilities source file.



3. Using the editor
Before you can use the editor, you have to install it first. To install to
program, you must unzip the zip file and place the contents in the Rise of
the Triad directory. That's all.

To run editor type:
	
	ROTTEN [Enter]

The introduction screen will appear, and the program will load the Rise of
the Triad wad file and the plane definition files. The plane definition
files define all walls, items and special stuff and assign a name and
picture to it. These files have the extension .def. These are normal text
files and you can edit them to suit your needs. See chapter 8 for more
information. The first time you run the program, it will compile these .def
files to faster to read binary files with the extension .bin.

After the plane definition files are read, a prompt appears.

	Command <Help>:

The text between the brackets is the default command or option. By just
pressing [Enter], you select this default option. In this case the Help
command is the default, so if you press [Enter] the Help command will be
started.

You may have noted that the Help command has an uppercase H. This means that
you can start the Help command by just typing:

	H [Enter]

This is much faster then typing the complete command name. Actually you can
type the first few letters, as long as the uppercase letters are included.



4. Command reference

4.1. Build
With this command you can put levels together in one .rtl or .rtc file.

First you are prompted for the name of the file to contain the other files.
Include the .rtl or .rtc extension. Then you are prompted for the names of
the files to include. Press [Enter] after every file name and just press
[Enter] to stop.

4.2. Edit
Edits an existing level in the currently open .rtl or .rtc file.

You are prompted for the name of the level to edit. If the level exists,
the editor is started. See chapter 5 for more information about the editor.

After leaving the editor, you are prompted for the file name and the level
name. Any existed file will be overwritten WITHOUT NOTICE. You can press
[Esc] when prompted for the file name if you don't want to save the level.

4.3. Help
Shows all commands with a short description.

4.4. New
Creates a new level.

The editor is started with a new level. See chapter 5 for more information
about the editor.

After leaving the editor, you are prompted for the file name and the level
name. Any existed file will be overwritten WITHOUT NOTICE. You can press
[Esc] when prompted for the file name if you don't want to save the level.

4.5. OPEn
Opens a .rtl or .rtc file.

You are prompted for the file name. You can press [Esc] to abort.

4.6. OPTions
Sets program options.

First you are prompted to create game levels or combat levels. Type Yes to
create game levels, or No to create combat levels. Then you are prompted for
game level flags and combat level flags. For more information about game and
combat levels and level flags, see chapter 6.

The default settings of these options are in the rotten.ini file. If you set
the options with the OPTions command, the rotten.ini file is NOT changed.
 
4.7. Status
Shows the current program status.

4.8. Quit
Quits the program.

4.9. Wads
Wad utilities.

You are prompted to choose an option. List will list all lumps in the wad
file, View will show all lumps in the wad file and Exit will abort the Wads
command.



5. Editor reference

5.1. Planes
A Rise of the Triad level is created from three planes. The wall plane
contains walls, doors and floors. The sprite plane contains items, like
actors, weapons and power-ups. The info plane contains various information,
like item heights, item placement and switch references. You can edit only
one plane at the same time.

5.2. Status bar
At the bottom of the screen you see the status bar. You see the current
visible planes (W, S or I), the current cursor position, the current active
plane (W, S or I) and the item on the current active plane on the cursor
position.

5.3. Keys
Key		Description
-----------------------------------------------------------------------------
F1		Show all keys with a short description.
F2              Show the complete map. You can click on the map to go to
                that section.
F3		Toggle wall plane visibility.
F4		Toggle sprite plane visibility.
F5		Toggle info plane visility.
F6		Toggle the active plane.
F7		Select an item by list.
F8		Select an item by id.
Shift+F8        Select an item by XY position or delay time (info plane only).
Ctrl+F8         Select an item by height (info plane only).
Alt+F8		Select an item by next level (info plane only).
ESC		Quit the editor.

Left mouse	Draw the selected item on the current active plane.
Right mouse     Select the item on the current active plane on the cursor
                position.



6. More about levels

6.1. Game and combat levels
Game levels have the extension .rtl and are used for the one player levels.
Combat levels have the extension .rtc and are used for the multi player
levels. Rise of the Triad allows you to use game levels as combat levels and
vice versa, because the file formats are virtually the same.

6.2. Level flags
Current there is only one level flag, lfl_ActivatePushwalls = 1. If this
flags is set, all pushwalls will be activated when the level is started and
is played as a combat level. This flag is usually set in game levels, so
that players can't get trapped. In combat levels this flags is usually
cleared.

6.3. Level environment
The first positions on the wall, sprite and info plane have a special
meaning.

For the wall plane, position (0, 0) should contain a floor icon to set the
floor. Position (1, 0) should contain a ceiling or sky icon to set the
ceiling or sky. Position (2, 0) should contain a brightness icon to set the
light level. And position (3, 0) should contain a light fall-off icon to set
the light fall-off rate.

For the sprite plane, position (0, 0) should contain a level/sky height icon
to set the level height. Position (1, 0) should contain a level/sky height
icon to set the sky height. Position (2, 0) should contain either a fog or a
no fog icon. Position (3, 0) can contain a light sourcing icon. Position
(4, 0) can contain a lightning icon. After (4, 0) zero or more timer icons
can be placed.

For the info plane, position (0, 0) can contain a song icon to set the song.

6.4. Hints
If you start creating your own levels, begin with a very simple level, with
only one room and a starting position (never forget a starting position :).
If that works, add something to it, like an extra room and a door. If you go
step by step and an error occurs, you'll know what caused it.

Look to the original levels to see how special things are done. The info
plane usually contains very important information.

If you delete a part of your map, make sure the info plane is also cleared.
Most things on the info plane are'nt visible and can cause a lot of errors.

You can go to the Apogee homepage for more information about level making.
The URL is http://www.apogee1.com.



7. The initialization file
The initialization file rotten.ini contains default settings for
ROTTen Editor. You may change these settings to suit your needs.

Every option in the file consists of two arguments, enclosed in double
quotes (") and separated by spaces or tabs. The first argument is the option
name, the second argument is the option value. Both arguments are
case-insensitive.

You may add comments to the file with the semi-colon (;). A comment must
start with a semi-colon and continues to the end of the line. You may also
add empty lines to separate options.

The following options can be used.

Option                  Description
-----------------------------------------------------------------------------
"WadFilename"		The wad filename and path
"CreateGameLevels"      Create game levels ("1") or combat                              levels ("0")
"GameFlags"             Game level flags
"CombatFlags"		Combat level flags



8. The plane defintion files
The definition files wall.def, sprite.def and info.def define the id's,
icons and descriptions of the objects on the wall plane, sprite plane and
info plane. You may change these definitions or you may add your own
definitions.

Every definition in the file consists of one to four arguments, enclosed in
double quotes (") and seperated by spaces of tabs. The first argument is the
object id, the second argument is the icon name, the third argument is the
alignment type and the fourth argument is the description.

You may add comments to the file with the semi-colon (;). A comment must
start with a semi-colon and continues to the end of the line. You may also
add empty lines to separate options.

The id is a unique number witch identifies the object. The id is the only
argument that has to be present.

The icon name is the name of the wad file entry to represent the object. The
icon name is case-independent. Use the Wads/View command to select an icon.
If this argument is not used or is blank, a solid filled box is drawn. If
objects on the info plane do not have a icon name, nothing is drawn.

The alignment type determines wether the icon is to be top aligned or bottom
aligned. If the alignment type is "0", the icon is bottom aligned, if the
alignment type is "1", it is top aligned. If this argument is not used or is
blank, the alignment type is bottom aligned.

The description is a text string to describe the object. If this argument is
not used or is blank, no description is given.

After changing the definition file, you have to delete the compiled
definition file, so that ROTTen Editor will compile and use the modified
file.
