JGR's Patch Pack

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

ZaphodB
Engineer
Engineer
Posts: 6
Joined: 17 Apr 2020 12:03

Re: JGR's Patch Pack

Post by ZaphodB »

Thank you very much for these patches. I really enjoy playing the game with them!

I think there is a very minor bug with the departure board feature. When an vehicle has an order to go via a station immediately followed by an order to stop at the same station, the vehicle doesn't appear as an arrival at that station. It will appear as an arrival at subsequent stations but with the "via" station listed twice. (This might seem like a strange thing to do, but I like having "via" on the departure board!)

I hope it's not stepping on anyone's toes by attempting to see why this happens. But I think the code at line 623 in departures.cpp should be checking that the order is not a "via" order (i.e. not ONSF_NO_STOP_AT_DESTINATION_STATION or ONSF_NO_STOP_AT_ANY_STATION) before registering a collision. Similarly, at line 646, it should perhaps not add to the calling at list if it is just a "via" order.

Thanks again!
SoylentBlack
Engineer
Engineer
Posts: 2
Joined: 11 Jun 2020 19:36

Re: JGR's Patch Pack

Post by SoylentBlack »

Hi!


Thank you for your patchpack. I played it any time ago on windows. Now I tried to start a game on WINE via OSX, and it crashes at startup. Does anyone know how to make it possible to play the patchpack via wine?



Thx!
PS:Crashing Screenshot and logfile:

Code: Select all

*** OpenTTD Crash Report ***

Crash at: Mon Jun 08 23:49:22 2020
In game date: 0-01-00 (0, 0) (DL: 0)

Crash reason:
 Exception:  E1212012
 Location:   000000007B00F30D
 Message:    Assertion failed at line 126 of /home/jgr/openttd/cross-win64/src/network/core/host.cpp: len <= num * sizeof(*ifo)

OpenTTD version:
 Version:    jgrpp-0.34.4 (0)
 NewGRF ver: 1b006d64
 Bits:       64
 Endian:     little
 Dedicated:  no
 Build date: Jun  5 2020 22:09:17
 Configure:  ./configure --host=x86_64-w64-mingw32 --prefix=/home/jgr/mingw64/ CFLAGS=-I/home/jgr/mingw64/include LDFLAGS=-L/home/jgr/mingw64/lib --without-sdl --without-icu --with-lzo2=/home/jgr/mingw64/lib/liblzo2.a --without-uniscribe
 Defines:    MINGW _FORTIFY_SOURCE=2 WITH_SSE WITH_DBGHELP WITH_BFD WITH_BITMATH_BUILTINS WITH_OVERFLOW_BUILTINS WITH_DEMANGLE WIN WITH_ZLIB WITH_LIBLZMA LZMA_API_STATIC WITH_LZO _SQ64 WITH_PNG WIN32_ENABLE_DIRECTMUSIC_SUPPORT UNICODE _UNICODE WITH_PERSONAL_DIR

Stack trace:
 0031CE20 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 E1212012 00000000 00000000 00000000 7B00F30D 00000000 00000000 00000000
 00000000 00000000 00010090 00000000 00000001 00000000 00000000 00000000
 04DB5980 00000000 000000AC 00000000 00010084 00000000 0031CEC0 00000000
 0031CF10 00000000 6B389C31 00000000 006F0068 0061006D 006C0000 00440020
 0067006C 00000000 00000000 00000000 00000001 00000000 00000000 00000000
 000100A0 00000000 00599530 00000000 00000016 00000000 6B2884F1 00000000
 0B12E41F 00000287 000001BD 00000000 6B53C990 00000000 0031D100 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 0031BF80 00000000 00000008 00000000 0031BF80 00000000 0031B780 00000000
 0031D100 00000000 000000AC 00000000 6B5DD3A0 00000000 0031DA10 00000000
 0031D0C0 00000000 6B28B8E8 00000000 6B350000 00000000 00000005 00000000
 6B421810 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000 6B5E4BE0 00000000 00E86FA0 00000000
 0031D38C 00000000 0057FD66 00000000 00000000 00000000 00000000 00000000
 000003DC 00000000 000000AC 00000000 0031D300 00000000 0031D318 00000000

Registers:
 RAX: 000000000031CE20 RBX: 0000000000000016 RCX: 000000000031CE20 RDX: 0000000000000000
 RSI: 0000000000599530 RDI: 0000000000000016 RBP: 000000000031CFE0 RSP: 000000000031CE00
 R8:  0000000000000000 R9:  0000000000000000 R10: 00007FFF73C02EEE R11: 0000000000000246
 R12: 000000000031D100 R13: 00000000000000AC R14: 0000000000000000 R15: 000000006B3234E0
 RIP: 000000007B00F30D EFLAGS: 00000206

 Bytes at instruction pointer:
 90 48 81 C4 C8 00 00 00 5E 5F C3 0F 1F 84 00 00 00 00 00 C7 44 24 38 00

Operating system:
 Name:     Windows
 Release:  6.1.7601 (Service Pack 1)
 Compiler: GCC 9.2.0 "9.2-win32 20191008"

Configuration:
 Blitter:      32bpp-anim
 Graphics set: OpenGFX (7393)
 Language:     Z:\Users\skynet\Downloads\openttd-custom-jgrpp-0.34.4-MINGW-win64\lang\german.lng
 Music driver: none
 Music set:    none (4294967295)
 Network:      no
 Sound driver: none
 Sound set:    none (4294967295)
 Video driver: win32
 Pathfinder:   - - -

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

Map size: 0x0 (0 x 0), NO MAP ALLOCATED

AI Configuration (local: 0) (current: 0):

Libraries:
 LZMA:       5.2.1
 LZO:        2.09
 PNG:        1.5.23
 Zlib:       1.2.8

Module information:
 Z:\Users\skynet\Downloads\openttd-custom-jgrpp-0.34.4-MINGW-win64\openttd.exe handle: 0000000000400000 size: 52301209 crc: D7419A95 date: 2020-06-05 20:11:08
 C:\windows\system32\ntdll.dll handle: 000000007bc10000 size: 2476 crc: 204D94DC date: 2020-06-08 23:42:28
 C:\windows\system32\kernel32.dll handle: 000000007b410000 size: 1802904 crc: DFD2072F date: 2020-06-08 23:42:28
 C:\windows\system32\kernelbase.dll handle: 000000007b000000 size: 2976037 crc: A3DE1B1E date: 2020-06-08 23:42:14
 C:\windows\system32\ADVAPI32.dll handle: 000000006b020000 size: 2488 crc: 5AC04D34 date: 2020-06-08 23:42:28
 C:\windows\system32\GDI32.dll handle: 000000006b0c0000 size: 17888 crc: 1572688A date: 2020-06-08 23:42:28
 C:\windows\system32\IMM32.dll handle: 000000006bec0000 size: 271573 crc: E104F76B date: 2020-06-08 23:42:14
 C:\windows\system32\msvcrt.dll handle: 000000006b260000 size: 2456 crc: 4D6BD7BB date: 2020-06-08 23:42:28
 C:\windows\system32\user32.dll handle: 000000006b350000 size: 937496 crc: 95634512 date: 2020-06-08 23:42:29
 C:\windows\system32\version.dll handle: 0000000065780000 size: 78465 crc: 88A730B6 date: 2020-06-08 23:42:25
 C:\windows\system32\ole32.dll handle: 0000000065000000 size: 5622492 crc: F334D443 date: 2020-06-08 23:42:21
 C:\windows\system32\rpcrt4.dll handle: 000000006fbc0000 size: 2172034 crc: 68B5ABCA date: 2020-06-08 23:42:23
 C:\windows\system32\SHELL32.dll handle: 000000006bf10000 size: 9253400 crc: 888275AF date: 2020-06-08 23:42:29
 C:\windows\system32\shlwapi.dll handle: 0000000004aa0000 size: 1327326 crc: 1D3F2BD7 date: 2020-06-08 23:42:23
 C:\windows\system32\shcore.dll handle: 0000000064940000 size: 275804 crc: C03A741E date: 2020-06-08 23:42:23
 C:\windows\system32\WINMM.dll handle: 00000000637c0000 size: 1447686 crc: BBF3A2AA date: 2020-06-08 23:42:27
 C:\windows\system32\msacm32.dll handle: 0000000066440000 size: 367752 crc: ED1E65FE date: 2020-06-08 23:42:16
 C:\windows\system32\WS2_32.dll handle: 000000006b5d0000 size: 2476 crc: 0A4E5FAA date: 2020-06-08 23:42:30
 C:\windows\system32\winemac.drv handle: 000000006b6c0000 size: 12200 crc: 1274F242 date: 2020-06-08 23:42:29
 C:\windows\system32\setupapi.dll handle: 0000000005330000 size: 1772405 crc: 8ADE88F4 date: 2020-06-08 23:42:23
 C:\windows\system32\iphlpapi.dll handle: 000000006f220000 size: 2480 crc: 4CF5DC91 date: 2020-06-08 23:42:28
 C:\windows\system32\usp10.dll handle: 0000000062600000 size: 831396 crc: 6A143898 date: 2020-06-08 23:42:25
 C:\windows\system32\psapi.dll handle: 0000000000390000 size: 25443 crc: 588C87A8 date: 2020-06-08 23:42:22

