Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Mar 23, 2019 2:10 pm

All times are UTC




Post new topic  Reply to topic  [ 23 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Sat Sep 02, 2006 5:17 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 08, 2006 8:33 am
Posts: 511
Location: Germany
Oki i developed a patch that stops road vehicles in front of a level crossing and not on the rail if they have to wait.
Currently i'm trying to get it working with the overtaking function together, so that not every vehicle is checked twice (first time the overtake function, the other time if it has to stop before a level crossing) and that vehicles continue driving and do not stop befor a crossing, if the vehicle in front of it drives over the crossing rail.

edit1: added diff/patch file
Here are some screenshots :)


Attachments:
File comment: Only a test if it works with road stops, too
Ilsenmünster Transport, 25th Dec 1950.png
Ilsenmünster Transport, 25th Dec 1950.png [ 37.5 KiB | Viewed 5796 times ]
File comment: only a quick test if all vehicles are doing their job right, and have a look at the CPU usage (there are 103 vehicles on the screen, if somebody wants to know)
Freudenberg Transport, 20th May 1952.png
Freudenberg Transport, 20th May 1952.png [ 64.96 KiB | Viewed 5797 times ]
rv_crossings_1.diff [5.04 KiB]
Downloaded 264 times


Last edited by gigajum on Sun Sep 03, 2006 3:54 pm, edited 2 times in total.
Top
   
 Post subject:
PostPosted: Sat Sep 02, 2006 5:20 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Mar 26, 2004 1:27 am
Posts: 1628
Location: Netherlands, Enschede
I don't get it... what exactly does this patch change?

_________________
Creator of the Openttd Challenge Spinoff, Town Demand patch
The path to riches, a report on playing on a daylength server on ultra hard mode.


Top
   
 Post subject:
PostPosted: Sat Sep 02, 2006 5:24 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 08, 2006 8:33 am
Posts: 511
Location: Germany
That road vehicles do not wait on a crossing tile and a train crashes into them. It is possible that a train hits a vehicle, but then both are driving and not one of it is waiting at that tile.


Top
   
 Post subject:
PostPosted: Sat Sep 02, 2006 5:25 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Sep 20, 2004 10:45 pm
Posts: 11491
Location: Black Mesa Research Facility - New Mexico
The vehicles will not stop 'on' the rail-road crossings, but infront of it if it notices a stop behind the crossing in that order preventing a crash. :wink:

EDIT: I was too late with my response. :wink:

_________________
Image
Authority is something you deserve, not something you impose. -Wile E. Coyote (TT-Forums member)


Top
   
 Post subject:
PostPosted: Sat Sep 02, 2006 9:04 pm 
Offline
Tycoon
Tycoon

Joined: Mon Mar 08, 2004 1:10 pm
Posts: 2088
good idea. A diff would be nice, then people can give constructive feedback and also bugreports.
tip: add numbers to your diffs, so the first one is named _1.diff and so on. This is good if/when you update. People will be able to figure out if they are looking at the newest version :wink:


Top
   
 Post subject:
PostPosted: Sat Sep 02, 2006 10:09 pm 
Offline
Engineer
Engineer

Joined: Sat Jul 22, 2006 12:29 pm
Posts: 42
Location: Austria
so its impossible to kill other players vehicles, right?

but will it be possible that a vehicle breaks down while exiting the level crossing and another vehicle closing up to it by going on the level crossing to get killed probably?

btw:
maybe you can check the behavior of trains killing vehicles too - there should be really a chance of derailment if a train crashes a bus/truck - for example 10%

_________________
http://www.rebell.at/


Top
   
 Post subject:
PostPosted: Sat Sep 02, 2006 11:11 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 08, 2006 8:33 am
Posts: 511
Location: Germany
suit wrote:
so its impossible to kill other players vehicles, right?

but will it be possible that a vehicle breaks down while exiting the level crossing and another vehicle closing up to it by going on the level crossing to get killed probably?

btw:
maybe you can check the behavior of trains killing vehicles too - there should be really a chance of derailment if a train crashes a bus/truck - for example 10%


No, it is still possible to kill road vehicles. If they break down over the rail or if the can't drive fast enough over the crossing / train is fast enough.

Yeah great idea, but that should be a bit more realistic. 10% is a fix value, maybe calculate it is better. Ok i do not have an idea what formula to use there, but a train with 20+ coal or iron waagons will in all probability not derail, because it is too heavy. But a Small train with 5 passenger waggons will react different as a freight train (imo)

Bjarni wrote:
good idea. A diff would be nice, then people can give constructive feedback and also bugreports.
tip: add numbers to your diffs, so the first one is named _1.diff and so on. This is good if/when you update. People will be able to figure out if they are looking at the newest version :wink:


I'll add one it if i find some free time today :)


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 8:12 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Mar 26, 2004 1:27 am
Posts: 1628
Location: Netherlands, Enschede
oh I see now, it checks if there is a train in the signal block, not just the crossing tile, right? great, this was needed for a long time.

the other thing that occurs is that if you have a double track, the road vehicles will drive across the first crossing, then stop at the second because of a train and then get hit by a train on the first track while waiting. Is that fixable? :)

_________________
Creator of the Openttd Challenge Spinoff, Town Demand patch
The path to riches, a report on playing on a daylength server on ultra hard mode.


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 9:16 am 
Offline
Director
Director

