The Glest Wiki
(It's a start. I'll finish later. For now, syntax highlighting. Comments were removed, will be replaced with proper summaries later.)
(Expansion!)
Line 23: Line 23:
 
</resource>
 
</resource>
 
</syntaxhighlight>
 
</syntaxhighlight>
  +
  +
==Explanation==
  +
===image===
  +
This is the path of the resource's image, which will be displayed on the top with the [[HUD]], unless the resource is a hidden resource (which means it will not appear on the HUD, GAE only), it needs an image to accompany it.
  +
  +
===type===
  +
The main body of the resource, there is only '''ONE''' type tag. The above example has more simply because its shows all the differing possibilities based on the different choices of the type. The type refers to how the resource is controlled. A static resource can only be added from production, morphing, upgrades, or [[GAE/Generate|generation]]. A consumable is like a static resource, but are used in cycles. A tech resource is harvested from resource nodes placed on the map. A tileset resource is harvested from a specific tileset object.
  +
  +
====static====
  +
If static is chosen, there are no needed attributes.
  +
  +
====consumable====
  +
Consumables only have a single attribute, the interval, which is how often the resources are checked for the necessary amounts (and thus how fast units can starve if there isn't enough).
  +
  +
====tech====
  +
Tech resources need a link to the G3D model that will be displayed, the amount that will be in the resource, and the resource number, which is which resource node number on a map will be replaced with that resource.
  +
  +
====tileset====
  +
Similar to a tech resource, the tileset resource must specify how much of that resource are held in each object, and which tileset object number will correspond with it (eg: Object 1 is trees). There is not yet any way to make multiple tileset objects be the same resource.
   
 
==See also==
 
==See also==

Revision as of 18:52, 17 June 2011

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>

Explanation

image

This is the path of the resource's image, which will be displayed on the top with the HUD, unless the resource is a hidden resource (which means it will not appear on the HUD, GAE only), it needs an image to accompany it.

type

The main body of the resource, there is only ONE type tag. The above example has more simply because its shows all the differing possibilities based on the different choices of the type. The type refers to how the resource is controlled. A static resource can only be added from production, morphing, upgrades, or generation. A consumable is like a static resource, but are used in cycles. A tech resource is harvested from resource nodes placed on the map. A tileset resource is harvested from a specific tileset object.

static

If static is chosen, there are no needed attributes.

consumable

Consumables only have a single attribute, the interval, which is how often the resources are checked for the necessary amounts (and thus how fast units can starve if there isn't enough).

tech

Tech resources need a link to the G3D model that will be displayed, the amount that will be in the resource, and the resource number, which is which resource node number on a map will be replaced with that resource.

tileset

Similar to a tech resource, the tileset resource must specify how much of that resource are held in each object, and which tileset object number will correspond with it (eg: Object 1 is trees). There is not yet any way to make multiple tileset objects be the same resource.

See also