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

Marcus98
Engineer
Engineer
Posts: 2
Joined: 07 Oct 2017 06:39

Re: JGR's Patch Pack

Post by Marcus98 »

Leanden wrote:"In game date: 0-01-01 (0, 0)"

Are you starting the game in year 0?

Im not sure how well it would cope with that.
Nope. My start date was January 1950 according to the game.
aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

Re: JGR's Patch Pack

Post by aberro »

Looks like you're missing schdispatch_cmd.cpp, schdispatch_gui.cpp and schdispatch.h files in VS project files (at least VS140). And btree won't compile for VS untill I've removed assertion which caused error (don't sure if it's safe without that assertion, but AFAIK it should be, bc it's compile-time assertion).
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Marcus98 wrote:Hello :)

I've recently downloaded the JGR patch (64-bits version) and the game frequently crashes (especially when trying to play a scenario). The settings are also reset. I've read the known-bugs file but I don't really understand why this problem is happening. (I'm not a computer programmer expert haha)

Below is the crash report file I've managed to find.

I'm looking forward to your help. Thanks in advance! :)
It looks like the crash is because the base graphics are missing, and you are trying to use keyboard scrolling.
I'll add a fix for the keyboard scrolling part to the next release.
The base graphics being missing suggests that your installation is broken, can you check that you have unpacked the zip file correctly (i.e. all the files within it are unpacked).
Mardok wrote:Earlier I was using Terminus Patch, is it possible to add airports from Terminus patch.
This has been asked before, I'm not planning to add it due to various bugs and other issues.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
SDHokie
Engineer
Engineer
Posts: 4
Joined: 10 Oct 2017 17:42

Re: JGR's Patch Pack

Post by SDHokie »

Hey thanks for being so responsive to our trouble tickets. I made a folder 'OpenTTD JGR' and put everything in there and ran the game. Got the message "Error with the configuration file...ignoring Base Music set 'OpenMSX': not found". What could be the issue? Sorry if this is a repeat inquiry.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: JGR's Patch Pack

Post by Leanden »

SDHokie wrote:Hey thanks for being so responsive to our trouble tickets. I made a folder 'OpenTTD JGR' and put everything in there and ran the game. Got the message "Error with the configuration file...ignoring Base Music set 'OpenMSX': not found". What could be the issue? Sorry if this is a repeat inquiry.
The binaries arent bundled with graphics or sounds in order to save space. You should get a prompt when you open the game the first time.

If you dont, locate Openttd.cfg from your documents folder and move this out to another location. Open the game, donwload the base files and then replace the cfg file to its original location.
Image
User avatar
SDHokie
Engineer
Engineer
Posts: 4
Joined: 10 Oct 2017 17:42

Re: JGR's Patch Pack

Post by SDHokie »

Leanden wrote:
SDHokie wrote:Hey thanks for being so responsive to our trouble tickets. I made a folder 'OpenTTD JGR' and put everything in there and ran the game. Got the message "Error with the configuration file...ignoring Base Music set 'OpenMSX': not found". What could be the issue? Sorry if this is a repeat inquiry.
The binaries arent bundled with graphics or sounds in order to save space. You should get a prompt when you open the game the first time.

If you dont, locate Openttd.cfg from your documents folder and move this out to another location. Open the game, donwload the base files and then replace the cfg file to its original location.
Thanks. Let me see if I get this. I moved openttd.exe to my desktop out of the OpenTTD folder created by the original game. I ran the JGR openttd.exe and am browsing 'Check Online Content'.

Now I search 'base' and download those files? Which? Where does the displaced .cfg file come back in? Please excuse my lack of understanding here.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: JGR's Patch Pack

Post by Leanden »

SDHokie wrote:
Leanden wrote:
SDHokie wrote:Hey thanks for being so responsive to our trouble tickets. I made a folder 'OpenTTD JGR' and put everything in there and ran the game. Got the message "Error with the configuration file...ignoring Base Music set 'OpenMSX': not found". What could be the issue? Sorry if this is a repeat inquiry.
The binaries arent bundled with graphics or sounds in order to save space. You should get a prompt when you open the game the first time.

