Skip to main content

Race for Victory (CTW)

Race for Victory is a Capture The Wool map where you need to retrive the wool from the enemy side. Players can build, bridge and tunnel their way through enemy lines and other obstacles. After retrieving the wool, they must make their way back without getting killed by enemies still guarding the wools.

Source: Race for Victory by Plastix, MonsieurApple, and Anxuiz. Floating lava blocks let you fire flaming arrows if you shoot through them, which can burn enemies.

Cacti and lava await enemies that might get into the woolrooms.

Boundaries are marked with redstone, which tells players if they are "safe". In this picture, the red team cannot stand or build past the redstone line. They must stop the Blue team from entering!

The wool room features useful tools like speed potions, better armour (along with the wool incased in glass) to help their way back to base!

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

<map proto="1.5.0">
<!-- Specifies what the map is called -->
<name>Race for Victory</name>
<!-- States what version the map is -->
<version>1.2.5</version>
<!-- Tells the teams what the objective is in order to win the game -->
<objective>Take the enemy's wool located to either side of the enemy's base and place it in your victory monument.</objective>
<!-- States who made the map -->
<authors>
<author uuid="ef4ea031-998f-4ec9-b7b6-1bdd428bcef8" contribution="Map design"/> <!-- Plastix -->
<author uuid="3c7db14d-ac4b-4e35-b2c6-3b2237f382be" contribution="Map design and gameplay management"/> <!-- MonsieurApple -->
<author uuid="25961a08-c90c-4abd-b136-dad90e89c2eb" contribution="Item management"/> <!-- Anxuiz -->
</authors>
<!-- Shows any map rules or details that are not in normal server rules which appears when running /map -->
<rules>
<rule>Players may not obstruct the wool rooms with lava or obsidian.</rule>
<rule>Players may not obstruct the majority of the lane with lava or obsidian.</rule>
<rule>Players may not use lava or obsidian to block a team's spawn.</rule>
<rule>Players may not venture below the bottom bedrock layer of the map.</rule>
</rules>

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

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

➡️ Define the kit that players will receive.

<kits>
<kit id="spawn-kit">
<item slot="0" material="iron sword"/>
<item slot="1" material="bow"/>
<item slot="28" amount="64" material="arrow"/>
<item slot="2" material="iron pickaxe"/>
<item slot="3" material="iron axe"/>
<item slot="4" amount="64" damage="1" material="wood"/>
<item slot="5" amount="64" material="ladder"/>
<item slot="8" amount="64" material="bread"/>
<!-- The armor set will be automatically colored based on the player's team -->
<helmet team-color="true" material="leather helmet"/>
<chestplate team-color="true" material="leather chestplate"/>
<leggings team-color="true" material="leather leggings"/>
<boots team-color="true" material="leather boots"/>
</kit>
</kits>

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

<spawns>
<spawn team="blue-team" kit="spawn-kit" yaw="180">
<region>
<cuboid min="-1.5,68,108.5" max="1.5,68,110.5"/>
</region>
</spawn>
<spawn team="red-team" kit="spawn-kit">
<region>
<cuboid min="-1.5,68,-111.5" max="1.5,68,-108.5"/>
</region>
</spawn>
<default yaw="90">
<region>
<cylinder base="-80,70,0" radius="3" height="0"/>
</region>
</default>
</spawns>

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

<filters>
<!-- Query if a player is a member of either team using the previously defined team ID -->
<team id="only-blue">blue-team</team>
<team id="only-red">red-team</team>
</filters>

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

