XML File Examples
Specify the XML file version and then open the main map module and specify the map’s name, version and objective.
<?xml version="1.0"?>
<map proto="1.4.2">
<name>Storm</name>
<version>0.1.4</version>
<objective>Take control of all three hills!</objective>
<authors>
<author uuid="ef4ea031-998f-4ec9-b7b6-1bdd428bcef8"/> <!-- Plastix -->
<author uuid="5986da63-a546-49c5-812d-d5c41a42510a"/> <!-- Lyzak -->
<author uuid="90e029a3-6873-46a7-8430-0ec3dbc42aba"/> <!-- SajinZero -->
</authors>
Define the tutorial and its points of interest.
<include src="tutorial.xml"/>
<tutorial>
<stage title="King of the Hill">
<message>
<line>`rThis map is a `a`lKing of the Hill `r(KotH) map</line>
<line>First team to hold all `a3 hills `rwins. You can also win by having the most hills `bcontrolled `rat the end of the time limit.</line>
</message>
<teleport>
<point yaw="135" pitch="30">30.5,38,30.5</point>
</teleport>
</stage>
<stage title="Spawn">
<message>
<line>This is the `cRed Team `rspawn. The `9Blue Team `rspawn is identical.</line>
<line>You spawn with gear ready to go into battle!</line>
</message>
<teleport>
<point yaw="125" pitch="10">59.5,7,73.5</point>
</teleport>
</stage>
<stage title="Hills">
<message>
<line>There is a `bhill `rin the `acenter`r, to the left is `aHill B`r, and to the right is `aHill A`r.</line>
<line>Hills are indicated with a `bbeacon.</line>
<line>The center hill will mostly be the most active.</line>
</message>
<teleport>
<point yaw="135" pitch="30">30.5,38,30.5</point>
</teleport>
</stage>
<stage title="Health Potions">
<message>
<line>There are chests like this scattered about the map.</line>
<line>They contain `bInstant Health 2 `rPotions.</line>
</message>
<teleport>
<point yaw="0" pitch="15">-28.5,6,16.5</point>
</teleport>
</stage>
</tutorial>
Define two teams, their colors and names.
<teams>
<team id="red-team" color="dark red" max="32">Red Team</team>
<team id="blue-team" color="blue" max="32">Blue Team</team>
</teams>
Define the team spawn kits. Both teams inherit the base spawn kit and add leather armor with that team’s color to it.
<kits>
<kit id="spawn">
<item slot="0" material="stone sword"/>
<item slot="1" enchantment="arrow infinite:1" material="bow"/>
<item slot="28" amount="1" material="arrow"/>
<item slot="3" amount="1" material="golden apple"/>
<item slot="2" amount="64" material="baked potato"/>
<chestplate enchantment="protection projectile:1" unbreakable="true" material="iron chestplate"/>
<potion duration="5">heal</potion>
<potion duration="10" amplifier="4">damage resistance</potion>
</kit>
<kit id="red" parents="spawn">
<helmet color="cd0000" unbreakable="true" material="leather helmet"/>
<leggings color="cd0000" unbreakable="true" material="leather leggings"/>
<boots color="cd0000" unbreakable="true" material="leather boots"/>
</kit>
<kit id="blue" parents="spawn">
<helmet color="0066cc" unbreakable="true" material="leather helmet"/>
<leggings color="0066cc" unbreakable="true" material="leather leggings"/>
<boots color="0066cc" unbreakable="true" material="leather boots"/>
</kit>
</kits>
Create a “deny-beacon” filter for later use.
<filters>
<deny id="deny-beacons">
<material>beacon</material>
</deny>
</filters>
Create the playable and team spawn regions, then apply the previously defined beacon filter to the playable region.
<regions>
<rectangle id="playable" min="-oo,-oo" max="oo,oo"/>
<cylinder id="red-spawn" base="49,4,66" radius="4" height="0"/>
<cylinder id="blue-spawn" base="-48,4,-65" radius="4" height="0"/>
<apply block="never" use="deny-beacons" region="playable"/>
</regions>
Add auto repair to stone swords and bows.
<toolrepair>
<tool>stone sword</tool>
<tool>bow</tool>
</toolrepair>
Auto remove some tools and items to prevent the playing field from being cluttered up.
<itemremove>
<item>leather helmet</item>
<item>iron chestplate</item>
<item>leather leggings</item>
<item>leather boots</item>
<item>arrow</item>
<item>ladder</item>
<item>baked potato</item>
<item>golden apple</item>
<item>glass bottle</item>
</itemremove>
Specify team spawns and use the previously defined spawn regions.
<spawns>
<spawns yaw="90">
<spawn team="red-team" kit="red"><region id="red-spawn"/></spawn>
</spawns>
<spawns yaw="270">
<spawn team="blue-team" kit="blue"><region id="blue-spawn"/></spawn>
</spawns>
<default yaw="90">
<cylinder base="95,60,0" radius="3" height="0"/>
</default>
</spawns>
Designate the KotH hills and their <capture>
, <progress>
and <captured>
regions.
<king>
<hills>
<hill name="Point A" capture-time="10s" ratio="1">
<capture><cuboid min="37,12,-38" max="46,15,-29"/></capture>
<progress><cuboid min="37,11,-38" max="45,11,-30"/></progress>
<captured><cuboid min="36,11,-39" max="48,16,-27"/></captured>
</hill>
<hill name="Middle" capture-time="15s" ratio="1">
<capture><cuboid min="-4,4,-4" max="5,7,5"/></capture>
<progress><cuboid min="-4,3,-4" max="4,3,4"/></progress>
<captured><cuboid min="-5,3,-5" max="5,8,5"/></captured>
</hill>
<hill name="Point B" capture-time="10s" ratio="1">
<capture><cuboid min="-45,12,30" max="-36,15,39"/></capture>
<progress><cuboid min="-45,11,30" max="-37,11,38"/></progress>
<captured><cuboid min="-46,11,29" max="-34,16,41"/></captured>
</hill>
</hills>
</king>
The game ends when a team reaches 750 points.
<score>
<limit>750</limit>
<!-- No points are gained from kills -->
</score>
</map>