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
Gwyd
Chief Executive
Chief Executive
Posts: 700
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: JGR's Patch Pack

Post by Gwyd » 04 Nov 2017 14:15

As far as I know, no there isn't. I might make a signal routing tutorial.

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5580
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb » 04 Nov 2017 16:26

Gwyd wrote:As far as I know, no there isn't. I might make a signal routing tutorial.
There is a tutorial here. Does it cover what you are looking for?

dasy2k1
Transport Coordinator
Transport Coordinator
Posts: 337
Joined: 20 Sep 2006 23:43
Location: UK
Contact:

Re: JGR's Patch Pack

Post by dasy2k1 » 04 Nov 2017 16:35

wallyweb wrote:
Gwyd wrote:As far as I know, no there isn't. I might make a signal routing tutorial.
There is a tutorial here. Does it cover what you are looking for?
I understand the original routing features its just the slot operations in the advanced programming,

see screenshot below
Attachments
Screenshot from 2017-11-04 16-34-37.png
Screenshot from 2017-11-04 16-34-37.png (69.01 KiB) Viewed 2899 times

User avatar
piratescooby
Transport Coordinator
Transport Coordinator
Posts: 311
Joined: 21 Nov 2014 12:39
Location: The Granite City.

Re: JGR's Patch Pack

Post by piratescooby » 04 Nov 2017 20:17

wallyweb wrote:
Gwyd wrote:As far as I know, no there isn't. I might make a signal routing tutorial.
There is a tutorial here. Does it cover what you are looking for?
Found this on youtube ... https://www.youtube.com/playlist?list=P ... Fuw9-4Z9ph

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by McZapkie » 04 Nov 2017 20:56

I understand these programmable signals, nice feature, by the way, separate signal with fixed (non conditional, just ready to use) "long reserve" feature would be very convenient (it should be even in trunk).
But what for are these "slots"?
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 700
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: JGR's Patch Pack

Post by Gwyd » 04 Nov 2017 21:37

And this is why I think I should make a tutorial

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

Re: JGR's Patch Pack

Post by JGR » 07 Nov 2017 12:31

wicket-303 wrote:Hello :D
JGR's Patch Pack is very wonderful. However, the time and day will inevitably deviate ...
Is it impossible to fit "Tick per minute" and "Day lengch factor" perfectly?
aberro wrote: I'd say more - is it impossible to make "Tick per minute" floating point? Because I'm using "Day length factor" times 10 and trying to align 24 hours with year, but it's definitely impossible, target value is 187.69791(6) (74 ticks per day * 10 daytime factor * 365.25 days in year = 270285, divided by 1440 minutes in day)
Ticks per minute may not be floating point. That would cause a long list of problems.
The 74 ticks per day is implicitly hard-coded in various places, changing it correctly would be likely to be non-trivial.

The slots feature is somewhat non-trivial to use and understand, which is why it is hidden behind an advanced setting
I'm probably not the best person to write a tutorial myself. I will look into writing some documentation at some point though.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

mjd_tech
Engineer
Engineer
Posts: 2
Joined: 09 Nov 2017 14:21

Re: JGR's Patch Pack

Post by mjd_tech » 09 Nov 2017 17:24

Notes on compiling for Ubuntu 16.04...

1. Get the build tools

Code: Select all

sudo apt-get build-dep openttd
2. Download and unzip source code from Github
3. Change directory into the unzipped source code.

4. Configure

Code: Select all

./configure
5. Compile

Code: Select all

make
Takes a few minutes...

6. Install

Code: Select all

sudo make install
Here, I had a problem:

Code: Select all

install: target '///usr/local/share/games/openttd/data' is not a directory
Makefile.bundle:178: recipe for target 'install' failed
make: *** [install] Error 1
Solution: I manually created the directory.

Code: Select all

sudo mkdir -p /usr/local/share/games/openttd/data
and ran sudo make install again.
It installed and runs.

I also have the standard openttd installed (downloaded the .deb file from openttd.org)
This installs into /opt/openttd.
There is no data/ directory there.
I guess the data/ directory is needed for the patched openttd, but not the standard openttd

I'm no expert on makefiles, but it seems like the makefile is not creating the data directory.

Anyway, the problem is solved, it works and was an easy fix, and probably won't happen again (when I compile the next JGR version) because the directory has already been created.

pelya
Transport Coordinator
Transport Coordinator
Posts: 272
Joined: 18 Nov 2010 19:48
Contact:

Re: JGR's Patch Pack

Post by pelya » 09 Nov 2017 17:30

