Special XML

## Minimum reinforcements

Adjusts the rate of reinforcements received from territories owned.

If this tag is not specified, the map will have a default rate of 1 army per 3 territories or fraction.

Syntax

```
<reinforcements>
  <reinforcement>
    <lower>From</lower>
    <upper>To</upper>
    <divisor>Divisor</divisor>
  </reinforcement>
<reinforcements>
```

This tag is a list of subtags describing segments. Each segment has the following parameters:

From: The segment starts applying when the player owns this number of territories.
To: The segment stops applying when the player owns this number of territories.
Divisor: The player will get an extra army each Divisor armies or fraction.

Notes:

Info about a more extensive use of Adjusted Reinforcements can be found here: Reinforcement Adjustment

The default value features a single segment providing one reinforcement army per each 3 territories. We can change this by defining one or more segments, and assigning a different rate to each segment. If you define two or more segments, ensure that they do not overlap.

If you leave spaces not covered by the segments defined, the default value of one army per each 3 territories will apply in the undefined areas. However, best practice suggests that if you are using this tag, you should define segments covering all the range of territories, even if the default rate applies at some of them. You should also list them in order.

The divisor applies only inside the segment defined. For example, if you define two segments...

* Segment A - from 1 to 30. One army per 3 territories.
* Segment B - from 31 to 100. One army per 5 territories.

...and the player has 50 armies, he will receive 30/3+(50-30)/5 = 30/3+20/5 = 10+4=14 armies at the begining of turn. He will not receive 50/5 = 10 armies

Please notice this tag does not affect reinforcements received from bonus regions (continents) as that is a completely different concept.

Location:
It goes after the <reinforcements> tag and before the <positions> tag.

Examples:
This code implements the default rate of 1 army for each 3 territories in the Classic Map.

```
<reinforcements>
   <reinforcement>
      <lower>1</lower>
      <upper>42</upper>
      <divisor>3</divisor>
   </reinforcement>
</reinforcements>
```

## Special starting positions

If present, defines which territories will be owned by players when the game starts, and how they will be distributed between such players. The territories not present inside this tag are dealt out in the standard way.

Syntax

```
<positions>
  <position>
    <territory>TerrName</territory>
    ...
  </position>
  <position>
    ...
  </position>
</positions>
```

The tag contains a list of positions, each of them identified by a <position> subtag. At the beginning of the game, the positions are divided evenly between the players. If there is a remainder, the territories of those start positions are dealt out in the same way as other territories.

TerrName: Is the name of the territory that forms part of the position.

Notes:
The most common way to use this tag is with a list of 8 positions. In that case, the number of positions allocated to each player will depend on the number of starting players:

* 8 to 5 players: 1 position
* 4 to 3 players: 2 positions
* 2 players: 4 positions

If the number of positions is not evenly divisible by the number of players, the territories within the remaining positions are distributed as normal territories. As an example, suppose each position has two territories, with 5 players, the three remaining positions contain a total of 6 territories. If there are no other territories on the map to be distributed, one territory will be given to each of the players, and one territory will start as neutral.

Info about a more extensive use of Starting Positions can be found here: Starting Positions

Location:
It goes after the <reinforcements> tag and before the <requirement> tag.

Examples:
The map New World provides a good example of how to use the <positions> tag to create a Conquest map (a map in which all the territories start as neutral except for the starting players positions):

```
<!-- Start Positions -->
<positions>
   <position>
      <territory>Britain</territory>
   </position>
   <position>
      <territory>France</territory>
   </position>
   <position>
      <territory>Holland</territory>
   </position>
   <position>
      <territory>Spain</territory>
   </position>
   <position>
      <territory>Portugal</territory>
   </position>
   <position>
      <territory>Inuit Homeland</territory>
   </position>
   <position>
      <territory>Comanche Homeland</territory>
   </position>
   <position>
      <territory>Aztec Homeland</territory>
   </position>
   <position>
      <territory>Mapuche Homeland</territory>
   </position>
</positions>
```

## Losing conditions

The requirement is a list of territories and / or continents. In order to stay alive, players have to hold one or more items from each list. A subtag specifies how many items need to be owned to continue playing. This feature is known as Losing Conditions.

Syntax

```
<requirement>
  <name>ReqName</name>
  <components>
    ( <territory>TerrName</territory> | <continent>ContName</continent> )
    ...
  </components>
  [<required>ItemsReq</required>]
</requirement>
```

The <required> subtag is optional.

