[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: 107
Joined: 01 Jul 2015 15:03

Re: [patch] Realistic Train Shunting

Post by TrainLover »

How probable would it be to get the realistic train shunting patch into a major patch pack, like JGR's?
Developer of North American Passenger Liveries: viewtopic.php?f=26&t=87228
User avatar
kamnet
Moderator
Moderator
Posts: 8673
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [patch] Realistic Train Shunting

Post by kamnet »

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: 135
Joined: 26 Jun 2005 20:12
Location: Cincinnati, OH
Contact:

Re: [patch] Realistic Train Shunting

Post by Jim Starluck »

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

Re: [patch] Realistic Train Shunting

Post by Eddi »

you realize that post basically says "no"?
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: [patch] Realistic Train Shunting

Post by Diesel Power »

Eddi wrote:you realize that post basically says "no"?
Really?
I read it as "when it's ready".
User avatar
kamnet
Moderator
Moderator
Posts: 8673
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [patch] Realistic Train Shunting

Post by kamnet »

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: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: [patch] Realistic Train Shunting

Post by wallyweb »

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: 273
Joined: 24 Mar 2008 13:04
Location: Finland

Re: [patch] Realistic Train Shunting

Post by kyosuke1989 »

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 »

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

Re: [patch] Realistic Train Shunting

Post by kamnet »

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
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: [patch] Realistic Train Shunting

Post by stefino_cz »

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
Traffic Manager
Traffic Manager
Posts: 154
Joined: 13 Oct 2018 16:33
Contact:

FYI bug

Post by SciFurz »

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 http://scifurz.wordpress.com/
danielkrs
Engineer
Engineer
Posts: 2
Joined: 15 May 2019 17:50

Re: [patch] Realistic Train Shunting

Post by danielkrs »

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

Re: [patch] Realistic Train Shunting

Post by kamnet »

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
Traffic Manager
Traffic Manager
Posts: 154
Joined: 13 Oct 2018 16:33
Contact:

Some thoughts

Post by SciFurz »

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 http://scifurz.wordpress.com/
User avatar
robo
Route Supervisor
Route Supervisor
Posts: 398
Joined: 14 Jan 2007 12:14

Re: [patch] Realistic Train Shunting

Post by robo »

I really like the idea of coupling and took a look at this mod. It seems that I found a problem, if a train decouples and changes direction like on the screenshot.
A workaround would be to work with an additional waypoint in this situation to decouple and move in the same direction, but an unexperienced player would be stuck because there's no way to take the train off the rails.
Some ideas of the mod are promissing, but I stopped playing it, because after starting a new scenario (without any other mods) I suddenly got a lot of crashes due to simple decoupling (openttd_decouple_0.10.4)
Attachments
Lunningbury Transport, 5th Oct 2021.png
(1.44 MiB) Not downloaded yet
Lunningbury Transport, 21. Okt 2019.sav
(15.89 KiB) Downloaded 328 times
workaround.sav
(18.87 KiB) Downloaded 296 times
Knedlik
Engineer
Engineer
Posts: 2
Joined: 13 Oct 2020 13:11

Re: [patch] Realistic Train Shunting

Post by Knedlik »

Hey guys, how do I install the patch? I'm new to OpenTTD and don't know anything about installing patches. I've tried extracting the zip and running the app, merging the original OpenTTD with the decouple patch and many other things. How do I install it correctly?
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: [patch] Realistic Train Shunting

Post by wallyweb »

Knedlik wrote: 13 Oct 2020 13:15 Hey guys, how do I install the patch? I'm new to OpenTTD and don't know anything about installing patches. I've tried extracting the zip and running the app, merging the original OpenTTD with the decouple patch and many other things. How do I install it correctly?
Karn wrote: 03 Sep 2018 11:23
McZapkie wrote:Are there compatible windows binary and corresponding source code? I would like to test this patch in multiplayer mode, but have no windows compiler.
The source code is same on github and first post binaries, I always update them at the same time. I'm not sure about version string, there could be something special depending on how you download source code.
The first post binaries is what you are looking for. All patched, compiled and ready to go.
Knedlik
Engineer
Engineer
Posts: 2
Joined: 13 Oct 2020 13:11

Re: [patch] Realistic Train Shunting

Post by Knedlik »

wallyweb wrote: 13 Oct 2020 14:00
Knedlik wrote: 13 Oct 2020 13:15 Hey guys, how do I install the patch? I'm new to OpenTTD and don't know anything about installing patches. I've tried extracting the zip and running the app, merging the original OpenTTD with the decouple patch and many other things. How do I install it correctly?
Karn wrote: 03 Sep 2018 11:23
McZapkie wrote:Are there compatible windows binary and corresponding source code? I would like to test this patch in multiplayer mode, but have no windows compiler.
The source code is same on github and first post binaries, I always update them at the same time. I'm not sure about version string, there could be something special depending on how you download source code.
The first post binaries is what you are looking for. All patched, compiled and ready to go.
Yes, but where do I put it? How do I Install it, not how I download it.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: [patch] Realistic Train Shunting

Post by wallyweb »

Knedlik wrote: 15 Oct 2020 17:32 Yes, but where do I put it? How do I Install it, not how I download it.
If you are on Windows10, look in your Program Files folder.
You will see a folder for OpenTTD. That is your current installation Do not touch it.
Highlight your Program Files folder and create a new folder.
Name that new folder OpenTTD-Shunting or something similar.
Place your download in that new folder and extract it there.
In that new folder, look for openttd.exe and click on it to start the game.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests