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

User avatar
JGR
Tycoon
Tycoon
Posts: 2155
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

SomeIndianGuy wrote: 12 Sep 2020 11:54
JGR wrote: 12 Sep 2020 10:38
SomeIndianGuy wrote: 12 Sep 2020 09:16 Hello JGR,
Here attached is a crash report regarding the most recent version of your patchpack :Crash report.zip
Thanks for reporting this, I will investigate.
For now I would suggest increasing the size of the sprite_cache_size_px value in your openttd.cfg file.
What is the max value for the given config variable?
I have kept it at 256 for now. It seemed to crash when the value was 128.
The maximum is 512.

I've committed a fix which should resolve this, which will be in the next release.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf
User avatar
vincentkoevoets
Engineer
Engineer
Posts: 33
Joined: 14 Nov 2014 10:49
Location: Assen, Netherlands

Re: JGR's Patch Pack

Post by vincentkoevoets »

Hey JGR! So my compiling adventures continue! On Mac OS, I switched to cmake, and all went well. The only thing is that the generated bundle by cpack simply does not start. I will be doing some troubleshooting there, and OpenTTD starts fine with ./openttd from CLI.

On Windows, in Visual Studio when I try to compile from master branch, all is fine. When I checkout the current version (0.37.0), I get errors while compiling. No problem, I can always download your windows binaries, but I like to fiddle with compiling OpenTTD myself. Maybe you have some insights on why this won't work?

Code: Select all

Error	C2079	'road_count' uses undefined class 'std::array<uint,63>'	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1293	
Error	C2079	'tram_count' uses undefined class 'std::array<uint,63>'	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1294	
Error	C2677	binary '[': no global operator found which takes type 'RoadType' (or there is no acceptable conversion)	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1299	
Error	C2677	binary '[': no global operator found which takes type 'RoadType' (or there is no acceptable conversion)	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1301	
Error	C2676	binary '[': 'const std::array<uint,63>' does not define this operator or a conversion to a type acceptable to the predefined operator	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1308	
Error	C2676	binary '[': 'const std::array<uint,63>' does not define this operator or a conversion to a type acceptable to the predefined operator	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1310	
Error	C2664	'void SetDefaultRoadGui::<lambda_ec3d88c45bc534e793d9b33b010b6109>::operator ()(RoadTramType,RoadType &,const std::array<uint,63> &) const': cannot convert argument 3 from 'int' to 'const std::array<uint,63> &'	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1315	
Error	C2664	'void SetDefaultRoadGui::<lambda_ec3d88c45bc534e793d9b33b010b6109>::operator ()(RoadTramType,RoadType &,const std::array<uint,63> &) const': cannot convert argument 3 from 'int' to 'const std::array<uint,63> &'	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1316	
Thanks again for all the work you've done and keeping the game alive!
User avatar
JGR
Tycoon
Tycoon
Posts: 2155
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

vincentkoevoets wrote: 24 Sep 2020 07:00 Hey JGR! So my compiling adventures continue! On Mac OS, I switched to cmake, and all went well. The only thing is that the generated bundle by cpack simply does not start. I will be doing some troubleshooting there, and OpenTTD starts fine with ./openttd from CLI.
Unfortunately I can't really offer much help for Mac-related issues. If the upstream master branch has the same issue it may be worth raising a bug report there.
vincentkoevoets wrote: 24 Sep 2020 07:00 On Windows, in Visual Studio when I try to compile from master branch, all is fine. When I checkout the current version (0.37.0), I get errors while compiling. No problem, I can always download your windows binaries, but I like to fiddle with compiling OpenTTD myself. Maybe you have some insights on why this won't work?

Code: Select all

Error	C2079	'road_count' uses undefined class 'std::array<uint,63>'	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1293	
Error	C2079	'tram_count' uses undefined class 'std::array<uint,63>'	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1294	
Error	C2677	binary '[': no global operator found which takes type 'RoadType' (or there is no acceptable conversion)	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1299	
Error	C2677	binary '[': no global operator found which takes type 'RoadType' (or there is no acceptable conversion)	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1301	
Error	C2676	binary '[': 'const std::array<uint,63>' does not define this operator or a conversion to a type acceptable to the predefined operator	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1308	
Error	C2676	binary '[': 'const std::array<uint,63>' does not define this operator or a conversion to a type acceptable to the predefined operator	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1310	
Error	C2664	'void SetDefaultRoadGui::<lambda_ec3d88c45bc534e793d9b33b010b6109>::operator ()(RoadTramType,RoadType &,const std::array<uint,63> &) const': cannot convert argument 3 from 'int' to 'const std::array<uint,63> &'	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1315	
Error	C2664	'void SetDefaultRoadGui::<lambda_ec3d88c45bc534e793d9b33b010b6109>::operator ()(RoadTramType,RoadType &,const std::array<uint,63> &) const': cannot convert argument 3 from 'int' to 'const std::array<uint,63> &'	D:\jgrpp\out\build\x64-Debug\jgrpp	D:\jgrpp\src\road_gui.cpp	1316	
Thanks again for all the work you've done and keeping the game alive!
This particular bug has been fixed since the release (in the next commit). If you do a `git pull` or otherwise apply commit 0cffabe57 it should build again.