If you dont, locate Openttd.cfg from your documents folder and move this out to another location. Open the game, donwload the base files and then replace the cfg file to its original location.
Thanks. Let me see if I get this. I moved openttd.exe to my desktop out of the OpenTTD folder created by the original game. I ran the JGR openttd.exe and am browsing 'Check Online Content'.

Now I search 'base' and download those files? Which? Where does the displaced .cfg file come back in? Please excuse my lack of understanding here.
No no,

Navigate to Documents > Openttd and take the Openttd.cfg file and put it on your desktop.

Run openttd.exe from your JGR folder and it should then automatically ask you to download graphics base set at the start of the game.

Once youve downloaded it, close the game. Put Openttd.cfg back into the Documents > Openttd folder and reopen the game to get your settings back :)
Image
User avatar
SDHokie
Engineer
Engineer
Posts: 4
Joined: 10 Oct 2017 17:42

Re: JGR's Patch Pack

Post by SDHokie »

Leanden wrote:
No no,

Navigate to Documents > Openttd and take the Openttd.cfg file and put it on your desktop.

Run openttd.exe from your JGR folder and it should then automatically ask you to download graphics base set at the start of the game.

Once youve downloaded it, close the game. Put Openttd.cfg back into the Documents > Openttd folder and reopen the game to get your settings back :)
I did not get a prompt, only the error message. What is the next workaround? Thank you.

EDIT: I went into options and set Base Music Set to OpenMSX. Would it only see this option if the content was present?
Last edited by SDHokie on 10 Oct 2017 20:19, edited 1 time in total.
aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

Re: JGR's Patch Pack

Post by aberro »

