Patch: No reliability decrease for stopped trains

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Patch: No reliability decrease for stopped trains

Post by Tekky »

Currently, a train not only loses reliability when it is moving, but also when it is not moving. Apart from this not being very realistic, it also is a big nuisance:
  • For example, if you have several trains with "wait for full load" orders, these trains will lose a significant amount of reliability by the time they are finished loading, so that they will often require servicing again after loading, even if they serviced immediately before loading.
  • When a major deadlock occurs on my network, it can take a long time for me to clear the deadlock. By this time, the reliability of the trains will often have dropped to 0%, even though the trains were not moving and waiting in front of red signals. This reliability of 0% makes it take an absurd amount of time for trains to clear the area that was previously deadlocked, especially if there is a long queue of trains.
Therefore, this patch changes the above behavior of OpenTTD. It causes trains to only lose reliability when they are actually moving. Trains no longer lose reliability when waiting in front of signals or when waiting for a full load.

For discussion about whether it is realistic or not for trains to lose reliability when not moving, please refer to my previous thread in the suggestions forum.

Also, when playing with breakdowns disabled, the reliability of trains no longer drops to 0% if you do not service them. Instead, their reliability stays constant.

This patch is for r17840. It is a very simple patch, as it does not contain any new code. Instead, it merely changes the order of execution of a small piece of existing code. The only thing I actually added was a comment.

I have also attached a Win32 binary and scanned it using VirusTotal. No infections were found.

Legal Information regarding the Win32 binary:
Please note that this program is copyrighted and licensed under version 2 of the General Public License, which means -among other things- that it is distributed without any warranty and you are using it at your own risk. Please see the file COPYING.txt for further information, which is included in the attached .zip archive. I have supplied this notice because it is mandatory according to section 1 of the GPL.
Attachments
reliability.diff
diff file against r17840
(965 Bytes) Downloaded 168 times
reliability_win32.zip
Win32 binary
(3.04 MiB) Downloaded 147 times
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Patch: No reliability decrease for stopped trains

Post by HackaLittleBit »

Trunk! :wink:
Attachments
trunk.jpg
trunk.jpg (53.19 KiB) Viewed 5266 times
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch: No reliability decrease for stopped trains

Post by pavel1269 »

For realistic, when train does not move, it is not loosing reliability? Then, lets park some locomotives for future museums. They would have, lets say, after 200year working locomotive, because it is not moving, it is not loosing reliability?
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Patch: No reliability decrease for stopped trains

Post by sulai »

Tekky wrote:
  • For example, if you have several trains with "wait for full load" orders, these trains will lose a significant amount of reliability by the time they are finished loading, so that they will often require servicing again after loading, even if they serviced immediately before loading.
I see a point here.
Tekky wrote:
  • When a major deadlock occurs on my network, it can take a long time for me to clear the deadlock. By this time, the reliability of the trains will often have dropped to 0%, even though the trains were not moving and waiting in front of red signals. This reliability of 0% makes it take an absurd amount of time for trains to clear the area that was previously deadlocked, especially if there is a long queue of trains.
[/list]
If the transport manager does some mistake, there should be some penalty. If there's a deadlock, trains additionally get stuck because of their reliability. In my opinion, this is part of the challenge, and challenge is what makes the game interesting.
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: Patch: No reliability decrease for stopped trains

Post by Tekky »

pavel1269 wrote:For realistic, when train does not move, it is not loosing reliability? Then, lets park some locomotives for future museums. They would have, lets say, after 200year working locomotive, because it is not moving, it is not loosing reliability?
Of course trains require maintenance from time to time, even if they were not moving. However, it is true that a train requires significantly less maintenance than a train that travels a lot. Therefore, in reality, trains are normally maintained according to distance travelled, not according to time since the last maintenance. My patch tries to simulate this by simply causing trains to not lose any reliability while not moving.

sulai wrote:
Tekky wrote:
  • When a major deadlock occurs on my network, it can take a long time for me to clear the deadlock. By this time, the reliability of the trains will often have dropped to 0%, even though the trains were not moving and waiting in front of red signals. This reliability of 0% makes it take an absurd amount of time for trains to clear the area that was previously deadlocked, especially if there is a long queue of trains.
If the transport manager does some mistake, there should be some penalty. If there's a deadlock, trains additionally get stuck because of their reliability. In my opinion, this is part of the challenge, and challenge is what makes the game interesting.
I personally believe that the deadlock itself and the work required to resolve the deadlock is sufficient penalty. Besides it being unrealistic, I do not see the need to additionally penalize the player by causing trains to brake down all the time after a deadlock.
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: Patch: No reliability decrease for stopped trains