Also thank you :).
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf
User avatar
vincentkoevoets
Engineer
Engineer
Posts: 33
Joined: 14 Nov 2014 10:49
Location: Assen, Netherlands

Re: JGR's Patch Pack

Post by vincentkoevoets »

JGR wrote: 24 Sep 2020 09:04 Unfortunately I can't really offer much help for Mac-related issues. If the upstream master branch has the same issue it may be worth raising a bug report there.
No problem, that's a known fact and I'm just happy to be able to play on a Mac :D
Will try the master branch too and report if necessary.
JGR wrote: 24 Sep 2020 09:04 This particular bug has been fixed since the release (in the next commit). If you do a `git pull` or otherwise apply commit 0cffabe57 it should build again.

Also thank you :).
Ah thanks! I missed that, will pull the commit and see how it goes.
User avatar
Tintinfan
Engineer
Engineer
Posts: 78
Joined: 29 Sep 2010 11:36

Re: JGR's Patch Pack

Post by Tintinfan »

Morning,


Recently moved our server game from v0.36.0 to v0.37.0 - but we're having some issues with linkgraph preformance since the update. Before the upgrade, we didn't have any pause for link graph updates but after going up to v0.37.0 we have been getting them. To make it worse, following a linkgraph update unpause the game hangs/freezes for 30-60 seconds which in some cases disconnects players.
Regards,

Tinny/Tintinfan. :)
User avatar
JGR
Tycoon
Tycoon
Posts: 2155
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Tintinfan wrote: 25 Sep 2020 06:13 Morning,


Recently moved our server game from v0.36.0 to v0.37.0 - but we're having some issues with linkgraph preformance since the update. Before the upgrade, we didn't have any pause for link graph updates but after going up to v0.37.0 we have been getting them. To make it worse, following a linkgraph update unpause the game hangs/freezes for 30-60 seconds which in some cases disconnects players.
The scheduling algorithm for link graph updates has been adjusted a bit. Before v0.37.0, networks in a particular size range (smallish) were updated excessively infrequently.
This has been fixed now, and in general updates will occur a bit more often. If you'd previously reduced the cargodist number of day settings because things were taking too long, it may be worth increasing them a bit.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf
User avatar
Tintinfan
Engineer
Engineer
Posts: 78
Joined: 29 Sep 2010 11:36

Re: JGR's Patch Pack

Post by Tintinfan »

JGR wrote: 25 Sep 2020 08:19
Tintinfan wrote: 25 Sep 2020 06:13 Morning,


Recently moved our server game from v0.36.0 to v0.37.0 - but we're having some issues with linkgraph preformance since the update. Before the upgrade, we didn't have any pause for link graph updates but after going up to v0.37.0 we have been getting them. To make it worse, following a linkgraph update unpause the game hangs/freezes for 30-60 seconds which in some cases disconnects players.
The scheduling algorithm for link graph updates has been adjusted a bit. Before v0.37.0, networks in a particular size range (smallish) were updated excessively infrequently.
This has been fixed now, and in general updates will occur a bit more often. If you'd previously reduced the cargodist number of day settings because things were taking too long, it may be worth increasing them a bit.
Sounds good, adjusted the recalc a bit and it's calmed down. Still get some strange lag after unpausing from a linkgraph update though - and some random lag spikes at other times of which the most recent led to all clients desyncing...
desynclogs_27092020_jpgame.zip
(13.52 MiB) Downloaded 19 times
Regards,

Tinny/Tintinfan. :)
User avatar
JGR
Tycoon
Tycoon
Posts: 2155
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Tintinfan wrote: 27 Sep 2020 16:40
JGR wrote: 25 Sep 2020 08:19
Tintinfan wrote: 25 Sep 2020 06:13 Morning,