ReqName: Is the name that we assign to the Requirement. Such as "Holding one capital".
TerrName: The name of an individual territory that forms part of the requirement.
ContName: The name of a continent that forms part of the requirement.
ItemsReq: The number of items that each player has to own at least to stay in the game.

Notes:
The requirement can be composed by a mix of territories and continents.

If no <required> subtag is specified, it is enough to hold only one item from the list to stay in the game.

Location:
It goes after the <positions> tag and before the <objectives> tag.

Examples:
The Antarctica map requires players to own at least one base to survive.

```
<!-- losing conditions -->
<requirement>
    <name>a Base and freezes to death</name>
    <components>
         <territory>Base A</territory>
         <territory>Base B</territory>
         <territory>Base C</territory>
         <territory>Base D</territory>
         <territory>Base E</territory>
         <territory>Base F</territory>
         <territory>Base G</territory>
         <territory>Base H</territory>
         <territory>Base I</territory>
         <territory>Base J</territory>
         <territory>Base K</territory>
         <territory>Base L</territory>
         <territory>Base M</territory>
         <territory>Base N</territory>
         <territory>Base O</territory>
         <territory>Base P</territory>
    </components>
    <required>1</required>
</requirement>
```

## Winning conditions

An objective is a territory or a group of territories. If a player holds the objective through a full round, that player wins the game.
This feature is known as Winning Conditions.

Syntax

```
<objective>
  <name>ObjName</name>
  <components>
    ( <territory>TerrName</territory> | <continent>ContName</continent> )
    ...
  </components>
  [<required>ItemsReq</required>]
</requirement>
```

The <required> subtag is optional.

ObjName: Is the name that we assign to the Requirement. Such as "Conquer the Eternal City".
TerrName: The name of an individual territory that forms part of the objective.
ContName: The name of a continent that forms part of the objective.
ItemsReq: If present, a player only needs to hold at least that number of items to win the game

Notes:
Conquering a territory does not automatically end the game. To win the game, the player has to own the objective at the beginning of his turn. That means conquering the objective one turn and holding it from other players during a full turn.

The objective can be composed by a mix of territories and continents.

If no <required> subtag is specified, all the items in the list must be owned. If the subtag is present, then it's enough to hold the number of items specificed.

Even if the <objective> tag is present, traditional victory by killing all the other players is still valid.

Location:
It goes after the <requirement> tag and before the <continents> tag.

Examples:
In the Oasis map, players can win by finding the treasure hidden in the center of the Oasis. It is described in the XML as that:

```
<objective>
   <name>Find The Treasure</name>
   <components>
      <territory>Grand Oasis 1</territory>
      <territory>Grand Oasis 2</territory>
      <territory>Grand Oasis 3</territory>
   </components>
</objective>
```

### Flexible conditions

Objectives are very flexible, and can be something else than just a list of territories. In the Third Crusade map, victory is achieved by fulfilling four conditions:

* Any starting point.
* Jerusalem.
* Antioch.
* Vatican or Granada.

And here's how it is coded:

```
   <!-- Objectives Begin -->
   <objective>
      <name>Victory Condition</name>
      <components>
         <continent>Any Starting Territory</continent>
         <territory>Jerusalem</territory>
         <territory>Antioch</territory>
         <continent>The Vatican or Granada</continent>
      </components>
   </objective>
   <!-- Objective Continents -->
   <continent>
      <name>Any Starting Territory</name>
      <bonus>0</bonus>
      <components>
         <territory>London</territory>
         <territory>Paris</territory>
         <territory>Ratisbon</territory>
         <territory>Castile</territory>
         <territory>Thessalonica</territory>
         <territory>Tunis</territory>
         <territory>Cairo</territory>
         <territory>Amasia</territory>
      </components>
      <required>1</required>
   </continent>
   <continent>
      <name>The Vatican or Granada</name>
      <bonus>0</bonus>
      <components>
         <territory>The Vatican</territory>
         <territory>Granada</territory>
      </components>
      <required>1</required>
   </continent>
```

## Multiple reinforcements layers

The map Conquer Man adjusts territories applying the Diminishing Returns Law meaning that the more territories a player has, the more he needs to add to get the next reinforcement, following the table:

* 1-30 occupied territories: One army for every 3 territories.
* 31-60 occupied territories: One army for every 4 territories.
* 61-100 occupied territories: One army for every 5 territories.
* 101-151 occupied territories: One army for every 6 territories.

This table is coded with those lines:

