Difference between revisions of "Overgrowth Object Xml File Format"
(Move Overgrowth Object XML to its own page) |
m (→Object XML -> Label element) |
||
(26 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
This is the top-level XML file for a level object. It specifies visual parameters, some gameplay parameters, and paths for visual assets.<br> | This is the top-level XML file for a level object. It specifies visual parameters, some gameplay parameters, and paths for visual assets.<br> | ||
Other XML file types reference this XML file type, such as [[Xml File Formats#Character XML|Character XML files]] and [[Xml File Formats#Item XML|Item XML files]]. | Other XML file types reference this XML file type, such as [[Xml File Formats#Character XML|Character XML files]] and [[Xml File Formats#Item XML|Item XML files]]. | ||
== Object XML Example == | == Object XML Example == | ||
− | + | <onlyinclude> | |
<pre> | <pre> | ||
<?xml version="1.0" ?> | <?xml version="1.0" ?> | ||
Line 48: | Line 47: | ||
view_distance="10" jitter_degrees="45" overbright="0.4" tint_weight="0.5" collision_type="static" /> | view_distance="10" jitter_degrees="45" overbright="0.4" tint_weight="0.5" collision_type="static" /> | ||
</DetailObjects> | </DetailObjects> | ||
− | <ShaderName> | + | <ShaderName>envobject #DETAILMAP4</ShaderName> |
<avg_color r = "100" g = "128" b = "47" /> | <avg_color r = "100" g = "128" b = "47" /> | ||
<MaterialPath>Data/Materials/wood.xml</MaterialPath> | <MaterialPath>Data/Materials/wood.xml</MaterialPath> | ||
Line 63: | Line 62: | ||
</Object> | </Object> | ||
</pre> | </pre> | ||
− | <onlyinclude> | + | </onlyinclude> |
+ | |||
== Object XML -> Model element == | == Object XML -> Model element == | ||
Line 194: | Line 194: | ||
</pre> | </pre> | ||
− | '''Optional''' - This is referenced by | + | '''Optional''' - This is referenced by gameplay scripts, to determine if this object is of a certain type (e.g. <code>spear</code>, <code>scabbard</code>, <code>impale</code>, etc). |
− | |||
=== Label element -> element text === | === Label element -> element text === | ||
Line 203: | Line 202: | ||
</pre> | </pre> | ||
− | '''Required''' - String value. This is referenced by | + | '''Required''' - String value. This is referenced by gameplay scripts, to determine if this object is of a certain type (e.g. <code>spear</code>, <code>scabbard</code>, <code>impale</code>, etc). |
− | |||
== Object XML -> WeightMap element == | == Object XML -> WeightMap element == | ||
Line 358: | Line 356: | ||
== Object XML -> DetailObjects element == | == Object XML -> DetailObjects element == | ||
+ | |||
+ | <pre> | ||
+ | <Object> | ||
+ | ... | ||
+ | <DetailObjects> | ||
+ | <DetailObject obj_path="Data/GrassTest/grass_square.xml" | ||
+ | weight_path="Data/Textures/Environments/Cliffs/groundbase_02_grass_short.png" | ||
+ | normal_conform="0.9" density="3" | ||
+ | min_embed="-0.2" max_embed="0.0" min_scale="4.0" max_scale="6.8" | ||
+ | view_distance="10" jitter_degrees="10" overbright="0" /> | ||
+ | ... | ||
+ | </DetailObjects> | ||
+ | ... | ||
+ | </Object> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - A list of secondary objects that will be scattered randomly to provide fine, repeated visual detail on top of the object's main surface. | ||
== Object XML -> DetailObjects element -> DetailObject element == | == Object XML -> DetailObjects element -> DetailObject element == | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject obj_path="Data/GrassTest/grass_square.xml" | ||
+ | weight_path="Data/Textures/Environments/Cliffs/groundbase_02_grass_short.png" | ||
+ | normal_conform="0.9" density="3" | ||
+ | min_embed="-0.2" max_embed="0.0" min_scale="4.0" max_scale="6.8" | ||
+ | view_distance="10" jitter_degrees="10" overbright="0.4" | ||
+ | tint_weight="0.5" collision_type="static" /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - A secondary object type that will be scattered randomly to provide fine, repeated visual detail on top of the object's main surface. | ||
=== DetailObject element -> obj_path attribute === | === DetailObject element -> obj_path attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject obj_path="Data/GrassTest/grass_square.xml" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Required''' - String value. Specifies the path to the [[Xml File Formats#Object XML|Object XML]] for the given detail object type. Will provide rendering parameters for the detail objects. | ||
+ | |||
=== DetailObject element -> weight_path attribute === | === DetailObject element -> weight_path attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject weight_path="Data/Textures/Environments/Cliffs/groundbase_02_grass_short.png" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Required''' - String value. Specifies the path to the image that specifies the weight densities for the detail object scattering. | ||
+ | |||
=== DetailObject element -> normal_conform attribute === | === DetailObject element -> normal_conform attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject normal_conform="0.9" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>0.0</code>. Specifies how much the normal of the detail objects will be shifted to match the normal of the surface they are decorating.<br> | ||
+ | '''TODO''': What are the units? -merlyn | ||
+ | |||
=== DetailObject element -> density attribute === | === DetailObject element -> density attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject density="3" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>1.0</code>. Specifies how many of the detail objects should be placed per area, upon the surface they decorate.<br> | ||
+ | '''TODO''': What are the units? -merlyn | ||
+ | |||
=== DetailObject element -> min_embed attribute === | === DetailObject element -> min_embed attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject min_embed="-0.2" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>0.0</code>. Specifies the deepest that detail objects will be embedded into the surface of the object they decorate. The actual value is random, and this is the deepest range value. | ||
+ | |||
=== DetailObject element -> max_embed attribute === | === DetailObject element -> max_embed attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject max_embed="0.0" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>0.0</code>. Specifies the shallowest that detail objects will be embedded into the surface of the object they decorate. The actual value is random, and this is the shallowest range value. | ||
+ | |||
=== DetailObject element -> min_scale attribute === | === DetailObject element -> min_scale attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject min_scale="4.0" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>1.0</code>. Specifies the smallest value that detail objects will be scaled to. The actual value is random, and this is the smallest range value. | ||
+ | |||
=== DetailObject element -> max_scale attribute === | === DetailObject element -> max_scale attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject max_scale="6.8" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>1.0</code>. Specifies the largest value that detail objects will be scaled to. The actual value is random, and this is the largest range value. | ||
+ | |||
=== DetailObject element -> view_distance attribute === | === DetailObject element -> view_distance attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject view_distance="10" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>30.0</code>. Specifies the farthest distance that the detail object will be visible from. Values are specified in game units (meters). | ||
+ | |||
=== DetailObject element -> jitter_degrees attribute === | === DetailObject element -> jitter_degrees attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject jitter_degrees="10" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>0.0</code>. Specifies the maximum number of degrees to randomly rotate the object, to keep detail objects from awkwardly all pointing directly upward, and to increase visual variety. | ||
+ | |||
=== DetailObject element -> overbright attribute === | === DetailObject element -> overbright attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject overbright="0.4" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>0.0</code>. Specifies the overbright value to render the object with.<br> | ||
+ | '''TODO''': Need a better description. Units? -merlyn | ||
+ | |||
=== DetailObject element -> tint_weight attribute === | === DetailObject element -> tint_weight attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject tint_weight="0.5" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Decimal value. The default value is <code>1.0</code>. Specifies the blend percentage between the detail object's tint, and the tint it inherits from the object's surface it decorates. The value should be between <code>0.0</code> and <code>1.0</code>.<br> | ||
+ | '''TODO''': Is this accurate? Is it the blend with other detail object layers or the parent layer? -merlyn | ||
+ | |||
=== DetailObject element -> collision_type attribute === | === DetailObject element -> collision_type attribute === | ||
+ | |||
+ | <pre> | ||
+ | <DetailObject collision_type="static" ... /> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - Enumerated value. The default value is unset, which will result in an object with dynamic collision. Specifies the type of collision this object should have with moving objects in the world. Valid values are <code>static</code>, <code>plant</code>, and unset. | ||
== Object XML -> ShaderName element == | == Object XML -> ShaderName element == | ||
+ | |||
+ | <pre> | ||
+ | <Object> | ||
+ | ... | ||
+ | <ShaderName>envobject #DETAILMAP4</ShaderName> | ||
+ | ... | ||
+ | </Object> | ||
+ | </pre> | ||
+ | |||
+ | '''Optional''' - The shader name and shader <code>#HASH_PARAMS</code> that specify how the object will be rendered. | ||
=== ShaderName element -> element text === | === ShaderName element -> element text === | ||
+ | |||
+ | <pre> | ||
+ | <ShaderName>envobject #DETAILMAP4</ShaderName> | ||
+ | </pre> | ||
+ | |||
+ | '''Required''' - String value. The shader name and shader <code>#HASH_PARAMS</code> that specify how the object will be rendered. | ||
== Object XML -> avg_color element == | == Object XML -> avg_color element == | ||
Line 389: | Line 525: | ||
</pre> | </pre> | ||
− | '''Optional''' - The color | + | '''Optional''' - The default value is <code>r = 200, g = 200, b = 200</code>, which is equivalent to a light grey. The color is used when the object is used as a detail object, and the detail is faded out while getting close to the max allowed draw distance. For other scenarios, such as when just placing the object normally in a level, the value seems to go unused. |
− | |||
=== avg_color element -> r attribute === | === avg_color element -> r attribute === | ||
Line 463: | Line 598: | ||
</pre> | </pre> | ||
− | '''Optional''' - Boolean value. If <code>true</code>, then the object will be rendered in the transparent rendering pass.<br> | + | '''Optional''' - Boolean value. The default value is <code>false</code>. If <code>true</code>, then the object will be rendered in the transparent rendering pass.<br> |
This flag doesn't make the object transparent on its own, and must also be coupled with transparent shader flags and a transparency map texture. | This flag doesn't make the object transparent on its own, and must also be coupled with transparent shader flags and a transparency map texture. | ||
Line 472: | Line 607: | ||
</pre> | </pre> | ||
− | '''Optional''' - Boolean value. If <code>true</code>, then the object will not trigger collisions with players, items, or weapons.<br> | + | '''Optional''' - Boolean value. The default value is <code>false</code>. If <code>true</code>, then the object will not trigger collisions with players, items, or weapons.<br> |
=== Flags element -> clamp_texture attribute === | === Flags element -> clamp_texture attribute === | ||
Line 480: | Line 615: | ||
</pre> | </pre> | ||
− | '''Optional''' - Boolean value. If <code>true</code>, then the object will render with its texture clamped at its edges, instead of repeating.<br> | + | '''Optional''' - Boolean value. The default value is <code>false</code>. If <code>true</code>, then the object will render with its texture clamped at its edges, instead of repeating.<br> |
=== Flags element -> bush_collision attribute === | === Flags element -> bush_collision attribute === | ||
Line 488: | Line 623: | ||
</pre> | </pre> | ||
− | '''Optional''' - Boolean value. If <code>true</code>, then the object will trigger jiggle physics when items and characters collide with it. Physics objects will also be slowed down when interacting with it, but not completely blocked. It will also impact line of sight. | + | '''Optional''' - Boolean value. The default value is <code>false</code>. If <code>true</code>, then the object will trigger jiggle physics when items and characters collide with it. Physics objects will also be slowed down when interacting with it, but not completely blocked. It will also impact line of sight. |
=== Flags element -> terrain_fixed attribute === | === Flags element -> terrain_fixed attribute === | ||
Line 496: | Line 631: | ||
</pre> | </pre> | ||
− | '''Optional''' - Boolean value. If <code>true</code>, then the object will be locked to the terrain when placed.<br> | + | '''Optional''' - Boolean value. The default value is <code>false</code>. If <code>true</code>, then the object will be locked to the terrain when placed.<br> |
'''TODO''': Is this an accurate description, or does it do something else? -merlyn | '''TODO''': Is this an accurate description, or does it do something else? -merlyn | ||
Line 505: | Line 640: | ||
</pre> | </pre> | ||
− | '''Optional''' - Boolean value. If <code>true</code>, then the object will be considered to move by script, and the physics engine will use that information for optimization<br> | + | '''Optional''' - Boolean value. The default value is <code>false</code>. If <code>true</code>, then the object will be considered to move by script, and the physics engine will use that information for optimization<br> |
'''TODO''': Is this an accurate description, or does it do something else? -merlyn | '''TODO''': Is this an accurate description, or does it do something else? -merlyn | ||
Line 514: | Line 649: | ||
</pre> | </pre> | ||
− | '''Optional''' - Boolean value. If <code>true</code>, then the object will have its polygons rendered double-sided. This is useful for objects such as flags and cloth, that have no thickness. | + | '''Optional''' - Boolean value. The default value is <code>false</code>. If <code>true</code>, then the object will have its polygons rendered double-sided. This is useful for objects such as flags and cloth, that have no thickness. |
== Object XML -> GroundOffset element == | == Object XML -> GroundOffset element == | ||
Line 525: | Line 660: | ||
</pre> | </pre> | ||
− | '''Optional''' - The Y offset to position this object away from the ground, when placed in the world. | + | '''Optional''' - The default value is <code>0.0</code>. The Y offset to position this object away from the ground, when placed in the world. |
=== GroundOffset element -> element text === | === GroundOffset element -> element text === | ||
Line 533: | Line 668: | ||
</pre> | </pre> | ||
− | '''Required''' - Decimal value. The Y offset to position this object away from the ground, when placed in the world. | + | '''Required''' - Decimal value. The default value (when the element is not present) is <code>0.0</code>. The Y offset to position this object away from the ground, when placed in the world. |
== Object XML -> ColorTint element == | == Object XML -> ColorTint element == | ||
Line 544: | Line 679: | ||
</pre> | </pre> | ||
− | '''Optional''' - The color that the object should be tinted, by default. This can be overridden in the editor after the object is placed | + | '''Optional''' - The default value is <code>r = 255, g = 255, b = 255</code>, which is equivalent to no tint. The color that the object should be tinted, by default, when placed in the world. This can be overridden in the editor after the object is placed. |
=== ColorTint element -> r attribute === | === ColorTint element -> r attribute === |
Latest revision as of 04:59, 11 September 2023
This is the top-level XML file for a level object. It specifies visual parameters, some gameplay parameters, and paths for visual assets.
Other XML file types reference this XML file type, such as Character XML files and Item XML files.
Contents
- 1 Object XML Example
- 2 Object XML -> Model element
- 3 Object XML -> ColorMap element
- 4 Object XML -> NormalMap element
- 5 Object XML -> TranslucencyMap element
- 6 Object XML -> WindMap element
- 7 Object XML -> SharpnessMap element
- 8 Object XML -> Label element
- 9 Object XML -> WeightMap element
- 10 Object XML -> PaletteMap element
- 11 Object XML -> DetailMaps element
- 12 Object XML -> DetailMaps element -> DetailMap element
- 13 Object XML -> DetailObjects element
- 14 Object XML -> DetailObjects element -> DetailObject element
- 14.1 DetailObject element -> obj_path attribute
- 14.2 DetailObject element -> weight_path attribute
- 14.3 DetailObject element -> normal_conform attribute
- 14.4 DetailObject element -> density attribute
- 14.5 DetailObject element -> min_embed attribute
- 14.6 DetailObject element -> max_embed attribute
- 14.7 DetailObject element -> min_scale attribute
- 14.8 DetailObject element -> max_scale attribute
- 14.9 DetailObject element -> view_distance attribute
- 14.10 DetailObject element -> jitter_degrees attribute
- 14.11 DetailObject element -> overbright attribute
- 14.12 DetailObject element -> tint_weight attribute
- 14.13 DetailObject element -> collision_type attribute
- 15 Object XML -> ShaderName element
- 16 Object XML -> avg_color element
- 17 Object XML -> MaterialPath element
- 18 Object XML -> Flags element
- 18.1 Flags element -> transparent attribute
- 18.2 Flags element -> no_collision attribute
- 18.3 Flags element -> clamp_texture attribute
- 18.4 Flags element -> bush_collision attribute
- 18.5 Flags element -> terrain_fixed attribute
- 18.6 Flags element -> dynamic attribute
- 18.7 Flags element -> double_sided attribute
- 19 Object XML -> GroundOffset element
- 20 Object XML -> ColorTint element
Object XML Example
<?xml version="1.0" ?> <Object> <Model>Data/Models/Buildings/arena/arena_gate.obj</Model> <ColorMap>Data/Textures/Buildings/arena/arena_gate_c.tga</ColorMap> <NormalMap>Data/Textures/Buildings/arena/arena_gate_n.tga</NormalMap> <TranslucencyMap>Data/Textures/Buildings/arena/arena_gate_tl.tga</TranslucencyMap> <WindMap>Data/Textures/Buildings/arena/arena_gate_wind.tga</WindMap> <SharpnessMap>Data/Textures/Buildings/arena/arena_gate_sharpness.tga</SharpnessMap> <Label>impale</Label> <WeightMap>Data/Textures/Buildings/arena/arena_gate_w.tga</WeightMap> <PaletteMap label_red="Bars" label_green="Ropes" label_blue="Banner 1" label_alpha="Banner 2" label_other="Banner 3"> Data/Textures/Buildings/arena/arena_gate_m.tga </PaletteMap> <DetailMaps> <DetailMap colorpath="Data/Textures/Buildings/detail_textures/wood_grain_c.tga" normalpath="Data/Textures/Buildings/detail_textures/wood_grain_n.tga" materialpath="Data/Materials/wood.xml" /> <DetailMap colorpath="Data/Textures/Buildings/detail_textures/gray_metal_c.tga" normalpath="Data/Textures/Buildings/detail_textures/gray_metal_n.tga" materialpath="Data/Materials/rocks.xml" /> <DetailMap colorpath="Data/Textures/Buildings/detail_textures/cat_cobbles_c.tga" normalpath="Data/Textures/Buildings/detail_textures/cat_cobbles_n.tga" materialpath="Data/Materials/rocks.xml" /> <DetailMap colorpath="Data/Textures/Buildings/detail_textures/gold_hexagons_c.tga" normalpath="Data/Textures/Buildings/detail_textures/gold_hexagons_n.tga" materialpath="Data/Materials/rocks.xml" /> </DetailMaps> <DetailObjects> <DetailObject obj_path="Data/GrassTest/grass_square.xml" weight_path="Data/Textures/Environments/Cliffs/groundbase_02_grass_short.png" normal_conform="0.9" density="3" min_embed="-0.2" max_embed="0.0" min_scale="4.0" max_scale="6.8" view_distance="10" jitter_degrees="10" overbright="0" /> <DetailObject obj_path="Data/GrassTest/grass_square.xml" weight_path="Data/Textures/Environments/Cliffs/groundbase_02_grass_short.png" normal_conform="0.9" density="2" min_embed="-0.2" max_embed="0.0" min_scale="4.0" max_scale="6.8" view_distance="20" jitter_degrees="10" overbright="0" /> <DetailObject obj_path="Data/Objects/Environment/Rocks/lichen_rock_a.xml" weight_path="Data/Textures/Terrain/forest_hills/forest_hills_not_grass.tga" normal_conform="1" density="20" min_embed="0.3" max_embed="0.7" min_scale="0.08" max_scale="0.12" view_distance="10" jitter_degrees="45" overbright="0.4" tint_weight="0.5" collision_type="static" /> </DetailObjects> <ShaderName>envobject #DETAILMAP4</ShaderName> <avg_color r = "100" g = "128" b = "47" /> <MaterialPath>Data/Materials/wood.xml</MaterialPath> <Flags transparent = "true" no_collision = "true" clamp_texture = "true" bush_collision = "true" terrain_fixed = "true" dynamic = "true" double_sided = "true" /> <GroundOffset>0.5</GroundOffset> <ColorTint r = "101" g = "129" b = "46" /> </Object>
Object XML -> Model element
<Object> <Model>Data/Models/Buildings/arena/arena_gate.obj</Model> ... </Object>
Required - Path to the obj format model file.
Model element -> element text
<Model>Data/Models/Buildings/arena/arena_gate.obj</Model>
Required - String value. Path to the obj format model file.
Object XML -> ColorMap element
<Object> ... <ColorMap>Data/Textures/Buildings/arena/arena_gate_c.tga</ColorMap> ... </Object>
Required - Path to the image file for the color map texture for the object.
ColorMap element -> element text
<ColorMap>Data/Textures/Buildings/arena/arena_gate_c.tga</ColorMap>
Required - String value. Path to the image file for the color map texture for the object.
Object XML -> NormalMap element
<Object> ... <NormalMap>Data/Textures/Buildings/arena/arena_gate_n.tga</NormalMap> ... </Object>
Required - Path to the image file for the normal map texture for the object.
NormalMap element -> element text
<NormalMap>Data/Textures/Buildings/arena/arena_gate_n.tga</NormalMap>
Required - String value. Path to the image file for the normal map texture for the object.
Object XML -> TranslucencyMap element
<Object> ... <TranslucencyMap>Data/Textures/Buildings/arena/arena_gate_tl.tga</TranslucencyMap> ... </Object>
Optional - Path to the image file for the translucency map texture for the object.
TranslucencyMap element -> element text
<TranslucencyMap>Data/Textures/Buildings/arena/arena_gate_tl.tga</TranslucencyMap>
Required - String value. Path to the image file for the translucency map texture for the object.
Object XML -> WindMap element
<Object> ... <WindMap>Data/Textures/Buildings/arena/arena_gate_wind.tga</WindMap> ... </Object>
Optional - Path to the image file for the wind map texture for the object.
WindMap element -> element text
<WindMap>Data/Textures/Buildings/arena/arena_gate_wind.tga</WindMap>
Required - String value. Path to the image file for the wind map texture for the object.
Object XML -> SharpnessMap element
<Object> ... <SharpnessMap>Data/Textures/Buildings/arena/arena_gate_sharpness.tga</SharpnessMap> ... </Object>
Optional - String value. Path to the image file for the sharpness map texture for the object. Used for weapon objects.
TODO: links to/from other file types for this field?
SharpnessMap element -> element text
<SharpnessMap>Data/Textures/Buildings/arena/arena_gate_sharpness.tga</SharpnessMap>
Required - String value. Path to the image file for the sharpness map texture for the object. Used for weapon objects.
Object XML -> Label element
<Object> ... <Label>impale</Label> ... </Object>
Optional - This is referenced by gameplay scripts, to determine if this object is of a certain type (e.g. spear
, scabbard
, impale
, etc).
Label element -> element text
<Label>impale</Label>
Required - String value. This is referenced by gameplay scripts, to determine if this object is of a certain type (e.g. spear
, scabbard
, impale
, etc).
Object XML -> WeightMap element
<Object> ... <WeightMap>Data/Textures/Buildings/arena/arena_gate_w.tga</WeightMap> ... </Object>
Optional - Path to the image file for the weight map texture for the object.
WeightMap element -> element text
<WeightMap>Data/Textures/Buildings/arena/arena_gate_w.tga</WeightMap>
Required - String value. Path to the image file for the weight map texture for the object.
Object XML -> PaletteMap element
<Object> ... <PaletteMap label_red="Bars" label_green="Ropes" label_blue="Banner 1" label_alpha="Banner 2" label_other="Banner 3"> Data/Textures/Buildings/arena/arena_gate_m.tga </PaletteMap> ... </Object>
Optional - Specifies a set of different tintable areas on this object. The labels are the text displayed in the editor interface. Each color channel of the specified image will be used as a mask to specify where on the object's model the tinting should be limited to.
PaletteMap element -> element text
<PaletteMap ...> Data/Textures/Buildings/arena/arena_gate_m.tga </PaletteMap>
Required - String value. Path to the image file for the color masks, used when there's tint parameters that limit the tint to a specific area on the object, such as character clothing colors, a tintable area on a weapon, etc.
PaletteMap element -> label_red attribute
<PaletteMap label_red="Clothing Color 1"> Data/Textures/Buildings/arena/arena_gate_m.tga </PaletteMap>
Optional - String value. The text displayed in the editor interface, next to the editable color corresponding to the red channel of the tint mask image.
PaletteMap element -> label_green attribute
<PaletteMap label_green="Clothing Color 2"> Data/Textures/Buildings/arena/arena_gate_m.tga </PaletteMap>
Optional - String value. The text displayed in the editor interface, next to the editable color corresponding to the green channel of the tint mask image.
PaletteMap element -> label_blue attribute
<PaletteMap label_blue="Clothing Color 3"> Data/Textures/Buildings/arena/arena_gate_m.tga </PaletteMap>
Optional - String value. The text displayed in the editor interface, next to the editable color corresponding to the blue channel of the tint mask image.
PaletteMap element -> label_alpha attribute
<PaletteMap label_alpha="Clothing Color 4"> Data/Textures/Buildings/arena/arena_gate_m.tga </PaletteMap>
Optional - String value. The text displayed in the editor interface, next to the editable color corresponding to the alpha channel of the tint mask image.
PaletteMap element -> label_other attribute
<PaletteMap label_alpha="Clothing Color 5"> Data/Textures/Buildings/arena/arena_gate_m.tga </PaletteMap>
Optional - String value. The text displayed in the editor interface, next to the editable color corresponding to the "other" channel of the tint mask image.
TODO: What the heck even is a "other" channel on an image? Does this even do anything in code, besides get parsed? -merlyn
Object XML -> DetailMaps element
<Object> ... <DetailMaps> <DetailMap colorpath="Data/Textures/Buildings/detail_textures/wood_grain_c.tga" normalpath="Data/Textures/Buildings/detail_textures/wood_grain_n.tga" materialpath="Data/Materials/wood.xml" /> ... </DetailMaps> ... </Object>
Optional - A list of secondary material layers that provide fine, repeated visual detail on top of the object's main texture layers.
Object XML -> DetailMaps element -> DetailMap element
<DetailMap colorpath="Data/Textures/Buildings/detail_textures/wood_grain_c.tga" normalpath="Data/Textures/Buildings/detail_textures/wood_grain_n.tga" materialpath="Data/Materials/wood.xml" />
Optional - The parameters for the detail map textures that repeat across the model, providing finer-scale detail. There can be up to four of these.
DetailMap element -> colorpath attribute
<DetailMap colorpath="Data/Textures/Buildings/detail_textures/wood_grain_c.tga" ... />
Required - String value. Specifies the path to the image for this detail map's color map texture.
DetailMap element -> normalpath attribute
<DetailMap normalpath="Data/Textures/Buildings/detail_textures/wood_grain_n.tga" ... />
Required - String value. Specifies the path to the image for the detail map's normal map texture.
DetailMap element -> materialpath attribute
<DetailMap materialpath="Data/Materials/wood.xml" ... />
Required - String value. Specifies the path to the Material XML for the given detail map level.
TODO: What is this used for? Aren't detail maps a visual-only thing? -merlyn
Object XML -> DetailObjects element
<Object> ... <DetailObjects> <DetailObject obj_path="Data/GrassTest/grass_square.xml" weight_path="Data/Textures/Environments/Cliffs/groundbase_02_grass_short.png" normal_conform="0.9" density="3" min_embed="-0.2" max_embed="0.0" min_scale="4.0" max_scale="6.8" view_distance="10" jitter_degrees="10" overbright="0" /> ... </DetailObjects> ... </Object>
Optional - A list of secondary objects that will be scattered randomly to provide fine, repeated visual detail on top of the object's main surface.
Object XML -> DetailObjects element -> DetailObject element
<DetailObject obj_path="Data/GrassTest/grass_square.xml" weight_path="Data/Textures/Environments/Cliffs/groundbase_02_grass_short.png" normal_conform="0.9" density="3" min_embed="-0.2" max_embed="0.0" min_scale="4.0" max_scale="6.8" view_distance="10" jitter_degrees="10" overbright="0.4" tint_weight="0.5" collision_type="static" />
Optional - A secondary object type that will be scattered randomly to provide fine, repeated visual detail on top of the object's main surface.
DetailObject element -> obj_path attribute
<DetailObject obj_path="Data/GrassTest/grass_square.xml" ... />
Required - String value. Specifies the path to the Object XML for the given detail object type. Will provide rendering parameters for the detail objects.
DetailObject element -> weight_path attribute
<DetailObject weight_path="Data/Textures/Environments/Cliffs/groundbase_02_grass_short.png" ... />
Required - String value. Specifies the path to the image that specifies the weight densities for the detail object scattering.
DetailObject element -> normal_conform attribute
<DetailObject normal_conform="0.9" ... />
Optional - Decimal value. The default value is 0.0
. Specifies how much the normal of the detail objects will be shifted to match the normal of the surface they are decorating.
TODO: What are the units? -merlyn
DetailObject element -> density attribute
<DetailObject density="3" ... />
Optional - Decimal value. The default value is 1.0
. Specifies how many of the detail objects should be placed per area, upon the surface they decorate.
TODO: What are the units? -merlyn
DetailObject element -> min_embed attribute
<DetailObject min_embed="-0.2" ... />
Optional - Decimal value. The default value is 0.0
. Specifies the deepest that detail objects will be embedded into the surface of the object they decorate. The actual value is random, and this is the deepest range value.
DetailObject element -> max_embed attribute
<DetailObject max_embed="0.0" ... />
Optional - Decimal value. The default value is 0.0
. Specifies the shallowest that detail objects will be embedded into the surface of the object they decorate. The actual value is random, and this is the shallowest range value.
DetailObject element -> min_scale attribute
<DetailObject min_scale="4.0" ... />
Optional - Decimal value. The default value is 1.0
. Specifies the smallest value that detail objects will be scaled to. The actual value is random, and this is the smallest range value.
DetailObject element -> max_scale attribute
<DetailObject max_scale="6.8" ... />
Optional - Decimal value. The default value is 1.0
. Specifies the largest value that detail objects will be scaled to. The actual value is random, and this is the largest range value.
DetailObject element -> view_distance attribute
<DetailObject view_distance="10" ... />
Optional - Decimal value. The default value is 30.0
. Specifies the farthest distance that the detail object will be visible from. Values are specified in game units (meters).
DetailObject element -> jitter_degrees attribute
<DetailObject jitter_degrees="10" ... />
Optional - Decimal value. The default value is 0.0
. Specifies the maximum number of degrees to randomly rotate the object, to keep detail objects from awkwardly all pointing directly upward, and to increase visual variety.
DetailObject element -> overbright attribute
<DetailObject overbright="0.4" ... />
Optional - Decimal value. The default value is 0.0
. Specifies the overbright value to render the object with.
TODO: Need a better description. Units? -merlyn
DetailObject element -> tint_weight attribute
<DetailObject tint_weight="0.5" ... />
Optional - Decimal value. The default value is 1.0
. Specifies the blend percentage between the detail object's tint, and the tint it inherits from the object's surface it decorates. The value should be between 0.0
and 1.0
.
TODO: Is this accurate? Is it the blend with other detail object layers or the parent layer? -merlyn
DetailObject element -> collision_type attribute
<DetailObject collision_type="static" ... />
Optional - Enumerated value. The default value is unset, which will result in an object with dynamic collision. Specifies the type of collision this object should have with moving objects in the world. Valid values are static
, plant
, and unset.
Object XML -> ShaderName element
<Object> ... <ShaderName>envobject #DETAILMAP4</ShaderName> ... </Object>
Optional - The shader name and shader #HASH_PARAMS
that specify how the object will be rendered.
ShaderName element -> element text
<ShaderName>envobject #DETAILMAP4</ShaderName>
Required - String value. The shader name and shader #HASH_PARAMS
that specify how the object will be rendered.
Object XML -> avg_color element
<Object> ... <avg_color r = "100" g = "128" b = "47" /> ... </Object>
Optional - The default value is r = 200, g = 200, b = 200
, which is equivalent to a light grey. The color is used when the object is used as a detail object, and the detail is faded out while getting close to the max allowed draw distance. For other scenarios, such as when just placing the object normally in a level, the value seems to go unused.
avg_color element -> r attribute
<avg_color r = "100" ... />
Required - Integer value. Specifies the intensity of the red channel of the average color. Value is between 0
and 255
.
avg_color element -> g attribute
<avg_color ... g = "128" ... />
Required - Integer value. Specifies the intensity of the green channel of the average color. Value is between 0
and 255
.
avg_color element -> b attribute
<avg_color ... b = "47" />
Required - Integer value. Specifies the intensity of the blue channel of the average color. Value is between 0
and 255
.
Object XML -> MaterialPath element
<Object> ... <MaterialPath>Data/Materials/wood.xml</MaterialPath> ... </Object>
Optional - Specifies the path to the Material XML for the object.
This is used for physics interaction events with this object, including sounds, particles, and decals that will be applied when collisions occur.
MaterialPath element -> element text
<MaterialPath>Data/Materials/wood.xml</MaterialPath>
Required - String value. Specifies the path to the Material XML for the object.
This is used for physics interaction events with this object, including sounds, particles, and decals that will be applied when collisions occur.
Object XML -> Flags element
<Object> ... <Flags transparent = "true" no_collision = "true" clamp_texture = "true" bush_collision = "true" terrain_fixed = "true" dynamic = "true" double_sided = "true" /> ... </Object>
Optional - A list of flags that will be applied to this object, if set to true. Some of these flags affect rendering (e.g. double_sided
), some affect physics (e.g. no_collision
), and others affect gameplay interactions with this object (e.g. bush_collision
).
Flags element -> transparent attribute
<Flags transparent = "true" ... />
Optional - Boolean value. The default value is false
. If true
, then the object will be rendered in the transparent rendering pass.
This flag doesn't make the object transparent on its own, and must also be coupled with transparent shader flags and a transparency map texture.
Flags element -> no_collision attribute
<Flags no_collision = "true" ... />
Optional - Boolean value. The default value is false
. If true
, then the object will not trigger collisions with players, items, or weapons.
Flags element -> clamp_texture attribute
<Flags clamp_texture = "true" ... />
Optional - Boolean value. The default value is false
. If true
, then the object will render with its texture clamped at its edges, instead of repeating.
Flags element -> bush_collision attribute
<Flags bush_collision = "true" ... />
Optional - Boolean value. The default value is false
. If true
, then the object will trigger jiggle physics when items and characters collide with it. Physics objects will also be slowed down when interacting with it, but not completely blocked. It will also impact line of sight.
Flags element -> terrain_fixed attribute
<Flags terrain_fixed = "true" ... />
Optional - Boolean value. The default value is false
. If true
, then the object will be locked to the terrain when placed.
TODO: Is this an accurate description, or does it do something else? -merlyn
Flags element -> dynamic attribute
<Flags dynamic = "true" ... />
Optional - Boolean value. The default value is false
. If true
, then the object will be considered to move by script, and the physics engine will use that information for optimization
TODO: Is this an accurate description, or does it do something else? -merlyn
Flags element -> double_sided attribute
<Flags double_sided = "true" ... />
Optional - Boolean value. The default value is false
. If true
, then the object will have its polygons rendered double-sided. This is useful for objects such as flags and cloth, that have no thickness.
Object XML -> GroundOffset element
<Object> ... <GroundOffset>0.5</GroundOffset> </Object>
Optional - The default value is 0.0
. The Y offset to position this object away from the ground, when placed in the world.
GroundOffset element -> element text
<GroundOffset>0.5</GroundOffset>
Required - Decimal value. The default value (when the element is not present) is 0.0
. The Y offset to position this object away from the ground, when placed in the world.
Object XML -> ColorTint element
<Object> ... <ColorTint r = "101" g = "129" b = "46" /> </Object>
Optional - The default value is r = 255, g = 255, b = 255
, which is equivalent to no tint. The color that the object should be tinted, by default, when placed in the world. This can be overridden in the editor after the object is placed.
ColorTint element -> r attribute
<ColorTint r = "101" ... />
Required - Integer value. Specifies the intensity of the red channel of the tint color. Value is between 0
and 255
.
ColorTint element -> g attribute
<ColorTint ... g = "129" ... />
Required - Integer value. Specifies the intensity of the green channel of the tint color. Value is between 0
and 255
.
ColorTint element -> b attribute
<ColorTint ... b = "46" />
Required - Integer value. Specifies the intensity of the blue channel of the tint color. Value is between 0
and 255
.