Wars involving the United Republics (Night of the Living Alternate History Map Game)

Current Algorithm
Location

Location goes by capital city.
 * at the location of the war: 5
 * next to the location of the war: 4
 * close to the location of the war: 3
 * far from location of the war: 2
 * other side of the world: 1
 * Antarctica: 0

Tactical Advantage
Defender: Attacker:
 * No defenses, open field, etc: 1
 * High ground/ambush: 2
 * Basic earthworks, makeshift defenses, ruins: 3
 * Fortifications, Dug in defenses: 4
 * High-security fortress: 5


 * No defenses, open field, etc: 1
 * High ground/ambush: 2

A country receives high ground/ambush if:

1)The battle location, or area where the army in question is located has a high topographic prominence, meaning it is surrounded by areas of significantly lower elevation. Even plateaus count, but it must be so that the enemy has to climb the mountain to capture the location.

2) The defenders are meeting a force invading from the coast. This means in all invasions involving crossing water in boats/ships and meeting an enemy immediately at the beach starts at this level.

Nations Per Side on the War

 * M for military aid (+3), S for supplies (+2), V for vassalization or subordination (-1) and then W for withdrawal (-1). So a list of belligerents read like China (L), Zhuang Warlords (MVW), Japan (M), Korea (MW), Hawaiian rebels (MV), Mali (SW), creating a score of 13

Military Development

 * Your current army score * 10
 * If you are defending, your industrial score is also included, multiplied by 4
 * If the battle is near water, and you have a navy stationed nearby then your naval score is also included, multiplied by 3

Expansion

 * expansion: -1 for every turn used for expansion in the past 10 years

Motive

 * motive is life or death (country's sovereign existence is threatened): 10
 * motive is religious: 7
 * motive is social or moral: 6
 * motive is political: 5
 * motive is economic: 3

If there are multiple motives, the one told to the army will be selected.

Chance
0 to 9 points will be awarded to each person based on chance. Factors will be the opponent's edit count on the wiki, and the precise time when the country declares war or acknowledges the other's declaration of war. The product of the non-zero digits of the time by UTC (0:00 yields 1) will be written as a percentage of the opponent's edit count at the exact time of the declaration. If the resulting number is less than one hundred percent, the reciprocal is taken. The result is multiplied by pi and the hundredths digit is the amount of points that person gets (e.g. 123.8377% yields 3). The algorithm is online for fairness, but I will be the moderator.

Stability

 * Your current stability divided by two

Participation
All nations get a +10 on this

Leader
To determine whether or not your general lives take a random number (0-9) and multiply that by the number of enemy soldiers over friendly soldiers. If no exact number of soldiers is known approximations can be used. That number determines the fate of your general.
 * If your army is being commanded by an established general or leader then you will receive a bonus
 * To determine leader bonus:


 * 8 or higher - General is killed
 * 6.9 to 7.9 - General is severally wounded and is no longer able to serve
 * 5.9 to 6.8 - General is wounded and cannot serve for the amount of turns that is your number /2, rounded down
 * 5.8 or lower - General is fine

Note: Depending on the situation your general may be killed after the battle.

Next do the following:

“Gen” is either 1 if the general is alive, and 0 if the general dies during the leader bonus determination or if not present. Next find the amount of victorious battles your general led, divided by their total amount of battles they commanded in, plus their experience, a random number determined at general’s creation. If your number is a decimal it is rounded up. If your general has commanded more than three battles and has one every one of them, then their total is multiplied by 1.3

Gen((wins+1)/total+1) + Exp)

Number of Troops

 * Friendly soldiers / Enemy soldiers

Other

 * Countries in civil disarray are able to resist invasion by a factor of 1.5. However, they may not take territory in another country
 * If X countries attack another country, they have to take 100X/(X+2)% of their opponents' territory to facilitate a full government transplant.
 * Expansion into countries not fully united is multiplied by 1.5, but it does not affect how well the country fares in war if it wins the war.
 * if your leader is killed then ten points is subtracted from your grand total

France
Total: 97
 * Location (close to the location of the war): 4
 * Tactical advantage: 3
 * General: (4/6 + 5) = 6
 * Italy(MS): 5
 * Motive: 10
 * Stability:38
 * Army: 10
 * Industry: 4
 * Navy: 3
 * Expansion : 0
 * Chance: 4
 * UTC time: 21:17
 * Edit count: 783
 * (783/14)*pi=175.70 4 7
 * Participating in the war: 10

Spain
Total: 56
 * Location (at the war): 3
 * Tactical Advantage: 1
 * General: (8/8 + 5) = 8
 * Portugal(V): 3
 * Motive: 6
 * Army: 2
 * Expansion : -2
 * Stability: 20
 * Chance: 5
 * Participating in the war: 10

Result
The French manage to hold off the Spanish long enough for reinforcements to arrive. The Spanish suffer large casualties and are forced to retreat south.

Discussion
(On the talk page you can discuss changes that should be made to the algorithm, and ask questions)