Afforess
The White Wizard
(abusign this thread of more code review)
In revision 258, SelectionGroupAI.cpp: You added stack attack for the AI (2x):
if ((!isHuman() | isAutomated()) && getNumUnits() > 1)
I assume you meant the logic OR "||". Not really a bug since bitwise OR will giev you the same result in the end.
Nice catch!
"Compare City Maintenance to Next Largest Empire"
Better RoM addition iirc: For every nation, the maintenance scales with the number of cities in comparison to the largest civ. Only for the largest civ, it scales to the number of the 2nd largest?
I think it's bad practice to mistreat a single empire like that. Use one number for all, either 2nd largest, average, 80% of largest, doesn't matter. Just don't treat one civ completely differently from all others.
I guess the problem with average is that in RevDCM, you're prone to having "balkan-like" states that have only a few cities, which throw off the curve, when the real powerhouses have 10-15 cities each.
Curtailing the human player to give the AIs a chance, that's what difficulty levels are for, those should be modded/extended if that's all this is about. The "largest amoung the rivals" is not as ideal as it seems, it's just unfair.
I've found that modding the difficulty levels (I have a bit), causes very sharp increases in costs, whereas something in the SDK would be less noticeable to the player. Ni ether are really solutions though, they are mainly stop-gaps for the real problem - balancing.
But most importantly: The "Civic Vacuum". What you are doing is creating a complete vacuum, and making all decisions based on the vacuum values of the civics. That is NOT how it works.
Remove that vacuum thing and use the "imperfect kludge/hack" for AI_civicValue() instead (see LM post), that will at least not cost you that many cpu cycles.
Alternatively, create vacuums only for one civic option at a time, while you are evaluating the civic for it. I hope I can have a version of that ready this week in case you don't know what I'm talking about.
I know what you are talking about. I'll look at it and update my AI accordingly.