[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
jimbob
Engineer
Engineer
Posts: 87
Joined: 24 Nov 2014 21:13
Location: At a desk
Contact:

Re: [patch] Realistic Train Shunting

Post by jimbob »

Impressive patch. Been messing around with it in vanilla. If I knew how to code grfs I'd modify the vanilla engines to not flip.

You can have one engine handle many cargo trains which is pretty fun, always one set of wagons loading for the returning engine to swap to.

Also tried chaining several industries together with the train picking up more and more wagons.

Finally could add a engine change over such as swapping out an electric and a diesel engine.

What currently does not work is anytime you want the detached train to also carry on its orders. Such as extra engines to help push/pull a train up a hill. Or multiple dmus to split and each continue on different routes.

I believe as it stands you could write the orders for these the only barrier is currently a train with orders to wait to couple forgets it's orders once coupled. This could be fixed by allowing the orders list to be a stack array. When joining the new head pushes to the orders array and when splitting the orders pop from the array leaving the stack with the left behind train. The stack would also fix your cargo dist problem as the wagons now have a memory of your orders.
Image
Real life transport planner
My projects:Link to my UK Scenario|Scenario Builder GS
Do check out my 3D unity transport game: transporter
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: [patch] Realistic Train Shunting

Post by Wahazar »

jimbob wrote:Impressive patch. Been messing around with it in vanilla. If I knew how to code grfs I'd modify the vanilla engines to not flip.
There is no need to not flip vanilla engines, they are very generic, without tenders. But more realistic grf's should have non-flipping capabilities, unfortunately it is painful.
I'm recoding my V4 CEE set for this, easy part is with single unit locomotives (diesel shunters, tank locomotives), I defined additional template plus sprite recolour, thus no need to make additional images of engine going backward.
But steam locomotives with tenders have asymmetric lengths and it is not possible to switch length of articulated parts outside depot :(
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: [patch] Realistic Train Shunting

Post by Leanden »

You could always make the articulated vehicle a 3 parter, where the first and last part are the length of the tender, and the middle part is the difference between tender and loco length. Then dont add graphics to the middle part and overlay the loco graphics over both parts.
Image
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: [patch] Realistic Train Shunting

Post by Gwyd »

For the alignments to work ideally, you'd need 7 parts. The front most part would be blank, the second would be for the centre reversed tender, then the centre of the forward loco. Then a "spacer" part, then the first three again, but backwards. This is useless anyway because I thought you couldn't uncouple articulated vehicles.
Karn
Traffic Manager
Traffic Manager
Posts: 128
Joined: 02 Oct 2011 18:56

Re: [patch] Realistic Train Shunting

Post by Karn »

You can uncouple articulated vehicles. But I don't think it's reasonable to adjust NewGRFs to current implementation of this patch. It still can change a lot. Reversing via NewGRFs is overkill, more reasonable should be doing it via patch.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: [patch] Realistic Train Shunting

Post by michael blunck »

Uncoupling/coupling articulated vehicles (either "single" vehicles or MUs) already works OK as expected. I´ve shown some examples over here just to promote this very interesting patch.

What does not work ATM is for a decoupled MU to have its own orders to carry on. It just gets an automatically generated order to "wait for couple" and keeps sitting on the station. It is however possible to manually enter additional orders which gets the MU to proceed.

IMO, this is a smaller problem. Bigger problems are handling of cargodist, and reversing.

regards
Michael
Image
User avatar
jimbob
Engineer
Engineer
Posts: 87
Joined: 24 Nov 2014 21:13
Location: At a desk
Contact:

Re: [patch] Realistic Train Shunting

Post by jimbob »

Cargodist and the forgotten orders are related issues. It's hard to see how you could fix one and not the other.

As per my previous post the implementation of an orders stack solves the memory issues. If you also restricted coupling to vehicles with the same shared orders as the decoupling vehicle cargodist will know the route the vehicle will take. This would be suitable for splitting dmus and adding helper locomotives to climb hills

The other less straightforward option for cargodist would be to load all the cargo and add a "marshalling" order which then split the wagons by destination.
Image
Real life transport planner
My projects:Link to my UK Scenario|Scenario Builder GS
Do check out my 3D unity transport game: transporter
Karn
Traffic Manager
Traffic Manager
Posts: 128
Joined: 02 Oct 2011 18:56

Re: [patch] Realistic Train Shunting

Post by Karn »

New update v0.8: Reversing is now reworked and shouldn't flip anything anymore.

Disclaimer: Glitches in NewGRFs are expected, there are at least 3 ways of defining articulated vehicles, which is getting out of hand with reversing.
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: [patch] Realistic Train Shunting

Post by Gwyd »

*thinking, hard*
So you can have a litteral articulation callback, double head... Then what? I only count 2. Is it and NFO only thing, or a game code thing, or something I just don't know about?
Karn
Traffic Manager
Traffic Manager
Posts: 128
Joined: 02 Oct 2011 18:56

Re: [patch] Realistic Train Shunting

Post by Karn »

It's about what sprites are used for articulated parts. One is the NFO way with variable 10 using wagon_override. Then there is counting of same engine_type with action 2. And then there is position in articulated chain, but there might be more.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: [patch] Realistic Train Shunting

Post by michael blunck »

[articulated vehicles]

1. Articulated vehicles are composed from more than one veh-ID. These veh-IDs could either be the same or different. In either way, callback 16 (articulated engine callback) is needed.

2. The veh-IDs of an articulated vehicle have to use graphics sprites. Again, these sprites can be the same for the veh-IDs, or they can be different.

2a. for vehicles on the map ("viewport") different graphics sprites can be assigned for every part vehicle in the vehicle chain. Usually, variables 40/41 (position and length) and 4D (position within articulated vehicle) are being used for displaying them.

2b. showing articulated vehicles in the various GUI windows (by variable 10), is usually done by assigning a single special graphics sprite. Only in this way, proper positioning of the vehicle graphics in the diverse GUI windows (depot, vehicle details, vehicle refit, vehicle list, purchase, exclusive preview, advertisement) can be guaranteed. It should be avoided to display vehicle graphics by use of a vehicle chain like in 2a.

3. Dual-headed engines don´t count as "articulated".

regards
Michael
Image
User avatar
jimbob
Engineer
Engineer
Posts: 87
Joined: 24 Nov 2014 21:13
Location: At a desk
Contact:

Re: [patch] Realistic Train Shunting

Post by jimbob »

Fantastic update. Put in wyes to turn the engine around. Have found a issue with engines pushing carriages into a station will decouple the front carriage as the train which has no power.
Image
Real life transport planner
My projects:Link to my UK Scenario|Scenario Builder GS
Do check out my 3D unity transport game: transporter
Karn
Traffic Manager
Traffic Manager
Posts: 128
Joined: 02 Oct 2011 18:56

Re: [patch] Realistic Train Shunting

Post by Karn »

michael blunck wrote:[articulated vehicles]

2b. showing articulated vehicles in the various GUI windows (by variable 10), is usually done by assigning a single special graphics sprite. Only in this way, proper positioning of the vehicle graphics in the diverse GUI windows (depot, vehicle details, vehicle refit, vehicle list, purchase, exclusive preview, advertisement) can be guaranteed. It should be avoided to display vehicle graphics by use of a vehicle chain like in 2a.l
I believe the single sprite is used in less places, only in buy menu, vehicle replacement and prototype vehicle offer. Depot and vehicle details use same callbacks and methods as viewport, I was messing with it a lot recently.
jimbob wrote:Fantastic update. Put in wyes to turn the engine around. Have found a issue with engines pushing carriages into a station will decouple the front carriage as the train which has no power.
It's a feature, not a bug :D Problem with this is, that I need to rework orders, so then we can count with decoupling last engine as a wanted feature. But it takes time and I prefer publishing feature when it's done and not to wait until the whole patch is perfect. It would take years to publish it in one big perfect commit.

I see how this can be limiting, but I don't think there is better solution than fixing orders, which can obviously take long. If it's too annoying, I can bring up v0.7 again for people to choose, but it can create other unwanted problems, such as users trying to load v0.8 save games in v0.7 which would cause glitches and other confusion.
Karn
Traffic Manager
Traffic Manager
Posts: 128
Joined: 02 Oct 2011 18:56

Re: [patch] Realistic Train Shunting

Post by Karn »

My idea for orders:
Decoupling station order will get second part, which will be automatically generated when decoupling button is hit. // This is due to number of buttons in gui and limited space to store data for each order.
In this section, the user can specify what happens with first and second part of decoupled train.
There will be 3 buttons - 1) "First part" 2) "Second part" 3) "Specify reverse".
1) First part will have 4 options: KEEP_ORDERS, INHERIT_WAIT_FOR_COUPLE, USE_ORDERS_XYZ, EMPTY(I guess generic option is never bad idea).
2) Same 4 options as 1)
3) 4 reverse options: NO_REVERSE, FIRST_PART_REVERSE(this one maybe makes sense in end of line and wagons being coupled to other loco later), SECOND_PART_REVERSE, BOTH_PARTS_REVERSE

