How is routing calculated?

JacobP

Chieftain
Joined
Jun 13, 2009
Messages
17
I have been digging for this, but have had no luck so far. I am trying to figure out how the game decides what route to follow when performing Move To or Route To. It appears that the game is trying to minimize movement time, but I can't figure out where that is programmed.

Best thing I can come up with is that these missions have EFFECT_FOOTSTEPS_ON, but I don't see any reference to that anywhere.

I really appreciate the help!
 
It's in the SDK, one of the functions. I believe it trys to maximize two variables, safety and shortest path. It will chose a safe path (e.g a tile with a defense bonus) over a slightly shorter path, so safety is weighted slightly higher. If you you want the specifics, I'd look in the BTS sdk, in CvUnitAI.cpp
 
Back
Top Bottom