Post by maquinista »

I like this patch. It's much better than setting the breakdown to none.
I like playing with reduced breakdowns, but sometimes there are lots of them, because the trains or trucks leave their stations with 0%. In trucks is not a problem, because They enter in the depot and exit in less than 5 seconds, but trains takes too many time.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
smallfly
Chairman
Chairman
Posts: 892
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Patch: No reliability decrease for stopped trains

Post by smallfly »

This is just a great patch!

To make it complete make the stopped train loosing reliability too but only a bit, so that the 200 years, museum example is obsolete ;)

And stop discussing things like "this is another penalty which makes the game more challenging". I refer to
sulai wrote: If the transport manager does some mistake, there should be some penalty. If there's a deadlock, trains additionally get stuck because of their reliability. In my opinion, this is part of the challenge, and challenge is what makes the game interesting.
The game OpenTTD is a simulation. It should base on a working cause-and-effect chain and not on a "hey we need some extra penalty for stupid players even if there is no cause for this effect-chain" I hate this kind of reasoning.

I understand your opinion that mistakes should lead to a smaller profit than players have that do less mistakes. Youre right with that. But you can manage that by adjusting parameters and not by just implementing unrealistic punishments.

(I know I sound angry, but dont take it personal; I even didnt look at your username before ... sulai. ah. now i did it ;) )
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Patch: No reliability decrease for stopped trains

Post by sulai »

For trains stopped at stations I'm completely with you. For trains stopped on some track, I always found it interesting to see parts of my network completely blocked by 0% trains. Of course I understand why people don't like it, but I saw it as part of the fun ;)

It's also a question of game balance: any transportation type should have some (dis-)advantage:
  • Ships are slow but are specialized to water;
  • Road Vehicles don't make much profit, but they may use town's roads, which is a big plus in urbanized areas;
  • Planes are money makers, but they can't transport everything and air ports have noise limits;
  • Trains may transport everything and are most efficient, but there is a risk of deadlock (intensified by 0% trains).
I don't want to argue too much for these 0% trains. I could live without them ;)
User avatar
smallfly
Chairman
Chairman
Posts: 892
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Patch: No reliability decrease for stopped trains

Post by smallfly »

sulai wrote:any transportation type should have some (dis-)advantage
yeah, im absolutely with you. and my target is to create a patch that makes ottd to game where every single transportation type makes sense. at the moment it is very easy: take a big loan, build 3 airports, spend your money for planes, wait, build more, wait, and so on. you cant loose. you cant make anything wrong. the most stupid player will will against a strategic think rail network building player.

also it doesnt make sense to build road vehicles at the moment. because the difference between the maintenance costs of road and rail is not really serious. i could go on with this but i will stop here. ill write some patches. then we can talk about it again ;)

NOW BACK TO TOPIC :wink:
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Patch: No reliability decrease for stopped trains

Post by sulai »

Let me stay a little off topic here ;)

If you'd like to play games where you actually can loose, you should try basecosts or modified building costs. Additionally, very rough and mountainous landscape will result in a hard - but interesting - game. You will be enforced to build small trains in the beginning, so it's a challenging start.

Road vehicles: It certainly does make sense to build them, since they easily earn enough money to make up their buying price in life time. Only thing is: the performance rating is based on a fixed income per year, which is way too high for road vehicles. Thats why I wrote a patch that does performance rating based on the vehicle's value and the total profit. Road vehicles benefit from that, while planes need to earn much more to get a good rating. The patch is included in Gremnon's Patch Pack.

I like your idea of adding property costs for tracks. Keep it up!

OK back to topic :)
Last edited by sulai on 23 Oct 2009 22:45, edited 1 time in total.
User avatar
smallfly
Chairman
Chairman
Posts: 892
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Patch: No reliability decrease for stopped trains

Post by smallfly »

