Algorithms (Veni Vidi Vici)

Attacker
Total:
 * Location:
 * Location bonus:
 * Tactical advantage:
 * Supporting nations:
 * Military development:
 * Economic development:
 * Technological development:
 * Industrial development:
 * Recent expansion:
 * Motive:
 * Modifiers:
 * Chance:
 * Edit count:
 * Turns:
 * [(Edit count ÷ Turns) ÷ π] = Chance
 * Nation age:
 * Nation size:
 * Participation:
 * Troops: TroopsAttacker ÷ TroopsDefender
 * Theaters of war:
 * Concurrent wars:
 * Recent wars:
 * Other stuff:

Defender
Total:
 * Location:
 * Location bonus:
 * Tactical advantage:
 * Supporting nations:
 * Military development:
 * Economic development:
 * Technological development:
 * Industrial development:
 * Infrastructure:
 * Recent expansion:
 * Motive:
 * Modifiers:
 * Chance:
 * Edit count:
 * Turns:
 * [(Edit count * Turns) ÷ π] ÷ 100 = Chance
 * Nation age:
 * Nation size:
 * Participation:
 * Troops: TroopsDefender ÷ TroopsAttacker
 * Theatres of war:
 * Concurrent wars:
 * Recent wars:
 * Other stuff:

Result
% = (TotalAttacker ÷ TotalAttacker + Defender) * 100

No. turns = [% * (1 - (100 ÷ (2*(TotalAttacker + Defender))))] ÷ 10 (round to nearest whole no.)
 * 0 — 20%: Defender changes tide of war and becomes attacker. Second algo required.
 * 20 — 30%: Attacker ceases assault with no consequences to attacker and minimal damage to defender.
 * 30 — 40%: Attacker ceases assault with no consequences to attacker and moderate damage to defender.
 * 40 — 50%: Attacker ceases assault with no consequences to either party.
 * 50 — 60%: Ceasefire occurs. Attacker and defender agree to two-way peace talks. Attacker makes minimal gains in defender territory.
 * 60 — 70%: Ceasefire occurs. Attacker and defender agree to two-way peace talks. Attacker makes moderate gains in defender territory.
 * 70 — 80%: Ceasefire occurs. Attacker and defender agree to two-way peace talks. Attacker makes significant gains in defender territory.
 * 80 — 90%: Ceasefire occurs. Attacker and defender agree to two-way peace talks. Attacker makes huge gains in defender territory.
 * 90 — 100%: Result is unconditional surrender of defender.

Algorithm explanation

 * Location
 * +15 if war is in home country
 * +10 if war is in a neighbouring country
 * +7 close to location of war
 * -5 far from location of war
 * -7 extremely far from location of the war.

This value is inversely proportionate to the military tier level of the nation.
 * Location bonus
 * +4 if war is in well known land
 * +2 if war is in a fairly known land
 * -2 if little is known about the land
 * -3 if war takes place in a land with no prior knowledge.
 * Tactical advantage
 * +2 Attacker’s advantage
 * +5 Defender’s advantage
 * +6 Surprise attack (Attackers)
 * +4 Home is island (Defenders)
 * +5 Home is desert (Defenders)
 * +8 Home is jungle/tropical (Defenders)
 * +10 (in winter), +12 (in spring) Home is tundra/arctic (Defenders)
 * +6 Amphibious landing (Defenders).
 * +2 Defender Scorched Earth policy enforced (-1 Infrastructure tier level), -2 for attackers
 * Supporting nations
 * +3 for every nation actively participating (ie. forces are physically in battle)
 * +2 for every nation providing any two of financial, technical and/or advisory support
 * +1 for every nation providing any one of financial, technical or advisory support
 * +0.5 for every nation providing limited support
 * Military development
 * +0.5 for every nation providing limited support
 * Military development
 * Tier 1 = +4
 * Tier 2 = +3
 * Tier 3 = +2
 * Tier 4 = +1
 * Tire 5= 0