default settings will be:
First part - KEEP_ORDERS, Second part - INHERIT_WAIT_FOR_COUPLE, reverse - NO_REVERSE.


Coupling will need new options too. It will be set via WAIT_FOR_COUPLE order. (other possibility is trick as above with GO_TO_COUPLE)
New options will be - GET_ORDERS_FROM_LOCO (default), GET_ORDERS_FROM_WAGONS, USE_ORDERS_XYZ
Other button options will tell what direction (reversing) to use - GO_TO_LOCO_FRONT (default), GO_TO_LOCO_REAR


As you can notice, there is one new element called USE_ORDERS_XYZ. This assume implementation of indenpendent global OrderList that orders can copy from.
This is advanced feature that is aimed to be implemented later. First goal is to implement everything above without USE_ORDERS_XYZ option.

Is this orders concept missing any feature that somebody would like to see? Once it's done, it's gonna be set in stone for this patch. Also something from above might change during implementation due to technical limits and some part being too hc.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: [patch] Realistic Train Shunting

Post by wallyweb »

Karn wrote:Is this orders concept missing any feature that somebody would like to see?
I'm thinking of a scenario ...
Branch line serves a rural region with many grain farms.
Farmers truck their grain harvests to nearby small towns served by grain elevators on sidings.
Train leaves city marshaling yards with a string of 15 empty grain hoppers.
First station gets 3 empty hoppers.
Second station gets 4 empty hoppers
Third station gets 2 empty hoppers.
Fourth station gets 4 empty hoppers
Last station - train waits while last 2 empty hoppers are loaded.
Train departs with 2 loaded hoppers and respectively collects the previously dropped hoppers all now loaded.
Train returns to city and drops the 15 hoppers at harbour for unloading to a ship while the engine goes to the depot for service.
Yard switcher collects the empty hoppers and drops them at the marshaling yard
Our engine goes to the yard and connects to the empty hoppers and the cycle is repeated.

