Patch: Improved Breakdowns v2.4 (r14563)

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

User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by bigos » 16 Nov 2009 23:28

Made a new version of patch... added vehicle news after train stuck crawling up the hill (because is to heavy). I know its have nothing to do with breakdowns... but after I added breakdown speed reduction such stuck train can break few times and then it will be big problem to unstuck rote.

Since there is many differences from IB 2.4 I think is time for new version IB 2.5 (hope Hirundo don't mind).

Patch Improved Breakdowns v2.5 (r18133) contains:

- Original patch IB 2.4
- additional speed reduction after mechanical failure (trains only)
- auto service in depot order after mechanical failure (to remove speed reduction)
- news about train stuck


Once again, if Hirundo is against that patch I will remove it or rename to something else.

Hope you test it and like it ;)
Attachments
IBv2.5.patch
Patch: Improved Breakdowns v2.5 (r18133)
(60.5 KiB) Downloaded 112 times

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

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by Tekky » 18 Nov 2009 19:50

Thank you very much for keeping Hirundo's patch alive and even expanding it!

Without your work, I'm quite sure this patch would have been completely forgotten.

User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by bigos » 18 Nov 2009 21:31

Tekky wrote:Thank you very much for keeping Hirundo's patch alive and even expanding it!

Without your work, I'm quite sure this patch would have been completely forgotten.
Thx:) Unfortunately my "news upgrade" is not working corectly:/ news are show also when train is waiting before PBS . Just notice that... Thinking how to fix it.

User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by bigos » 18 Nov 2009 22:37

I think I found solution. Here is patch file.

Edit: next bug...

To fix it replace 1 line in patch file:

Code: Select all

