[BNW] How we can make Trade Routes use Routes (Roads and Railroads) like normal Units via the DLL?

FlammieJerynZ

Flammy
Joined
Aug 6, 2023
Messages
10
Location
Santiago de Chile
Good day or night everyone!
I hope you all be okay.
I was thinking if can be possible to allow Trade Routes (Internal or International) to use Roads and/or Railroads (just like the other Units) benefiting from their Movement bonuses via modifying the BNW DLL.
This can be possible?
Thank you in advance.
 
Your starting point is in CvGlobals.cpp at the SetInternationalTradeRouteLandFinder(FNEW(CvAStar, c_eCiv5GameplayDLL, 0)); line

You may be able to use a CvTwoLayerPathFinder instead, as this is what is used for unit movement (setPathFinder(FNEW(CvTwoLayerPathFinder, c_eCiv5GameplayDLL, 0));), but I never did fully understand Firaxis' version of the AStar algorithm.
 
Hey, thank you very much!
Yeah, I could check it out and find the desired methods and references to make this possible.
Don't worry about that, I don't understand it too yet :lol: For now, obviously :)
I really appreciate your help and answer, and I hope somebody can be find this useful too.
I'm gonna try it out right now :thumbsup:
Grettings!
 
Top Bottom