I added an optional parameter to the tileset object to enable/disable randomized positions.
Usage/defaults
<object walkable="false">
<model path="models/wood_tree_2.g3d" anim-speed="-1" smoothTwoFrameAnim="false" rotationAllowed="true" randomPositionEnabled="true"/>
</object>
Every property of the "model" besides the "path"-property is optional.
[img]http://img28.imageshack.us/img28/3789/kc8x.jpg[/img]
Download link for the game patch (http://muwum.org/glest/randomPositionEnabled.patch)
Documentation Patch for the wiki
XML/Tileset
Line 16:
<objects>
<object walkable="false">
− <model path="models/tree.g3d" anim-speed="150" smoothTwoFrameAnim="false">
<!-- Start MG Only -->
<particles value="true">
Line 69:
<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).
===particles===
Line 74:
===rotationAllowed===
− A [[MegaGlest]] only feature, 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]].
===day-sound===
Line 16:
<objects>
<object walkable="false">
+ <model path="models/tree.g3d" anim-speed="150" smoothTwoFrameAnim="false" rotationAllowed="true" randomPositionEnabled="true">
<!-- Start MG Only -->
<particles value="true">
Line 69:
<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> 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> 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 not be placed at the center of the field.
===particles===
Line 78:
===rotationAllowed===
+ deprecated, use the attribute <tt>rotationAllowed</tt> of the model instead.
===day-sound===
Edit by Omega: Code blocks inside spoiler tags need a new line before opening code tag or you'll get code blocks with a height of less than one line.