Will this be possible?
Karn
Traffic Manager
Traffic Manager
Posts: 128
Joined: 02 Oct 2011 18:56

Re: [patch] Realistic Train Shunting

Post by Karn »

wallyweb wrote:
Karn wrote:Is this orders concept missing any feature that somebody would like to see?
I'm thinking of a scenario ...
Branch line serves a rural region with many grain farms.
Farmers truck their grain harvests to nearby small towns served by grain elevators on sidings.
Train leaves city marshaling yards with a string of 15 empty grain hoppers.
First station gets 3 empty hoppers.
Second station gets 4 empty hoppers
Third station gets 2 empty hoppers.
Fourth station gets 4 empty hoppers
Last station - train waits while last 2 empty hoppers are loaded.
Train departs with 2 loaded hoppers and respectively collects the previously dropped hoppers all now loaded.
Train returns to city and drops the 15 hoppers at harbour for unloading to a ship while the engine goes to the depot for service.
Yard switcher collects the empty hoppers and drops them at the marshaling yard
Our engine goes to the yard and connects to the empty hoppers and the cycle is repeated.

Will this be possible?
Yes.

Such scenario is doable now too. Altho orders right now don't support terminus stations for decoupling, which can be limiting when designing such rail network. Supporting terminus stations along with more shunting options will be main feature of new orders options.
evepoi
Engineer
Engineer
Posts: 9
Joined: 20 Jul 2016 07:31

Re: [patch] Realistic Train Shunting

Post by evepoi »

