XML/Resource

From MegaGlest
Revision as of 20:10, 17 June 2011 by Hofmic (talk) (It's a start. I'll finish later. For now, syntax highlighting. Comments were removed, will be replaced with proper summaries later.)
Jump to: navigation, search

Game resources are specified under the resources directory of the tech tree. Each resource will have it's own subdirectory and a resource specification file with the same name as the resource, but ending in .xml.

Note that there are 4 types of resources and that only one of the below can be specified for a single resource.

Full XML Example

<?xml version="1.0" standalone="no"?>
<resource>
    <image path="images/image.bmp"/>
    <type value="static"/>
    <type value="consumable">
        <interval value="30"/>
    </type>
    <type value="tech">
        <model path="models/gold.g3d"/>
        <default-amount value="1500"/>
        <resource-number value="1"/>
    </type>
    <type value="tileset">
        <default-amount value="300"/> 
        <tileset-object value="1"/>
    </type>
</resource>

See also