User:SolaceEaSw/Algorithm

War Template

 * Attacking Nation:
 * Primary Score:
 * Government:
 * Economy:
 * Technology:
 * Reputation:
 * Population:
 * War Score:
 * Military:
 * Location:
 * Attrition Modifier:
 * Great Leader:
 * Luck:
 * Defending Nation:
 * Primary Score:
 * Government:
 * Economy:
 * Technology:
 * Reputation:
 * Population:
 * War Score:
 * Military:
 * Location:
 * Attrition Modifier:
 * Great Leader:
 * Luck:
 * Result:
 * Attacking Total Score:
 * Defending Total Score:
 * Difference:

Main Score

 * Government
 * Dictatorial Empire: +15
 * Absolute Monarchy: +10
 * Feudal State: +7
 * Constitutional Monarchy: +5
 * Oligarchy: +5
 * Republic: +5
 * Tribal State: +2
 * Economy
 * Rank I: +2
 * Rank II: +3
 * Rank III: +4
 * Rank IV: +5
 * Rank V: +8
 * Technology
 * Rank I: +2
 * Rank II: +4
 * Rank III: +5
 * Rank IV: +6
 * Rank V: +8
 * Reputation
 * Global Power: +15
 * Great Power: +10
 * Regional Power: +5
 * No Power: +0
 * Population
 * <500,000: +2
 * <1,000,000: +4
 * <1,500,000: +5
 * <3,500,000: +6
 * <5,000,000: +7
 * <10,000,000: +8
 * <20,000,000: +10

War Score

 * Military
 * Score = (.9 * troop number)/4000
 * Location of the battle
 * Holy site: +10 for defending, -10 for attacker
 * Capital city: +7 for defending, -5 for attacker
 * Standard city: +4 for defending, -2 for attacker
 * Around river or coast: +3 for everybody
 * Desolate place: +0 for everybody
 * Attrition Modifier (usually for only the attacker)
 * Unfamiliar region (never controlled/visited ever): -2
 * At sea: -4
 * Jungle: -4
 * Desert: -5
 * Winter: -8
 * Mountains: -10
 * Great Leader
 * Great Admiral: +5
 * Great Commander: +10
 * Great Leader: +15
 * Luck
 * Random number generated through google by unbiased mod; number from 10 through -10
 * Reason
 * Attacking:
 * Resources: +2
 * Enforce hegemony: +4
 * Aiding suppressed race or peoples: +5
 * Total annihilation: +6
 * Defending:
 * Defending against enemy trying to steal resources: +4
 * Defending against enemy trying to enforce hegemony: +6
 * Defending against non-fatal attack to heartland: +8
 * Defending against fatal attack to heartland: +10

Result

 * Difference <5: Stalemate, both sides suffer 5% casualties
 * Difference <10: Victory. Victory suffers 10% casualties, Loser suffers 25% casualties
 * Difference >10: Overwhelming victory. Victor suffers 15% casualties, Loser suffers 45% casualties

Examples
Egyptian-Nubian War - Egyptian invasion of Napata City:
 * Egypt
 * Primary Score: 34
 * Government: 10
 * Economy: 4
 * Technology: 6
 * Reputation: 10
 * Population: 4
 * War Score: 11.25
 * Military: 2.25 (10,000 troops)
 * Location: -2
 * Attrition Modifier: -2
 * Great Leader: 5
 * Luck: 4
 * Reason: 4
 * Nubia
 * Primary Score: 25
 * Government: 10
 * Economy: 3
 * Technology: 5
 * Reputation: 5
 * Population: 2
 * War Score: 10.13
 * Military: 1.13 (5,000 troops)
 * Location: 4
 * Attrition Modifier: N/A
 * Great Leader: N/A
 * Luck: -1
 * Reason: 6
 * Result:
 * Attacking Nation's Total Score: 45.25
 * Defending Nation's Total Score: 35.13
 * Difference: 10.12, Egypt occupies the attacked city, and moves forward
 * Casualties: 1500 casualties for Egypt, 2250 casualties for Nubia