kine100
Warlord
- Joined
- May 8, 2010
- Messages
- 153
@ Patriachica:
For you, I reversed the logic in the CvGameUtils attached.
With this file, you should now only fill the Config file with False, all True being the default.
For example, a caravan could be NO_ROUTE = False. Then the caravan will be obliged to use road or railroad. To even restrict it, for example, caravans cannot use railroad, add: ROUTE_RAILROAD = False.
For a freight train unit: NO_ROUTE = False and ROUTE_ROAD = False.
Probably the Civilopedia will be wrong but right now I'm fed up with this code!
Edit: added the revised Python/Screens/CvPediaUnit.py file to show "Cannot move along..." in the Civilopedia. Packed the whole new version with instructions.
Have fun!
Not sure, if you are still working on it or interested.
I tried the all 3 versions as mod comp and mod itself, they do not work at all.
The units are unrestricted and can go anywhere..
I looked up the every post here and did everything I could,
even did something failures people already had, for figuring out.
I added a locomotive unit hopefully, only can enter a plot has railroad.
Below is the change I made in zRoutes Config.ini
Code:
;It is very easy to use this. Here is some example code:
[UNIT_LOCOMOTIVE] ;We want to work with the locomotive
ROUTE_ROAD = True ;We want the locomotive to require that a road be on the plot
Hope, you still can see this post..