[patch] Realistic Train Shunting

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
TrainLover
Engineer
Engineer
Posts: 88
Joined: 01 Jul 2015 15:03

Re: [patch] Realistic Train Shunting

Post by TrainLover » 23 Nov 2018 15:53

How probable would it be to get the realistic train shunting patch into a major patch pack, like JGR's?

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

Re: [patch] Realistic Train Shunting

Post by kamnet » 23 Nov 2018 21:58

TrainLover wrote:How probable would it be to get the realistic train shunting patch into a major patch pack, like JGR's?
Here's the answer from JGR himsef:
[b][url=https://www.tt-forums.net/viewtopic.php?p=1210152#p1210152]On July 23, 2018 JGR[/url][/b] wrote:
TrainLover wrote:What would be broken if you added the realistic shunting patch into this PatchPack?
I am keeping an eye on this patch, however it is not finished and not in a state where I would be inclined to consider looking into the feasibility of merging it.

If I were to merge it, I would not do so in a way that broke existing functionality.

User avatar
Jim Starluck
Traffic Manager
Traffic Manager
Posts: 132
Joined: 26 Jun 2005 20:12
Location: Cincinnati, OH
Contact:

Re: [patch] Realistic Train Shunting

Post by Jim Starluck » 29 Nov 2018 22:07

kamnet wrote:
TrainLover wrote:How probable would it be to get the realistic train shunting patch into a major patch pack, like JGR's?
Here's the answer from JGR himsef:
[b][url=https://www.tt-forums.net/viewtopic.php?p=1210152#p1210152]On July 23, 2018 JGR[/url][/b] wrote:
TrainLover wrote:What would be broken if you added the realistic shunting patch into this PatchPack?
I am keeping an eye on this patch, however it is not finished and not in a state where I would be inclined to consider looking into the feasibility of merging it.

If I were to merge it, I would not do so in a way that broke existing functionality.
Very good to hear. :D
If at first you don't succeed, get a bigger locomotive and try again.

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

Re: [patch] Realistic Train Shunting

Post by Eddi » 29 Nov 2018 22:21

you realize that post basically says "no"?
You might not exactly be interested in Ferion, but if you are, have fun :)

Diesel Power
Traffic Manager
Traffic Manager
Posts: 136
Joined: 18 Jun 2016 19:05

Re: [patch] Realistic Train Shunting

Post by Diesel Power » 30 Nov 2018 22:50

Eddi wrote:you realize that post basically says "no"?
Really?
I read it as "when it's ready".

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

Re: [patch] Realistic Train Shunting

Post by kamnet » 01 Dec 2018 01:12

Diesel Power wrote:
Eddi wrote:you realize that post basically says "no"?
Really?
I read it as "when it's ready".
And he might, but right now that day is a long way out, and Karn has acknowledged that this patch has a lot of things left to fix.

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5519
Joined: 27 Nov 2004 15:05
Location: Canada

Re: [patch] Realistic Train Shunting

Post by wallyweb » 01 Dec 2018 01:53

kamnet wrote:
Diesel Power wrote:
Eddi wrote:you realize that post basically says "no"?
Really?
I read it as "when it's ready".
And he might, but right now that day is a long way out, and Karn has acknowledged that this patch has a lot of things left to fix.
The shunting works at an acceptable level. It's the known issues that are the challenge.

User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 24 Mar 2008 13:04
Location: Finland

Re: [patch] Realistic Train Shunting

Post by kyosuke1989 » 25 Jan 2019 22:51

Nice to see where this patch has evolved :) Thumbs up! Keep up the good work. :) It spices up the game nicely.

danielkrs
Engineer
Engineer
Posts: 2
Joined: 15 May 2019 17:50

Re: [patch] Realistic Train Shunting

Post by danielkrs » 15 May 2019 18:07

hi! this patch is so mesmerizing :bow: ! But I have a problem with "critical failur" about the newgrf: 'CZTR RAILS 2.1.0'. Something about invalid ID (sprite 2032). I am uploading two screenshots for better understanding. Can you fix it? or may I go to CZTR forum first? thank you so much!
Image
Image
Attachments
screenshot of critical failure note.png
(1.56 MiB) Not downloaded yet

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

Re: [patch] Realistic Train Shunting

Post by kamnet » 16 May 2019 02:34

danielkrs wrote:hi! this patch is so mesmerizing :bow: ! But I have a problem with "critical failur" about the newgrf: 'CZTR RAILS 2.1.0'. Something about invalid ID (sprite 2032). I am uploading two screenshots for better understanding. Can you fix it? or may I go to CZTR forum first? thank you so much!
What version of OpenTTD did you apply this patch to?

