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: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

michael blunck wrote:Peter,

since your great patch had meanwhile developed into a common replacement for trunk, are you thinking about to not only add existing patches but also about adding some of those often requested features which had/will never made/make it into trunk?

I´m not talking about "large" features like "real" push-pull operation for trains or multiple cargo for ships, but about "smaller" ones like

- allow to built stations on different adjoining levels (see pic)
- disallow to built stations for certain track types (via CB13/var42, resp CB var10 or 18)

stations_flat-land-required.png
Both features won´t need any changes in nfo/grf specs/docs.

regards
Michael
Are you thinking of Peter1138 here?

If not, I'm not especially familiar with the NewGRF interface. It's not a part of the code that I tend to look at or use much, so I'm probably not the right person to ask for these.
Ex TTDPatch Coder
Patch Pack, Github
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: JGR's Patch Pack

Post by michael blunck »

JGR wrote: Are you thinking of Peter1138 here?

If not, I'm not especially familiar with the NewGRF interface. It's not a part of the code that I tend to look at or use much, so I'm probably not the right person to ask for these.
Ah, sorry. Of course I meant Jonathan. :cool:

Well, first item seems not a newgrf interface problem. I think that´s rather an original TTD limitation. And the second one seems to have been already contemplated, since I found this line in newgrf_station.cpp:

Code: Select all

case 0x42: return 0;                // Rail type (XXX Get current type from GUI?) 
In fact, this seems to be the way with implementing that particular feature, since the railtype is already known here, when going to build a station tile.

Anyway, I´ll ask cirdan, maybe it´s a more fitting feature for his OTTD fork.

regards
Michael
Image
User avatar
ffpp
Engineer
Engineer
Posts: 125
Joined: 29 Jan 2010 12:56

Re: JGR's Patch Pack

Post by ffpp »

Hi JGR,

I am currently reviewing your changes on TBTR. It looks like you made some nide additions.
May I draw (some of) them into the next official release of the tbtr project?

Thanks also for working on those crucial multiplayer issues, I was not aware of them.

Best,
Thomas
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

ffpp wrote:Hi JGR,

I am currently reviewing your changes on TBTR. It looks like you made some nide additions.
May I draw (some of) them into the next official release of the tbtr project?

Thanks also for working on those crucial multiplayer issues, I was not aware of them.

Best,
Thomas
By all means, please feel free to merge any of my changes.

No problem, and thank you for your work in developing it.

Regards,
Jonathan
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

I'd quite like a little toggle, to draw the destination of a train above it (or its assigned ID / name). So trains run around with a little tag above them stating where it's going. next destination or termination point. I think that'd aid in locating misrouted trains or thinking of better routes on the fly as I spot them on their travels / timetabling adjustments.
Might be a bit of a CPU drain though, I guess. Seems a neat thing to have at least.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote:I'd quite like a little toggle, to draw the destination of a train above it (or its assigned ID / name). So trains run around with a little tag above them stating where it's going. next destination or termination point. I think that'd aid in locating misrouted trains or thinking of better routes on the fly as I spot them on their travels / timetabling adjustments.
Might be a bit of a CPU drain though, I guess. Seems a neat thing to have at least.
I can see the attraction of that sort of thing, but it seems like one of those areas where doing it well and seamlessly would take quite a bit of thought and development time.
I'll add it to the list, but there may be a large delay before I can get round to looking at those sorts of things.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
STD
Tycoon
Tycoon
Posts: 1810
Joined: 02 Jul 2012 14:53
Location: Russia, Samara

Re: JGR's Patch Pack

Post by STD »

Thanks for another update of this great patch pack. Great job :)) .
[OpenTTD] STD screenshots
----------------------------------------------------------------------------------------------------------------------------------
[OpenTTD] STD saved games - My finished scenarios and saves from the game
My Youtube channel - OpenTTD | Wiki xUSSR set (RU) | Wiki xUSSR set (EN) | Download the latest version of the xUSSR set
TT Screenshot of the Month - the page editor | Screenshot Of The Month Contest Winner: August 2017
kiwitree
Engineer
Engineer
Posts: 4
Joined: 18 Jan 2017 16:14

