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.name
is the name of the body you are making.enabled
is a toggle for if collision should be enabled.template
is the physics template of the body.static
is solid collision.editor
is 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)name
is the name of the object being used.- Using empties will bind the body to the empty for constraints.
collision_type
is the shape/type of collision.box
is a box.sphere
is a sphere.capsule
is a pill shape.convex
is a convex shape based on your used object mesh.mesh_mopp
is a paper thin collision that is 1:1 the shape of your objects mesh.
two_sided
is a toggle for if your collision should be double sided. (Very buggy!)padding
is 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_material
is 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.name
is the name of the object being used as the decal mesh.enabled
is a toggle for if decal_mesh should be enabled.material
to 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.name
is the name of the object being used as the graphic.enabled
is a toggle for if the graphics should be visible.shadow_caster
is 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.enabled
is a toggle for if the constraint should be active.type=""
sets the type of constrant.static
ragdoll
<param body_a="body_a" body_b="body_b"/>
Attaches A to B.- Attaching to world requires
@world
to 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.