Time for a much needed update.
I have given myself a good kick up the butt to get things moving along again and surprisingly the short break helped me clear my mind and solve some complex coding problems.
Whilst I hate providing constant updates without screenies, I think the below items should give you a good idea of how things are progressing.
Production System
This whole feature is now pretty much complete. The vision I had around resources feeding into buildings which in turn produce production resources and equipment is complete. The whole system has been rewritten about 3 times and I am confident that the current version is as fast and modular as I can make the code.
Unit Supply System - Damage Allocation and Equipment Stats
This feature is also complete with each unit now having its equipment and personnel quantities updated to reflect its current HP level. Equipment losses are randomly generated based on a 'head-ache inducing' algorithm that ensures specific rules are always followed (i.e. you can't have equipment without personnel) when allocating HP damage across the equipment values.
For those curious, each unit in the game has a table of equipment (TOE) associated with it that tells the game how its max HPs are distributed across personnel and equipment.
Unit Supply System - Resupply and Recovery
The other side of the supply system coin is the healing of units. This code is also finished but still needs some robust testing.
On each player's turn, the game checks a set of criteria that enables each unit to be resupplied (heal HPs):
- Rule 1 - Is the unit cutoff (identical to the WWII RED mod, units capture tiles as they progress across enemy territory and convert the tile culture). Cutoff units will not get resupplied at present, but this probably needs to be refined further to avoid player abuse of AI which is not aware of the supply system!
- Rule 2 - Is a unit connected to a city that has a supply depot? Simply being connected to a city is not enough.
- Rule 3 - Is there enough personnel and equipment in the supply pool to resupply the unit? Each turn, a unit is healed 6HP which is distributed across personnel and equipment. If you lack a specific equipment type then the unit wont get the full 6HP for that turn and so on.
Aggressive AI
Reminder - The AI nations are Germany, Italy, Hungary, Slovakia, Finland and Romania. The USSR is the only playable nation.
This is currently my main focus and I have been running numerous tests to determine how the AI responds with certain unit types and map features. The biggest surprise is that the AI does work well with the map defensive/offensive features and is capable of conducting similar moves to Operation Barbarossa. Keep in mind that this is on Immortal difficulty with the Soviet side static (all units fortified).
After some major tweaking of unit and city stats, the AI seems to take an identical approach to the real German invasion by splitting its forces towards Leningrad, Moscow and Kharkov. In almost every game, the AI responds to the Pripet Marshes similar to historical circumstances and encircles the Soviet forces around Kiev before target the southern portion of the USSR.
Also, in every test, the AI reaches almost identical frontlines to the real Axis forces by the time the mud season sets in.
However, I have had to 'boost' the AI's efforts a bit by introducing city capture events that provide additional reserve troops. This ensures the AI's mindless slaughter of units does not hinder its initial charge across the map.
I will post more on my learnings as things progress.
Overall, if I was to give an indication of progress it would be around the 60-70% complete mark.
Happy to answer any feedback or questions any of you may have.