---- gamelog start ----
---- gamelog end ----

Recent news messages (0 of 0):

Command Log:
 Showing most recent 0 of 0 commands

*** End of OpenTTD Crash Report ***

Decoded stack trace:
[00] kernelbase           0x000000007B00F30D RaiseException + 101
[01] msvcrt               0x000000006B2884F1 MSVCRT_raise + 321
[02] msvcrt               0x000000006B28B8E8 MSVCRT_abort + 168
[03] openttd              0x000000000057FD66 error(char const*, ...) + 118 (/home/jgr/openttd/cross-win64/src/openttd.cpp:147)
[04] openttd              0x000000000051342B NetworkFindBroadcastIPsInternal (/home/jgr/openttd/cross-win64/src/network/core/host.cpp:126)
[05] openttd              0x0000000000513496 NetworkFindBroadcastIPs(std::vector<NetworkAddress, std::allocator<NetworkAddress> >*) + 22 (/home/jgr/openttd/cross-win64/src/network/core/host.cpp:197)
[06] openttd              0x000000000051BF5C NetworkStartUp() + 412 (/home/jgr/openttd/cross-win64/src/network/network.cpp:1099)
[07] openttd              0x00000000005823A2 openttd_main(int, char**) + 5378 (/home/jgr/openttd/cross-win64/src/openttd.cpp:919)
[08] openttd              0x000000000059AC2D WinMain + 253 (/home/jgr/openttd/cross-win64/src/os/windows/win32.cpp:467)
[09] openttd              0x00000000004013C7 EntryPoint + 18446744073709551615
[10] openttd              0x00000000004014CB WinMainCRTStartup + 27 (./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt/./mingw-w64-crt/crt/crtexe.c:195)
[11] kernel32             0x000000007B4412E2 __wine_start_process + 354

*** End of additional info ***
crash-20200608T234924Z.png
(5.53 KiB) Not downloaded yet
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

SoylentBlack wrote: 11 Jun 2020 19:47 Hi!


Thank you for your patchpack. I played it any time ago on windows. Now I tried to start a game on WINE via OSX, and it crashes at startup. Does anyone know how to make it possible to play the patchpack via wine?
...
This is due to a bug in Wine, I added a workaround before but that seems to not be sufficient.
I've belatedly sent them a bug report now.
I'll put a better workaround in the next release.

If you've got more than 8 network interfaces, removing or disabling some may resolve the issue.

Otherwise you should be able to compile natively for OSX in the same way as trunk.
Ex TTDPatch Coder
Patch Pack, Github
SoylentBlack
Engineer
Engineer
Posts: 2
Joined: 11 Jun 2020 19:36

Re: JGR's Patch Pack

Post by SoylentBlack »

JGR wrote: 11 Jun 2020 21:15
SoylentBlack wrote: 11 Jun 2020 19:47 Hi!


Thank you for your patchpack. I played it any time ago on windows. Now I tried to start a game on WINE via OSX, and it crashes at startup. Does anyone know how to make it possible to play the patchpack via wine?
...
This is due to a bug in Wine, I added a workaround before but that seems to not be sufficient.
I've belatedly sent them a bug report now.
I'll put a better workaround in the next release.

If you've got more than 8 network interfaces, removing or disabling some may resolve the issue.

Otherwise you should be able to compile natively for OSX in the same way as trunk.

Thank you for your fast response! Well thats a pity, i try to fix it via disabling network interfaces.

I never compiled myself before, I will take some lessions and hope to get it done. Is there some tutorial for it? Would be nice to play your patchpack again, it includes all features i love to have in this game.

Thank you anyway, best regards!

UPDATE: I GOT IT. Compiling via Homebrew, man that was easy. Started it now after downloading opengfx, looks fine, no crashes for now.

I will start a serious game after configuring it and loading tons of newgrfs and try it.

THX again
User avatar
MagicBuzz
Tycoon
Tycoon
Posts: 1354
Joined: 15 Feb 2003 17:32
Location: Vergezac, France

Re: JGR's Patch Pack

Post by MagicBuzz »

Hello,

I found a small bug with goals scripts and day length factor.

I'm using the script Bee Reward and set a day length factor of 15.

But goals time remaining are not affected by the day length factor.

