Getting civilian units from point A to B while avoiding hostile units

Pazyryk

Deity
Joined
Jun 13, 2008
Messages
3,584
I know the AI isn't terribly good at this anyway, but I assume that there is at least some logic for it when it sends missionaries, prophets or great merchants out to foreign cities.

Is there any way to access this logic in Lua? Does this have anything to do with Unit.ExecuteSpecialExploreMove?
 
Let me bump this by asking a second question:

Do AI great people and missionaries make any attempt to avoid being captured by hostiles including barbs? (I know workers and maybe settlers have some different logic.)
 
Do AI great people and missionaries make any attempt to avoid being captured by hostiles including barbs?

Doesn't look like it. The code is in CvHomelandAI.cpp - search for "(Plot|Execute)(Missionary|Inquisitor|Prophet)Moves". Workers and Settlers get formed into "armies of two" (ie them plus an escort) and moved around as a single formation. Religious units and Great People get to fend for themselves, being sent to a target plot with a simple PushMission(MISSION_MOVE_TO, pTargetPlot)
 
Back
Top Bottom