Conditional Borders
Posted: Mon Jan 07, 2013 4:35 pm
4.4.5 -Conditional Borders
We all know that standard territories have fixed borders. This means that Territory A always borders with Territory B.
But now we're going to learn how to make the border conditional.
Conditional Borders allow a more flexible usage of borders and this feature makes it possible to have borders which change over the course of a game, based on the possession of territories.
Using again the same example, with conditional borders, we can have that Territory A borders with Territory B only if the player holds a Territory C. The third territory will be a sort of key: holding it satisfies the condition and so activates that border.
Syntax
<territory>
__<name>TerName</name>
____<borders>
______<border condition="CondName">Ter2Name</border>
_________...
____</borders>
_________...
</territory>
So to define a conditional border you need to add the condition=" " option to the <border> tag.
There are few additional notes:
Here below an imaginary example of how the code looks like:
Sao Paulo can attack Buenos Aires only if the same player holds New York. In addition, Sao Paulo can assault Dakar if the player holds the whole Oceania continent.
Obviously this is just a stupid example and I'm sure you can find plenty of better ways to use it.
We all know that standard territories have fixed borders. This means that Territory A always borders with Territory B.
But now we're going to learn how to make the border conditional.
Conditional Borders allow a more flexible usage of borders and this feature makes it possible to have borders which change over the course of a game, based on the possession of territories.
Using again the same example, with conditional borders, we can have that Territory A borders with Territory B only if the player holds a Territory C. The third territory will be a sort of key: holding it satisfies the condition and so activates that border.
Syntax
<territory>
__<name>TerName</name>
____<borders>
______<border condition="CondName">Ter2Name</border>
_________...
____</borders>
_________...
</territory>
So to define a conditional border you need to add the condition=" " option to the <border> tag.
There are few additional notes:
- You can specify either a territory or a continent as condition
- You must hold the territory/continent to activate the border
- If there is a territory and a continent that both match the condition's name, the territory will be used as the condition
- The conditional border is activated/disactivated immediately when you conquer or lose the condition
Here below an imaginary example of how the code looks like:
- Code: Select all
<territory>
<name>Sao Paulo</name>
<borders>
<border>Bogota</border>
<border>Lima</border>
<border condition="New York">Buenos Aires</border>
<border condition="Oceania">Dakar</border>
</borders>
<coordinates>
...
</coordinates>
</territory>
Sao Paulo can attack Buenos Aires only if the same player holds New York. In addition, Sao Paulo can assault Dakar if the player holds the whole Oceania continent.
Obviously this is just a stupid example and I'm sure you can find plenty of better ways to use it.