sulai wrote:Let me stay a little off topic here ;)
So do I. But the admins of the forum dont want to deal with the fact that there are off-topics between be-topics (see my posting http://www.tt-forums.net/viewtopic.php?f=21&t=45589)
sulai wrote:so it's a challenging start.
Thats it. Its challenging at the start. Or lets say: Its boring at the start, because you lack money to realize your wishes. After some years the hardest map will get easy because you earn enough, never mind, what you build and how intelligent you are. Thats why I want to add running costs for serveral things like tracks, roads etc. THEN and only then senseful building gets rewarded.

At the moment: You can do the following: Build a train earning money for you. Go sh*tting. Depending how "hard" the map/patches are, you have to go sh*tting for a longer or shorter period of time. But in the end: You will have enough money to build stupid big rail networks without any thinking about it. I want OTTD to be fun from the beginning on. People that build efficient transportation systems should get as much loan as they want (like it is in real life; if you double the money of your share holders they will stuff money into your company till your headquarter bursts)

But I dont like people saying "thats bad". I want to say "thats bad, I will help making it better by writing some patches" ;)
sulai wrote:the performance rating is based on a fixed income per year, which is way too high for road vehicles. Thats why I wrote a patch that does performance rating based on the vehicle's value and the total profit.
Nice. But this just changes the appearance of a green/yellow/red icon. It doesnt make the game harder/softer.
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Patch: No reliability decrease for stopped trains

Post by Gremnon »

I think it does make it easier, since I find it makes it a little easier to make road vehicles a useful means of transport again, leaving only ships with any doubts for me.
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Patch: No reliability decrease for stopped trains

Post by sulai »

I hope nobody is annoyed by us being off topic.
Gremnon wrote:... leaving only ships with any doubts for me.
Ships have higher life time and most of them make up their buying price. That means they are not totally useless.

Since total profit is compared to the vehicle's value loss, the "better profit rating" patch respects ships being slow and traveling several years - as long as they are profitable. No warnings about "negative income last year" just because they travel longer than a year. But there are warnings, if the ship's total profit doesn't look like it makes up its buying cost.

Sorry I'll stop to do advertisements for my patches now. :D
User avatar
smallfly
Chairman
Chairman
Posts: 892
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Patch: No reliability decrease for stopped trains

Post by smallfly »

sulai wrote:Sorry I'll stop to do advertisements for my patches now. :D
Use your signature for that purpose. I often click on the patch links in peoples signature. ;)
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: Patch: No reliability decrease for stopped trains

Post by Tekky »

smallfly wrote:To make it complete make the stopped train loosing reliability too but only a bit, so that the 200 years, museum example is obsolete ;)
Yes, I agree with you that this may be the best solution. I was thinking about making the train lose 1/20th of the reliability it loses when moving. However, in this case, it may be appropriate to display reliability with one or two digits after the decimal point, i.e. to display "71.32%" instead of only "71%" reliability. Otherwise, the player may not notice trains losing reliability when they are not moving.
User avatar
smallfly
Chairman
Chairman
Posts: 892
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Patch: No reliability decrease for stopped trains

Post by smallfly »

Tekky wrote:
smallfly wrote:To make it complete make the stopped train loosing reliability too but only a bit, so that the 200 years, museum example is obsolete ;)
Yes, I agree with you that this may be the best solution. I was thinking about making the train lose 1/20th of the reliability it loses when moving. However, in this case, it may be appropriate to display reliability with one or two digits after the decimal point, i.e. to display "71.32%" instead of only "71%" reliability. Otherwise, the player may not notice trains losing reliability when they are not moving.
Sounds good. That will show the real process of loosing reliability because you will see the decline in real time. At the moment you just see a status that looks static.
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: No reliability decrease for stopped trains

Post by Bilbo »

Or you can have three reliability decrease rates - the normal one, when train is moving. Some reduced, when train is topped and waiting somewhere on the track (one third maybe). And even further reduced (perhaps even to zero?), when it is waiting in station (loading, unloading ...), since while waiting in station the train can usually receive some limited maintenance and simple repairs.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Patch: No reliability decrease for stopped trains

Post by sulai »

I second that!
Tekky
Route Supervisor
Route Supervisor
Posts: 420
Joined: 19 Dec 2006 04:24

Re: Patch: No reliability decrease for stopped trains

Post by Tekky »

Bilbo wrote:Or you can have three reliability decrease rates - the normal one, when train is moving. Some reduced, when train is topped and waiting somewhere on the track (one third maybe). And even further reduced (perhaps even to zero?), when it is waiting in station (loading, unloading ...), since while waiting in station the train can usually receive some limited maintenance and simple repairs.
To me, that sounds more like a reason for the reliability of the train to go up instead of down.
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Patch: No reliability decrease for stopped trains

Post by 2007Alain2007 »

some train sets dont work with this patch
For Community Integrated Version http://code.google.com/p/civopenttd/
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests