A bit of help required from more seasoned modders

GeneralAmadeus

Chieftain
Joined
Dec 22, 2019
Messages
91
So I proposed and sponsored a proposal (3-11). While trying to make it work I have encountered some problems. While I would like to finish this myself some guidance would be appreciated.

1) I am having problems finding the file where Air Recon range is determined.
2) Can't find where AI logic for choosing promotions is located.

EDIT: 1) Is solved.
 
Last edited:
This may have changed, but I remember that promotions were effectively random. I don't think there are flavor values set for promotions (taking a look in assets/gameplay/xml/units in the main install)
 
Promotions are scored based on the bonuses/maluses they give, and the state the unit is in.
 
Here is a github thread that looks relevant

It suggests the logic is within Community-Patch-DLL/CvGameCoreDLL_Expansion2/CvUnit.cpp
 
Last edited:
My first thought when making a promotion mod, it's the OrderPriority column, as I can't see any AI picking my custom promotion. But it's only for the UI where the promotion is located. I think AI selects promotions randomly based on the promotion's ability.
 
Yea I did that code a while ago, it tries to value each promotion based on the bonuses it gives and then chooses the highest value. If your promotion isn't being chosen maybe the bonus it gives isn't being included or it's lower than the other options.
Lmk if you need help.
 
Top Bottom