GAE/Resource XML

From MegaGlest
Revision as of 19:35, 28 November 2008 by Daniel Santos (talk) (Page creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

<?xml version="1.0" standalone="no"?>

<resource>
    <image path="images/image.bmp"/>    <!-- This icon will be displayed on the hud to show how
                                             many resources are available -->

    <type value="static"/>              <!-- Static Resources are "Checked in" when created and
                                             "Checked out" when used. -->

            <-- or -->

    <type value="consumable">           <!-- Consumable resources are created and used whenever the
                                             timer indicates an interval has passed. -->
        <interval value="30"/>
    </type>

            <-- or -->

    <type value="tech">                 <!-- Tech Resources are maps to a Custom Map Object and can
                                             be harvested -->
        <model path="models/gold.g3d"/> <!-- Path to the .g3d model used to display the resouce as
                                             it's being carried by a harvester unit in game. -->
        <default-amount value="1500"/>  <!-- How much can be harvested before the object is removed
                                             from the Map -->
        <resource-number value="1"/>    <!-- Maps the resource to the custom Resource used by the
                                             Map Editor -->
    </type>

            <-- or -->

    <type value="tileset">              <!-- Tileset Resources are mapped to a default Map object,
                                             and can be harvested -->
        <default-amount value="300"/> 
        <tileset-object value="1"/>     <!-- Maps the resource to the tileset object used by the
                                             Map Editor -->
    </type>

<-- GAE Only -->

    <display value="true|false"/>       <!-- (Optional) Rather or not this resource should be
                                             displayed or hidden.  The default is non-hidden. -->
<-- /GAE Only -->

</resource>


Back to GAE XML Reference