```
<reinforcements>
   <reinforcement>
      <lower>1</lower>
      <upper>30</upper>
      <divisor>3</divisor>
      <lower>31</lower>
      <upper>60</upper>
      <divisor>4</divisor>
      <lower>61</lower>
      <upper>100</upper>
      <divisor>5</divisor>
      <lower>101</lower>
      <upper>151</upper>
      <divisor>6</divisor>
   </reinforcement>
</reinforcements>
```

## Capped reinforcements

The Hive map sets a maximum for territories reinforcement. After the 36th territory, players do not get additional reinforcements on this basis. It is achieved by setting a divisor number higher than the number of territories in the last segment.

```
   <minreinforcement>3</minreinforcement>
   <reinforcements>
      <reinforcement>
         <lower>1</lower>
         <upper>36</upper>
         <divisor>3</divisor>
      </reinforcement>
      <reinforcement>
         <lower>37</lower>
         <upper>352</upper>
         <divisor>400</divisor>
      </reinforcement>
   </reinforcements>
```

## Autodeploy and decay

**Syntax**

```
<territory>
  <name>TerName</name>
    <borders>
      <border>AdjName</border>
        ...
    </borders>
    <coordinates>
      <smallx>SXCoord</smallx>
      <smally>SYCoord</smally>
      <largex>LXCoord</largex>
      <largey>LYCoord</largey>
    </coordinates>
    <bonus>#</bonus>
</territory>
```

Autodeploy and Decay are two different systems to use the same tag. If we want to apply a specific bonus to a single territory, we can use the <bonus> tag. It goes always after the

Fatal error: The format of the coordinate could not be determined. Parsing failed.

```
  <bonus>5</bonus>

```

</territory>
Instead, the Dust Bowl map has several decay territories in the central part to simulate drought. If you hold on of these regions you will receive a negative bonus directly on the region. For example, if you hold Sterling, you will lose 1 troop each turn you have on that region until you find yourself with just 1 army.

```
<territory>
   <name>Sterling</name>
   <borders>
      <border>Imperial</border>
      <border>Colby</border>
      <border>Lamar</border>
      <border>Denver</border>
   </borders>
   <coordinates>
      <smallx>331</smallx>
      <smally>121</smally>
      <largex>423</largex>
      <largey>159</largey>
   </coordinates>
   <bonus>-1</bonus>
</territory>
```

So, you can simply change a number to make one region (or more) a powerful source of additional troops or a deadly spot on which to start your turn.

## Starting neutrals and killer neutrals

### Starting neutrals

There are some cases in which we want to have more control of the starting drop in a game. One of these cases is when we don't want to have someone who starts with a specific territory. The best system to achieve this result is to code that territory to start always as neutral.

For example the Luxemburg map has Luxemburg City coded as neutral, that region will start with 3 neutral troops on it in any game.

```
   <territory>
      <name>Luxembourg City</name>
      <borders>
         <border>Capellen</border>
         <border>Bourglinster</border>
         <border>Remich</border>
         <border>Esch</border>
         <border>Bous</border>
         <border>Dudelange</border>
         <border>Frisange</border>
      </borders>
      <coordinates>
         <smallx>177</smallx>
         <smally>474</smally>
         <largex>207</largex>
         <largey>550</largey>
      </coordinates>
      <neutral>3</neutral>
   </territory>
```

So, to code a neutral territory as starting neutral, you need only to add the <neutral> tag before the closing </territory one. The number of starting troops for that territory is specified within the tag.

### Killer neutrals

There's an additional behaviour that we can assign to a neutral territory. We can make it a Killer Neutral.
Killer neutral works exactly like a normal neutral territory, but with an important difference:
If you take a neutral territory during a game, it will be yours until someone else conquers it. However, a killer neutral region, if you hold it, will revert back to a predefined number of neutral troops at the start of the next turn!

For example in the Arms Race! Map, the player that will take a missile launch, will lose it to 15 neutral armies, at the start of the next turn.

