Configuration files syntax
- Last UpdatedDec 06, 2023
- 2 minute read
Several files adopt the hierarchically structured Application configuration file XML file format. At the root, there is the <config> tag.
Code example
This is an example of code extracted from the config.xml file using the <config> tag.
<config version="1.0">
<struct name="Platform">
<struct name="input">
<item name="enableSpaceNavigator" type="sbool" value="False" description="Enable the SpaceNavigator controller" constraints="" />
<item name="enableWiimote" type="sbool" value="False" description="Enable the WiiMote controller" constraints="" />
<item name="enableWiimoteMT" type="sbool" value="True" description="Enable the WiiMote MultiThread code" constraints="" />
</struct>
<struct name="startup">
<item name="startFrame" type="sint" value="1" description="First game frame to be rendered. The App will execute i_startFrame game frames before rendering a frame and giving user control. (1 to launch normally)" constraints="range:1 inf" />
<item name="randSeed" type="sint" value="1" description="Random seed (if 0 it's random)" constraints="range:0 inf" />
<item name="runSpeed" type="sfloat" value="1.0000" description="Appllication execution speed multiplier" constraints="range:0 inf" />
</struct>
<struct name="sound">
<item name="enable" type="sbool" value="True" description="Enable sounds/musics effects" constraints="" />
</struct>
<struct name="grab">
<item name="enable" type="sbool" value="False" description="Enable grabbing" constraints="" />
<item name="alpha" type="sbool" value="True" description="Write images with alpha channel" constraints="" />
<item name="compress" type="sbool" value="True" description="Write compressed images" constraints="" />
<item name="numFrames" type="sint" value="-1" description="Number of frames to grab (-1 is infinite grabbing)" constraints="range:-1 inf" />
<item name="numThreads" type="sint" value="0" description="Number of grabbing threads (0 is no threads)" constraints="range:0 inf" />
<item name="name" type="sstring" value="grab_radix" description="File Name of the grabbed files" constraints="" />
<item name="dir" type="sstring" value="./grab/" description="Directory where the files will be stored" constraints="" /> <struct name="printResolution">
<item name="enable" type="sbool" value="False" description="Enable/Disable" constraints="" />
<item name="numDiv" type="sint" value="3" description="Number of sub divisions" constraints="range:1 inf" />
</struct>
</struct>
<struct name="retroCompatibility">
<item name="supportOldNamesFormat" type="sbool" value="True" description="The engine will automatically look for names without the '|' character" constraints="" />
</struct>
<struct name="dirs">
<item name="textures" type="sstring" value="./GameData/Textures/;./GameData/Lightmaps/;./GameData/Menutextures/;./GameData/TexturesCache/" description="Textures directories (comma separated)" constraints="" />
<item name="models" type="sstring" value="./GameData/Models/" description="Models directory" constraints="" />
<item name="movies" type="sstring" value="./GameData/Movies/" description="Movies directory" constraints="" />
<item name="scripts" type="sstring" value="./GameData/Scripts/" description="Scripts directory" constraints="" />
<item name="shaders" type="sstring" value="./GameData/Shaders/" description="Shaders directory" constraints="" />
<item name="streams" type="sstring" value="./GameData/Sounds/" description="Music Streams directory" constraints="" />
<item name="sounds" type="sstring" value="./GameData/Sounds/" description="Sounds directory" constraints="" />
</struct>
<struct name="debug">
<item name="enableLog" type="sbool" value="False" description="Enable messages logging" constraints="" />
<item name="disableAssert" type="sbool" value="False" description="Disable Asserts display (but not the assert code)" constraints="" />
</struct>
</struct>
....
</config>