Difference between revisions of "Xml File Formats"

From Wolfire Games Wiki
Jump to: navigation, search
m (Character)
(Object XML)
 
(98 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
= Actor XML =
 
= Actor XML =
  
== Example ==
+
This is the top-level XML file for an NPC or combat character. It binds a [[Xml File Formats#Character XML|Character XML]] file to an [[Character Scripting|AI angelscript]] file.<br>
 +
When a level references a character, this is the file type that is referenced.
 +
 
 +
== Actor XML Example ==
 
<pre>
 
<pre>
 
<?xml version="1.0" ?>
 
<?xml version="1.0" ?>
Line 14: Line 17:
 
</pre>
 
</pre>
  
=== Character element ===
+
== Actor XML -> Character element ==
 
<pre>
 
<pre>
<Character>Data/Characters/rabbot.xml</Character>
+
<Actor>
 +
    <Character>Data/Characters/rabbot.xml</Character>
 +
    ...
 +
</Actor>
 
</pre>
 
</pre>
  
Path to [[XML File Formats#Character XML|Character XML]]
+
'''Required''' - String value. Path to [[Xml File Formats#Character XML|Character XML]]
  
=== ControlScript element ===
+
== Actor XML -> ControlScript element ==
 
<pre>
 
<pre>
<ControlScript>enemycontrol.as</ControlScript>
+
<Actor>
 +
    ...
 +
    <ControlScript>enemycontrol.as</ControlScript>
 +
</Actor>
 
</pre>
 
</pre>
  
Path to [[Character Scripting|AI angelscript]]. Relative to Data/Scripts folder
+
'''Required''' - String value. Path to [[Character Scripting|AI angelscript]]. Relative to <code>Data/Scripts</code> folder
  
= Asset Preload =
+
= Asset Preload XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Attachment =
+
= Attachment XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Attack =
+
= Attack XML =
  
 
'''TODO:'''
 
'''TODO:'''
Line 44: Line 53:
 
'''TODO:'''
 
'''TODO:'''
  
= Decal =
+
= Decal XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Events =
+
= Events XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Hotspot =
+
= Hotspot XML =
 +
 
 +
This is the top-level XML file for a hotspot game object. It specifies the billboard image, and the [[Hotspot Scripting|Hotspot angelscript]] file.<br>
 +
When a level references a hotspot, this is the file type that is referenced.
 +
 
 +
== Hotspot XML Example ==
 +
<pre>
 +
<?xml version="1.0" ?>
 +
<Type>generic</Type>
 +
<Hotspot>
 +
    <BillboardColorMap>Data/UI/spawner/thumbs/Hotspot/empty.png</BillboardColorMap>
 +
    <Script>hotspots/sound_hotspot.as</Script>
 +
</Hotspot>
 +
</pre>
 +
 
 +
== Hotspot XML -> Type element ==
 +
<pre>
 +
<Type>generic</Type>
 +
<Hotspot>
 +
    ...
 +
</Hotspot>
 +
</pre>
 +
 
 +
'''Required''' - String value. This should always have the value <code><Type>generic</Type></code>.<br>
 +
Note: Having two document elements is not valid XML, and I'm not sure what purpose this element serves. But leave it in, since all the hotspots do it. -merlyn
 +
 
 +
== Hotspot XML -> Character element ==
 +
<pre>
 +
<Hotspot>
 +
    <BillboardColorMap>Data/UI/spawner/thumbs/Hotspot/empty.png</BillboardColorMap>
 +
    ...
 +
</Hotspot>
 +
</pre>
 +
 
 +
'''Required''' - String value. Path to image file. If you don't want a billboard image, you can use <code>Data/UI/spawner/thumbs/Hotspot/empty.png</code>.
 +
 
 +
== Hotspot XML -> Script element ==
 +
<pre>
 +
<Hotspot>
 +
    ...
 +
    <Script>hotspots/sound_hotspot.as</Script>
 +
</Hotspot>
 +
</pre>
 +
 
 +
'''Required''' - String value. Path to [[Hotspot Scripting|Hotspot angelscript]]. Relative to <code>Data/Scripts</code> folder.
 +
 
 +
= Item XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Item =
+
= Layered Song XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Layered Song =
+
= Level Meta XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Level Meta =
+
= Material XML =
 +
 
 +
This XML file specifies the sounds that will be played when a character or item interacts with a world object.  It is used to model the sound differences between wood, metal, soil, ice, etc.<br>
 +
 
 +
<code>Data/Materials/default.xml</code> is the global "default" material, if the material isn't specified by the world object.<br>
 +
 
 +
When the engine or a gameplay script detects a physics event, the code will do a lookup against the current material, for an event with that event name. If the event name is found, then the corresponding sound will be triggered.<br>
 +
 
 +
Some of these events and materials might specify modifiers (<code>soft</code>, <code>heavy</code>, etc). If they do, the code will first do the lookup against the <code><events mod="themod"></code> version of the event.<br>
 +
If an event with the given name is not found with that modifier, the code will then lookup a version of the same event name, but with no modifiers specified.<br>
 +
 
 +
Some of the values, if not specified, will look at a global "base" material to find the value of the parameter. <code>max_distance</code> is the only one of those parameters right now.
 +
 
 +
<code>Data/Materials/base.xml</code> is the global "base" material.<br>
 +
 
 +
== Material XML Example ==
 +
From <code>Data/Materials/dirt.xml</code> - this is not the complete contents of that file.
 +
<pre>
 +
<?xml version="1.0" ?>
 +
<material>
 +
    <events>
 +
        <weapon_drop_light soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_light_dirt.xml" attached="true"/>
 +
        <weapon_drop_medium soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_medium_dirt.xml" attached="true"/>
 +
        <weapon_drop_heavy soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_heavy_dirt.xml" attached="true"/>
 +
        <-- Note: more sound events in the real file than just these -->
 +
    </events> 
 +
    <events mod="soft">
 +
        <weapon_drop_light soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
 +
        <weapon_drop_medium soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
 +
        <weapon_drop_heavy soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
 +
    </events>
 +
    <decals>
 +
        <step color="Data/Textures/Decals/Footprints/rabbitdirtprint_c.tga"
 +
              normal="Data/Textures/Decals/Footprints/rabbitdirtprint_n.tga"
 +
              shader="stepdecalfast"/>
 +
        <skid color="Data/Textures/Decals/Footprints/rabbitdirtsmear_c.tga"
 +
              normal="Data/Textures/Decals/Footprints/rabbitdirtsmear_n.tga"
 +
              shader="stepdecalfast"/>
 +
    </decals>
 +
    <particles>
 +
        <step path="Data/Particles/heavydirt.xml"/>
 +
        <skid path="Data/Particles/heavydirt.xml"/>
 +
    </particles>
 +
    <physics hardness = "0.8" friction = "1.0" sharp_penetration = "1.0" />
 +
</material>
 +
</pre>
 +
 
 +
From <code>Data/Materials/default.xml</code>, which is the default Material XML file. It is used when other XML file types call for a Material XML, but one is not specified.<br>
 +
This is the complete contents of that file.
 +
<pre>
 +
<?xml version="1.0" ?>
 +
<material>
 +
    <events>
 +
        <leftrunstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_run.xml" attached="true"/>
 +
        <rightrunstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_run.xml" attached="true"/>
 +
        <leftwallstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_wallrun.xml" attached="true"/>
 +
        <rightwallstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_wallrun.xml" attached="true"/>
 +
        <leftwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_walk.xml" attached="true"/>
 +
        <rightwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_walk.xml" attached="true"/>
 +
        <leftcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_crouchwalk.xml" attached="true"/>
 +
        <rightcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_crouchwalk.xml" attached="true"/>
 +
        <leftcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_crouchwalk.xml" attached="true"/>
 +
        <rightcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_crouchwalk.xml" attached="true"/>
 +
        <land soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_jump_land.xml" attached="true"/>
 +
        <land_soft soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_jump_land_soft.xml" attached="true"/>
 +
        <land_slide soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_jump_land_slide.xml" attached="true"/>
 +
        <slide soundgroup="Data/Sounds/concrete_foley/slide_concrete_short.xml" attached="true"/>
 +
        <kick soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_kick.xml" attached="true"/>
 +
        <sweep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_sweep.xml" attached="true"/>
 +
        <jump soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_jump.xml" attached="true"/>
 +
        <roll soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_roll.xml" attached="true"/>
 +
        <edge_grab soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_edge_grab.xml" attached="true"/>
 +
        <edge_crawl soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_edgecrawl.xml" attached="true"/>
 +
        <bodyfall soundgroup="Data/Sounds/concrete_foley/bf_concrete.xml" attached="true"/>
 +
        <bodyfall_light soundgroup="Data/Sounds/concrete_foley/bf_concrete_light.xml" attached="true"/>
 +
        <bodyfall_medium soundgroup="Data/Sounds/concrete_foley/bf_concrete_medium.xml" attached="true"/>
 +
        <bodyfall_heavy soundgroup="Data/Sounds/concrete_foley/bf_concrete_heavy.xml" attached="true"/>
 +
        <weapon_drop_light soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_light_stone.xml" attached="true"/>
 +
        <weapon_drop_medium soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_medium_stone.xml" attached="true"/>
 +
        <weapon_drop_heavy soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_heavy_stone.xml" attached="true"/>
 +
        <blood_spatter soundgroup="Data/Sounds/blood/spatter_hard.xml"/>
 +
        <blood_drip soundgroup="Data/Sounds/blood/drip_lowpass.xml"/>
 +
    </events>
 +
    <events mod="heavy">
 +
        <leftrunstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_run.xml" attached="true"/>
 +
        <rightrunstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_run.xml" attached="true"/>
 +
        <leftwallstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_wallrun.xml" attached="true"/>
 +
        <rightwallstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_wallrun.xml" attached="true"/>
 +
        <leftwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_walk.xml" attached="true"/>
 +
        <rightwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_walk.xml" attached="true"/>
 +
        <leftcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_crouchwalk.xml" attached="true"/>
 +
        <rightcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_crouchwalk.xml" attached="true"/>
 +
        <leftcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_crouchwalk.xml" attached="true"/>
 +
        <rightcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_crouchwalk.xml" attached="true"/>
 +
        <land soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_jump_land.xml" attached="true"/>
 +
        <land_soft soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_jump_land.xml" attached="true"/>
 +
        <land_slide soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_jump_land.xml" attached="true"/>
 +
        <kick soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_kick.xml" attached="true"/>
 +
        <sweep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_sweep.xml" attached="true"/>
 +
        <jump soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_jump.xml" attached="true"/>
 +
        <roll soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_roll.xml" attached="true"/>
 +
        <edge_grab soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_edge_grab.xml" attached="true"/>
 +
    </events>
 +
    <events mod="soft">
 +
        <weapon_drop_light soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
 +
        <weapon_drop_medium soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
 +
        <weapon_drop_heavy soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
 +
    </events>
 +
    <physics hardness = "1.0" friction = "1.0" sharp_penetration = "0.0" />
 +
</material>
 +
</pre>
 +
 
 +
From <code>Data/Materials/base.xml</code>, which specifies the default '''max_distance''' values for all materials.<br>
 +
This is the complete contents of that file.
 +
<pre>
 +
<?xml version="1.0" ?>
 +
<material>
 +
    <events>
 +
        <leftrunstep max_distance = "40.0"/>
 +
        <rightrunstep max_distance = "40.0"/>
 +
        <leftwallstep max_distance = "40.0"/>
 +
        <rightwallstep max_distance = "40.0"/>
 +
        <leftwalkstep max_distance = "25.0"/>
 +
        <rightwalkstep max_distance = "25.0"/>
 +
        <leftcrouchwalkstep max_distance = "10.0"/>
 +
        <rightcrouchwalkstep max_distance = "10.0"/>
 +
        <land max_distance = "60.0"/>
 +
        <land_soft max_distance = "30.0"/>
 +
        <land_slide max_distance = "20.0"/>
 +
        <slide max_distance = "30.0"/>
 +
        <kick max_distance = "25.0"/>
 +
        <sweep max_distance = "25.0"/>
 +
        <jump max_distance = "40.0"/>
 +
        <roll max_distance = "15.0"/>
 +
        <edge_grab max_distance = "25.0"/>
 +
        <edge_crawl max_distance = "15.0"/>
 +
        <bodyfall max_distance = "80.0"/>
 +
        <bodyfall_light max_distance = "40.0"/>
 +
        <bodyfall_medium max_distance = "60.0"/>
 +
        <bodyfall_heavy max_distance = "80.0"/>
 +
        <weapon_drop_light max_distance = "80.0"/>
 +
        <weapon_drop_medium max_distance = "80.0"/>
 +
        <weapon_drop_heavy max_distance = "80.0"/>
 +
        <blood_spatter max_distance = "30.0"/>
 +
        <blood_drip max_distance = "20.0"/>
 +
        <flip max_distance = "20.0"/>
 +
        <choke_grab max_distance = "10.0"/>;
 +
        <choke_move max_distance = "10.0"/>;
 +
        <choke_fall max_distance = "10.0"/>;
 +
    </events>
 +
    <events mod="heavy">
 +
        <leftrunstep max_distance = "50.0"/>
 +
        <rightrunstep max_distance = "50.0"/>
 +
        <leftwallstep max_distance = "50.0"/>
 +
        <rightwallstep max_distance = "50.0"/>
 +
        <leftwalkstep max_distance = "30.0"/>
 +
        <rightwalkstep max_distance = "30.0"/>
 +
        <leftcrouchwalkstep max_distance = "20.0"/>
 +
        <rightcrouchwalkstep max_distance = "20.0"/>
 +
        <land max_distance = "80.0"/>
 +
        <land_soft max_distance = "40.0"/>
 +
        <land_slide max_distance = "40.0"/>
 +
        <kick max_distance = "30.0"/>
 +
        <sweep max_distance = "30.0"/>
 +
        <jump max_distance = "50.0"/>
 +
        <roll max_distance = "25.0"/>
 +
        <edge_grab max_distance = "40.0"/>
 +
    </events>
 +
</material>
 +
</pre>
 +
 
 +
== Material XML -> Events element ==
 +
<pre>
 +
<material>
 +
    <events>
 +
        ...
 +
    </events>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
Contains a list of collision sound events for the material.
 +
 
 +
=== Events element -> mod attribute ===
 +
 
 +
<pre>
 +
<material>
 +
    <events mod="soft">
 +
        ...
 +
    </events>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
'''Optional''' - String value. Specifies that this list of collision sound events only apply when the given modifier is specified.<br>
 +
The modifiers are different ways the sounds will be presented, such as <code>soft</code>, <code>heavy</code>, etc.
 +
 
 +
== Material XML -> Events element -> Sound element ==
 +
<pre>
 +
<material>
 +
    <events>
 +
        <leftrunstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_run.xml" attached="true" max_distance = "40.0"/>
 +
        ...
 +
    </events>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
The sound (and physical properties of the sound) for a given collision sound event. The name of the element corresponds to the name of the collision sound event (in this example, '''leftrunstep''').
 +
 
 +
=== Sound element -> soundgroup attribute ===
 +
 
 +
<pre>
 +
...
 +
<events>
 +
    <leftrunstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_run.xml"/>
 +
    ...
 +
</events>
 +
...
 +
</pre>
 +
 
 +
'''Optional''' - String value. Specifies the [[Xml File Formats#Sound Group XML|Sound Group XML]] for the material interaction event.<br>
 +
'''TODO:''': Is this really optional? If so, what is the default behavior?
 +
 
 +
=== Sound element -> attached attribute ===
 +
 
 +
<pre>
 +
...
 +
<events>
 +
    <leftrunstep attached="true"/>
 +
    ...
 +
</events>
 +
...
 +
</pre>
 +
 
 +
'''Optional''' - Boolean value. '''Default''': false<br>
 +
If true, the sound (group) will be played as a sound that is attached to the character that triggered the collision sound event.
 +
 
 +
=== Sound element -> max_distance attribute ===
 +
 
 +
<pre>
 +
...
 +
<events>
 +
    <leftrunstep max_distance = "40.0"/>
 +
    ...
 +
</events>
 +
...
 +
</pre>
 +
 
 +
'''Optional''' - Decimal value. '''Default''': 0.0<br>
 +
The max distance that the sound will still be audible to the player.<br>
 +
If the value is 0.0, then the max distance will be considered infinite.<br>
 +
If it is not specified for a given sound collision event, then the corresponding value in <code>Data/Materials/base.xml</code> will be used instead.
 +
 
 +
== Material XML -> Decals element ==
 +
 
 +
<pre>
 +
<material>
 +
    ...
 +
    <decals>
 +
        ...
 +
    </decals>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
Contains a list of collision decal events for the material.
 +
 
 +
== Material XML -> Decals element -> Decal element ==
 +
 
 +
<pre>
 +
<material>
 +
    ...
 +
    <decals>
 +
        <step color="Data/Textures/Decals/Footprints/rabbitdirtprint_c.tga"
 +
              normal="Data/Textures/Decals/Footprints/rabbitdirtprint_n.tga"
 +
              shader="stepdecalfast"/>
 +
        <skid color="Data/Textures/Decals/Footprints/rabbitdirtsmear_c.tga"
 +
              normal="Data/Textures/Decals/Footprints/rabbitdirtsmear_n.tga"
 +
              shader="stepdecalfast"/>
 +
        ...
 +
    </decals>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
The decal (and rendering properties of the decal) for a given collision decal event. The name of the element corresponds to the name of the collision decal event (in these examples, '''step''' and '''skid''').
 +
 
 +
=== Decal element -> color attribute ===
 +
 
 +
<pre>
 +
<material>
 +
    ...
 +
    <decals>
 +
        <step color="Data/Textures/Decals/Footprints/rabbitdirtprint_c.tga"/>
 +
        ...
 +
    </decals>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
'''Required''' - String value. Specifies the path to the image for the decal's color texture.
 +
 
 +
=== Decal element -> normal attribute ===
 +
 
 +
<pre>
 +
<material>
 +
    ...
 +
    <decals>
 +
        <step normal="Data/Textures/Decals/Footprints/rabbitdirtprint_n.tga"/>
 +
        ...
 +
    </decals>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
'''Required''' - String value. Specifies the path to the image for the decal's normal texture.
 +
 
 +
=== Decal element -> shader attribute ===
 +
 
 +
<pre>
 +
<material>
 +
    ...
 +
    <decals>
 +
        <step shader="stepdecalfast"/>
 +
        ...
 +
    </decals>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
'''Required''' - String value. Specifies the shader name that will be used when rendering the decal.
 +
 
 +
== Material XML -> Particles element ==
 +
 
 +
<pre>
 +
<material>
 +
    ...
 +
    <particles>
 +
        ...
 +
    </particles>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
Contains a list of collision particle events for the material.
 +
 
 +
== Material XML -> Particles element -> Particle element ==
 +
 
 +
<pre>
 +
<material>
 +
    ...
 +
    <particles>
 +
        <step path="Data/Particles/heavydirt.xml"/>
 +
        <skid path="Data/Particles/heavydirt.xml"/>
 +
    </particles>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
The particle for a given collision particle event. The name of the element corresponds to the name of the collision particle event (in these examples, '''step''' and '''skid''').
 +
 
 +
=== Particle element -> path attribute ===
 +
 
 +
<pre>
 +
<material>
 +
    ...
 +
    <particles>
 +
        <step path="Data/Particles/heavydirt.xml"/>
 +
        ...
 +
    </particles>
 +
    ...
 +
</material>
 +
</pre>
 +
 
 +
'''Required''' - String value. Path to [[Xml File Formats#Particle XML|Particle XML]]
 +
 
 +
== Material XML -> Physics element ==
 +
 
 +
<pre>
 +
<material>
 +
    <physics hardness = "0.8" friction = "1.0" sharp_penetration = "1.0" />
 +
</material>
 +
</pre>
 +
 
 +
The physics properties of the the material. Collision gameplay events will use these properties to determine how to make other objects respond when they collide with the object this material is applied to.
 +
 
 +
=== Physics element -> hardness attribute ===
 +
 
 +
<pre>
 +
<material>
 +
    <physics hardness = "0.8"/>
 +
</material>
 +
</pre>
 +
 
 +
'''Optional''' - Decimal value. '''Default''': 1.0<br>
 +
'''TODO: Describe'''
 +
 
 +
=== Physics element -> friction attribute ===
 +
 
 +
<pre>
 +
<material>
 +
    <physics friction = "1.0"/>
 +
</material>
 +
</pre>
 +
 
 +
'''Optional''' - Decimal value. '''Default''': 1.0<br>
 +
The friction between any other object and the object this material is applied to.<br>
 +
In real life this would depend on the materials for both objects, but the game makes simplifying assumptions to make the mapping a bit less complicated.
 +
 
 +
=== Physics element -> sharp_penetration attribute ===
 +
 
 +
<pre>
 +
<material>
 +
    <physics sharp_penetration = "1.0"/>
 +
</material>
 +
</pre>
 +
 
 +
'''Optional''' - Decimal value. '''Default''': 0.0<br>
 +
'''TODO: Describe'''
 +
 
 +
= Mod XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Material =
+
= Music XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Mod =
+
= Nav Mesh Meta XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Music =
+
= Object XML =
 +
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]].<br>
 +
 
 +
[[Overgrowth_Object_Xml_File_Format|See the Object XML Format article for more detailed information]].<br>
 +
An example is shown below:
 +
{{:Overgrowth_Object_Xml_File_Format}}
 +
 
 +
= Particle XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Nav Mesh Meta =
+
= Path XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Object =
+
= Reaction XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Particle =
+
= Retarget XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Path =
+
= Rig XML =
 +
 
 +
This is the XML file for a character skeleton. It binds a [[Xml File Formats#Character XML|Character XML]] file to an [[Character Scripting|AI angelscript]] file.<br>
 +
When a level references a character, this is the file type that is referenced.
 +
 
 +
== Rig XML Example ==
 +
<pre>
 +
<?xml version="1.0" ?>
 +
<rig bone_path = "Data/Skeletons/r_wolf2.phxbn"
 +
    model_path = "Data/Models/Characters/IGF_Wolf/IGF_Wolf.obj"
 +
    mass_path = "Data/Skeletons/r_lt_dog.xml"/>
 +
</pre>
 +
 
 +
== Rig element -> bone_path attribute ==
 +
<pre>
 +
<rig bone_path = "Data/Skeletons/r_wolf2.phxbn"/>
 +
</pre>
 +
 
 +
'''Required''' - String value. Path to the skeleton file, using the custom Phoenix Engine skeleton file type ([[Binary File Formats#PHXBN|PHXBN]]. This file MUST have been exported using the mesh specified in <code>model_path</code>.
 +
 
 +
== Rig element -> model_path attribute ==
 +
<pre>
 +
<rig model_path = "Data/Models/Characters/IGF_Wolf/IGF_Wolf.obj"/>
 +
</pre>
 +
 
 +
'''Required''' - String value. Path to Obj model file to use as skinned the character mesh. This file MUST be the same as the one used when exporting the skeleton specified in <code>bone_path</code>.
 +
 
 +
== Rig element -> mass_path attribute ==
 +
<pre>
 +
<rig mass_path = "Data/Skeletons/r_lt_dog.xml"/>
 +
</pre>
 +
 
 +
'''Optional''' - String value. Path to [[Xml File Formats#Rig XML|Rig XML]]. Used to override the current skeleton with the bone masses from a different skeleton.<br>
 +
'''TODO''': Why you'd want to do this? Who knows! -merlyn
 +
 
 +
= Shader Preload XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Reaction =
+
= Sound Group XML =
 +
 
 +
This is the XML file that describes a group of sounds. One of those sounds will be randomly chosen and played whenever the sound group is triggered.<br>
  
'''TODO:'''
+
The file will specify a count of the number of <code>variants</code> that exist, and a sound file will need to exist for each of those variants.<br>
 +
For a Sound Group XML with three variants, the XML file and and corresponding sound variants should follow a naming scheme like this:
 +
* <code>Data/Sounds/example_subdir/example_sound_group.xml</code><br>
 +
* <code>Data/Sounds/example_subdir/example_sound_group_1.wav</code><br>
 +
* <code>Data/Sounds/example_subdir/example_sound_group_2.wav</code><br>
 +
* <code>Data/Sounds/example_subdir/example_sound_group_3.wav</code><br>
 +
 
 +
== Sound Group XML Example ==
 +
<pre>
 +
<?xml version="1.0" ?>
 +
<soundgroup
 +
    variants = "3"
 +
    delay = "5.3"
 +
    volume = "0.1"
 +
    max_distance = "77.5"
 +
/>
 +
</pre>
  
= Retarget =
+
== Sound Group element -> variants attribute ==
 +
<pre>
 +
<soundgroup variants = "3" />
 +
</pre>
  
'''TODO:'''
+
'''Optional''' - Integer value. '''Default''': 1.<br>
 +
The count of variants. There must also be a corresponding <code>SoundGroupXmlName_1.wav</code> file for every variant, numbered incrementally up to the variant count.<br>
 +
E.g. if there was 3 variants, there would need to be files named <code>SoundGroupXmlName_1.wav</code>, <code>SoundGroupXmlName_2.wav</code>, and <code>SoundGroupXmlName_3.wav</code>.
  
= Rig =
+
== Sound Group element -> delay attribute ==
 +
<pre>
 +
<soundgroup delay = "5.3" />
 +
</pre>
  
'''TODO:'''
+
'''Optional''' - Decimal value. '''Default''': 0.0.<br>
 +
A delay to add to the start of sound playback, in seconds.
  
= Shader Preload =
+
== Sound Group element -> volume attribute ==
 +
<pre>
 +
<soundgroup volume = "0.1" />
 +
</pre>
  
'''TODO:'''
+
'''Optional''' - Decimal value. '''Default''': 1.0.<br>
 +
The volume to play back the sound.<br>
 +
This is further multiplied by the gain specified when triggering the sound group in gameplay code.
  
= Sound Group =
+
== Sound Group element -> max_distance attribute ==
 +
<pre>
 +
<soundgroup max_distance = "77.5" />
 +
</pre>
  
'''TODO:'''
+
'''Optional''' - Decimal value. '''Default''': 30.0.<br>
 +
The maximum distance that the sound can be heard by the player.<br>
 +
It will be overridden by the <code>max_distance</code> in the collision sound event, in the [[Xml File Formats#Material XML -> Events element -> Event element|Material XML]], if specified for the given collision sound event.
  
= Synced Animation Group =
+
= Synced Animation Group XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Version Manifest =
+
= Version Manifest XML =
  
 
'''TODO:'''
 
'''TODO:'''
  
= Voice =
+
= Voice XML =
  
 
'''TODO:'''
 
'''TODO:'''

Latest revision as of 11:11, 10 September 2023

Contents

TODO:

Level, Saved Object, Prefab - These have more confusing schemas, to the point where I'm not entirely sure they're distinct types from one another, and I haven't nailed them down yet -merlyn

Actor XML

This is the top-level XML file for an NPC or combat character. It binds a Character XML file to an AI angelscript file.
When a level references a character, this is the file type that is referenced.

Actor XML Example

<?xml version="1.0" ?>
<Actor>
    <Character>Data/Characters/rabbot.xml</Character>
    <ControlScript>enemycontrol.as</ControlScript>
</Actor>

Actor XML -> Character element

<Actor>
    <Character>Data/Characters/rabbot.xml</Character>
    ...
</Actor>

Required - String value. Path to Character XML

Actor XML -> ControlScript element

<Actor>
    ...
    <ControlScript>enemycontrol.as</ControlScript>
</Actor>

Required - String value. Path to AI angelscript. Relative to Data/Scripts folder

Asset Preload XML

TODO:

Attachment XML

TODO:

Attack XML

TODO:

Character XML

TODO:

Decal XML

TODO:

Events XML

TODO:

Hotspot XML

This is the top-level XML file for a hotspot game object. It specifies the billboard image, and the Hotspot angelscript file.
When a level references a hotspot, this is the file type that is referenced.

Hotspot XML Example

<?xml version="1.0" ?>
<Type>generic</Type>
<Hotspot>
    <BillboardColorMap>Data/UI/spawner/thumbs/Hotspot/empty.png</BillboardColorMap>
    <Script>hotspots/sound_hotspot.as</Script>
</Hotspot>

Hotspot XML -> Type element

<Type>generic</Type>
<Hotspot>
    ...
</Hotspot>

Required - String value. This should always have the value <Type>generic</Type>.
Note: Having two document elements is not valid XML, and I'm not sure what purpose this element serves. But leave it in, since all the hotspots do it. -merlyn

Hotspot XML -> Character element

<Hotspot>
    <BillboardColorMap>Data/UI/spawner/thumbs/Hotspot/empty.png</BillboardColorMap>
    ...
</Hotspot>

Required - String value. Path to image file. If you don't want a billboard image, you can use Data/UI/spawner/thumbs/Hotspot/empty.png.

Hotspot XML -> Script element

<Hotspot>
    ...
    <Script>hotspots/sound_hotspot.as</Script>
</Hotspot>

Required - String value. Path to Hotspot angelscript. Relative to Data/Scripts folder.

Item XML

TODO:

Layered Song XML

TODO:

Level Meta XML

TODO:

Material XML

This XML file specifies the sounds that will be played when a character or item interacts with a world object. It is used to model the sound differences between wood, metal, soil, ice, etc.

Data/Materials/default.xml is the global "default" material, if the material isn't specified by the world object.

When the engine or a gameplay script detects a physics event, the code will do a lookup against the current material, for an event with that event name. If the event name is found, then the corresponding sound will be triggered.

Some of these events and materials might specify modifiers (soft, heavy, etc). If they do, the code will first do the lookup against the <events mod="themod"> version of the event.
If an event with the given name is not found with that modifier, the code will then lookup a version of the same event name, but with no modifiers specified.

Some of the values, if not specified, will look at a global "base" material to find the value of the parameter. max_distance is the only one of those parameters right now.

Data/Materials/base.xml is the global "base" material.

Material XML Example

From Data/Materials/dirt.xml - this is not the complete contents of that file.

<?xml version="1.0" ?>
<material>
    <events>
        <weapon_drop_light soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_light_dirt.xml" attached="true"/>
        <weapon_drop_medium soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_medium_dirt.xml" attached="true"/>
        <weapon_drop_heavy soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_heavy_dirt.xml" attached="true"/>
        <-- Note: more sound events in the real file than just these -->
    </events>   
    <events mod="soft">
        <weapon_drop_light soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
        <weapon_drop_medium soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
        <weapon_drop_heavy soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
    </events>
    <decals>
        <step color="Data/Textures/Decals/Footprints/rabbitdirtprint_c.tga"
              normal="Data/Textures/Decals/Footprints/rabbitdirtprint_n.tga"
              shader="stepdecalfast"/>
        <skid color="Data/Textures/Decals/Footprints/rabbitdirtsmear_c.tga"
              normal="Data/Textures/Decals/Footprints/rabbitdirtsmear_n.tga"
              shader="stepdecalfast"/>
    </decals>
    <particles>
        <step path="Data/Particles/heavydirt.xml"/>
        <skid path="Data/Particles/heavydirt.xml"/>
    </particles>
    <physics hardness = "0.8" friction = "1.0" sharp_penetration = "1.0" />
</material>

From Data/Materials/default.xml, which is the default Material XML file. It is used when other XML file types call for a Material XML, but one is not specified.
This is the complete contents of that file.

<?xml version="1.0" ?>
<material>
    <events>
        <leftrunstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_run.xml" attached="true"/>
        <rightrunstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_run.xml" attached="true"/>
        <leftwallstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_wallrun.xml" attached="true"/>
        <rightwallstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_wallrun.xml" attached="true"/>
        <leftwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_walk.xml" attached="true"/>
        <rightwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_walk.xml" attached="true"/>
        <leftcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_crouchwalk.xml" attached="true"/>
        <rightcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_crouchwalk.xml" attached="true"/>
        <leftcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_crouchwalk.xml" attached="true"/>
        <rightcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_crouchwalk.xml" attached="true"/>
        <land soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_jump_land.xml" attached="true"/>
        <land_soft soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_jump_land_soft.xml" attached="true"/>
        <land_slide soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_jump_land_slide.xml" attached="true"/>
        <slide soundgroup="Data/Sounds/concrete_foley/slide_concrete_short.xml" attached="true"/>
        <kick soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_kick.xml" attached="true"/>
        <sweep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_sweep.xml" attached="true"/>
        <jump soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_jump.xml" attached="true"/>
        <roll soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_roll.xml" attached="true"/>
        <edge_grab soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_edge_grab.xml" attached="true"/>
        <edge_crawl soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_edgecrawl.xml" attached="true"/>
        <bodyfall soundgroup="Data/Sounds/concrete_foley/bf_concrete.xml" attached="true"/>
        <bodyfall_light soundgroup="Data/Sounds/concrete_foley/bf_concrete_light.xml" attached="true"/>
        <bodyfall_medium soundgroup="Data/Sounds/concrete_foley/bf_concrete_medium.xml" attached="true"/>
        <bodyfall_heavy soundgroup="Data/Sounds/concrete_foley/bf_concrete_heavy.xml" attached="true"/>
        <weapon_drop_light soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_light_stone.xml" attached="true"/>
        <weapon_drop_medium soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_medium_stone.xml" attached="true"/>
        <weapon_drop_heavy soundgroup="Data/Sounds/weapon_foley/impact/weapon_drop_heavy_stone.xml" attached="true"/>
        <blood_spatter soundgroup="Data/Sounds/blood/spatter_hard.xml"/>
        <blood_drip soundgroup="Data/Sounds/blood/drip_lowpass.xml"/>
    </events>
    <events mod="heavy">
        <leftrunstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_run.xml" attached="true"/>
        <rightrunstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_run.xml" attached="true"/>
        <leftwallstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_wallrun.xml" attached="true"/>
        <rightwallstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_wallrun.xml" attached="true"/>
        <leftwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_walk.xml" attached="true"/>
        <rightwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_walk.xml" attached="true"/>
        <leftcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_crouchwalk.xml" attached="true"/>
        <rightcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_crouchwalk.xml" attached="true"/>
        <leftcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_crouchwalk.xml" attached="true"/>
        <rightcrouchwalkstep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_crouchwalk.xml" attached="true"/>
        <land soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_jump_land.xml" attached="true"/>
        <land_soft soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_jump_land.xml" attached="true"/>
        <land_slide soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_jump_land.xml" attached="true"/>
        <kick soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_kick.xml" attached="true"/>
        <sweep soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_sweep.xml" attached="true"/>
        <jump soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_jump.xml" attached="true"/>
        <roll soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_roll.xml" attached="true"/>
        <edge_grab soundgroup="Data/Sounds/concrete_foley/fs_heavy_concrete_edge_grab.xml" attached="true"/>
    </events>
    <events mod="soft">
        <weapon_drop_light soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
        <weapon_drop_medium soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
        <weapon_drop_heavy soundgroup="Data/Sounds/weapon_foley/impact/soft_bag_on_hard.xml" attached="true"/>
    </events>
    <physics hardness = "1.0" friction = "1.0" sharp_penetration = "0.0" />
</material>

From Data/Materials/base.xml, which specifies the default max_distance values for all materials.
This is the complete contents of that file.

<?xml version="1.0" ?>
<material>
    <events>
        <leftrunstep max_distance = "40.0"/>
        <rightrunstep max_distance = "40.0"/>
        <leftwallstep max_distance = "40.0"/>
        <rightwallstep max_distance = "40.0"/>
        <leftwalkstep max_distance = "25.0"/>
        <rightwalkstep max_distance = "25.0"/>
        <leftcrouchwalkstep max_distance = "10.0"/>
        <rightcrouchwalkstep max_distance = "10.0"/>
        <land max_distance = "60.0"/>
        <land_soft max_distance = "30.0"/>
        <land_slide max_distance = "20.0"/>
        <slide max_distance = "30.0"/>
        <kick max_distance = "25.0"/>
        <sweep max_distance = "25.0"/>
        <jump max_distance = "40.0"/>
        <roll max_distance = "15.0"/>
        <edge_grab max_distance = "25.0"/>
        <edge_crawl max_distance = "15.0"/>
        <bodyfall max_distance = "80.0"/>
        <bodyfall_light max_distance = "40.0"/>
        <bodyfall_medium max_distance = "60.0"/>
        <bodyfall_heavy max_distance = "80.0"/>
        <weapon_drop_light max_distance = "80.0"/>
        <weapon_drop_medium max_distance = "80.0"/>
        <weapon_drop_heavy max_distance = "80.0"/>
        <blood_spatter max_distance = "30.0"/>
        <blood_drip max_distance = "20.0"/>
        <flip max_distance = "20.0"/>
        <choke_grab max_distance = "10.0"/>;
        <choke_move max_distance = "10.0"/>;
        <choke_fall max_distance = "10.0"/>;
    </events>
    <events mod="heavy">
        <leftrunstep max_distance = "50.0"/>
        <rightrunstep max_distance = "50.0"/>
        <leftwallstep max_distance = "50.0"/>
        <rightwallstep max_distance = "50.0"/>
        <leftwalkstep max_distance = "30.0"/>
        <rightwalkstep max_distance = "30.0"/>
        <leftcrouchwalkstep max_distance = "20.0"/>
        <rightcrouchwalkstep max_distance = "20.0"/>
        <land max_distance = "80.0"/>
        <land_soft max_distance = "40.0"/>
        <land_slide max_distance = "40.0"/>
        <kick max_distance = "30.0"/>
        <sweep max_distance = "30.0"/>
        <jump max_distance = "50.0"/>
        <roll max_distance = "25.0"/>
        <edge_grab max_distance = "40.0"/>
    </events>
</material>

Material XML -> Events element

<material>
    <events>
        ...
    </events>
    ...
</material>

Contains a list of collision sound events for the material.

Events element -> mod attribute

<material>
    <events mod="soft">
        ...
    </events>
    ...
</material>

Optional - String value. Specifies that this list of collision sound events only apply when the given modifier is specified.
The modifiers are different ways the sounds will be presented, such as soft, heavy, etc.

Material XML -> Events element -> Sound element

<material>
    <events>
        <leftrunstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_run.xml" attached="true" max_distance = "40.0"/>
        ...
    </events>
    ...
</material>

The sound (and physical properties of the sound) for a given collision sound event. The name of the element corresponds to the name of the collision sound event (in this example, leftrunstep).

Sound element -> soundgroup attribute

...
<events>
    <leftrunstep soundgroup="Data/Sounds/concrete_foley/fs_light_concrete_run.xml"/>
    ...
</events>
...

Optional - String value. Specifies the Sound Group XML for the material interaction event.
TODO:: Is this really optional? If so, what is the default behavior?

Sound element -> attached attribute

...
<events>
    <leftrunstep attached="true"/>
    ...
</events>
...

Optional - Boolean value. Default: false
If true, the sound (group) will be played as a sound that is attached to the character that triggered the collision sound event.

Sound element -> max_distance attribute

...
<events>
    <leftrunstep max_distance = "40.0"/>
    ...
</events>
...

Optional - Decimal value. Default: 0.0
The max distance that the sound will still be audible to the player.
If the value is 0.0, then the max distance will be considered infinite.
If it is not specified for a given sound collision event, then the corresponding value in Data/Materials/base.xml will be used instead.

Material XML -> Decals element

<material>
    ...
    <decals>
        ...
    </decals>
    ...
</material>

Contains a list of collision decal events for the material.

Material XML -> Decals element -> Decal element

<material>
    ...
    <decals>
        <step color="Data/Textures/Decals/Footprints/rabbitdirtprint_c.tga"
              normal="Data/Textures/Decals/Footprints/rabbitdirtprint_n.tga"
              shader="stepdecalfast"/>
        <skid color="Data/Textures/Decals/Footprints/rabbitdirtsmear_c.tga"
              normal="Data/Textures/Decals/Footprints/rabbitdirtsmear_n.tga"
              shader="stepdecalfast"/>
        ...
    </decals>
    ...
</material>

The decal (and rendering properties of the decal) for a given collision decal event. The name of the element corresponds to the name of the collision decal event (in these examples, step and skid).

Decal element -> color attribute

<material>
    ...
    <decals>
        <step color="Data/Textures/Decals/Footprints/rabbitdirtprint_c.tga"/>
        ...
    </decals>
    ...
</material>

Required - String value. Specifies the path to the image for the decal's color texture.

Decal element -> normal attribute

<material>
    ...
    <decals>
        <step normal="Data/Textures/Decals/Footprints/rabbitdirtprint_n.tga"/>
        ...
    </decals>
    ...
</material>

Required - String value. Specifies the path to the image for the decal's normal texture.

Decal element -> shader attribute

<material>
    ...
    <decals>
        <step shader="stepdecalfast"/>
        ...
    </decals>
    ...
</material>

Required - String value. Specifies the shader name that will be used when rendering the decal.

Material XML -> Particles element

<material>
    ...
    <particles>
        ...
    </particles>
    ...
</material>

Contains a list of collision particle events for the material.

Material XML -> Particles element -> Particle element

<material>
    ...
    <particles>
        <step path="Data/Particles/heavydirt.xml"/>
        <skid path="Data/Particles/heavydirt.xml"/>
    </particles>
    ...
</material>

The particle for a given collision particle event. The name of the element corresponds to the name of the collision particle event (in these examples, step and skid).

Particle element -> path attribute

<material>
    ...
    <particles>
        <step path="Data/Particles/heavydirt.xml"/>
        ...
    </particles>
    ...
</material>

Required - String value. Path to Particle XML

Material XML -> Physics element

<material>
    <physics hardness = "0.8" friction = "1.0" sharp_penetration = "1.0" />
</material>

The physics properties of the the material. Collision gameplay events will use these properties to determine how to make other objects respond when they collide with the object this material is applied to.

Physics element -> hardness attribute

<material>
    <physics hardness = "0.8"/>
</material>

Optional - Decimal value. Default: 1.0
TODO: Describe

Physics element -> friction attribute

<material>
    <physics friction = "1.0"/>
</material>

Optional - Decimal value. Default: 1.0
The friction between any other object and the object this material is applied to.
In real life this would depend on the materials for both objects, but the game makes simplifying assumptions to make the mapping a bit less complicated.

Physics element -> sharp_penetration attribute

<material>
    <physics sharp_penetration = "1.0"/>
</material>

Optional - Decimal value. Default: 0.0
TODO: Describe

Mod XML

TODO:

Music XML

TODO:

Nav Mesh Meta XML

TODO:

Object XML

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.

See the Object XML Format article for more detailed information.
An example is shown below:

<?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>


Particle XML

TODO:

Path XML

TODO:

Reaction XML

TODO:

Retarget XML

TODO:

Rig XML

This is the XML file for a character skeleton. It binds a Character XML file to an AI angelscript file.
When a level references a character, this is the file type that is referenced.

Rig XML Example

<?xml version="1.0" ?>
<rig bone_path = "Data/Skeletons/r_wolf2.phxbn"
     model_path = "Data/Models/Characters/IGF_Wolf/IGF_Wolf.obj"
     mass_path = "Data/Skeletons/r_lt_dog.xml"/>

Rig element -> bone_path attribute

<rig bone_path = "Data/Skeletons/r_wolf2.phxbn"/>

Required - String value. Path to the skeleton file, using the custom Phoenix Engine skeleton file type (PHXBN. This file MUST have been exported using the mesh specified in model_path.

Rig element -> model_path attribute

<rig model_path = "Data/Models/Characters/IGF_Wolf/IGF_Wolf.obj"/>

Required - String value. Path to Obj model file to use as skinned the character mesh. This file MUST be the same as the one used when exporting the skeleton specified in bone_path.

Rig element -> mass_path attribute

<rig mass_path = "Data/Skeletons/r_lt_dog.xml"/>

Optional - String value. Path to Rig XML. Used to override the current skeleton with the bone masses from a different skeleton.
TODO: Why you'd want to do this? Who knows! -merlyn

Shader Preload XML

TODO:

Sound Group XML

This is the XML file that describes a group of sounds. One of those sounds will be randomly chosen and played whenever the sound group is triggered.

The file will specify a count of the number of variants that exist, and a sound file will need to exist for each of those variants.
For a Sound Group XML with three variants, the XML file and and corresponding sound variants should follow a naming scheme like this:

  • Data/Sounds/example_subdir/example_sound_group.xml
  • Data/Sounds/example_subdir/example_sound_group_1.wav
  • Data/Sounds/example_subdir/example_sound_group_2.wav
  • Data/Sounds/example_subdir/example_sound_group_3.wav

Sound Group XML Example

<?xml version="1.0" ?>
<soundgroup
    variants = "3"
    delay = "5.3"
    volume = "0.1"
    max_distance = "77.5"
/>

Sound Group element -> variants attribute

<soundgroup variants = "3" />

Optional - Integer value. Default: 1.
The count of variants. There must also be a corresponding SoundGroupXmlName_1.wav file for every variant, numbered incrementally up to the variant count.
E.g. if there was 3 variants, there would need to be files named SoundGroupXmlName_1.wav, SoundGroupXmlName_2.wav, and SoundGroupXmlName_3.wav.

Sound Group element -> delay attribute

<soundgroup delay = "5.3" />

Optional - Decimal value. Default: 0.0.
A delay to add to the start of sound playback, in seconds.

Sound Group element -> volume attribute

<soundgroup volume = "0.1" />

Optional - Decimal value. Default: 1.0.
The volume to play back the sound.
This is further multiplied by the gain specified when triggering the sound group in gameplay code.

Sound Group element -> max_distance attribute

<soundgroup max_distance = "77.5" />

Optional - Decimal value. Default: 30.0.
The maximum distance that the sound can be heard by the player.
It will be overridden by the max_distance in the collision sound event, in the Material XML, if specified for the given collision sound event.

Synced Animation Group XML

TODO:

Version Manifest XML

TODO:

Voice XML

TODO: