XML resource files must contain a document-level tag <resource>:
<?xml version="1.0"?> <resource> ... </resource>
You may draw in other resource files by using the <requires> tag:
<requires file="road-tiles.xml" />
This will load "road-tiles.xml" into the resource's namespace. If you wish to avoid id clashes you may supply a namespace:
<requires file="road-tiles.xml" namespace="road" />
If a namespace is given then the element ids from the "road-tiles.xml" will be prefixed by the namespace and a period, e.g. "road:bitumen".
Other tags within <resource> are:
<image file="" id="">
Loads file with pyglet.image.load and gives it the id which is used by tiles to reference the image.
<imageatlas file="" [id="" size="x,y"]>
Sets up an image atlas for child <image> tags to use. Child tags are of the form:
<image offset="" id="" [size=""]>
If the <imageatlas> tag does not provide a size attribute then all child <image> tags must provide one. Image atlas ids are optional as they are currently not reference directly.
<tileset id="">
Sets up a TileSet object. Child tags are of the form:
<tile id="">
[<image ...>]
</tile>
The <image> tag is optional; these tiles may have only properties (or be completely empty). The id is used by maps to reference the tile.
<rectmap id="" tile_size="" [origin=""]>
Sets up a RectMap object. Child tags are of the form:
<column>
<cell tile="" />
</column>