History of World - Combat System

smallstepforman

Megalomaniac
Joined
Oct 30, 2001
Messages
130
Location
Melbourne, Australia
<taken from History of the World Developer Blog>
http://members.optusnet.com.au/hotw

Combat system
Most Empires were built with forged iron, so unit combat is a major component which can make/break a game. For HotW, I plan to use the following combat system. Each player controllable Unit will consist of 10 miniature soldiers which move as a squad. Each soldier will have the following stats:

Health 8 possible values [0-7]
Rank 8 possible values [0-7]
Morale 4 possible values
Endurance Percentage number [0%-100%]

The unit health will range from [0-7]. This will be colour coded (0=black/dead, 1=white/hospitalised, 2=red, ... , 7=green 100% healthy). An interesting concept is that soldiers may be hospitalised - they do not participate in battles, but they do slow down the unit movement. When the unit is resting in a city, each soldier will restore one health point per turn. It will take 6 months (turns) for a hospitalised soldier to recover to full health. If the city also has a barracks, each month a soldier will be trained to fill vacant possitions in a squad (the new soldier will hold the rank of private, since they have no combat experience).

After a unit participates in a battle, each surviving soldier is promoted to a higher rank. The ranks modify the soldiers Attack/Defense statistics by +25% per rank (to a max of +175%). The soldier ranks are:
0 - Private
1 - Corporal
2 - Sergeant
3 - Lieutenant
4 - Captain
5 - Major
6 - Colonel
7 - General

The unit moral has 4 values. It starts from 100% (loyal), and can randomly decrease by 25% after every health point loss. If the moral reaches zero, then the soldier will throw away their uniform, and desert the armed forces (there is only so much blood they are prepared to give to the cause). So don't expect your soldiers to fight suicidal battles, they'll just pack up and go home. After every military victory, the moral increases until its back at 100%.

Each unit type has a Attack/Defense/Range/Power/Movement statistic. When engaged in battle, the cumulative Attack/Defense ratio determines the winner. Range is used by artillery units. Movement is the number of tiles a unit can move per turn. Power determines the number of health points a soldier will loose when defeated in combat. How does the battle system work?

For a 1 on 1 combat, the following calculation takes place: For each soldier in a squad, do the following calculation
Determine attacker points eg. a Captain swordsman (2-1-1-1-1) has 2*(4*25%) = 4
Modify attack points by endurance percentage (I'll explain this later) 4*100% = 4
Determine defender points eg. a Corporal spearman (2-1-1-1-1) has 2*(1*25%) = 2.5
Modify defender points by endurance percentage 2.5*100% = 2.5
Add numbers together eg. 4 + 2.5 = 6.5 (A)
Add the lower of the 2 values to the previous sum 6.5 + 2.5 = 9 (B)
Generate a random number from 1 to total sum B
We have 3 ranges - if the random number falls in the 1st range, the attacker wins. If it falls in the 2nd range, the defender wins. If it falls in the 3rd range, they both take damage.
The looser takes damage based on the winners firepower.
Generate another random number to determine if looser morale drops.
Decrease endurance for soldiers participating in battle by 5-10%
This is repeated for each soldier in a unit. If Unit A has more soldiers than unit B, then the remaining soldiers in Unit A can continue battling with unit B, but his time soldiers in unit B have lower endurance. This allows simulating overwhelming numbers of the attacking forces (ie. a unit of 10 swordsman can overwhelm a unit of 2 musketeers, even though one on one the musketeers have an advantage). The battle continues until either one side is defeated (with a few hospitalised units left), or both parties are too tired to continue (once endurance reaches zero for both units). This allows some soldiers to survive major battles, and regroup.

Since HotW plans to have a strategy phase and an action phase, most likely multiple units will converge on a group of units (ie. when attacking a fortified position). The cycle of determining the battle outcome will be similar to what I've already outlined, but the sequence will be slighly different:
First determine damage caused by ranged attacking units
Determine damage caused by ranged defending units
Each best attacker engages best defender (attacking units on both sides)
If one group has more units than the other, continue engagement (fresh units on tired units)
Repeat cycle until units eliminated or units too tired to continue
If oppossing enemy unit eliminated, increase moral for all friendly soldiers in battle
Increase rank of all surviving soldiers (even hospitalised)
During the next turn (after the strategy phase), the endurance points for each soldier will reset to 100% for the next battle. Hopefully, this battle system will allow for very strategic gameplay. Ideas and comments are welcome.

Another factor which will contribute to unit statistics are scientific advance related modifiers. In HotW, I plan to implement a technology tree which is suitable for a 40 year game timeframe. This means that a player will research advances which can modify the A/D/R/P/M statistics of a unit type. Each advance will allow modifications to one or two of these stats by 25% for each unit type, so in effect, players will be waging battles with customised units. When you see a horde of cavalry approaching your cities, don't be suprised if they have a higher movement rate than what a normal cavalry unit might have. Luckily you invested years of research on extending the range of your cannons, so you can hit them while they're still far away. Guess who will be suprised now :-) The strategic choices that you as leader can make will determine the direction the game will take.
 
Back
Top Bottom