Examples

XML File Examples

Every map XML file starts with the XML header and then the base <map> module.

<?xml version="1.0"?>
<map proto="1.4.2">
<!-- Specifies what the map is called -->
<name>Airship Battle</name>
<!-- States what version the map is -->
<version>1.0.4</version>
<!-- Tells the teams what the objective is in order to win the game -->
<objective>Leak lava from the enemy's obsidian core into the void.</objective>
<!-- States who made the map -->
<authors>
    <author uuid="30e27366-0b14-4076-8f55-0819ece49ce3"/> <!--  Dewtroid  -->
</authors>
<!-- Shows any map rules that are not in normal OCN rules -->
<rules>
    <rule>Dispensers are disabled</rule>
</rules>


These filters is used to prevent people from placing dispensers or obsidian in the regions they are applied to.

<filters>
    <not id="deny-dispenser">
        <material>dispenser</material>
    </not>
    <not id="deny-obsidian">
        <material>obsidian</material>
    </not>
</filters>


Defines the teams colors, names and how many people can be on the teams.

<teams>
    <team id="blue-team" color="blue" max="24">Blue Team</team>
    <team id="red-team" color="dark red" max="24">Red Team</team>
</teams>


These regions reference the dispenser and obsidian filters defined above and states where they will work.

<regions>
    <!-- Apply the deny-dispenser filter to a infinite region -->
    <apply block-place="deny-dispenser" message="Dispensers are disabled on this map!">
        <region>
            <rectangle min="-oo,-oo" max="oo,oo"/>
        </region>
    </apply>
    <apply leave="always" message="Don't exit the playing field!">
        <region>
            <rectangle min="-102,-4" max="102,125"/> <!-- Main area -->
            <rectangle min="-36,-16" max="13,-2"/> <!-- Area between spawn tunnels -->
        </region>
    </apply>
    <apply block="always" message="Don't edit blocks outside the playing field!">
        <region>
            <negative>
                <union id="map">
                    <rectangle min="-100,-2" max="100,123"/> <!-- Main area -->
                    <rectangle min="-36,-14" max="13,-2"/> <!-- Area between spawn tunnels -->
                </union>
            </negative>
        </region>
    </apply>
    <apply block-break="deny-obsidian" message="You may not break obsidian outside the core area!">
        <region>
            <complement>
                <region id="map"/>
                <cuboid min="13,85,23" max="18,92,30"/>
                <cuboid min="-41,85,23" max="-36,92,30"/>
            </complement>
        </region>
    </apply>
</regions>


Define a kit with special TNT defuser shears.

<kits>
    <kit id="shears">
        <item slot="8" name="`6TNT Defuser" lore="`7Right click to defuse teammate's TNT|`7Does not work in `9water`7!" material="shears"/>
    </kit>
</kits>


Remove shears, obsidian and gold block items from the playing field when they are dropped.

<itemremove>
    <item>shears</item>
    <item>obsidian</item>
    <item>gold block</item>
</itemremove>


Specify where the previously defined teams will spawn, the kit they will spawn with and what direction they face.

<spawns>
    <spawn team="blue-team" yaw="270" kit="shears">
        <cuboid min="4.5,91,-34" max="7.5,91,-31"/>
    </spawn>
    <spawn team="red-team" yaw="90" kit="shears">
        <cuboid min="-30.5,91,-34" max="-27.5,91,-31"/>
    </spawn>
    <default yaw="180">
        <cylinder base="-11.5,90,-33" radius="3" height="0"/>
    </default>
</spawns>


This specifies what material the core is made of, who each core belongs to and how far the lava needs to leak.

<cores material="obsidian" leak="10">
    <core team="blue-team">
        <cuboid min="13,85,23" max="18,92,30"/>
    </core>
    <core team="red-team">
        <cuboid min="-41,85,23" max="-36,92,30"/>
    </core>
</cores>


This specifies how high players can build however it doesn’t stop them from going over this limit.

<maxbuildheight>125</maxbuildheight>


Close the main <map> module.

</map>