Why are you doing 'make install'? Just run the compiled file from directory 'bin'.

mjd_tech
Engineer
Engineer
Posts: 2
Joined: 09 Nov 2017 14:21

Re: JGR's Patch Pack

Post by mjd_tech » 09 Nov 2017 20:05

Why are you doing 'make install'? Just run the compiled file from directory 'bin'.
And sure enough that works fine.
I did 'make install' purely out of habit.
Thanks

User avatar
einsteinyh
Engineer
Engineer
Posts: 36
Joined: 15 Feb 2016 01:22
Location: Bogotá

Re: JGR's Patch Pack

Post by einsteinyh » 09 Nov 2017 23:19

mjd_tech wrote:
Why are you doing 'make install'? Just run the compiled file from directory 'bin'.
And sure enough that works fine.
I did 'make install' purely out of habit.
Thanks
Using make bundle gives you an "installation" folder that you can copy and erase from sources without any problem.

User avatar
Redirect Left
Tycoon
Tycoon
Posts: 6608
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left » 14 Nov 2017 07:47

This may be entirely coincidental but...

Windows froze at the exact moment it autosaved. I have included the corrupt autosave (openTTD seems to have created it, but corrupted it), and a copy of the autosave before the error. to see if you can notice anything building up.

Windows crashed entirely, and needed to be restarted. Again, I have no idea if this was pure unfortunate exact timing, or something else.
Attachments
CORRUPT.sav
(4.68 MiB) Downloaded 54 times
autosave13.sav
(4.72 MiB) Downloaded 59 times
Image
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

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

Re: JGR's Patch Pack

Post by JGR » 15 Nov 2017 01:19

Redirect Left wrote:This may be entirely coincidental but...

Windows froze at the exact moment it autosaved. I have included the corrupt autosave (openTTD seems to have created it, but corrupted it), and a copy of the autosave before the error. to see if you can notice anything building up.

Windows crashed entirely, and needed to be restarted. Again, I have no idea if this was pure unfortunate exact timing, or something else.
If the operating system crashed mid-way through saving the file, it's likely unsalvageable.
There isn't anything obviously wrong with the other savegame.
You're probably better off looking into operating system logs/issues or hardware issues, as OpenTTD is unlikely to be the cause of an operating system crash.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

User avatar
Redirect Left
Tycoon
Tycoon
Posts: 6608
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left » 15 Nov 2017 01:21

I've already checked. Windows didn't record anything for that, it skips straight to the boot up logs within nothing noting the crash, which is somewhat unusual in its own way.
Image
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

wright_jamie
Engineer
Engineer
Posts: 1
Joined: 16 Nov 2017 20:59

Re: JGR's Patch Pack

Post by wright_jamie » 16 Nov 2017 21:04

Just wondering if you had considered this patch? The ability to have a vehicle leave if one with shared orders arrives would be excellent.

viewtopic.php?t=50001

Many thanks

Scautura
Engineer
Engineer
Posts: 102
Joined: 01 Aug 2006 07:30

Re: JGR's Patch Pack

Post by Scautura » 18 Nov 2017 12:53

