Object Xml
Example XML:
<dynamic_object>
<diesel materials="units/path/material_config" orientation_object="rp_rootpoint_object" />
<sequence_manager file="units/path/sequence_manager" />
<bodies>
<body name="body_static" enabled="true" template="static">
<object name="c_collision" collision_type="box" padding="-2.5" />
</body>
</bodies>
<decal_surfaces default_material="stone">
<decal_mesh name="dm_decalmesh" enabled="true" material="steel" />
</decal_surfaces>
<graphics>
<object name="g_graphics" enabled="true" shadow_caster="true" />
</graphics>
</dynamic_object>
<diesel/>is a required table that holds a path to the materials and root object.materials="path"leads to the material config the unit will use.orientation_object="rp_rootpoint"the object that acts as the origin of the unit, must be an Empty object.
<sequence_manager file="path"/>is its own table defining the sequence manager the unit will use.- Warning!
<extension name="damage" class="UnitDamage" />is required in the units extensions!
- Warning!
<bodies/>is the table that holds collision information.<body/>is the table that holds the objects that will be used as collision.nameis the name of the body you are making.enabledis a toggle for if collision should be enabled.templateis the physics template of the body.staticis solid collision.editoris editor only collision.- a full list of templates can be found in
settings/physics_settings.physics_settings. - templates can be edited in object by adding properties seem in the physics_settings file.
<object/>is the table that holds the referenced object. (The same object can be used more than once)nameis the name of the object being used.- Using empties will bind the body to the empty for constraints.
collision_typeis the shape/type of collision.boxis a box.sphereis a sphere.capsuleis a pill shape.convexis a convex shape based on your used object mesh.mesh_moppis a paper thin collision that is 1:1 the shape of your objects mesh.
two_sidedis a toggle for if your collision should be double sided. (Very buggy!)paddingis the additional thickness in cm of your object.- Default 0 leaves models 2.5cm thicker, use -2.5 to correct it.
- Does not apply to mesh_mopp collision.
<decal_surfaces/>is the table that holds a list of meshes to act as decal surfaces. (Blankets that allow decals to spawn)default_materialis used if no decal material information is avaliable when hit.
<decal_mesh/>is a table that holds a specific object to act as a decal surface.nameis the name of the object being used as the decal mesh.enabledis a toggle for if decal_mesh should be enabled.materialto be used when shot/hit.
<graphics/>is the table that holds all of the graphics objects.<object/>is a table that is used to control the selected graphic.nameis the name of the object being used as the graphic.enabledis a toggle for if the graphics should be visible.shadow_casteris a toggle for if the graphics object should cast a shadow. (typically used by shadow_caster material objects.s_shadowcaster)
<constraints/>is a table that holds all of the constraint information.<constraint/>is a table that constrains objects together.enabledis a toggle for if the constraint should be active.type=""sets the type of constrant.staticragdoll
<param body_a="body_a" body_b="body_b"/>Attaches A to B.- Attaching to world requires
@worldto be used asbody_a.
- Attaching to world requires
<param pivot="position:a_object"/>Sets the position to pivot from.<param twist_axis="yaxis:a_object" twist_min="-10" twist_max="10" twist_freedom="1"/>Sets the twist axis and control.<param plane_axis="xaxis:a_object"/><param cone_y="60" cone_z="60" cone_freedom="12"/>Limit the angle the constrant can rotate.<param damping="8" spring_constant="600" min_restitution="0"/>Spring settings.
No comments to display
No comments to display