Road Vehicles constantly take the "Unsafe route".
Moderator: OpenTTD Developers
Road Vehicles constantly take the "Unsafe route".
At the moment in one of my games, I have 2 fairly large cities whoch have started to merge, I have running between them a fairly decent bus and mail service, and inbetween the two cities I have a series of rail tracks that hold A LOT of traffic.
Now because I dont want to lose any vehicles, I have built bridges over the tracks (of which I have about 6 running parrallell), but the town councils are building roads to each other, crossing the tracks.
N9ow my bridges are set at such a posistion as to make the crossing over the tracks from one stop to the other quickly and safely, but my busses and mail trucks keep on using the town council roads that cross the tracks, with predictable results. I lose on average 4-5 busses/trucks a year, which is rather annoying.
Now I understand there is a penality for the slope on the bridge, that I have no propbles with, because that just stops you building stupid bridges that dcross nothing, however when it comes to a situation as described above, is it possible to add a "safety" penality where the more tracks a road crosses, the higher the penalty, which would force the busses to use the bridges? Unless of course there is a 2nd "safe" route which has no slopes or rail tracks and is still in the right direction?
I would attempt to do this myself, but what I know of C is next to nothing and it would probably take me about a year to get up to the required standard to be able to program in such a feature.
Now because I dont want to lose any vehicles, I have built bridges over the tracks (of which I have about 6 running parrallell), but the town councils are building roads to each other, crossing the tracks.
N9ow my bridges are set at such a posistion as to make the crossing over the tracks from one stop to the other quickly and safely, but my busses and mail trucks keep on using the town council roads that cross the tracks, with predictable results. I lose on average 4-5 busses/trucks a year, which is rather annoying.
Now I understand there is a penality for the slope on the bridge, that I have no propbles with, because that just stops you building stupid bridges that dcross nothing, however when it comes to a situation as described above, is it possible to add a "safety" penality where the more tracks a road crosses, the higher the penalty, which would force the busses to use the bridges? Unless of course there is a 2nd "safe" route which has no slopes or rail tracks and is still in the right direction?
I would attempt to do this myself, but what I know of C is next to nothing and it would probably take me about a year to get up to the required standard to be able to program in such a feature.
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
Well you are in luck, peter1138 made a patch that does exactly this. I will give him a shout to come and tell you more.
Here is a link to his test version, I am sure he won't mind me posting it here (if you do Peter, errr, it wasn't me!):
http://petern.bucks.net/ottd/npf_crossing_penalty.diff
So just apply that, compile and enjoy!
Here is a link to his test version, I am sure he won't mind me posting it here (if you do Peter, errr, it wasn't me!):
http://petern.bucks.net/ottd/npf_crossing_penalty.diff
So just apply that, compile and enjoy!
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
Just one little problem, for some reason I cannot compile the source (not even the latest version), this is despite the fact that I am following the instructions in the Wiki to the letter.lucaspiller wrote:Well you are in luck, peter1138 made a patch that does exactly this. I will give him a shout to come and tell you more.
Here is a link to his test version, I am sure he won't mind me posting it here (if you do Peter, errr, it wasn't me!):
http://petern.bucks.net/ottd/npf_crossing_penalty.diff
So just apply that, compile and enjoy!
When I tell it to make, well it compiles everything BUT openttd.exe, it stops on that saying there is 1 error.
Before that it goes "linking to openttd.exe" and then has a series of errors to do with saveload.c
what I get is as follows
Code: Select all
===> Linking openttd.exe
saveload.o(.text+0x10ed):saveload.c: undefined reference to `inflateInit_@12'
saveload.o(.text+0x115e):saveload.c: undefined reference to `inflate@8'
saveload.o(.text+0x11ca):saveload.c: undefined reference to `inflate@8'
saveload.o(.text+0x120b):saveload.c: undefined reference to `inflateEnd@4'
saveload.o(.text+0x1266):saveload.c: undefined reference to `deflateInit_@16'
saveload.o(.text+0x12f2):saveload.c: undefined reference to `deflate@8'
saveload.o(.text+0x13b4):saveload.c: undefined reference to `deflateEnd@4'
saveload.o(.text+0x13f4):saveload.c: undefined reference to `deflateEnd@4'
collect2: ld returned 1 exit status
make: *** [openttd.exe] Error 1
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
Here's an updated version for current SVN. It renames the parameter to be more meaningful as well...
- Attachments
-
- npf_level_crossing_penalty.diff
- NPF level crossing penalty
- (1.71 KiB) Downloaded 103 times
- latinoloco
- Transport Coordinator
- Posts: 315
- Joined: 24 Apr 2005 23:06
- Location: Sydney, Australia
This is just one of the reasons that I wanted this feature request to be implemented:
http://ledowopenttd.blogspot.com/2005/0 ... -tile.html
http://ledowopenttd.blogspot.com/2005/0 ... -tile.html
Who is online
Users browsing this forum: No registered users and 0 guests