I've been getting really frustrated with not being able to play OpenTTD because of the Fall update and the right click/mouse drag issues it brings. I normally play this patch pack, so I've tried compiling my own, and even without making the required code changes, I get errors while trying to compile (specifically in btree.h, due to a COMPILE_ASSERT, after I've fixed all the other errors by using the openttd-useful file containing Windows includes/libraries) JGRPP, that I don't get when compiling vanilla (which gives me linker errors, but that's an entirely different kettle of fish).

What am I missing/doing wrong? I've tried with MSVC 2017 (14.1) and MSVC 2015 (14.0), and while I installed versions of MingW (Cygwin64 and MingW-w64), my Posix style compilation abilities verge on the non-existent.

Edit: More detail on the errors; 190 errors, 95 copies of variations of this pair (the only difference being the "compiling source file"):

Code: Select all

Error	C2672	'btree::btree<Params>::key_compare_checker': no matching overloaded function found (compiling source file ..\src\cargomonitor.cpp)
	openttd	c:\users\me\documents\github\openttd-patches\src\3rdparty\cpp-btree\btree.h	1396	
Error	C2118	negative subscript (compiling source file ..\src\cargomonitor.cpp)
	openttd	c:\users\me\documents\github\openttd-patches\src\3rdparty\cpp-btree\btree.h	1396	
Edit2: I've fixed my issues with linking Vanilla OTTD, so I can build Vanilla without issues. I'd prefer a "fixed" version of JGRPP (so used to many of the extras that I can't even think of them compared to Vanilla, routing restrictions and signals on bridges and tunnels being the only ones that come to mind)

Edit3: Commenting out that assert allows it to compile (I don't believe it's causing problems, but my C++ is rusty enough to not know enough to say with absolute 100% certainty), but now getting linker errors (similar to the ones I got when building Vanilla, but my same solution didn't fix linking JGRPP) as attached.

Edit4: Nope, way over my head!

Edit5: Tried again with Cygwin/MingW-w64, which tells me that it can't find "src/endian_check.cpp" - which is a load of poppycock. I'm really not destined to get this working!

Edit6: Last one I swear! I actually got it compiled and working using Linux and MXE to cross compile. Yay!
Attachments
Linker Errors.txt
Only LNK2001 errors at the end of compilation.
(21.92 KiB) Downloaded 46 times
Duct tape is like the Force - it has a Dark side, a Light side, and it holds the universe together.

ino
Engineer
Engineer
Posts: 107
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino » 21 Nov 2017 00:53

Dunno if you have seen this yet, but there's a bug report on Reddit:

https://www.reddit.com/r/openttd/commen ... nsfer_bug/
I noticed that I get money from transfers in JGR (JGRpp 0.22.0, should be most recent). I x-checked with OTTD 1.7.0 and didn't get any money there. So I made a new game, ran it in OTTD 1.7.0, again, no transfer money. Then, loaded the same game in JGR, transfer money. So it's not in the save, but in the PP.
My set-up:
Economy NewGRFs: FIRS 3.0.0, reduced passenger payments 1.0, base cost mod 5.0.
Vehicles: Road Hogs 1.2.1 (freight trams fave money, didn't check other vehicles), OpenGFX + (trains 0.3.0, RV 0.4.1), vac trains, Squid r1687.
I transferred within catchment of an unrelated industry (wood next to a machine shop). The next time, a sugar refinery did the trick, so it doesn't have to be the same line of processing (e.g. wood-->iron-->machine shop-->supplies)
The bug is independent of day length modifier.
However, I found another bug related to day length. I started with 5 and changed to 7; the result was that most vehicles had hardly any running costs. There were AIs running paddle steamers on 30-square routes, and they were profitable. When I checked my running costs, my dozen or so trams had lower combined costs than one should have ($100-ish)!
Starting another game with a setting of 7 gave the right amount of running costs.

cmhbob
Engineer
Engineer
Posts: 58
Joined: 29 May 2010 06:06
Contact:

Re: JGR's Patch Pack

Post by cmhbob » 27 Nov 2017 17:48

Here's some research I did WRT the panning issue and Windows FCU.

viewtopic.php?p=1194504#p1194504
--
Bob
The wrinkles only go where the smiles have been...
Me, elsewhere

cmhbob
Engineer
Engineer
Posts: 58
Joined: 29 May 2010 06:06
Contact:

Re: JGR's Patch Pack

Post by cmhbob » 28 Nov 2017 03:18

cmhbob wrote:Here's some research I did WRT the panning issue and Windows FCU.

viewtopic.php?p=1194504#p1194504
Really strange.

I uninstalled the Logitech software because it was causing problems in Chrome, and the panning problem came back. What I noticed later though was that as the game runs for a bit, some of the scrolling capability comes back. I've got the zoom turned all the way in Settings, but if I zoom in so that the fences around rail lines just become visible, after about 5-10 minutes of game play, I can right-button scroll. The further out I am, the choppier it is, but I can scroll and pan. That part of it makes no sense to me, but there it is.
--
Bob
The wrinkles only go where the smiles have been...
Me, elsewhere

marioxcc
Engineer
Engineer
Posts: 17
Joined: 25 Nov 2017 22:04

Re: JGR's Patch Pack

Post by marioxcc » 29 Nov 2017 21:10

Hello.

I am using this patch set, commit fd5f8d23. I have found some possible problems:
  • When I hold CTRL and use the mouse wheel, the viewport does not change. I expected that it would switch to the enhanced viewport mode as described in viewtopic.php?f=33&t=53394.
  • The “Day length factor” setting is limited to odd numbers. I can not set it to 2 for example.
  • Apparently cargo production per month is scaled by the day length factor, but maintenance costs are not. How can I make maintenance costs scale too?
  • I do not understand the “Wall clock” settings. Is it documented anywhere? How does it interact with “Day length factor”?
Thanks.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 1 guest