A system that allows separate trains to be directed to different destinations
A (10 vehicles) + B (10 vehicles) The train stopped at the station and disconnected.
Train A is headed for Station C, Train B is heading for Station D
This is very realistic.

The train will reconnect when it comes to the station that was first separated through C and D stations.

It will be important to remember that train A and train B have to be remembered when trains are separated and separated.

If this function is applied, separate trains will connect from one station to another station where they stop at the same station, and will come to a separate station to go to another station.

This feature is not only the final feature you can research and develop now, but it will also be loved by many people.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: [patch] Realistic Train Shunting

Post by michael blunck »

Brilliant work with "real reversing" (instead messing around with newgrf code)!

However, I got a crash when testing it with articulated vehicles (those coaches). The crash happened when I sold the locomotive, see screenshot. There was no .dmp file written.

Hm, can´t attach a .log file?

regards
Michael

[edit]
BTW, before the crash I recognized a graphical glitch with those articulated coaches. These coaches consist of 3 part vehicles, and the third and second part vehicles use a randomized action2, reading the random bits of the first part vehicle (4 = count forward (toward the engine), starting at this vehicle). Now, in reversing state (locomotive at the back), this gets messed up. Probably because the order of vehicles is modified internally in reversing state?
[/edit]

________________
*** OpenTTD Crash Report ***

Crash at: Tue Jul 10 07:13:18 2018
In game date: 1962-05-21 (10)

Crash reason:
Exception: E1212012
Location: 7728C54F
Message: Assertion failed at line 1482 of c:/github/OpenTTD-YPS/src/gfx.cpp: width > 0

OpenTTD version:
Version: 20180707-Decouple-g39aef975 (0)
NewGRF ver: 19000000
Bits: 32
Endian: little
Dedicated: no
Build date: Jul 7 2018 21:45:16

Registers:
EAX: 0028D3B4 EBX: 00000016 ECX: 00000000 EDX: 0008E3C8
ESI: 75733180 EDI: 00000000 EBP: 0028D404 ESP: 0028D3B4
EIP: 7728C54F EFLAGS: 00200246

Bytes at instruction pointer:
C9 C2 10 00 CC CC CC CC CC 8B FF 55 8B EC 56 8B 75 08 83 FE F4 72 18 83

Stack trace:
E1212012 00000000 00000000 7728C54F 00000000 0028D3E8 76EAFD81 0005018E
757364A8 77A0FB1A 6D6436BD FFFFFFFF 45033969 0028D460 6D64C868 FFFFFFFF
0028D414 77A2B2D6 FFFFFFFF 00000024 0028D470 00546567 E1212012 00000000
00000000 00000000 75730290 0028D470 756F5E89 756F5E8F 00000016 58A18DC5
0028DA54 0028DA54 0028D7C0 0028D460 77A296AC 00000000 00000024 00546540
00000001 0028D430 0028CF58 0028FFC4 756B8CD5 2DE6070D FFFFFFFE 0028D7A8
756F8EA2 00000016 0028DA54 00000032 00000000 01000237 00000000 00000190
01010000 0028D3D0 76E7DA5C 0028FFC4 77A64DCD 00042122 FFFFFFFE 77A2304D
77A22C45 00000000 06B3F690 00010003 00000000 0028D6DC 06B3F688 0028D578
76EAF808 01DC0000 00000000 06B3F690 00000001 0028D6DC 00000001 0000001C
0000000F 00000000 016EF8A0 00000010 0005018E 00000006 00000006 00000000
00000000 00000500 000003D8 00000000 00000168 0028D6DC 00000195 00000000
00007F01 00000000 00000001 0000001E 50022080 00000035 00000020 00000001
00000000 000001D5 0052CC70 06B3F690 01D5135C 00000000 06B3F6F4 01D513C8
0000019B 0028D6D0 76EAFAAC 00000010 0028DA54 0028DA54 76EAFAE4 00000001
000007A1 0028D7C4 00000000 7FFFFFFF 00000000 01D50E04 756AAA42 01A618F6
00A6231F 00000000 00000000 76EAFAFC 00000000 00000001 01A61380 7569A53A
00000000 0028D608 756AA8C1 01A618F6 00A6231F 00000016 0028D5F8 7FFFFFFF
00000000 01A61240 01A61380 0000000A 00000000 00000001 00000001 01A618F6
00A6231F 00000016 00000001 00000000 0028D643 0028D640 006F1C1D 00000001
00000000 0000000A 00000000 31343832 00000020 FFFFFFFF 006F1A0E 0028D670
00000000 000001FF 00000000 0028D66C 7569A442 0028D710 756998DA 58A18F1D
FFFFFFFF 0028D9E0 0028D9E0 00000000 00000000 0028D710 006F15DF 0028D670
0028D7E8 0028FFC4 756B8CD5 2DE0C155 FFFFFFFE 756998DA 006F3305 00000000