<regions>
<!-- Define where the teams' base are located -->
<union id="spawn-protections">
<rectangle id="red-base" min="-13,-oo" max="13,-97"/>
<rectangle id="blue-base" min="-13,97" max="13,oo"/>
</union>
<!-- Define the exact location where teams must place any captured wools -->
<union id="wool-monuments">
<block id="blue-team-purple-wool">-1,75,97</block>
<block id="blue-team-yellow-wool">0,75,97</block>
<block id="red-team-lime-wool">0,75,-98</block>
<block id="red-team-orange-wool">-1,75,-98</block>
</union>
<union id="wool-rooms">
<!-- Red wool room protection (these are the wools Blue has to get) -->
<union id="red-wool-rooms">
<rectangle id="purple-room" min="-25,-80" max="-oo,-oo"/>
<rectangle id="yellow-room" min="25,-80" max="oo,-oo"/>
</union>
<!-- Blue wool room protection (these are the wools Red has to get) -->
<union id="blue-wool-rooms">
<rectangle id="lime-room" min="25,80" max="oo,oo"/>
<rectangle id="orange-room" min="-25,80" max="-oo,oo"/>
</union>
</union>
<!-- This is the inverse of the rectangle region (everything outside of the rectangle) -->
<union id="map-protection">
<negative id="not-map">
<rectangle id="map" min="-57,-123" max="57,123"/>
</negative>
<cylinder base="0,67,-110" height="4" radius="3"/>
<cylinder base="0,67,110" height="4" radius="3"/>
</union>
<union id="void-area">
<complement>
<union>
<rectangle min="-13,-90" max="-oo,90"/>
<rectangle min="13,-90" max="oo,90"/>
</union>
<rectangle min="-oo,15" max="oo,-15"/>
</complement>
<!-- Behind Red's wool rooms -->
<rectangle min="42,-101" max="13,-112"/>
<rectangle min="-42,-101" max="-13,-112"/>
<!-- Behind Blue's wool rooms -->
<rectangle min="13,111" max="42,101"/>
<rectangle min="-13,111" max="-42,101"/>
</union>
<!-- applicators -->
<apply region="blue-wool-rooms" block="only-red" use="only-red"/>
<apply region="blue-wool-rooms" enter="only-red" message="You may not enter your own wool room!"/>
<apply region="red-wool-rooms" block="only-blue" use="only-blue"/>
<apply region="red-wool-rooms" enter="only-blue" message="You may not enter your own wool room!"/>
<apply region="red-base" enter="only-red" message="You may not enter the enemy spawn!"/>
<apply region="red-base" block="only-red"/>
<apply region="blue-base" enter="only-blue" message="You may not enter the enemy spawn!"/>
<apply region="blue-base" block="only-blue"/>
<apply region="void-area" block="never" message="You may not build over the void!"/> <!-- Prevent void bridging (building out of bounds) -->
<apply region="map-protection" block="never" message="You may not edit blocks in this area!"/>
</regions>

➡️ Specify the wools and its color each team needs to get, where it can be placed, and where exactly it is located to determine proximity.

<wools craftable="false">
<!-- Blue team must retrieve and place the purple and yellow wools to win -->
<wool team="blue-team" color="purple" monument="blue-team-purple-wool" location="-49,69,-96"/>
<wool team="blue-team" color="yellow" monument="blue-team-yellow-wool" location="48,69,-96"/>
<!-- Red team must retrieve and place the lime and orange wools to win -->
<wool team="red-team" color="lime" monument="red-team-lime-wool" location="48,69,95"/>
<wool team="red-team" color="orange" monument="red-team-orange-wool" location="-49,69,95"/>
</wools>

➡️ ️Reward players by giving a golden apple, sixteen arrows, and eight oak wood planks for killing an enemy.

<kill-rewards>
<kill-reward>
<item material="golden apple"/>
<item amount="16" material="arrow"/>
<item damage="1" amount="8" material="wood"/>
</kill-reward>
</kill-rewards>

➡️ 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>iron pickaxe</tool>
<tool>iron axe</tool>
</toolrepair>
<!-- 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>arrow</item>
<item>wood</item>
<item>log</item>
<item>ladder</item>
<item>bread</item>
<item>golden apple</item>
</itemremove>

➡️

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

<maxbuildheight>100</maxbuildheight>

➡️ Close the main <map> module.

</map>