Alpakinator
Chieftain
- Joined
- Jun 30, 2020
- Messages
- 45
I'm trying to figure out why AI builds so few ships on maps with lots of coastal cities. It usually makes 70-90% of it's army land based which is often detrimental. But idk where in code, AI decides which unit production strategy to adopt.
in 'CvUnitProductionAI.cpp' I noticed for example:
what does this code do?
I can't find this strategy flavor defined in any .sql file. Is it in .db? Also AI would never adopt this strategy, based on AI logs from autoplay game on archipelago. AI uses 'MILITARYAISTRATEGY_NEED_NAVAL_UNITS' though, leading to production of melee and ranged ships (usually melee). It however is not used in 'CvUnitProductionAI.cpp', but in 'CvMilitaryAI.cpp' instead:
Could someone knowledgeable on CBP AI help?
Are these 'naval_ranged', 'naval_melee' strategies ever used? Where in code does AI decide to use 'MILITARYAISTRATEGY_NEED_NAVAL_UNITS' strategy?
in 'CvUnitProductionAI.cpp' I noticed for example:
MilitaryAIStrategyTypes eStrategyNavalRanged = (MilitaryAIStrategyTypes)GC.getInfoTypeForString("MILITARYAISTRATEGY_NEED_NAVAL_RANGED");
MilitaryAIStrategyTypes eStrategyEnoughNavalRanged = (MilitaryAIStrategyTypes)GC.getInfoTypeForString("MILITARYAISTRATEGY_ENOUGH_NAVAL_RANGED");
what does this code do?
I can't find this strategy flavor defined in any .sql file. Is it in .db? Also AI would never adopt this strategy, based on AI logs from autoplay game on archipelago. AI uses 'MILITARYAISTRATEGY_NEED_NAVAL_UNITS' though, leading to production of melee and ranged ships (usually melee). It however is not used in 'CvUnitProductionAI.cpp', but in 'CvMilitaryAI.cpp' instead:
bStrategyShouldBeActive = MilitaryAIHelpers::IsTestStrategy_EnoughNavalUnits(m_pPlayer);
else if(strStrategyName == "MILITARYAISTRATEGY_NEED_NAVAL_UNITS")
Could someone knowledgeable on CBP AI help?
Are these 'naval_ranged', 'naval_melee' strategies ever used? Where in code does AI decide to use 'MILITARYAISTRATEGY_NEED_NAVAL_UNITS' strategy?