Editing XML/Tileset
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | [[ | + | {{XMLs}} |
+ | [[Tilesets]] are structures which define how to render a map. Its [[XML]] explains which surface textures to use, which object models, day/night lighting, fog, weather, and water. | ||
− | + | {{TOC limit|2}} | |
==XML== | ==XML== | ||
− | + | {{XML_definition_header}} | |
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<?xml version="1.0"?> | <?xml version="1.0"?> | ||
Line 16: | Line 17: | ||
<object walkable="false"> | <object walkable="false"> | ||
<model path="models/tree.g3d" anim-speed="150" smoothTwoFrameAnim="false" rotationAllowed="true" randomPositionEnabled="true"> | <model path="models/tree.g3d" anim-speed="150" smoothTwoFrameAnim="false" rotationAllowed="true" randomPositionEnabled="true"> | ||
+ | <!-- Start MG Only --> | ||
<particles value="true"> | <particles value="true"> | ||
<particle-file path="models/tree_particles.xml" /> | <particle-file path="models/tree_particles.xml" /> | ||
</particles> | </particles> | ||
<rotationAllowed value="true" /> | <rotationAllowed value="true" /> | ||
+ | <!-- End MG Only --> | ||
</model> | </model> | ||
</object> | </object> | ||
Line 40: | Line 43: | ||
<day-night value="0.7" /> | <day-night value="0.7" /> | ||
<weather sun="0.5" rain="0.4" snow="0.1" /> | <weather sun="0.5" rain="0.4" snow="0.1" /> | ||
− | |||
</parameters> | </parameters> | ||
</tileset> | </tileset> | ||
Line 64: | Line 66: | ||
The model tag defines the path to the G3D file in the path attribute. There can be multiple model tags inside each object tag, and one will be randomly chosen each time. | The model tag defines the path to the G3D file in the path attribute. There can be multiple model tags inside each object tag, and one will be randomly chosen each time. | ||
− | <tt>anim-speed</tt> is a value which denotes the model is animated and should be played at the corresponding speed. | + | <tt>anim-speed</tt> is a [[MegaGlest]] only value which denotes the model is animated and should be played at the corresponding speed. |
− | <tt>smoothTwoFrameAnim</tt> is a switch which smoothes 2 frame animations with a sin curve for the animation speed. This is good for animated trees (example: see tileset birch forest). | + | <tt>smoothTwoFrameAnim</tt> is a [[MegaGlest]] only switch which smoothes 2 frame animations with a sin curve for the animation speed. This is good for animated trees (example: see tileset birch forest). |
− | <tt>rotationAllowed</tt> | + | <tt>[ MegaGlest >= 3.8.0-beta1 (+r4514) ]</tt> <tt>rotationAllowed</tt> is a [[MegaGlest]] only switch which defines whether nor not the object can be randomly rotated when placed on maps. By default, all objects will be given a random rotation. If false, the objects will not be rotated and will be seen at the angle it appears in the [[G3D viewer]]. |
− | <tt>randomPositionEnabled</tt> defines whether nor not the object can be randomly placed on maps. By default, all objects will be given a random position within the field. If false, the objects will be placed at the center of the field. | + | <tt>[ MegaGlest >=3.8.0-dev+r4598 ]</tt> <tt>randomPositionEnabled</tt> is a [[MegaGlest]] only switch which defines whether nor not the object can be randomly placed on maps. By default, all objects will be given a random position within the field. If false, the objects will be placed at the center of the field. |
===particles=== | ===particles=== | ||
− | + | A [[MegaGlest]] only feature, particles can be set to any object. Unit particle XMLs will be used used for this, and any number of particle XMLs can be linked. | |
+ | |||
+ | ===rotationAllowed=== | ||
+ | deprecated since 3.8.0, use the attribute <tt>rotationAllowed</tt> of the model instead. | ||
===day-sound=== | ===day-sound=== | ||
Line 115: | Line 120: | ||
===weather=== | ===weather=== | ||
The weather element chooses the percentage chances of the 3 possible weather conditions: sun, rain, or snow, in decimal form (0-1). | The weather element chooses the percentage chances of the 3 possible weather conditions: sun, rain, or snow, in decimal form (0-1). | ||
− | |||
− | |||
− | |||
− | |||
==See Also== | ==See Also== | ||
*[[XMLs]] | *[[XMLs]] | ||
+ | *[[GAE]] | ||
*[[MegaGlest]] | *[[MegaGlest]] | ||
[[Category:XMLs]] | [[Category:XMLs]] | ||
[[Category:Tilesets]] | [[Category:Tilesets]] |