GameTools level files
The file 'ultimate.xml' (in the 'data' directory) lists a number of 'levels' for the game. Each level is represented by a separate XML file (typically also stored in the 'data' directory). These level files can have any name you like so long as it ends in '.xml'.
The level files describe what terrain tiles make up each level and what 'flags' have been provided within it. This file may eventually contain additional data such as the appearance of the sky, the time of day and the weather conditions.
The 'tiled' program allows you to generate or edit 'level' files graphically - and also allows you to 'fly' around them to view them without needing to load up the game itself.
Additionally, the 'mklevel' program can auto-generate a level file from two '.png' image files - one for height data and the other for features like roads, forests and rivers.
Example
Here is an example of a 'level.xml' file:
<?xml version="1.0" ?> <game> <main> <model euler_rotation="90 0 0" translation="0 20 0" src="models/tiles/dock.plb"/> <model euler_rotation="180 0 0" translation="20 0 0" src="models/tiles/river.plb"/> <model euler_rotation="0 0 0" translation="0 0 0" src="models/tiles/flattile.plb"/> <model euler_rotation="0 0 0" translation="20 20 0" src="models/tiles/flattile.plb"/> </main> </game>
Structure
Since this is an XML 'level' file, the first three lines must always be:
<?xml version="1.0" ?> <game> <main>
...and the last two lines are always:
</main> </game>
Between those tags are a number of model or 'flag' loading commands:
Model Loading commands
<model euler_rotation="h p r" translation="x y z" src="YYY" />
"h p r" are three numbers representing the rotation angle of the model (h=heading, p=pitch, r=roll) - all angles are in degrees. "x y z" is the position of the center of the model from the origin (in meters). "YYY" is a model file in any format that PLIB knows how to load (eg '.ac', '.plb').
Flag Loading commands
It is useful in some situations to be able to place an invisible flag into the model that Java plugins can look for and query - but which don't show up as polygonal models inside the game (although they do show up as little flag poles in tiled.
<flag euler_rotation="h p r" translation="x y z" name="YYY" colour="N" />
"h p r" are three numbers representing the rotation angle of the model (h=heading, p=pitch, r=roll) - all angles are in degrees. "x y z" is the position of the center of the model from the origin (in meters). "YYY" is the name of the flag and "N" is a number in the range 0..9 that indicates what colour the flag will show up as in tiled:
- 0 = Red
- 1 = Green
- 2 = Blue
- 3 = Cyan
- 4 = Magenta
- 5 = Yellow
- 6 = Black
- 7 = White
- 8 = Orange
- 9 = Grey
Wikiid Pages relating to gameTools (edit) |
gameTools - Main page |
gameTools - Support Tools : |
gameTools - File Formats : |
gameTools - Source Code :
|
Wikiid Pages relating to Lemur of Lima (edit) |
Lemur of Lima - Main page |
Lemur of Lima - Controls |
Lemur of Lima - Levels : |
Lemur of Lima - Java Plugins : |
Lemur of Lima - Source Code Documentation : |