Recently moved our server game from v0.36.0 to v0.37.0 - but we're having some issues with linkgraph preformance since the update. Before the upgrade, we didn't have any pause for link graph updates but after going up to v0.37.0 we have been getting them. To make it worse, following a linkgraph update unpause the game hangs/freezes for 30-60 seconds which in some cases disconnects players.
The scheduling algorithm for link graph updates has been adjusted a bit. Before v0.37.0, networks in a particular size range (smallish) were updated excessively infrequently.
This has been fixed now, and in general updates will occur a bit more often. If you'd previously reduced the cargodist number of day settings because things were taking too long, it may be worth increasing them a bit.
Sounds good, adjusted the recalc a bit and it's calmed down. Still get some strange lag after unpausing from a linkgraph update though - and some random lag spikes at other times of which the most recent led to all clients desyncing...
desynclogs_27092020_jpgame.zip
Thanks for letting me know about this. I'll investigate.
It would be handy if I could have a copy of the GRFs that you're using.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf
stb
Engineer
Engineer
Posts: 38
Joined: 20 Sep 2013 20:26

Re: JGR's Patch Pack

Post by stb »

Hi there,

One question: how to use _counter_ conditional order?

Thanks
User avatar
JGR
Tycoon
Tycoon
Posts: 2155
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

stb wrote: 28 Sep 2020 22:47 Hi there,

One question: how to use _counter_ conditional order?

Thanks
You can create/modify counters by going to: company train list window -> manage list -> manage counters.

You can use routing restriction programs on a signal to change the value of a counter when a train passes.
You can then use conditional orders (or generally simpler, routing restrictions or programmable pre-signals) to test the counter value and take whatever action.

This is primarily aimed at things like round-robin splitters or other stateful logic, but I'm sure that it can be used for other things.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf
Deicide
Engineer
Engineer
Posts: 11
Joined: 17 May 2011 16:02

Re: JGR's Patch Pack

Post by Deicide »

Is there a way to make the map update itself at old rate? It's really difficult to tell at a glance whether my trains are moving or stuck.
User avatar
JGR
Tycoon
Tycoon
Posts: 2155
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Deicide wrote: 30 Sep 2020 08:40 Is there a way to make the map update itself at old rate? It's really difficult to tell at a glance whether my trains are moving or stuck.
This will be fixed in the next release. This was a bit of an oversight on my part.
In the meantime, you can increase the "Maximum zoom out" setting to get a similar map overview in the main viewport.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf
Argus
Engineer
Engineer
Posts: 79
Joined: 16 Oct 2018 08:31

Re: JGR's Patch Pack

Post by Argus »

Why is everything packed with the main directory now? It complicates the update ... :oops:
ino
Engineer
Engineer
Posts: 127
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Argus wrote: 01 Oct 2020 12:29 Why is everything packed with the main directory now? It complicates the update ... :oops:
It should be in the build directory, no? (idk if openttd cmake config have a condition that prevent building in the main directory or not)

Code: Select all

$ mkdir build
$ cd build
$ cmake ..
$ make
It's a change from the vanilla, migrating the build system to cmake.
dol422
Traffic Manager
Traffic Manager
Posts: 134
Joined: 29 Dec 2015 20:06

Re: JGR's Patch Pack

Post by dol422 »

Hi,
I seem to have stumbled upon a problem with infrastructure sharing.
Attachments
Hamilton & Co., 7th Apr 2020.sav
The white company lays down infrastructure, but is not receiving income from the red company which is using the infrastructure.
(1.73 MiB) Downloaded 15 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2155
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

dol422 wrote: 01 Oct 2020 16:02 Hi,
I seem to have stumbled upon a problem with infrastructure sharing.
You need to turn on the "Allow companies in debt to pay sharing fees" setting. The red company isn't currently paying fees because it is in debt.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf
dol422
Traffic Manager
Traffic Manager
Posts: 134
Joined: 29 Dec 2015 20:06

Re: JGR's Patch Pack

Post by dol422 »

Ah I don't normally play using multiple companies so must have missed that. Thanks
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 136
Joined: 14 Dec 2019 14:22

Re: JGR's Patch Pack

Post by Gadg8eer »

Is there any chance of integrating some of the patches from dbpp? I know you already added the click-and-drag NewObjects, but what are your thoughts on the remaining features?
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: JGR's Patch Pack

Post by ColdIce »

Hy JGR,

I have a problem with conditional orders. I can't set the value more than 2047 solid cargo on a conditional order, but i can set higher value with liquid cargo. I'm using FIRS 1.4.4.
Attachments
2047.png
2047.png (38.52 KiB) Viewed 293 times
ImageImage
ino
Engineer
Engineer
Posts: 127
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

ColdIce wrote: 05 Oct 2020 16:06 Hy JGR,

I have a problem with conditional orders. I can't set the value more than 2047 solid cargo on a conditional order, but i can set higher value with liquid cargo. I'm using FIRS 1.4.4.
Liquid cargo is stored internally as a kiloliter. So 2047 solid cargo is equivalent to 2,047,000 liters.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 7 guests