User avatar
stefino_cz
Traffic Manager
Traffic Manager
Posts: 186
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: [patch] Realistic Train Shunting

Post by stefino_cz » 16 May 2019 04:18

danielkrs wrote:hi! this patch is so mesmerizing :bow: ! But I have a problem with "critical failur" about the newgrf: 'CZTR RAILS 2.1.0'. Something about invalid ID (sprite 2032). I am uploading two screenshots for better understanding. Can you fix it? or may I go to CZTR forum first? thank you so much!
You have to download version 1.9.0 or higher. You have old version which doesn't support more railtypes than 15 (or how many railtypes were in the previous version)
Image

User avatar
SciFurz
Engineer
Engineer
Posts: 67
Joined: 13 Oct 2018 16:33
Contact:

FYI bug

Post by SciFurz » 16 May 2019 10:23

Something I saw happening while testing shunting between two stations, the consist doesn't reverse at the end of a line and instead goes backwards from then on. If left alone it'll even become stuck at a station after 3 or so visits, on the order to visit the next.
It might have to do with the Dutch train set that I use by default but that set is too important for playing the game to do without.

I still have to finish details on my own real time patch though, otherwise I'd take a shot at tinkering with this patch and testing more thoroughly.
Tinkering in the code in between writing mostly naughty stuff.
See https://www.patreon.com/scifurz

danielkrs
Engineer
Engineer
Posts: 2
Joined: 15 May 2019 17:50

Re: [patch] Realistic Train Shunting

Post by danielkrs » 20 May 2019 17:11

kamnet wrote:
danielkrs wrote:hi! this patch is so mesmerizing :bow: ! But I have a problem with "critical failur" about the newgrf: 'CZTR RAILS 2.1.0'. Something about invalid ID (sprite 2032). I am uploading two screenshots for better understanding. Can you fix it? or may I go to CZTR forum first? thank you so much!
What version of OpenTTD did you apply this patch to?
At first I was download ottd 1.9.1. to my new OS and after that I looked for decouple patch, but I found only openttd_decouple_0.10.4_win32.zip file on this thread with another openttd.exe. I was download all of cztr grfs again and than I took the screenshot with failure info....
In the cztr facebook page somebody wrote that this patch is downloadable with older version of ottd. last changes was made in 2018...
maybe anybody can help how I can "extract" the patch to my openttd 1.9.1. or something?

Thank you

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

Re: [patch] Realistic Train Shunting

Post by kamnet » 21 May 2019 00:34

danielkrs wrote:
kamnet wrote:
danielkrs wrote:hi! this patch is so mesmerizing :bow: ! But I have a problem with "critical failur" about the newgrf: 'CZTR RAILS 2.1.0'. Something about invalid ID (sprite 2032). I am uploading two screenshots for better understanding. Can you fix it? or may I go to CZTR forum first? thank you so much!
What version of OpenTTD did you apply this patch to?
At first I was download ottd 1.9.1. to my new OS and after that I looked for decouple patch, but I found only openttd_decouple_0.10.4_win32.zip file on this thread with another openttd.exe. I was download all of cztr grfs again and than I took the screenshot with failure info....
In the cztr facebook page somebody wrote that this patch is downloadable with older version of ottd. last changes was made in 2018...
maybe anybody can help how I can "extract" the patch to my openttd 1.9.1. or something?

Thank you
A patch is C++ code which must be added to the OpenTTD source code and compiled. It may or may not require changes in order to successfully compile with the current master source code (which will be newer than OpenTTD 1.9.1).

User avatar
SciFurz
Engineer
Engineer
Posts: 67
Joined: 13 Oct 2018 16:33
Contact:

Some thoughts

Post by SciFurz » 11 Jun 2019 01:00

Had some thoughts recently about this patch looking at it from the point of automating a sorting yard.
What would be needed is each wagon having a tag for the next hop destination and the ability for the locomotive to read that tag. That way the locomotive can couple a wagon, and depending on the next hop move to a specific waypoint and couple it to wagons with the same tag. Alternatively it's a next hop tag for the cargo. I haven't dug into that side of the code to see what's already available.
The conditional order then needs a list of train stations to choose from and a conditional order could be made that directs the main line coupling locomotive to head for the station tagged on the wagon/cargo.
Then there's also the possibility to sort by empty wagons or possible cargo type of a wagon to pick those up and deliver them to loading stations.

To avoid a train running in reverse because the coupling wasn't done from the side of the next destination (the first problem I ran into when testing the functionality), a way to check for that and reverse the whole train if necessary before the LEAVESTATION order.
To avoid a no power status, a check at decoupling to disable it.
Tinkering in the code in between writing mostly naughty stuff.
See https://www.patreon.com/scifurz

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests