Skip to main content

Warlock (DTM)

Warlock is a Destroy the Monument map. Players must destroy a single obsidian monument to win.

Source: Warlock by McSpider. Players can build and jump their way to the other side of the map. The cobwebs define the out of bounds region. Underground hallways lead to the monument.

The monument is obsidian protected by stone bricks and a wooden pressure plate on top of it.

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

<map proto="1.4.2">
<!-- Specifies what the map is called -->
<name>Warlock</name>
<!-- Shows the map creation date when a user runs /map in game -->
<created>2012-08-29</created>
<!-- States what version the map is -->
<version>1.3.12</version>
<!-- Tells the teams what the objective is in order to win the game -->
<objective>Break the obsidian from the enemy team's monument.</objective>
<!-- States who made the map -->
<authors>
<author uuid="e5953ddf-c1fc-4405-9ac9-6939631cd185"/> <!-- McSpider -->
</authors>
<!-- States who made contributions to the map -->
<contributors>
<contributor uuid="ef4ea031-998f-4ec9-b7b6-1bdd428bcef8" contribution="Map Feedback and XML Coding"/> <!-- Plastix -->
</contributors>

➡️ Define the teams' colors, names, and how many people can be on each team.

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

➡️ Define the kit that players will receive.

<kits>
<kit id="spawn-kit">
<clear/>
<item slot="0" unbreakable="true" material="iron sword"/>
<item slot="1" unbreakable="true" material="bow">
<enchantment>infinity</enchantment>
</item>
<item slot="2" unbreakable="true" material="diamond pickaxe"/>
<item slot="3" unbreakable="true" material="iron axe"/>
<item slot="4" amount="64" material="glass"/>
<item slot="5" damage="2" amount="64" material="wood"/> <!-- To get birch planks, damage must be "2" -->
<item slot="6" amount="2" material="gold nugget"/>
<item slot="28" material="arrow"/>
<item slot="30" unbreakable="true" material="iron spade"/>
<helmet unbreakable="true" team-color="true" material="leather helmet"/>
<chestplate unbreakable="true" team-color="true" material="leather chestplate">
<enchantment level="2">protection projectile</enchantment>
</chestplate>
<leggings unbreakable="true" team-color="true" material="leather leggings"/>
<boots unbreakable="true" team-color="true" material="leather boots"/>
<effect duration="2">heal</effect>
<effect duration="4">damage resistance</effect>
</kit>
</kits>

➡️ Define the spawn areas and the kit each team gets. The regions will be defined in a later section.

<spawns>
<spawn team="red-team" kit="spawn-kit" region="red-spawn-point"/>
<spawn team="blue-team" kit="spawn-kit" region="blue-spawn-point" yaw="180"/>
<default region="obs-spawn-point" yaw="90"/>
</spawns>

➡️ This specifies what material the monuments are made of and where each monument belongs to. The regions will be defined in a later section.

<destroyables name="Monument" materials="obsidian" mode-changes="true">
<destroyable owner="red-team" region="red-monument"/>
<destroyable owner="blue-team" region="blue-monument"/>
</destroyables>
<!-- The monuments which are made of obsidian will turn into beacon blocks in 20 minutes -->
<modes>
<mode material="beacon" after="20m"/>
</modes>

➡️ Define the filters on the map and determine which events are allowed.

<filters>
<!-- Query if the player is over a void area -->
<not id="not-void">
<void/>
</not>
<!-- Always deny beacon placement, destruction, or interaction -->
<deny id="deny-beacon">
<material>beacon</material>
</deny>
</filters>

➡️ Define regions that can be used to apply spawns, filters, etc.

<regions>
<cuboid id="red-spawn-point" min="40,6,-30" max="44,6,-34"/>
<cuboid id="blue-spawn-point" min="40,6,31" max="44,6,35"/>
<point id="obs-spawn-point">133.5,22,0.5</point>
<cuboid id="red-monument" min="77,1,-36" max="78,3,-37"/>
<cuboid id="blue-monument" min="77,1,37" max="78,3,38"/>
<union id="spawns">
<union id="red-spawn">
<cuboid min="36,5,-38" max="55,11,-25"/>
<cuboid min="54,5,-31" max="61,11,-38"/>
</union>
<union id="blue-spawn">
<cuboid min="36,5,39" max="55,11,26"/>
<cuboid min="54,5,32" max="61,11,39"/>
</union>
</union>
<negative id="not-build-region">
<rectangle id="build-region" min="26,-49" max="120,50"/>
</negative>
<!-- applicators -->
<apply block="never" region="spawns" message="You may not edit spawn!"/>
<apply block="not-void" region="not-build-region" message="You may not edit the void!"/>
<apply use="deny-beacon"/>
</regions>

➡️ We do not want an excessive amount of items dropped on the map, so this allows us to manage how to deal with dropped items more easily.

<!-- These items will drop, players that already have these items can pick it up and will be merged -->
<toolrepair>
<tool>iron sword</tool>
<tool>bow</tool>
<tool>diamond pickaxe</tool>
<tool>iron axe</tool>
<tool>iron spade</tool>
</toolrepair>
<!-- If the player has these item, it will be saved in their inventory -->
<itemkeep>
<item>iron sword</item>
<item>bow</item>
<item>diamond pickaxe</item>
<item>iron axe</item>
<item>iron spade</item>
<item>arrow</item>
<item>wood</item>
<item>glass</item>
<item>golden apple</item>
</itemkeep>
<!-- All of these items will be automatically removed when dropped -->
<itemremove>
<item>leather helmet</item>
<item>leather chestplate</item>
<item>leather leggings</item>
<item>leather boots</item>
<item>obsidian</item>
<item>beacon</item>
<item>ink sack</item>
</itemremove>

➡️ You can allow players to drop only specific blocks from their inventory, but not when they die or the blocks are broken in the world.

<block-drops>
<rule>
<filter>
<any>
<material>wood:2</material>
<material>glass</material>
</any>
</filter>
<drops>
<item chance="0" material="wood"/>
</drops>
</rule>
</block-drops>

➡️ Configure how TNT behaves on a map.

<tnt>
<!-- TNT will automatically ignite when placed -->
<instantignite>on</instantignite>
<!-- Do not require a license so TNT usage is not restricted -->
<licensing>off</licensing>
<!-- Players can't defuse a teammate's TNT -->
<friendly-defuse>off</friendly-defuse>
</tnt>

➡️ We can make special kill rewards for players that fit certain criteria.

<kill-rewards>
<!-- All players get a golden apple and a gold nugget after killing an enemy -->
<kill-reward>
<item material="gold nugget"/>
<item material="golden apple"/>
</kill-reward>
<!-- Players that kill two enemies in a row will get a Lapis Lazuli (represented as ink sack with damage value of 4) -->
<kill-reward>
<filter>
<kill-streak count="2" repeat="true"/>
</filter>
<item damage="4" material="ink sack"/>
</kill-reward>
</kill-rewards>

➡️ Players do not need to worry about hunger in this map, so hunger is disabled.

<!-- Prevent hunger from depleting -->
<hunger>
<depletion>off</depletion>
</hunger>

➡️ This specifies how high players can build, however, it does not stop them from walking or breaking blocks above this limit.

<maxbuildheight>25</maxbuildheight>

➡️ Close the main <map> module.

</map>