• Firaxis announces Civilization 2K23! Discuss these news with us here.
Resource icon

Unit Production AI Improvements for VP v 2

In short, this modmod introduces soft checks to AI army composition to help it create more balanced armies. This is done by introducing new AIMilitaryStrategies, Flavors and UNITAIs for each unit type*. When an AI player has too few of a certain unit type, it gets a bonus to prioritize the production of that type, and vice versa when it has too much. For a long description on what it does and why, please refer to: https://github.com/LoneGazebo/Community-Patch-DLL/pull/878

I welcome any feedback on the ratios above or suggestions where we can further employ these additions. Just to give an example, I modified AIGrandStrategy_FlavorMods so that civs going for domination get a bonus to bombers and siege units, while the culture, diplomacy and science get it for fighters.
If the results are good this may get integrated into the base VP, so any testing is much appreciated.

Works with new units/civs/leaders. I specifically tested with 4UC, ENW, Macedon/Greece Split and Kushan Empire, highly unlikely that other custom civs will have any issues. Units will get assigned the correct UNITAI but may miss specific flavors and the new leaders will get the default flavor value of 5 for new flavors. To be honest this shouldn't matter much, UUs get spammed by another function anyway. You can make your custom leader optimized for UPAI by referencing new flavors/unitais with a IF EXISTS check.

Many thanks to Recursive, ilteroi and the discord community for their help.

- Rewrite need/have enough recon code (UPAI doesn't modify this as it's handled by another part of the code)
- Better integration between new flavors and technologies&policies
- A trigger to auto-detect UUs and give boost to related flavor of custom leaders

*unit type in this context refers to the broader types such as melee, ranged, bomber, fighter, not the specific unit types used in database like "unit_mongolian_keshik"

You can find options to reduce Leader Flavor randomization in NewLeaderFlavors.sql . The same file also includes and option to remove randomization from city production decisions (includes both buildings and units). Both are commented out/disabled by default to make comparisons with the base VP more reliable.

See here for detailed information
First release
Last update
0.00 star(s) 0 ratings

More resources from balparmak

Top Bottom