Operating system:
Name: Windows
Release: 6.1.7601 (Service Pack 1)
Compiler: GCC 5.3.0 "5.3.0"

Configuration:
Blitter: 32bpp-anim
Graphics set: original_windows (0)
Language: C:\Program Files\decouple\openttd_decouple_0.8_win32\lang\german.lng
Music driver: win32
Music set: NoMusic (0)
Network: no
Sound driver: win32
Sound set: original_windows (0)
Video driver: win32

Fonts:
Small: sprite
Medium: sprite
Large: sprite
Mono: sprite

AI Configuration (local: 0):
0: Human

Libraries:
FreeType: 2.4.10
LZMA: 5.0.4
LZO: 2.06
PNG: 1.5.16
Zlib: 1.2.11

Module information:
C:\Program Files\decouple\openttd_decouple_0.8_win32\openttd.exe handle: 00400000 size: 13241958 crc: 50499093 date: 2018-07-07 19:45:28
C:\Windows\SysWOW64\ntdll.dll handle: 779f0000 size: 1314064 crc: B1F5C6BA date: 2018-05-29 02:25:37
C:\Windows\syswow64\kernel32.dll handle: 76f50000 size: 1114112 crc: 9E203295 date: 2018-05-29 02:22:56
C:\Program Files\AVAST Software\Avast\aswhookx.dll handle: 6d640000 size: 199448 crc: B0225710 date: 2018-05-17 10:14:37
C:\Windows\syswow64\KERNELBASE.dll handle: 77280000 size: 275456 crc: 0FC78AB1 date: 2018-05-29 02:22:56
C:\Windows\syswow64\ADVAPI32.DLL handle: 75ad0000 size: 644096 crc: 10258DBA date: 2018-05-29 02:22:47
C:\Windows\syswow64\msvcrt.dll handle: 75690000 size: 690688 crc: DAB48B3A date: 2011-12-16 07:52:58
C:\Windows\SysWOW64\sechost.dll handle: 77160000 size: 92160 crc: 80F53C42 date: 2015-05-25 18:01:39
C:\Windows\syswow64\RPCRT4.dll handle: 75540000 size: 666112 crc: 1642FF08 date: 2018-05-29 02:22:56
C:\Windows\syswow64\SspiCli.dll handle: 752a0000 size: 96768 crc: 8653EA84 date: 2018-05-29 02:22:56
C:\Windows\syswow64\CRYPTBASE.dll handle: 75290000 size: 36352 crc: 32361A8D date: 2018-05-29 01:58:32
C:\Windows\syswow64\GDI32.dll handle: 75b80000 size: 312832 crc: E0A547F7 date: 2017-09-08 15:10:06
C:\Windows\syswow64\USER32.dll handle: 76e40000 size: 833024 crc: 0B9D7989 date: 2016-11-10 16:19:40
C:\Windows\syswow64\LPK.dll handle: 76ca0000 size: 25600 crc: 24E04013 date: 2018-03-09 18:12:56
C:\Windows\syswow64\USP10.dll handle: 76a70000 size: 629760 crc: 94D2A596 date: 2017-08-16 15:10:30
C:\Windows\syswow64\IMM32.DLL handle: 76b10000 size: 119808 crc: 38DB5163 date: 2010-11-20 12:08:51
C:\Windows\syswow64\MSCTF.dll handle: 772e0000 size: 830464 crc: 255FD2E3 date: 2017-09-13 15:09:01
C:\Windows\syswow64\SHELL32.DLL handle: 75cb0000 size: 12880384 crc: 14652CEE date: 2018-01-01 02:00:12
C:\Windows\syswow64\SHLWAPI.dll handle: 75630000 size: 350208 crc: 23E05F73 date: 2010-11-20 12:21:19
C:\Windows\system32\WINMM.DLL handle: 74290000 size: 194048 crc: 849223C7 date: 2010-11-20 12:21:36
C:\Windows\syswow64\WS2_32.dll handle: 77180000 size: 206336 crc: E20C855A date: 2016-05-11 15:19:26
C:\Windows\syswow64\NSI.dll handle: 77600000 size: 8704 crc: 748C8F4C date: 2017-08-11 06:19:39
C:\Windows\syswow64\ole32.dll handle: 76ce0000 size: 1417728 crc: 7D8DBE15 date: 2018-04-22 23:40:58
C:\Windows\system32\uxtheme.dll handle: 74640000 size: 245760 crc: 60C5C746 date: 2009-07-14 01:11:24
C:\Windows\system32\dwmapi.dll handle: 6f480000 size: 67584 crc: 0A7DEB75 date: 2015-07-09 17:42:54
C:\Windows\system32\mswsock.dll handle: 735a0000 size: 231424 crc: DD4CB3EB date: 2016-05-11 15:19:16
C:\Windows\System32\wshtcpip.dll handle: 73590000 size: 9216 crc: BA963A19 date: 2009-07-14 01:16:20
C:\Windows\system32\MMDevAPI.DLL handle: 67a50000 size: 213504 crc: 93C0AA4F date: 2010-11-20 12:19:39
C:\Windows\system32\PROPSYS.dll handle: 670d0000 size: 988160 crc: 888D0BCB date: 2010-11-20 12:20:57
C:\Windows\syswow64\OLEAUT32.dll handle: 75c10000 size: 582144 crc: F754483F date: 2018-04-22 23:40:58
C:\Windows\system32\wdmaud.drv handle: 6caa0000 size: 172032 crc: D5B9F5FA date: 2010-11-20 12:16:50
C:\Windows\system32\ksuser.dll handle: 6d630000 size: 4608 crc: 1A5CD26B date: 2015-12-08 21:53:47
C:\Windows\system32\AVRT.dll handle: 6d620000 size: 14336 crc: 9818237B date: 2009-07-14 01:14:58
C:\Windows\syswow64\SETUPAPI.dll handle: 773b0000 size: 1667584 crc: 1D0104E8 date: 2010-11-20 12:21:14
C:\Windows\syswow64\CFGMGR32.dll handle: 77550000 size: 145920 crc: 377B5190 date: 2011-05-24 10:39:38
C:\Windows\syswow64\DEVOBJ.dll handle: 775e0000 size: 64512 crc: 66B02A5A date: 2011-05-24 10:40:05
C:\Windows\system32\AUDIOSES.DLL handle: 67a10000 size: 195072 crc: E762B1EF date: 2016-06-14 15:21:18
C:\Windows\system32\msacm32.drv handle: 6d600000 size: 20992 crc: 73923147 date: 2009-07-14 01:14:08
C:\Windows\system32\MSACM32.dll handle: 679f0000 size: 72192 crc: ABA25814 date: 2009-07-14 01:15:42
C:\Windows\system32\midimap.dll handle: 6d5e0000 size: 16896 crc: C000494C date: 2009-07-14 01:15:40
C:\Windows\syswow64\CLBCatQ.DLL handle: 770d0000 size: 522240 crc: 6C130B8A date: 2009-07-14 01:15:03
C:\Windows\syswow64\psapi.dll handle: 77580000 size: 6144 crc: 25B988F9 date: 2009-07-14 01:16:12