Have you tried to add clipboard patch? I'm trying right now on your patchpack, even updated it separately for trunk, but it's too old (and I think it has some trails of old version in it's diff file) and I don't understand it enough to update other patches for it.
But I need it badly...
User avatar
SDHokie
Engineer
Engineer
Posts: 4
Joined: 10 Oct 2017 17:42

Re: JGR's Patch Pack

Post by SDHokie »

aberro wrote:Have you tried to add clipboard patch? I'm trying right now on your patchpack, even updated it separately for trunk, but it's too old (and I think it has some trails of old version in it's diff file) and I don't understand it enough to update other patches for it.
But I need it badly...
Who are you responding to?
aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

Re: JGR's Patch Pack

Post by aberro »

I'm not responding, I'm asking devs.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: JGR's Patch Pack

Post by Leanden »

aberro wrote:I'm not responding, I'm asking devs.
JGR has already stated he wont be including clipboard patch as it has some inherent bugs standalone, and it interacts poorly with some other patches what he feels are more useful to the patchpack.
Image
aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

Re: JGR's Patch Pack

Post by aberro »

Hell yeah, with a bit of crutches and покрыл всё хуями, I've shoved this old filthy piece of code and to my surprise it's not only started, but even working.
Don't sure if it's stable (actually, I'm thinking it's very unstable), so won't recommend to apply it, but if anybody want to try, then get sources from git repo and apply those patches. Or create new git repo, commit this patch pack and then apply patches. Don't know why tortoise made two diff files.
Attachments
0001-clipboard-patch.patch
(512.21 KiB) Downloaded 82 times
0002-clipboard-patch.patch
(104.78 KiB) Downloaded 81 times
aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

Re: JGR's Patch Pack

Post by aberro »

Leanden wrote:JGR has already stated he wont be including clipboard patch as it has some inherent bugs standalone, and it interacts poorly with some other patches what he feels are more useful to the patchpack.

That's sad, clipboard is very useful path in gameplay, especially in my gameplay - I'm using many station grfs and trying to make authentic and realistic stations. But it's too time consuming to make each station from scratch, and all I wanted is to copy one of existing stations and slightly modify it.

BTW, your patchpack is crashing on every load (before I've mutilated it with clipboard patch, of cource) and now I can catch this crash in debugger, screenshot attached. Dunno, maybe it's one of newgrs?
Attachments
1.png
1.png (10.59 KiB) Viewed 3831 times
aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

Re: JGR's Patch Pack

Post by aberro »

Welp, my build of this patchpack is not only working, it's a hell of a lot faster (not that this patchpack build is slow... but we need to go faster!). I've changed compiler and linker settings to use __vectorcall (function arguments is passing in as many registers as possible, including MMX & SSE regs, instead of few good'ol a/c/d/b registers in fastcall), full code optimization, set optimization target to fast code instead of smaller code (exe bloated from 9Mb to ~19Mb which is still less than build from JGR), 16B data alignment and I'll try later profile based optimization. But this build requires quite modern CPUs, Intel with at least Sandy Bridge arch (wiki), AMD at least Bulldozer (wiki), you can google if your CPU have AVX support (if it was build in 2012 or later it should support AVX). And this build is Windows 64bit only!
Don't forget to add clipboard.grf to baseset folder!
Oh, and you really really shouldn't download it, not only because it have unstable clipboard patch, unstable optimizations and you can't play online with it, but because I could add some malware which can't be detected even by virustotal, could if I want to (welp, I wouldn't mind to insert some kind of xmr miner, but I'm too lazy to actually do it). But if you nonetheless want to try it - then enjoy.
Upd.: tested both this and original builds on huge map (8k x 8k): loaded map, waited for February 1'st, set game to fast forward and started timer until game hits March 1'st. JGR's build done month in 1m40s, this build in 1m10s. That's 30% faster.
Attachments
openttd.7z
(4.95 MiB) Downloaded 49 times
clipboard.grf
(5.28 KiB) Downloaded 85 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

aberro wrote:Hell yeah, with a bit of crutches and покрыл всё хуями, I've shoved this old filthy piece of code and to my surprise it's not only started, but even working.
Don't sure if it's stable (actually, I'm thinking it's very unstable), so won't recommend to apply it, but if anybody want to try, then get sources from git repo and apply those patches. Or create new git repo, commit this patch pack and then apply patches. Don't know why tortoise made two diff files.
This is quite incomplete, and there are quite a lot of cases which aren't covered (e.g. new features on the map which aren't in trunk).
This also changes various unrelated areas.
I would advise caution.
aberro wrote:BTW, your patchpack is crashing on every load (before I've mutilated it with clipboard patch, of cource) and now I can catch this crash in debugger, screenshot attached. Dunno, maybe it's one of newgrs?
This is probably caused by heap corruption somewhere else.
If it's reproducible with a particular savegame could you upload that here?
aberro wrote:(exe bloated from 9Mb to ~19Mb which is still less than build from JGR)
The builds I do are mostly bigger as they come with debug info for stack traces with line numbers included.

I'm open to adjusting optimisation flags and such but I can't realistically upload binaries which require AVX support.
Ex TTDPatch Coder
Patch Pack, Github
aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

Re: JGR's Patch Pack

Post by aberro »

JGR wrote:I would advise caution.
Hahah, I've adviced against this patch anyway, but I hope if something would pop up in my gameplay, I'll handle it.
JGR wrote:If it's reproducible with a particular savegame could you upload that here?
Yup, here it is. Sorry for the size, it's the only file I have that was saved in your build.
JGR wrote:I'm open to adjusting optimisation flags and such but I can't realistically upload binaries which require AVX support.
'course, I understand, this is why I've uploaded it. Nonetheless, your build is enough for most users.
Btw, now I think AVX isn't used, or at least it doesn't do any significant change, bc it used only with specific datatypes with floating points, which OTTD apparently doesn't using. Other optimization settings do their job, as I can see, but they aren't applicable in your case, bc you're using MinGW, and those settings are for VC++. Still, you can make separate build without debug info. Not sure though if that would make any difference except for a few milliseconds at startup.
Attachments
1.backup.sav.7z
(14.08 MiB) Downloaded 44 times
aberro
Engineer
Engineer
Posts: 64
Joined: 20 May 2013 20:20

Re: JGR's Patch Pack

Post by aberro »

Oh, and I meant that this save crashes on unloading, not on loading (second loading still applies to this case, of cource).
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

aberro wrote:Oh, and I meant that this save crashes on unloading, not on loading (second loading still applies to this case, of cource).
I've implemented a fix for this which will be in the next release.
Interestingly this bug is in trunk and can be triggered by using the same GRF list as in your savegame.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

JGR wrote:
aberro wrote:Oh, and I meant that this save crashes on unloading, not on loading (second loading still applies to this case, of cource).
I've implemented a fix for this which will be in the next release.
Interestingly this bug is in trunk and can be triggered by using the same GRF list as in your savegame.
Hopefully you can submit it trunk for fixing too then? If you have that sort of access.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 12 guests