Skip to main content

Object Xml

Example XML:

<dynamic_object>
	<diesel materials="units/path/material_config" orientation_object="rp_rootpoint_object" />
	<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.
  • <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.
    • 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)