```
<territory>
  <name>Titan II MISSLE LAUNCH</name>
  <borders>
  </borders>
  <bombardments>
  <bombardment>SS-18 Launch Platform</bombardment>
  <bombardment>SS-18 Stage 1</bombardment>
  <bombardment>SS-18 Stage 2</bombardment>
  <bombardment>SS-18 Stage 3</bombardment>
  <bombardment>SS-18 Stage 4</bombardment>
  <bombardment>SS-18 Stage 5</bombardment>
  <bombardment>SS-18 Warhead</bombardment>
  <bombardment>USSR Spy 1</bombardment>
  <bombardment>Leningrad</bombardment>
  <bombardment>USSR Premier</bombardment>
  <bombardment>Mendeleyev</bombardment>
  <bombardment>Moscow</bombardment>
  <bombardment>Samara</bombardment>
  <bombardment>USSR Uranium 1</bombardment>
  <bombardment>USSR Bunker 1</bombardment>
  <bombardment>Yekaterinburg</bombardment>
  <bombardment>Novosibirsk</bombardment>
  <bombardment>Noril'sk</bombardment>
  <bombardment>USSR Uranium 2</bombardment>
  <bombardment>USSR Bunker 2</bombardment>
  <bombardment>Frenkel</bombardment>
  <bombardment>Chitba</bombardment>
  <bombardment>USSR Uranium 3</bombardment>
  <bombardment>Magadan</bombardment>
  <bombardment>USSR Launch Code</bombardment>
  <bombardment>USSR Spy 2</bombardment>
  <bombardment>Sakharov</bombardment>
  <bombardment>Yakutsk</bombardment>
  <bombardment>USSR Silo 1</bombardment>
  <bombardment>USSR Silo 2</bombardment>
  </bombardments>
 <coordinates>
         <smallx>37</smallx>
         <smally>180</smally>
         <largex>51</largex>
         <largey>232</largey>
 </coordinates>
   <neutral killer="yes">15</neutral>
</territory>
```

To switch a neutral territory to a killer neutral, you have to add the killer="yes" option to the <neutral> tag. The territory will revert back always to the number of troops specified within the neutral tag.

## One way borders and ranged attacks

Optional tags for territories are great, but there are a few features that we can use without adding a single line of code.

A standard territory has a list of borders. Usually Territory A borders with Territory B and vice versa. But if we want to make it possible to attack only from Territory A to Territory B and not the reverse?
It's simple! The solution is to list only the territory that can be attacked as a border of the territory that cannot be attacked.

An example is the British Isles Map, in which we can see that Northumberland can one way attack Lothian & Borders.

```
   <territory>
      <name>Northumberland</name>
      <borders>
         <border>Lothian & Borders</border>
         <border>Cumberland</border>
         <border>Durham</border>
      </borders>
      <coordinates>
         <smallx>355</smallx>
         <smally>269</smally>
         <largex>457</largex>
         <largey>351</largey>
      </coordinates>
   </territory>
...
<territory>
      <name>Lothian & Borders</name>
      <borders>
         <border>Dumfries & Galloway</border>
         <border>Strathclyde</border>
         <border>Tayside</border>
      </borders>
      <coordinates>
         <smallx>342</smallx>
         <smally>224</smally>
         <largex>444</largex>
         <largey>286</largey>
      </coordinates>
   </territory>
```

If a player decides to move troops from the attacking region to the other (advancing after conquering), he won't be able to reinforce them back, the connection being one-way, unless he has another route and the reinforcement option for the game is something other than Adjacent.

Using the same technique, we can allow a territory to attack another even if on the map the two do not border, for example a distant territory. It's the Ranged Attack feature. Remember, the map image does not determine how the game is played -- the XML does.
Ranged attacks and one way borders can be mixed together without problems. In most cases, the ranged attacks are visually supported on the map and there's no additional code required. Tt is mentioned in this guide just because it's considered by the community as a distinct map feature.

An example of ranged attacks (and also one way in this case) are the plane-parachute in the D-Day:Omaha Beach! Map

## Bombardements

Attack is not the only way to take away a territory from your opponent(s). With the additional <bombardments> tag we can list a territory (or a series) that can be "bombarded" to become neutral. When all opponent's troops are defeated, the troop count of a bombarded territory reverts to one neutral, and the attacker isn't able to advance his troops into that region or reinforce into or through it after ending the attack phase of a turn.

A classic example of bombardments can be found on the Berlin 1961 map, where Hohenschonhausen (the tank) can bombard the 3 western checkpoints:

```
<territory>
      <name>Hohenschönhausen</name>
      <borders>
         <border>Marzahn</border>
         <border>Lichtenberg</border>
         <border>Prenzlauer Berg</border>
         <border>Weißensee</border>
      </borders>
      <bombardments>
         <bombardment>Wedding</bombardment>
         <bombardment>Moabit</bombardment>
         <bombardment>Kreuzberg</bombardment>
      </bombardments>
      <coordinates>
         <smallx>380</smallx>
         <smally>196</smally>
         <largex>476</largex>
         <largey>240</largey>
     </coordinates>
     <neutral>3</neutral>
   </territory>
```