GameTools decoration.xml

From Wikiid
Revision as of 20:18, 23 October 2007 by SteveBaker (Talk | contribs) (New page: The file '''decoration.xml''' (in the 'data' directory) is only used by the 'mktile' program (not by the game itself), It lists the names of 3D model files which are to be used as randomly...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The file decoration.xml (in the 'data' directory) is only used by the 'mktile' program (not by the game itself), It lists the names of 3D model files which are to be used as randomly scattered decoration in terrain tiles that have been automatically generated by the 'mktile' program.

Example

Here is an example of a 'decoration.xml' file:

 <?xml version="1.0" ?>
 <mktile>
   <model src="models/decor/river_rock.plb" probability="0.3" conform="true" type="Water" />
   <model src="models/decor/rock.plb" probability="0.3" conform="true" />
   <model src="models/decor/plant.plb" probability="1.0" />
   <model src="models/decor/tree.plb" probability="1.0" lean="45" />
 </mktile>

Structure

Since this is an XML 'decoration' file, the first three lines must always be:

 <?xml version="1.0" ?>
 <mktile>

...and the last line is always:

 </mktile>

Between those tags are a number of decor items:

 <model src="XXX" ... />

This says that the 3D model with the filename XXX should be scattered at random onto terrain tiles. You have some control over how this happens:

probability="XX
Sets the relative probability of this object being placed onto the terrain. A probability of 0.0 would mean that the object never appears - a probability of 1.0 means that this object is as likely to appear as any other object.
conform="boolean" 
If "true" then the object will be rotated such that it's 'vertical' axis is at right angles to the slope of whatever polygon it's affixed to. Things like trees (which always grow more or less vertically) should have this set "false" (which is the default).
lean="XX
Allows the model to randomly lean at angles ranging from vertical to XX degrees from the vertical.
type="XX
Means that the model will only be placed on polygons with the specified type. Currently, the only special type is "Water". Objects without this attribute will never be planted on anything other than solid ground. If you need an object to be placed either on solid ground or in water, you'll need to enter it into decoration.xml twice - once with type="Water" and once without.


Wikiid Pages relating to gameTools (edit)
gameTools - Main page
gameTools - Support Tools :
plb_to_ac3d, mklevel, mktile, mktree, tiled, autogen_java, mk3dgallery
gameTools - File Formats :
title_screen.rgb, ultimate.xml, material.xml, decoration.xml, physics.xml
tiled.xml, tiled_autotiles.xml, Level files, Tile naming scheme, PLB files
gameTools - Source Code :
Game functions: gameCamera, gameClock, gameChecksum/gameHashTable, gameHTTP,
gameIsect, gameJoystick, gameParticleManager, gameScreen/gameMouse,
gameSky, gameStarter, gameStrokeFont, gameUtils
Material database: MatList/MatEntry
Tile map handling: TileObject/MapFlag/MapEntry/Map
Java Interfacing: JavaLink
Image file loading: liImage/liImageFactory
3D Model file loading: loadPLB, PLB exporter
Physics: Sabot, Bullet, gameTools - Use with Blender, PLB exporter
Object management: Object


Wikiid Pages relating to Lemur of Lima (edit)
Lemur of Lima - Main page
Lemur of Lima - Controls
Lemur of Lima - Levels :
List of Levels, Level design, Screen shots, Models
Lemur of Lima - Java Plugins :
Java plugin API, Event handling, Flags, GameInterface API , Alphabetical Index
Lemur of Lima - Source Code Documentation :
Initialisation, Main Loop, gameTools