Scripting AI possible?

Yes, at least in a kludgy sort of way. You have access to AI missions through unit:popMission() and unit:pushMission(). You can use these to "drive" units to particular destinations (whether AI or human) as done in this thread: http://forums.civfanatics.com/showthread.php?t=396273&highlight=unit+move. So at the minimum it would be possible to periodically drive AI units back to their homeland. I think you can do even better than that with missions, but you will have to explore that yourself. I recomend searching for all cases of PopMission and PushMission in existing Lua.
 
It seems logical to also adjust the 'War' setting under 'Major Civ Approach' in the leader XML files. Otherwise it would still be just as likely they declare war... I don't think you want civs declaring war but keep their units at home.
 
Top Bottom