As a result, 9 years goal expires after a few months.

I don't know what should be done : dividing the goals time shown by the day length factor or multiply the actual remaining time bby day length ? But currently it's inconsistent.
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

MagicBuzz wrote: 12 Jun 2020 16:01 Hello,

I found a small bug with goals scripts and day length factor.

I'm using the script Bee Reward and set a day length factor of 15.

But goals time remaining are not affected by the day length factor.

As a result, 9 years goal expires after a few months.

I don't know what should be done : dividing the goals time shown by the day length factor or multiply the actual remaining time bby day length ? But currently it's inconsistent.
I don't personally use game scripts at all, but I'd presume that making the actual goal duration longer would make achieving the goal much easier, and remove the challenge.

Taking a look at the goal code, and the implementation of Bee Reward, the progress text is set by the GS itself, it doesn't supply a duration to OpenTTD in any way.
The number of ticks per day has been hard-coded into the Bee Reward source.
I'm not sure what can realistically be done about this other than modifying the Bee Reward implementation. That said there's currently no way to get the day length factor from within a GS as there are no known potential users of such an API.
Ex TTDPatch Coder
Patch Pack, Github
DrCplKlinger
Engineer
Engineer
Posts: 12
Joined: 28 Dec 2018 19:29

Re: JGR's Patch Pack

Post by DrCplKlinger »

Howdy,

I've checked the github/searched this thread and could not find an answer. So I'll ask.

Since I'm on linux, I download the source (tag 34.4) and run "./configure" and "make".
However, when I do that, I find I'm missing some settings like "day length factor" or measurement. Is there any particular flags I need to add to the compilation commands? Or am I missing something?

Thanks in advance!
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Did you run the OpenTTD from /build folder of the code, or did you run it from the system? If it's the latter, you are not running the patch pack at all.
DrCplKlinger
Engineer
Engineer
Posts: 12
Joined: 28 Dec 2018 19:29

Re: JGR's Patch Pack

Post by DrCplKlinger »

ino wrote: 12 Jun 2020 18:31 Did you run the OpenTTD from /build folder of the code, or did you run it from the system? If it's the latter, you are not running the patch pack at all.
:mrgreen: That's the issue. Thanks a million!
Edit: I'm not finding a "build" folder or an alternative configure. Where would it be?
DrCplKlinger
Engineer
Engineer
Posts: 12
Joined: 28 Dec 2018 19:29

Re: JGR's Patch Pack

Post by DrCplKlinger »

ino wrote: 12 Jun 2020 18:31 Did you run the OpenTTD from /build folder of the code, or did you run it from the system? If it's the latter, you are not running the patch pack at all.
Actually I've misread this lol. I thought you meant there was some alternative make location. I've been running the OpenTTD file from the ./JGRPatchPack/bin folder.
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Ah sorry I remember the folder name wrong. Did you select Show all settings option in the setting menu?
DrCplKlinger
Engineer
Engineer
Posts: 12
Joined: 28 Dec 2018 19:29

Re: JGR's Patch Pack

Post by DrCplKlinger »

Yep! All expert settings are shown. If I download the .exe on my Windows laptop, I've can find it no problem.
User avatar
Valle
Transport Coordinator
Transport Coordinator
Posts: 284
Joined: 15 May 2007 11:35
Location: Germany

Re: JGR's Patch Pack

Post by Valle »

Hello,

I have a request for an enhancement of the following existing feature:

44. Add a menu item to the vehicle list to assign all listed vehicles to a new group (added in v0.12.1)

=> Would it be possible to integrate this into the top level company vehicle lists based on the selected filter criteria (e.g. select all 317 ungrouped road vehicles that carry mail and put all of those into the same group)?

Particularly in very large games, the number of road vehicles might grow a lot faster than I care to add them to groups individually (or based on their shared schedules), so such a mass-management feature for ungrouped vehicles would be greatly appreciated. I could simply throw such a filter-based group from within the ungrouped set into an existing vehicle group for mail road vehicles, and then eliminate the new subgroup to merge them. It's an easier task with 1500 trains that are strictly grouped based on their routes (apart from point2point freight), but when you get to the point of having almost 5000 road vehicles it gets a bit tiring to assign new road vehicles to groups one by one. ;)

Thanks in advance, and please keep up this amazing work! I am still amazed that your Patchpack keeps allowing me to play and update a savegame that I initiated more than half a decade ago across multiple NewGRFs that came and went.
User avatar
TrainLover
Engineer
Engineer
Posts: 107
Joined: 01 Jul 2015 15:03