+	if (v->IsFrontEngine() && !(v->current_order_time & 0x1FF) && !(v->flags & (VRF_IS_BROKEN | (1 << VRF_TRAIN_STUCK))) && v->cur_speed < 3 && accel < 5) {
to:

Code: Select all

+	if (v->IsFrontEngine() && !(v->current_order_time & 0x1FF) && !(v->current_order.IsType(OT_LOADING)) && !(v->flags & (VRF_IS_BROKEN | (1 << VRF_TRAIN_STUCK))) && v->cur_speed < 3 && accel < 5) {
Attachments
IB.patch
IB2.5 (r18172)
(60.65 KiB) Downloaded 88 times

User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by bigos » 05 Dec 2009 16:47

Merged with current trunk (r18408).
Attachments
IB_v2.5.patch
Patch: Improved Breakdowns v2.5 (r18408)
(60.47 KiB) Downloaded 96 times

User avatar
bigos
Traffic Manager
Traffic Manager
Posts: 181
Joined: 13 Sep 2009 21:15
Location: Poland
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by bigos » 10 Jan 2010 12:27

Merged to trunk (r18768) and fixed bug with planes (my mistake).
Attachments
IB.patch
IB 2.5 (r18768)
(60.11 KiB) Downloaded 112 times

User avatar
Mackensen
Engineer
Engineer
Posts: 55
Joined: 17 Jun 2003 10:51
Location: Michigan, USA
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by Mackensen » 27 Feb 2010 22:15

Merged to trunk (r19152). Apologies to bigos and Hirundo if I'm stepping on their toes. I use this with cargodist (note, not yet tested against it), and the recent changes to the train struct meant that the changes to train_cmd.cpp didn't apply cleanly at all. No new features in this patch. A word of warning: I haven't done any real work in C in about eight years, and I haven't tested it as thoroughly as I'd like.
Attachments
ib_r19152.diff
IB 2.5 (r19152)
(62.45 KiB) Downloaded 1318 times

User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by ostlandr » 28 Feb 2010 23:57

Thanks! You have now persuaded me to take another crack at patching OTTD myself. :) Once more unto the breach, dear friends. . . :?
Mackensen wrote:Merged to trunk (r19152). Apologies to bigos and Hirundo if I'm stepping on their toes. I use this with cargodist (note, not yet tested against it), and the recent changes to the train struct meant that the changes to train_cmd.cpp didn't apply cleanly at all. No new features in this patch. A word of warning: I haven't done any real work in C in about eight years, and I haven't tested it as thoroughly as I'd like.
Who is John Galt?

alyr
Engineer
Engineer
Posts: 26
Joined: 01 Apr 2008 07:59
Location: Budapest, Hungary

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by alyr » 16 Apr 2010 17:16

I hope this patch will get into trunk sooner or later (though it seems that it's not as popular as e.g. infrastructure sharing or cargodest :? ).
*fingers crossed*

User avatar
Kraks
Engineer
Engineer
Posts: 73
Joined: 23 Jun 2010 20:53
Location: Moscow, Russia

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by Kraks » 23 Jun 2010 21:03

Hello! I like your patch very much, but I have a problem with it:
Image

The problem is that when the train breaks with power breakdown it writes, that power down to 0% and starts to go very fast (at max. speed), but before break it goes slower for example at 110 km/h (depending of it weight). When the break ends, the train returns it real speed.

I'm playing the russian build with your patch. I'm using NARS 2 train set.
Image
Image
Image

User avatar
Vaulter
Traffic Manager
Traffic Manager
Posts: 185
Joined: 21 Dec 2004 05:35
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by Vaulter » 24 Feb 2011 19:11

IB.patch
r22110
(66.11 KiB) Downloaded 136 times

2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by 2007Alain2007 » 25 Feb 2011 15:11

:bow: great work on updateing the patch
For Community Integrated Version http://code.google.com/p/civopenttd/

damerell
Traffic Manager
Traffic Manager
Posts: 188
Joined: 22 Feb 2008 23:09

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by damerell » 02 Mar 2011 02:43

Yes, what a pleasure to see this back again. I'm sure many of us feel there must be a good way to make reliability pay without the pain of "original" breakdowns.

KBoogle
Engineer
Engineer
Posts: 24
Joined: 27 May 2011 02:41

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by KBoogle » 18 Sep 2011 23:55

I'm sorry for being noob, but how do I install this for OTTD? Where do I put the .patch file?

Eddi
Tycoon
Tycoon
Posts: 7395
Joined: 17 Jan 2007 00:14

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by Eddi » 18 Sep 2011 23:57

you get a compiler and then read the stickie topics in this forum.
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
Comm Cody
Tycoon
Tycoon
Posts: 1047
Joined: 07 Mar 2008 22:21
Location: In a galaxy far far away.

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by Comm Cody » 19 Sep 2011 16:06

Or you can download Chillcore's Patchpack which has this in it along with so much more.
Something goes here, hell if I know.

User avatar
Kraks
Engineer
Engineer
Posts: 73
Joined: 23 Jun 2010 20:53
Location: Moscow, Russia

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by Kraks » 19 Sep 2011 16:52

Comm Cody wrote:Or you can download Chillcore's Patchpack which has this in it along with so much more.
Or Hard Game pack 0.6 from Vaulter who updated the patch last time
Image
Image
Image

viki2
Engineer
Engineer
Posts: 11
Joined: 23 Dec 2011 01:06

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by viki2 » 23 Dec 2011 01:13

I've ported it to the latest trunk version (r23640). I'll call it v2.5.1.

Maybe someone is hapy about this.
Attachments
ImprovedBreakdowns-v2.5.1-r23640.patch
(61.14 KiB) Downloaded 174 times

User avatar
Vaulter
Traffic Manager
Traffic Manager
Posts: 185
Joined: 21 Dec 2004 05:35
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by Vaulter » 29 Jul 2013 16:54

viki2 wrote:I've ported it to the latest trunk version (r23640). I'll call it v2.5.1.

Maybe someone is hapy about this.
something wrong with this patch

User avatar
kamnet
Moderator
Moderator
Posts: 6636
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Patch: Improved Breakdowns v2.4 (r14563)

Post by kamnet » 29 Jul 2013 21:29

Vaulter wrote:
viki2 wrote:I've ported it to the latest trunk version (r23640). I'll call it v2.5.1.

Maybe someone is hapy about this.
something wrong with this patch
Would you like to stat what is wrong with it? :D

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests