Map File Structure
The map file has several sections. Many must come after other sections, or else the game will react unpredictably (probably crash).
All lines that begin with hash's "#" are comments. For example,
# This is a comment line
Blank lines are also ignored. The only section where comments are not allowed is in the map data which is expected to only contain the tile data numbers.
MAPVER
Syntax:
MAPVER INTEGER
This should be the first item in a map file. It gives the map version to the program. This could be used if in later versions of WoD the map file structure changes and it must decide how to read the file.
WIDTH
Syntax:
WIDTH INTEGER
Gives the width of the map. It may range from 0 to 32000, which is huge. Please don't make maps that large unless you plan on playing on a Cray... This must come before the MAPDATA section.
HEIGHT
Syntax:
HEIGHT INTEGER
Gives the height of the map. It may range from 0 to 32000, which is huge. Please don't make maps that large unless you plan on playing on a Cray... This must come before the MAPDATA section.
STARTNUM
Syntax:
STARTNUM INTEGER
Says how many players, human or not, there are in the map. This may range from 1 to 255. This must come before the START section.
START
Syntax:
START INTEGER INTEGER INTEGER
Gives the corresponding player's start position tiles. The first integer is the player number, starting at 0 and going up to n-1, where n is the integer specified in STARTNUM. The second integer is the column of the tile the player's start position is in, ranging from 0 to x-1, with x the integer given in the WIDTH statement. The final and third integer is the row of the tile of the start position, ranging from 0 to y-1, with y the integer from the HEIGHT statement. Note, this section does not rely on the WIDTH or HEIGHT statements and may come before them. However, it must come after the STARTNUM statement.
NUMRULES
Syntax:
NUMRULES INTEGER
Says how many rules there are in the map. It may range from 0 to about 32000. This must come before the RULE statements. Rules give the properties of the tiles (slippery, ground may not pass on, air travel denied, slow, hazard damage, etc), or give triggers for actions when certain types of objects enter the tile.
RULE
Syntax:
RULE INTEGER INTEGER
The first integer gives the rule number, which may range from 0 to n-1, with n being the integer specified in the NUMRULES statement. The second integer gives the number of strings in this rule. A tile may have only one rule associated with it, but a rule may have multiple strings with it. A rule string may specify for a rule change on the tile if it is triggered, leaving the map creator open to new ways of having the map react dynamicly. This statement must come after the NUMRULES section, and before it's associated RULESTRING statements.
RULESTRING
Syntax:
RULESTRING INTEGER INTEGER STRING,STRING,....,STRING
Gives the string to modify the tile properities and actions. The first integer is the rule number it is associated with. The second integer is the string number, ranging from 0 to n-1, with n being the second integer given in the RULE statement. The STRING comments are comma separted, with no spaces anywhere, either between the strings or in the strings themselves. The syntax of the strings are to be determined later when implemented in WoD...
GRAPHICSNUM
Syntax:
GRAPHICSNUM INTEGER
Gives the number of graphics to be loaded for objects, tiles, buttons, and mice. This must occur before any GRAPHIC lines.
GRAPHIC
Syntax:
GRAPHIC INTEGER FILE
Gives the graphic file to load. In the current implementation, files are loaded relative to the current directory, or you may specify the absolute path. The integer ranges from 0 to n-1, with n being the integer given in GRAPHICSNUM. Do not repeat any integers after loading a graphic, or you will have a memory leak. There may not be any spaces in the FILE parameter.
ANIMATIONNUM
Syntax:
ANIMATIONNUM INTEGER
Gives the number of animations to associate with the graphics. This must come before the ANIMATION statements. The number may range from 0 (not very useful though) to the max integer on your system, which you probably don't have enough memory to load that many animations (or the time to create that many).
ANIMATION
Syntax:
ANIMATION INTEGER1 INTEGER2 INTEGERS3 INTEGERS4 INTEGERS5
This defines the animation for use in objects or tiles. The first integer is the animation number, ranging from 0 to n-1, with n being the integer specified in the ANIMATIONNUM statement. The second integer is the number of frames in the animation, ranging from 1 on up. The next set of integers are comma separed, giving the delay between the frames. A delay is defined as one frame drawn in the game, which, at the time of this documentation was about 30 frames per second. If there is only one frame, set the delay to 0. If there are multiple frames, and one has a delay of 0, it will be the same as giving it a delay of 1. An example of a frame delay string for 2 frames is 5,5. The next set of integers (INTEGERS4) is a comma separated list of graphics numbers, which must be declared in the GRAPHIC statements. There must be the same number of frame delay integers, or the number given in INTEGER2. The last comma separated integers is INTEGERS5. It gives the events of each frame. This can be used to trigger AI events, sounds, or explosions. At the time of this documentation, the event triggering was not implemented yet.
OBJECTSNUM
Syntax:
OBJECTNUM INTEGER
Gives the number of objects in the map that are to exist before the game begins. It can be 0, but that may not be very useful unless you want a totally void map.
OBJECT
OBJECTINFO
MAPDATA