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 »

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 127 times

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

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

Post by Tekky »

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 »

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 »

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 98 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 »

Merged with current trunk (r18408).
Attachments
IB_v2.5.patch
Patch: Improved Breakdowns v2.5 (r18408)
(60.47 KiB) Downloaded 106 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 »

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

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

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

Post by Mackensen »

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 1551 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 »

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 »

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 »

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 »

IB.patch
r22110
(66.11 KiB) Downloaded 146 times

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

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

Post by 2007Alain2007 »

: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 »

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 »

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: 7428
Joined: 17 Jan 2007 00:14

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

Post by Eddi »

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: 1057
Joined: 07 Mar 2008 22:21
Location: In a galaxy far far away.

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

Post by Comm Cody »

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 »

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 »

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 183 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 »

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: 7164
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

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

Post by kamnet »

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 4 guests