Re: JGR's Patch Pack

Post by kiwitree »

I found a bug on JGRPP 0.17.0.
It crashes when I try to use reset_company command.
IMG_4343.JPG
IMG_4343.JPG (25.2 KiB) Viewed 2062 times
https://drive.google.com/open?id=0BygJD ... lRnRF9ROGc
Crashed save file
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by Wahazar »

I'm trying to compile files from github, but got followng errors:

Code: Select all

Compiling strgen/strgen_base.cpp
In file included from ~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:17:0:
~/OpenTTD-patches-jgrpp/src/strgen/strgen.h:120:33: error: ‘LanguagePackHeader’ does not name a type
  virtual void WriteHeader(const LanguagePackHeader *header) = 0;
                                 ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen.h:120:53: error: ISO C++ forbids declaration of ‘header’ with no type [-fpermissive]
  virtual void WriteHeader(const LanguagePackHeader *header) = 0;
                                                     ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen.h:149:8: error: ‘LanguagePackHeader’ does not name a type
 extern LanguagePackHeader _lang;
        ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:31:1: error: ‘LanguagePackHeader’ does not name a type
 LanguagePackHeader _lang;             ///< Header information about a language.
 ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp: In constructor ‘StringData::StringData(size_t)’:
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:90:70: error: ‘TAB_SIZE’ was not declared in this scope
 StringData::StringData(size_t tabs) : tabs(tabs), max_strings(tabs * TAB_SIZE)
                                                                      ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:92:18: error: ‘CallocT’ was not declared in this scope
  this->strings = CallocT<LangString *>(max_strings);
                  ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:92:37: error: expected primary-expression before ‘*’ token
  this->strings = CallocT<LangString *>(max_strings);
                                     ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:92:38: error: expected primary-expression before ‘>’ token
  this->strings = CallocT<LangString *>(max_strings);
                                      ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:93:35: error: expected primary-expression before ‘>’ token
  this->hash_heads = CallocT<uint16>(max_strings);
                                   ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp: In member function ‘uint StringData::CountInUse(uint) const’:
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:216:11: error: ‘TAB_SIZE’ was not declared in this scope
  for (i = TAB_SIZE; --i >= 0;) if (this->strings[(tab * TAB_SIZE) + i] != NULL) break;
           ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp: At global scope:
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:238:28: error: expected template-name before ‘<’ token
 struct Buffer : SmallVector<byte, 256> {
                            ^
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:238:28: error: expected ‘{’ before ‘<’ token
~/OpenTTD-patches-jgrpp/src/strgen/strgen_base.cpp:238:28: error: expected unqualified-id before ‘<’ token
Any idea, what goes wrong? I got this error on ubuntu 14.04, at another computer with ubuntu 16 everthing is OK, maybe outdated compiler?
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

kiwitree wrote:I found a bug on JGRPP 0.17.0.
It crashes when I try to use reset_company command.IMG_4343.JPG

https://drive.google.com/open?id=0BygJD ... lRnRF9ROGc
Crashed save file
Thanks for the bug report.
It'd be helpful if you could upload the crash.log file as well.
Also, your savegame uses a number of GRFs not available on bananas, it'd be useful if you could also upload those.
McZapkie wrote:I'm trying to compile files from github, but got followng errors:

Code: Select all

Compiling strgen/strgen_base.cpp...
Any idea, what goes wrong? I got this error on ubuntu 14.04, at another computer with ubuntu 16 everthing is OK, maybe outdated compiler?
Does ./configure work successfully? Can you post the output if not?
The gcc toolchain that ships by default with 14.04 should be new enough.
Ex TTDPatch Coder
Patch Pack, Github
Telk
Engineer
Engineer
Posts: 64
Joined: 05 May 2008 14:04
Location: Seoul, South Korea
Contact:

Re: JGR's Patch Pack

Post by Telk »

JGR wrote:Thanks for the bug report.
It'd be helpful if you could upload the crash.log file as well.
Also, your savegame uses a number of GRFs not available on bananas, it'd be useful if you could also upload those.

I am the one who meets the bug first. Here I attach crash.dmp and crash.log
and here you can download NewGRFs that is not on online contents server: http://server.telk.kr:8056/openttd/NewG ... rver_2.tar

And this bug also occurs when company is autocleaned.
Attachments
crash.zip
(236.83 KiB) Downloaded 42 times
Image
- OpenTTD/OpenRCT2/Parkitect Korean Translator
- TELKLAND site manager, the korean website of OpenRCT2/OpenTTD (https://telk.kr)
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by Wahazar »

JGR wrote:Does ./configure work successfully? Can you post the output if not?
I don't see anything suspicious in configure output:

Code: Select all

checking awk... awk
detecting OS... UNIX
checking build system type... i686-linux-gnu
checking host system type... i686-linux-gnu
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... g++
checking host c++... g++
checking strip... disabled
checking builtin depend... yes
checking makedepend... disabled
detecting cpu-type... 32 bits
detecting SSE... found
checking static... no
checking unicode... no
using debug level... no
using desync debug level... no
using link time optimization... no
checking OSX sysroot... not OSX, skipping
checking allegro... not found
checking sdl... found
checking COCOA... not OSX, skipping
checking GDI video driver... not Windows, skipping
checking dedicated... not selected
checking console application... not Windows, skipping
checking network... found
checking squirrel... found
checking translator... no
checking assert... enabled
checking zlib... found
checking liblzma... found
checking lzo2... found
checking libxdg-basedir... not found
checking libpng... found
checking freetype2... found
checking fontconfig... found
checking icu-lx... found
checking icu-i18n... found
checking psp-config... not PSP, skipping
checking libtimidity... not found
checking direct-music... not Windows, skipping
checking sort... sort
checking endianness... AUTO
suppress language errors... no
checking stripping... skipped
checking distcc... no (only used when forced)
checking ccache... no (only used when forced)
checking grfcodec... needs at least version 6.0.5 (r985), disabled
checking nforenum... needs at least version 6.0.5 (r985), disabled
checking OSX application bundle... not OSX, skipping
checking revision... source release version
checking iconv... not OSX, skipping
personal home directory... .openttd
shared data directory... none
installation directory... /
icon theme directory... share/icons/hicolor
manual page directory... share/man/man6
menu item directory... share/applications
checking libdl... found
checking libbfd... no
checking dbg gdb... found
checking dbg gdb (prctl)... found
checking sigaction... found
checking ucontext... found
checking bitmath builtins... found
checking abi::__cxa_demangle... found
using CFLAGS_BUILD...  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -O1
using CXXFLAGS_BUILD...  -std=gnu++11
using LDFLAGS_BUILD...  -rdynamic
using CFLAGS... -O2 -fomit-frame-pointer  -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -DWITH_SSE -DWITH_DL -DWITH_DBG_GDB -DWITH_PRCTL_PT -g1 -DWITH_SIGACTION -DWITH_UCONTEXT -DWITH_BITMATH_BUILTINS -DWITH_DEMANGLE -DWITH_SDL  -D_REENTRANT -I/usr/include/SDL   -DWITH_ZLIB    -DWITH_LZMA    -DWITH_LZO -I/home/mczapkie/tt/JGR/OpenTTD-patches-jgrpp/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/include/libpng12    -DWITH_FONTCONFIG -I/usr/include/freetype2    -DWITH_FREETYPE -I/usr/include/freetype2    -DWITH_ICU_LAYOUT -I/usr/include/i386-linux-gnu    -DWITH_ICU_SORT -I/usr/include/i386-linux-gnu    -DENABLE_NETWORK -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\".openttd\" -DGLOBAL_DATA_DIR=\"/usr/local/share/games/openttd\"
using CXXFLAGS...  -std=gnu++11
using LDFLAGS... -lstdc++ -lpthread -ldl -lc -lSDL   -lz    -llzma    -llzo2 -lpng12    -lfontconfig -lfreetype    -lfreetype    -liculx -licule -licuuc -licudata    -licui18n -licuuc -licudata     -rdynamic
Generating Makefile...
Generating menu item...
Generating lang/Makefile...
Generating setting/Makefile...
Generating grf/Makefile...
Generating objs/Makefile...
but maybe this libbfd is missing?
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
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Telk wrote:I am the one who meets the bug first. Here I attach crash.dmp and crash.log
and here you can download NewGRFs that is not on online contents server: http://server.telk.kr:8056/openttd/NewG ... rver_2.tar

And this bug also occurs when company is autocleaned.
The bug is due to an error in the code to handle accounting of infrastructure totals when a bridge/tunnel with signals is removed due to removal of the company.
This has been fixed and will be in the next release.
Thanks for bringing it to my attention.
Ex TTDPatch Coder
Patch Pack, Github
Amak
Engineer
Engineer
Posts: 36
Joined: 13 Feb 2017 14:48

Re: JGR's Patch Pack

Post by Amak »

Hi JGR,

Your Patchpack is awesome! It is a lot better then vanilla OpenTTD (128x zoom is the bomb).

However, I recently downloaded v0.17.0 (coming from v0.16.1) and have the following issues:

The 32bit version upon loading states "Out of memory, Allocating 1.5GiB of spritecache faild, reduced to 768MiB etc etc" (this does not happen on the 64bit version, O/S is win7 64bit.)

Both 64bit and 32bit upon loading a game state "Too many NEWGRF's are loaded" (similar to vanilla openttd) and some grf's aren't loaded. This is game-breaking and does not happen with the v0.16.1 version.

I really enjoy the max 255grf, I hope you can fix this.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Amak wrote:Hi JGR,

Your Patchpack is awesome! It is a lot better then vanilla OpenTTD (128x zoom is the bomb).

However, I recently downloaded v0.17.0 (coming from v0.16.1) and have the following issues:

The 32bit version upon loading states "Out of memory, Allocating 1.5GiB of spritecache faild, reduced to 768MiB etc etc" (this does not happen on the 64bit version, O/S is win7 64bit.)

Both 64bit and 32bit upon loading a game state "Too many NEWGRF's are loaded" (similar to vanilla openttd) and some grf's aren't loaded. This is game-breaking and does not happen with the v0.16.1 version.

I really enjoy the max 255grf, I hope you can fix this.
Edit: This should be fixed in 0.17.1
Last edited by JGR on 14 Feb 2017 01:05, edited 1 time in total.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: JGR's Patch Pack

Post by AndersI »

Version 0.17.0, crash as soon as I build a bus stop (not immediate, but a few seconds later)...

Edit:
And if I build a train station instead, I get an "Assertion failed at line 2897 of/home/jgr/openttd/cross-win32/src/window.cpp:HasModalProgress()||IsLocalCompany()

Swedish Windows XP.

Edit2:
And if I build a dock, I get another crash...
Attachments
OpenTTD.zip
(512.85 KiB) Downloaded 47 times
OpenTTDdock.zip
(394.92 KiB) Downloaded 40 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

AndersI wrote:Version 0.17.0, crash as soon as I build a bus stop (not immediate, but a few seconds later)...

Edit:
And if I build a train station instead, I get an "Assertion failed at line 2897 of/home/jgr/openttd/cross-win32/src/window.cpp:HasModalProgress()||IsLocalCompany()

Swedish Windows XP.

Edit2:
And if I build a dock, I get another crash...
Thanks for letting me know about this, looks like a silly error on my part.

There's a divide by 0 error in the case where the total estimated cost of all scheduled cargo-dest link graph operations is 0 or 1, which is a case that I hadn't thought of.

Edit: Have you got a crash log or some other information for the assertion failure case.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

McZapkie wrote:
JGR wrote:Does ./configure work successfully? Can you post the output if not?
I don't see anything suspicious in configure output:

but maybe this libbfd is missing?
It looks fine to me as well.
libbfd is optional and is only really for enhanced crash logs. That shouldn't cause the error that you have here.

Are you able to build trunk openttd OK on that machine?
Ex TTDPatch Coder
Patch Pack, Github
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Apologies, but due to a number of regressions in version 0.17.0, I've released version 0.17.1.

I'd encourage everyone currently using 0.17.0 to upgrade to 0.17.1.
Ex TTDPatch Coder
Patch Pack, Github
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by Wahazar »

No need for apologies, who makes no mistakes, makes nothing.
I updated server to 0.17.1.
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.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 42 guests