Can I customize the AI of units?

kitfox

Chieftain
Joined
Mar 29, 2018
Messages
29
I'd like to know if it is possible to program the AI of units. Most of the mod tutorials I've found are just about tweaking the XML files which can affect a few hyper parameters such as how aggressive they are, but nothing where you can just rewrite their decision code. I've also looked through the lua scripts in Civ 5's Assets directory but can't find anything relevant.

I've seen some posts that have hinted that some of the bigger mod overhaul packages can create custom AI, but I don't know how I might get started on this or if maybe I'm misunderstanding things. Is there a way to customize the AI?
 
Absolutely, but you'd need a decent grasp of lua to do so.
 
If I remember correctly, the AI related stuff is hard coded and cannot be changed. You can script AI to do custom actions yes, but one cannot force the AI to say move to a certain tile to attack.

Likewise, there is no way to get the flavor values and strategies of the leaders in question, only the default values assigned to the leaders.
 
Back
Top Bottom