---- gamelog start ----
Tick 0: new game started
Revision text changed to 20180707-Decou, savegame version 199, not modified, _openttd_newgrf_version = 0x19000000
New game mode: 1 landscape: 0
Added NewGRF: GRF ID 6D620700, checksum 5C795B37F05FA41ABEF641B1E897DD42, filename: alpinew.grf (md5sum matches)
Added NewGRF: GRF ID 6D620A00, checksum 5A53727D76557B28427BBA128BBB37A7, filename: canals.grf (md5sum matches)
Added NewGRF: GRF ID 44550001, checksum B781E3495091FA6B5DE79472FD4A61A5, filename: germanrvw.grf (md5sum matches)
Added NewGRF: GRF ID 6D620004, checksum 0D7F3DEBDFE1322F18A9D30476F75FD3, filename: nshipsxl.grf (md5sum matches)
Added NewGRF: GRF ID 6D620601, checksum D78D833DCE9B7253ADC9CAD3F0AA81D1, filename: newstats.grf (md5sum matches)
Added NewGRF: GRF ID 6D620C00, checksum 59EC033AEF7D91DF205F202F077F2274, filename: marico.grf (md5sum matches)
Added NewGRF: GRF ID 74677462, checksum A2396FFDCC0F1BA37A2A89EF525CDF21, filename: total_bridges.grf (md5sum matches)
Added NewGRF: GRF ID 6D620900, checksum FDF12E94FF15EE4D3C2C9FA1F161D254, filename: rivers.grf (md5sum matches)
Added NewGRF: GRF ID 6D620B00, checksum D865C429E88896525959A0174B8768B6, filename: dbrails.grf (md5sum matches)
Added NewGRF: GRF ID 6D620401, checksum 9651B7FFCAE7A7A28A98A28633015DD8, filename: dbsetxlaw.grf (md5sum matches)
---- gamelog end ----