Re: JGR's Patch Pack

Post by TrainLover »

Valle wrote: 15 Jun 2020 20:00 Hello,

I have a request for an enhancement of the following existing feature:

44. Add a menu item to the vehicle list to assign all listed vehicles to a new group (added in v0.12.1)

=> Would it be possible to integrate this into the top level company vehicle lists based on the selected filter criteria (e.g. select all 317 ungrouped road vehicles that carry mail and put all of those into the same group)?
Seconded. It would be awesome to have a feature so that all vehicles that have the same shared orders can be grouped. I can't think of any way to accomplish this that won't slow the CPU down by a lot tho :(

Also, you should allow cargo production to have a multiplier without using the cheat menu! @JGR! I want to see my name on the high score list more often :P :P :P
Developer of North American Passenger Liveries: viewtopic.php?f=26&t=87228
User avatar
Valle
Transport Coordinator
Transport Coordinator
Posts: 284
Joined: 15 May 2007 11:35
Location: Germany

Re: JGR's Patch Pack

Post by Valle »

Grouping based on shared orders already works when you hold down ... uh, was it shift or ctrl or even option? ... while adding a vehicle with those shared orders to a group. It'll pull all members of that shared schedule into the same group, which is very handy for when you want to group - say - a Regional Express line with a shared-order vehicle fleet.

That feature just won't help when you'd have tons of vehicles with largely individual orders but underlying features that would make it attractive to be able to create a permanent group based on filter criteria such as the cargo they carry. Being able to eliminate that first-time individual group assignment for such cases would be a huge deal.
User avatar
TrainLover
Engineer
Engineer
Posts: 107
Joined: 01 Jul 2015 15:03

Re: JGR's Patch Pack

Post by TrainLover »

Valle wrote: 16 Jun 2020 21:20 Grouping based on shared orders already works when you hold down ... uh, was it shift or ctrl or even option? ... while adding a vehicle with those shared orders to a group. It'll pull all members of that shared schedule into the same group, which is very handy for when you want to group - say - a Regional Express line with a shared-order vehicle fleet.

That feature just won't help when you'd have tons of vehicles with largely individual orders but underlying features that would make it attractive to be able to create a permanent group based on filter criteria such as the cargo they carry. Being able to eliminate that first-time individual group assignment for such cases would be a huge deal.
Holy hell, OpenTTD is so many features that I never even knew...
Developer of North American Passenger Liveries: viewtopic.php?f=26&t=87228
User avatar
piratescooby
Route Supervisor
Route Supervisor
Posts: 451
Joined: 21 Nov 2014 12:39
Location: The Granite City.

Re: JGR's Patch Pack

Post by piratescooby »

TrainLover wrote: 16 Jun 2020 21:25
Valle wrote: 16 Jun 2020 21:20 Grouping based on shared orders already works when you hold down ... uh, was it shift or ctrl or even option? ... while adding a vehicle with those shared orders to a group. It'll pull all members of that shared schedule into the same group, which is very handy for when you want to group - say - a Regional Express line with a shared-order vehicle fleet.

That feature just won't help when you'd have tons of vehicles with largely individual orders but underlying features that would make it attractive to be able to create a permanent group based on filter criteria such as the cargo they carry. Being able to eliminate that first-time individual group assignment for such cases would be a huge deal.
Holy hell, OpenTTD is so many features that I never even knew...
https://wiki.openttd.org/Hidden_features , nice and handy .
cmhbob
Engineer
Engineer
Posts: 66
Joined: 29 May 2010 06:06
Contact:

Re: JGR's Patch Pack

Post by cmhbob »

Re: grouping - Am I the only one who just clones from the group I want the vehicle in?
--
Bob
The wrinkles only go where the smiles have been...
Me, elsewhere
User avatar
TrainLover
Engineer
Engineer
Posts: 107
Joined: 01 Jul 2015 15:03

Re: JGR's Patch Pack

Post by TrainLover »

cmhbob wrote: 16 Jun 2020 23:46 Re: grouping - Am I the only one who just clones from the group I want the vehicle in?
I had a recent game where I tried to group all my road vehicles who were in the same town and then gave up after my 20th town
Developer of North American Passenger Liveries: viewtopic.php?f=26&t=87228
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: JGR's Patch Pack

Post by mak »

cmhbob wrote: 16 Jun 2020 23:46 Re: grouping - Am I the only one who just clones from the group I want the vehicle in?
No. Do it all the time. :)

crtl, clone to 'share orders' or just clone and change orders if running from to different stations, same with road vehicles.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 22 guests