Joined: Tue Feb 22, 2005 9:51 am
Posts: 586
Quote:
oh I see now, it checks if there is a train in the signal block, not just the crossing tile, right?

No, it has nothing to do with the trains. It simply stops road vehicles from queueing on the actual track square, and therefore getting cleaned up by trains while waiting for the road to clear. Wont do anything for moving or broken down ones. Still a nice patch though; every little bit helps.


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 10:52 am 
Offline
Engineer
Engineer

Joined: Thu Mar 03, 2005 8:00 pm
Posts: 3
What about patching the vehicle breakdown code so that a breakdown does not occur on railroad crossings or at least is very unlikely on them?


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 11:06 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Sep 20, 2004 10:45 pm
Posts: 11491
Location: Black Mesa Research Facility - New Mexico
that would make the game unrealistic, if you want to prevent a certain bus from having breakdowns you can make his complete route a railroad crossing. :P

Well IMHO it's just weird a vehicle can't have a breakdown on a level crossing. :wink:

_________________
Image
Authority is something you deserve, not something you impose. -Wile E. Coyote (TT-Forums member)


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 1:15 pm 
Offline
Engineer
Engineer

Joined: Sun May 28, 2006 9:21 am
Posts: 68
Location: 52° 13' N 21° 2' E
In real life most of collisions of trucks with trains have been caused by breakdown of truck, not because truck had to stay on crossing because there were cars standing in the way preventing truck from leaving it.


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 2:12 pm 
Offline
Engineer
Engineer

Joined: Sat Jul 22, 2006 12:29 pm
Posts: 42
Location: Austria
ddream wrote:
In real life most of collisions of trucks with trains have been caused by breakdown of truck, not because truck had to stay on crossing because there were cars standing in the way preventing truck from leaving it.


good point - there is a rule, that a driver is only allowed to enter a crossing or level crossing if its possible to leave it before it gets red

most people ignore this rule and place their cars right on the level crossing to get hit by car

maybe truck-drivers in ottd are smart enough dont do that ;)
but crashes and desasters are part of the game and make it more challenging

but there should be a factor like "human fault" - a truck driver can simply nap a bit and/or ignore the traffic light at the level crossing (for example with 5% chance) if a train comes through right at this moment they will crash (allmost impossible in early game, but very likely in later game with lots of trains and vehicles)

---

according to my upper post: there should be a chance of derailment for the train - 10% als fixed value is bad

but the calculation based on weight suggested by gigajum is good

a small and light loco can easier derail than a heavy train - a fast train can also easier derail then a slow one

for calculating the chance of derailment following factors should be important

- weight of the road vehicle (empty = derailment is unlikely)
- speed of the train (slow = unlikely)
- weight of the train (heavy = unlikely)
- length of the train (short = unlikely) <- not sure about that

_________________
http://www.rebell.at/


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 2:53 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 08, 2006 8:33 am
Posts: 511
Location: Germany
suit wrote:
- length of the train (short = unlikely) <- not sure about that


It has more to do with the weigth of a train. Sure if you have a train which is a half kilometre long it wont derail complete. But a short one will derail completely. But there is one problem: What to do with the remaining not derailed waggons? In normal life you can send a new lok, but in openttd that is not possible. So i have to code that the complete train gets destroyed?


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 3:14 pm 
Offline
Engineer
Engineer

Joined: Sat Jul 22, 2006 12:29 pm
Posts: 42
Location: Austria
good question - derailing a 10-tile train with 19 cars by crashing an empty bus? unlikely

but i guess there is no other solution?

_________________
http://www.rebell.at/


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 3:19 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 08, 2006 8:33 am
Posts: 511
Location: Germany
suit wrote:
good question - derailing a 10-tile train with 19 cars by crashing an empty bus? unlikely

but i guess there is no other solution?


Not until someone invents shunting to openttd


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 4:00 pm 
Offline
Tycoon
Tycoon

Joined: Mon Oct 25, 2004 3:39 pm
Posts: 4349
Location: Mississauga
This patch looks promising. Once I tried to do that but I didn't know where to start. Could you please upload a diff file?


Top
   
 Post subject:
PostPosted: Sun Sep 03, 2006 4:30 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 08, 2006 8:33 am
Posts: 511
Location: Germany
done, about 30 min ago (see first post)


Top
   
 Post subject:
PostPosted: Tue Sep 05, 2006 5:18 pm 
Offline
Route Supervisor
Route Supervisor

Joined: Wed Mar 08, 2006 8:33 am
Posts: 511
Location: Germany
suit wrote:
- weight of the road vehicle (empty = derailment is unlikely)


The problem is that only trains have a declaration of weight. So i only can calculate the weigth of their cargo and not of the whole vehicle. I'm glad, if anyone is able to figure out what's the weight of each road vehicle used in the game.

Please note: That feature will become an extra patch, because it has more to do with the disasters and it need no code from this patch.


Top
   
 Post subject:
PostPosted: Tue Sep 05, 2006 6:58 pm 
Offline
Director
Director

Joined: Tue Jan 03, 2006 8:45 pm
Posts: 560
Location: Netherlands
Use the MiniIN then. There the road vehicles do have weights, for the purpose of realistic acceleration. Also, road vehicles in newgrfs also have weight as one of their properties.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 23 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.