This value is inversely proportionate to the economic tier level of the nation. This value is inversely proportionate to the technological tier level of the nation. This value is inversely proportionate to the infrastructural tier level of the nation. The size of the nation in area. Participation of the user controlling the nation. This is a factor only if the forces on both sides are known. If the forces of both sides or one side is unknown, disregard this factor. The total is derived from the sum of all final values.
 * Economic development
 * Technological development
 * Infrastructure
 * Recent expansion
 * 0 No expansion in the past five years
 * -1 Insignificant expansion in the past five years
 * -2 Minor expansion in the past five years
 * -3 Some expansion in the past five years
 * -4 Major expansion in the past five years
 * -5 Huge expansion in the past five years
 * Motive
 * +3 Economic gain (land, money, resources, etc)
 * +2 Aiding Ally
 * +2 Defending territory not held for more than 10 years
 * +4 Defending territory not part of heartland but held for more than 20 years
 * +3 Taking territory of similar culture but not part of nation
 * +4 Pre-emptive strike
 * +5 Taking back territory recently held by nation but since lost
 * +6 Aiding Social/Moral/Ideological/Religious Kinsmen who are being oppressed
 * +6 Attacking to enforce political hegemony
 * +5 Defending Heartland from attack that will not cripple/ destroy nation
 * +9 Defending Core/heartland from possibly fatal attack
 * +10 Defending from attack that will wipe out nation and culture.
 * Modifiers
 * -2 Non-democratic Government
 * +3 Democratic government
 * -9 Government not supported by people
 * -3 War not supported by people (Democratic)
 * -2 War not supported by people (Non-Democratic)
 * +5 Troop Morale High (requires motive over or equal to 5, chance over 4, and larger strength)
 * -5 Troop Morale Low (any of the following: chance below 1, srength less or equal to 50% of opponents, recent war penalty over 5)
 * -5 (Attacker) +1 (Defender) Fighting Guerrilla War
 * -10 Multiple concurrent wars
 * -2 (per defeat) Defeat suffered within the previous two years.
 * Chance
 * Edit count — The edit count of the user controlling the nation (at time of calculation). If the nation is mod controlled, this value is equal to 0.
 * Turns — Length of time the user has participated in the map as this nation, measured in turns. Again, if the nation is mod controlled, this value is equal to 0.
 * Nation age
 * -10 Newborn nation (less than 5 years since gov change; 3 years if popular revolt)
 * -5 Young nation (5–25 years since government change)
 * +0 Maturing nation (25–75 years)
 * +5 Mature nation (75–200 years)
 * +0 Old nation (200–300 years)
 * -5 Ancient nation (300–500 years)
 * -15 Antique nation (more than 500 years).
 * Nation size
 * -10 Very small (eg. OTL Fiji)
 * -5 Small (eg. OTL New Zealand)
 * 0 Medium (eg. OTL Spain)
 * +5 Modest (eg. OTL Sweden)
 * +10 Large (eg. OTL United States)
 * +15 Very large (eg. OTL Roman Empire)
 * -10 Extremely large (eg. OTL Russia)
 * Participation
 * -5 User not active (no action in past 4 turns)
 * 0 User moderately active (no action in past 2 turns or mod-controlled
 * +5 User active (action every turn on average)
 * Troops
 * Theatres of war
 * +2 One front
 * -5 Two fronts
 * -7 Three or more fronts
 * Concurrent wars
 * 0 None
 * -2 One concurrent war
 * -5 Two concurrent wars
 * -7 Three or more concurrent wars
 * Recent wars
 * 0 None in the past 10 years
 * -2 Conflict(s) in the past 10 years in which victory was achieved
 * -5 Conflict(s) in the past 10 years in which this nation was defeated
 * Other stuff
 * Victim of a theater nuke (Castle Bravo, Tsar bomb, UGM-27 Polaris, etc)= attacker +5, Defender -5.
 * Victim of a tactical nuke (Davy Crockett, SDDs, suitcase bombs, Hiroshima, etc)= attacker +3, Defender -3.
 * Sent spies in to the defender's nation the previous round to gain secret knowledge for the attacker= attacker +1, Defender -1.
 * Total