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.
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.
The concept of Transformation includes the general ability to apply rules that transform any territory in different ways. Transformation rules, called Tranforms, can be applied:
to individual territories, or to every territory.
at the start of every turn, every round, or at the start of specific rounds
to neutral armies, player armies, opponents armies, or some combinations of these
to set armies to fixed amounts, change by fixed increments, change by fixed percentages, or make random changes within a range
XML Specification In the XML, Tranforms are specified either globally or as children to a <territory> object, as follows:
In the following we use "Quantity" as representing the army count of a terit count before transformation.
TYPE<type>:
Controls when the tranform will execute, as follows:
T=Each Turn R=Each Round (when first player starts) RGN=Each Round after Round N RLN=Each Round before ROund N
APPLYTO<applyto>:
Controls whether a tranform will be applied based on the type of occupying armies, as follows:
A=All S=Self (the playing Player only) N=Neutral only P=Players only (not neutral) OP=Other Players only (not neutral or the playing Player) O=Others (all others, including neutral, except the playing player)
INC <inc>: [Optional] + or - Adds/Subtracts Amount to/from Quantity, If this is not set then the Quantity will be set to a calculated Amount independent of its current value
AMOUNT <amount>:
Fixed amount to set Quantity to.
UPPER/LOWER<upper>/<lower>: A upper and lower range given so that the system chooses an Amount randomly with equal probability across the range. May be fractional.
PERC<perc>: [Optional]
If set to any non-zero value, use Amount as a % of the current value, instead of as a fixed value.
CONDITIONS<conditions>:[Optional] Each Conditions tag contains a set of Condition tags and optionally a Formula tag to tie them together. Currently conditions apply to territories only.
FORMULA<formula>:[Optional] formula allows construction of boolean logic rules. conditions prefixed with COND_ (see example below). Default is to use logical AND for each condition.
CONDITION<condition>: Each condition tag may contain ID, VARIABLE, OWNERSHIP, MINVALUE & MAXVALUE tags
ID<id>: Territory id
VARIABLE<variable>: [Optional] Variable name if you are using a formula
OWNERSHIP<ownership>:[Optional] Test who owns the territory. See assigns_to tag spec for the transform tag for functioning.
MINVALUE<minvalue>:[Optional] Test the minimum size of the army
MAXVALUE<maxvalue>:[Optional Test the maximum size of the army
Tranformation Process
Tranformation is the very first thing to execute on a Begin Turn action.
Go through each territory:
- Set Quantity = Initial value of armies on this territory
For the territory, execute the following process for each applicable Tranform in turn: - Apply filters. If Tranform does not apply do nothing and skip to next tranform for this terit. - Calulate Amount by choosing random number if range or setting as fixed amount - if % is set, multiply Amount by Quantity/100 - If INC = "-" negate Amount - If INC is set add Quantity to Amount - set Quantity to Amount
After all Tranforms have executed for a territory: - Quantity is rounded to the closest integer and set to a minimum of 1 - If Quantity has changed, set new army count and send log to game log.
Go to next Territory
Examples
The original suggestion of neutrals that increase (or decrease by changing <inc> to "-") by 1 each turn would be specified as:
Note that the range is specified as -1.5 to 1.5 to give each option -1,0,1 equal chance, since the number is rounded at the end.
The following transform makes a territory get thrown up in the air at the start of Round 20 - it will change by between -100% and 100% (note: a minimum of 1 army is always applied).
Conditions Example. The following Transform will only be applied if Territory 11 is Neutral OR Territory 32 is owned by the current player with an army size of 5 or more.