Requesting help from AI modders?

I have introduced 6 new monk units with different skins with unit ID 1691, 1693, 1695, 1697, 1699, 1705 into the game. Using a free auto-upgrading Tech at Dark Age, I upgrade the original monk 125 with the new units. So as soon as the AI attempts to buy a monk 125, it gets upgraded to new ID. But it seems like the AI is unable to recognize the new monk units as monks, so it always feels that it is lacking monks(0 monks) and thus it continuously tries to train monks draining itself of it’s gold. Is there a way to make it recognize the new unit IDs of monks?

I don’t know a whole lot about how the AI works, but from working with the FE AI Builder, I noticed that the AI files group units into “lines” of related units. (Such as swordsmen being the “militiaman-line”.) I’d assume you’d need to find the value that determines what is in the monk line and add the new IDs to that. Hopefully someone with more information will be able to point you in the right direction, though.

Thanks for the reply! Also a huge thanks for your contribution of AI builder to the community, it will be highly useful for scenario creators.

I have seen the unit groups, i.e “lines”, infact I am using it in my HUA mod, units.per script to build a custom AI that builds more of a specific unit line for a specific civ:
I am not sure how to assign such parameters to new unit IDs. How to put a limit on how many of the new unit ID (new monks) the AI trains?

I checked the AI scripts and used the Genie Editor, but I couldn’t figure out where the unit lines are defined. I eventually found this site (, but still no idea of how to edit the unit lines.

You may have to run the check using the unit ID itself to check how many of them exist. If the AI can train either type of monk, you’ll have to make sure to check for the combined total of both types.