Getting Started With E02

E02 is built for creating games through the use of its various editing tools. The two basic types are the Data Editors, and the Script Tools. Either type can be used to alter existing games, but proper use of both could yield totally new and unique games. Each editor and tool have their own, more detailed documentation. An easy way to get started would be to focus on a particular aspect of development and browse that portion of the documentation while attempting to modify an existing game. Piece by piece, a major modification, or an entirely new game can be built this way.

The following list is an overview of the available functionality. For a complete list of all documentation files, see the end of this page.

Data Editors: Script Tools:
File Setup Information

Certain files are absolutely necesary for a stand-alone game, and must be in certain places. Be sure to pay special attention to where the "Game Listing", "Game Def", and "Zone Def" files belong, and how to use them.

Aside from Game-global data, games built using E02 are made up of "Zones", which themselves are broken up into "Acts". "Zones" are a collection of data that make up any one level, menu screen, intro/ending sequence, etc, depending on how they are used. "Acts" are sub-sets of data within a "Zone" that are generally used to group similar levels together. Both are defined in the Zone Def files that appear in each "Zone" folder.

"Zone" folders are named by their Zone ID number (which must contain at least two digits), such as "zone00" for when the game's "Zone" setting is set to 0. Any number value may be used for Zone IDs, and they do not need to be sequential. Registers 3 and 4 represent the current "Zone" and "Act" respectively, however, they only have an effect when they are tested by scripted game events, or when Register 7, "InLevel" is set to 0, which causes E02 to reload "Zone" and "Act" data. The simplest way to fully switch levels is to use the Func_Set_Level command, which takes care of all three.

Files used with E02 must not use long filenames. Instead, their names must consist only of 8 characters, and 3 characters for the suffix (12345678.123, 8charfil.def). Not all supported platforms allow long filenames.

Files and file references must have consistent casing. Some supported platforms are case-sensitive. Referencing a file named "filename.ext" when the file on disk is "filename.ext" will work. Referencing a file named "FileName.ext" when the file on disk is "filename.ext" will not work. All files and folders expected by E02 itself are assumed to be all lower-case (such as "game.def", "zone00/zone.def", "keymap.def", etc). Files referenced by scripts may use any casing as long as the actual file and all references to it match exactly. E02 cannot enforce this restriction on platforms that are case-insensitive, so a practice such as limiting all files and folders strictly to lower-case names would be an easy way to avoid mistakes that will only cause errors for other users.

For all script file types, please also view previously-created scripts as well as the documentation to get a deeper understanding of how they work.


Level Data and Menu/Gameplay Setup Information

Level, Tile, and Object files that must be made available to any particular level must be loaded by the appropriate Script Commands in that level's "Act Init" function. If none of those commands are called, the level will start with an empty level, blank tiles, and no objects. When files are loaded with those commands, they become the current Level, Tile, and Object files, which will be used for any saving/loading initiated within the editors. These files must be specified by these commands even if they do not exist (blank ones will be created if they do not exist), because this is the only way to supply filenames to the editor. Otherwise, data cannot be saved.

The "Act Init" function must also call any "Object" that is to be used in the current level, whether it is a gameplay level, a menu "level", a title screen/intermission "level", or any other type of screen. Built-in objects are very necesary, such as the tile plane object for displaying planes, the player move and draw objects for making a player character available, and the Script Objects, for displaying Status Scripts. Please see the "Zone Def", Function, and Built-in Object documentation for more information. The "SpawnObject" function will be of particular interest.


ID, Count, Variable, and Constant Value Information

Remember that ID numbers for everything start with the number 0, not the number 1. The very first ID number for anything must be 0, and the very last must be the total number of entries minus 1. The total number of entries in any list will be the ID number of the final entry plus 1, because the 0 entry also counts. (Example: 0, 1, 2, 3 - there are 4 total values listed). This includes entries within scripts, as well as ID numbers for "acts". ("Act 1" has the ID number 0)

"Variables" are areas of memory that are set aside to store number values that can be changed. Variables are used to store temporary values, counters, changeable settings, etc. They are laid out as lists, and each one is referenced by its "ID number" from within that list. When a Script Command requires a "Variable ID" as a Parameter, the number entered for the Parameter is taken as the ID number of a Variable, and the value stored in that Variable is used for the operation. There are three basic types of Variables: Game Variables/Registers, Player Variables, Object Variables