Recent news messages:
(1953-02-01) StringID: 673, Type: 9, Ref1: 4, 9, Ref2: 0, 4294967295
(1953-03-01) StringID: 670, Type: 9, Ref1: 4, 0, Ref2: 0, 4294967295
(1953-03-01) StringID: 673, Type: 9, Ref1: 4, 29, Ref2: 0, 4294967295
(1953-03-01) StringID: 670, Type: 9, Ref1: 4, 44, Ref2: 0, 4294967295
(1953-04-01) StringID: 673, Type: 9, Ref1: 4, 11, Ref2: 0, 4294967295
(1953-05-05) StringID: 695, Type: 12, Ref1: 3, 1, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 9, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 10, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 11, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 21, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 22, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 23, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 24, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 105, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 126, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 127, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 154, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 156, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 217, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 220, Ref2: 0, 4294967295
(1962-05-18) StringID: 694, Type: 11, Ref1: 6, 253, Ref2: 0, 4294967295

*** End of OpenTTD Crash Report ***
Attachments
crash.png
(166.16 KiB) Not downloaded yet
decouple-08_crash.jpg
(365.77 KiB) Not downloaded yet
Image
Karn
Traffic Manager
Traffic Manager
Posts: 128
Joined: 02 Oct 2011 18:56

Re: [patch] Realistic Train Shunting

Post by Karn »

michael blunck wrote:However, I got a crash when testing it with articulated vehicles (those coaches). The crash happened when I sold the locomotive, see screenshot.
Is the NewGRF with coaches available for public? If yes, where can I download it? I can't reproduce the game crash with other NewGRFs.
michael blunck wrote:BTW, before the crash I recognized a graphical glitch with those articulated coaches. These coaches consist of 3 part vehicles, and the third and second part vehicles use a randomized action2, reading the random bits of the first part vehicle (4 = count forward (toward the engine), starting at this vehicle). Now, in reversing state (locomotive at the back), this gets messed up. Probably because the order of vehicles is modified internally in reversing state?
Checking the first engine is not at its final form yet. Reversing change both the vehicle chain and where to look for other vehicles, it still needs fixes for corner cases.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: [patch] Realistic Train Shunting

Post by michael blunck »

Karn wrote: Is the NewGRF with coaches available for public?
Unfortunately not, since I´m still working on that set. I could produce a small test newgrf for you, but o/c I´ll have to check first if the bug still exists there.
Karn wrote: Checking the first engine is not at its final form yet. Reversing change both the vehicle chain and where to look for other vehicles, it still needs fixes for corner cases.
The layout of articulated coaches in my set is like this:

train with 3 articulated coaches (each of them 3 parts):
<-- loco - 123 - 123 - 123

Here, part vehicles "3" are each reading random bits from parts "1" and "2", i.e. "counting forward (toward the engine)" by 1 and 2.

Now, how is it in reversed state?
<-- 321 - 321 - 321 - loco

or like this?
<-- 123 - 123 - 123 - loco

regards
Michael
Image
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 11 guests