<map> - root node, no additional attributes.
<version>3</version> - map version, currently 3.<width>16</width><height>16</height> - map size, in tiles.<max-living-monsters>100</max-living-monsters> - maximum number of living monsters on the map. If there is more of them, lairs will halt spawning until some of them aren't dead.<tiletype code="a" image="data/maps/themes/test/rgrass1.png" [ index="0" ] /> - tile type declaration, used later in <tiles>. Attributes:
code - string, required. Used in <tiles>. Should be as short as possible, but every tiletype must have unique one.
image - string, required. Descibes path to tile image.
index - integer, optional. Used to identify a tile in an .atlas file.<tiles>[...]</tiles> - [width * height] tile codes, describing the map's background. [height] rows, each one containing [width] tile codes (see: <tiletype ...>). Example:
<tiles>
a a a b
a b b b
a a b b
c c a b
</tiles>
<objtype code="a" file="data/physicals/rat.xml" /> - object type declaration, used in <obj ... />. Attributes:code - string, required. Used in <obj ... />. Should be as short as possible, but every objtype must have unique one.file - string, required. Path to XML file describing given object.<obj code="a" x="3" y="5" [ rot="120" name="lenny" ] /> - describes object placed on the map. Attributes:
code - string, required. Same as code of the objtype you want to place.x - float, required. Object's X position on the map, where 1.0 = tile size.y - float, required. Object's Y position, as above.rot - float, optional. Object's rotation, in degrees.name - string, optional. Used to identify object from console.<cond>[...]</cond> - condition. Object will be "activated" when the condition is fulfilled: monsters will start moving, lairs spawning enemies, doors will open etc.<monster-count>100</monster-count> (lairs only) - maximum number of monsters, which this lair can spawn.<effect-on-open>[...]<effect-on-open> (doors only) - an effect triggered when the door is being opened.<region name="exit" x="0.5" y="12.5" [ scale="1" ] >[...]</region> - a square-shaped area with some name. They activate when the player steps on them. Mostly used to move between maps, but they also can be used to trigger some effect. Attributes:
name - string, required. Region name, used for identification.x - float, required. Region's X coordinate, 1.0 = tile size.y - float, required. Region's Y coordinate.scale - float, optional, default: 1.0. Describes the region's size, 1.0 = 1 tile.<next-map>data/maps/level01.xml</next-map> - path to map file, which should be loaded when the player steps on the region.<next-map-region>entry</next-map-region> - the name of a region on a new map, where the player should be placed after loading.<cond>[...]</cond> - optional. Condition activating the region. Inactive region doesn't trigger when someone steps on it.<effect-on-open> node. To trigger an effect, you have to use this trick:
<!-- xml describing door without image nor animations, to make sure it's invisible -->
<objtype code="invisible-door" file="path/to/door-without-image.xml">
<!-- door placed outside the map (x=-5, y=-5) -->
<obj code="invisible-door" x="-5" y="-5">
<cond check="is">
<type>region-triggered</type>
<param>REGIONNAME</param>
</cond>
</obj>
<region name="REGIONNAME" x="10" y="10" scale="1" />
See conditions page for more info regarding the <cond> node.