"Constant Values" are essentially the opposite of Variables; they are "Constant", they never change. "Constant Values" are used when a known value must be used in a mathematical expression, to initialize a Variable, or to pass as known Parameters to any other Command. When a Script Command requires a "Constant Value" as a Parameter, the value entered as the parameter is taken literally; that value is used for the operation.

All "Constant Values" are treated as Base 10 (Decimal) by default, however, Base 16 (Hexadecimal) and Base 2 (Binary) values may be entered by prefixing the number value with '$' or '%', respectively (For example, "31" (Decimal), "$1F" (Hex), and "%00011111" (Binary) all represent the same value)

-Advanced- "Constant Value" versions of mathematical Commands may be used to perform math operations on a Variable ID (the Variable's reference number, not the contents of that variable) by using the special Variable reference "Tags" (as described below), entering the ID of that Variable as the "Constant Value". This is also useful for storing Variable IDs in "Registers", for use when a Command that requests a Variable ID allows that ID to be obtained from a "Register". Furthermore, the extra "Tag" "O" may be used in conjunction with the "G", "Z", and "A" "Tags" to reference an Object Type ID (as in "OZ4", to reference "Zone"-specific Object Type 4).



Script Value Tags Information

There are also several "tags" that may be used on certain script lines to change the meaning of a Number Value. They are used to make keeping track of certain IDs easier. When they are to be used, they must come immediately before the value they are meant to alter, without spaces, such as "A2", "r0", "U13", etc. These tags are:
Script Setup Information

Each script file, although it uses its own extension, is a plain text file. It is best to work with these files in a fixed-width font viewer, such as Windows' "Notepad". If the file becomes too large, there are other free viewers, such as "Crimson Editor", which is much more powerful and much less resource-intensive. A wide variety of viewers for non-Windows systems are also available from various sources.

The basic format of the script files is very simple. Each line consists of a "Header String" and a "Data String". The header string is NOT interpreted in any way by the program; it is ignored, and is simply used as reference. It can contain any text that describes what is required on that particular line, or even no text at all, but it is generally best to use the text given in the documentation for each script type. The end of the Header String, and the beginning of the Data String is referenced by a colon (:). The colon must not ever be used at any time for any reason other than signifying the start of a Data String. The end of a Data String is signified by an enter keypress. No data is interpreted beyond that point, as the program then disregards everything else until it finds another colon. As an example, an entry in a script file may look like this:
In the example, the string "Num Of Sound Effects" is ignored entirely, and is used only to tell the person reading the script that the data supplied is used by the program to determine the number of sound effects to be loaded. The Data String will either be regarded as a Text String or a Number Value, which is determined during the processing of the script. Each script type documentation states exactly what data is expected in each part of each script. It is very important to follow the format exactly, because if the format is broken, the program will not be able to recover, and will either act inappropriately, or crash.

The semicolon (;) is used throughout many of the scripts to signify a comment. The script parser will stop interpreting a line if a semicolon is met.

While all other aspects of a script use only the colon (:) as a line identifier, Functions use a few others to identify certain parts of the function itself, which are detailed in their own documentation


Image Setup Information

Image files used to store image data for use in E02 can be any size as long as height and width are both even, but must be 256-color PCX "Version 5", or 256-color RLE-compressed or uncompressed TGA. If the images aren't saved in one of these formats, they will be interpreted wrong, and the data taken will either appear as garbage or cause a crash.

E02 graphics are 256-color palettized, and so, the display colors of graphics loaded from image files depend on the palette settings within E02 at the time they are displayed. The full in-game palette is broken into two parts- Both tiles and sprites may use either area of the palette, and either area may be manipulated by the Func_Set_Palette_Range command. If, after that command has been used to modify the palette, the original colors need to be restored, the Func_Switch_Palette and Func_Restore_Global_Palette commands may be used.

Palette entry 0 is reserved for "transparancy", meaning that any area of any graphic that is drawn with that index will not actually be drawn to the screen, and anything that was drawn to the screen before will show through. This entry is also the "Backdrop Color". This is the color that the screen will be filled with if a Backdrop Object was spawned.


Sound and Music Setup Information

E02 uses uncompressed WAV format for sound effects. It will recognize sounds of any frequency, 8- or 16-bit, and stereo or mono, but they will be converted to 8-bit mono durong load. WAV files of similar type may also be loaded as music, as well as XM files with up to 16 channels. XM support is based on the XM standard - special extensions to the format added by various tracker programs are not supported.



Complete Documents Listing
(in alphabetical order)