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

Re: JGR's Patch Pack

Post by JGR » 27 Apr 2019 13:02

peter1138 wrote:It's not case of adding a parameter. It's a case of actually adding the code for these vehicles to be able to overtake. It's not disabled, it's simply not there.
I had a go at adding the missing code, there wasn't much more required.

It's on github if anyone fancies testing it.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

Currently on holiday, patchpack/dev queries will be looked into when I'm back.

Diesel Power
Traffic Manager
Traffic Manager
Posts: 148
Joined: 18 Jun 2016 19:05

Re: JGR's Patch Pack

Post by Diesel Power » 27 Apr 2019 20:34

Really?! I figured if it was that simple it would've been done years ago.

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

Re: JGR's Patch Pack

Post by JGR » 27 Apr 2019 22:04

McZapkie wrote:I would like to remind suggestion about possibility of cloning/using template consist of expired vehicles
This is done now, it'll be in the next release.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

Currently on holiday, patchpack/dev queries will be looked into when I'm back.

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

Re: JGR's Patch Pack

Post by McZapkie » 28 Apr 2019 19:16

Thanks for great work!

I have one more suggestion: permanent (until visit in dock) decrease of speed for ship (if advanced breakdowns are enabled), as it is already done for trains and road vehicles.
Reason is same as for road vehicles: disable avoiding maintenance payment by removing depots -
such "cheat" give even higher handicap than for road vehicles due to high ship purchase costs.

User avatar
3iff
Tycoon
Tycoon
Posts: 983
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: JGR's Patch Pack

Post by 3iff » 30 Apr 2019 09:10

Brumi wrote:It's definitely the compatibility files that are causing the crash. Vehicle groups can be organized in a hierarcy since 1.9.0, so AIGroup::CreateGroup got an extra parameter: the parent group of the new group.

compat_1.2.nut should contain the following excerpt:

Code: Select all

/* 1.9 adds parent_group_id to CreateGroup function */
AIGroup._CreateGroup <- AIGroup.CreateGroup;
AIGroup.CreateGroup <- function(vehicle_type)
{
	return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
} 
If this part is not there in your file, then your compatibility files are not up to date :)
Spot on. I never normally update those files as they never change...but once a fresh install worked perfectly I realised that something had changed When Trunk (and this patch) upgraded to 1.9.0, some AI/Compat*.nut files had code added.

It's now working perfectly. Apologies for the false bug report.

User avatar
eekee
Engineer
Engineer
Posts: 94
Joined: 23 Jun 2005 19:45
Location: Cyberspace

Re: JGR's Patch Pack

Post by eekee » 02 May 2019 17:38

Funny story: I tried improved breakdowns on my slow game today. It's a game I started too early; I have only one engine and it only does 43mph. It can take trains 6 months or more to get from source to destination. To handle all the cargo, I have a lot of trains, there's a lot of traffic. With improved breakdowns on, even after the breakdown clears, a train may be stuck doing less than half its maximum speed until it's next service. What happens? Well, I've had queues 300 tiles long, 150 tiles back to a drop-off station and 150 tiles behind it. The industries are FIRS and I make heavy use of engineering and farm supplies to boost production. When a supply train is stuck behind another or is itself stuck doing less than half its maximum speed, what happens? Production of the affected industry drops to 1/3, meaning all the trains needed to support its full production queue up waiting to enter the station, which itself is likely to inhibit the supply train reaching the station... :lol: Fortunately, the latter situation hasn't actually triggered devastating queuing, but the potential is there for this one feature in this particular game to be worse than any other disaster the game offers! :lol: I can patch up after a destroyed UFO far quicker than it took that 300 tile queue to clear! It's a really big event when this happens! :lol:

Edit: Of course, when a train is running so slowly, it has more time to break down again, too! :lol:
Extreme network builder. screenshot thread

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

Re: JGR's Patch Pack

Post by JGR » 02 May 2019 19:11

eekee wrote:Funny story: I tried improved breakdowns on my slow game today. It's a game I started too early; I have only one engine and it only does 43mph. It can take trains 6 months or more to get from source to destination. To handle all the cargo, I have a lot of trains, there's a lot of traffic. With improved breakdowns on, even after the breakdown clears, a train may be stuck doing less than half its maximum speed until it's next service. What happens? Well, I've had queues 300 tiles long, 150 tiles back to a drop-off station and 150 tiles behind it. The industries are FIRS and I make heavy use of engineering and farm supplies to boost production. When a supply train is stuck behind another or is itself stuck doing less than half its maximum speed, what happens? Production of the affected industry drops to 1/3, meaning all the trains needed to support its full production queue up waiting to enter the station, which itself is likely to inhibit the supply train reaching the station... :lol: Fortunately, the latter situation hasn't actually triggered devastating queuing, but the potential is there for this one feature in this particular game to be worse than any other disaster the game offers! :lol: I can patch up after a destroyed UFO far quicker than it took that 300 tile queue to clear! It's a really big event when this happens! :lol:

Edit: Of course, when a train is running so slowly, it has more time to break down again, too! :lol:
I tend to give vehicles with medium/long order lists more than one "service at depot" order.
This way if they do break down or otherwise need servicing they don't usually have to go too far before the next service order.

If you have queues that long resulting from a single breakdown you probably need more slack/capacity in your layout.
When I use trains with full load orders, I often place some queuing sidings before the loading stations so that if trains come in faster than cargo is available to be loaded, they can queue up there without blocking unrelated traffic, or worse blocking traffic trying to leave the loading station.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

Currently on holiday, patchpack/dev queries will be looked into when I'm back.

Diesel Power
Traffic Manager
Traffic Manager
Posts: 148
Joined: 18 Jun 2016 19:05

Re: JGR's Patch Pack

Post by Diesel Power » 02 May 2019 21:08

sooooo, now NRT has been merged, will it be in the pack soon?

SimYouLater
Director
Director
Posts: 623
Joined: 03 Apr 2016 20:19

Re: JGR's Patch Pack

Post by SimYouLater » 02 May 2019 21:42

Diesel Power wrote:sooooo, now NRT has been merged, will it be in the pack soon?
Don't rush him. I ask, but I never push.

EDIT: To be clear...

I asked JGR about the real time daylength patch, because I wasn't sure if he would see it. When he looked and said no guarantees, I said thanks and left the topic alone.

This is not the same, you're asking him to put out a patch pack... something he's already going to do... sooner. Don't, it's inconsiderate to assume NRT being added to JGR's patch pack will be easy or quick, and it's inconsiderate to ask someone to work faster on a project they volunteered for.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.

Diesel Power
Traffic Manager
Traffic Manager
Posts: 148
Joined: 18 Jun 2016 19:05

Re: JGR's Patch Pack

Post by Diesel Power » 03 May 2019 10:27

2 messages in 2 weeks is hardly pushy. JGR has mentioned in the past that it will be included when it's merged, this has now happened. I wasn't demanding it's release tomorrow, Just enquiring wether he is aware of this and if it's in the pipe line.

peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1646
Joined: 30 Mar 2005 09:43

Re: JGR's Patch Pack

Post by peter1138 » 03 May 2019 11:18

Pretty sure he's busy swearing at us changing lots of underlying code and causing massive conflicts. Sorry JGR!
He's like, some kind of OpenTTD developer.

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

Re: JGR's Patch Pack

Post by JGR » 03 May 2019 12:04

Diesel Power wrote:2 messages in 2 weeks is hardly pushy. JGR has mentioned in the past that it will be included when it's merged, this has now happened. I wasn't demanding it's release tomorrow, Just enquiring wether he is aware of this and if it's in the pipe line.
There are a few issues outstanding in the most recent patchpack release at the moment, once these are all resolved and I've done some testing I'll do another release.
Once that is out of the way I will start looking at NRT and other upstream changes.
peter1138 wrote:Pretty sure he's busy swearing at us changing lots of underlying code and causing massive conflicts. Sorry JGR!
No need to apologise at all. I am very happy to merge improvements, features, and so on.
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018

Currently on holiday, patchpack/dev queries will be looked into when I'm back.

User avatar
acs121
Tycoon
Tycoon
Posts: 1933
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: JGR's Patch Pack

Post by acs121 » 03 May 2019 19:49

Diesel Power wrote:2 messages in 2 weeks is hardly pushy. JGR has mentioned in the past that it will be included when it's merged, this has now happened. I wasn't demanding it's release tomorrow, Just enquiring wether he is aware of this and if it's in the pipe line.
Let's not worry, JGR is going to update it sooner or later anyways. :wink:
There's not even a stable version containing NRT and the latest changes yet AFAIK.

User avatar
eekee
Engineer
Engineer
Posts: 94
Joined: 23 Jun 2005 19:45
Location: Cyberspace

Re: JGR's Patch Pack

Post by eekee » 03 May 2019 20:02

JGR wrote: I tend to give vehicles with medium/long order lists more than one "service at depot" order.
This way if they do break down or otherwise need servicing they don't usually have to go too far before the next service order.
I will if I decide to enable improved breakdowns again.
JGR wrote:If you have queues that long resulting from a single breakdown you probably need more slack/capacity in your layout.
Yeah. I think it was at capacity before I started serving another high-capacity industry and added a bunch of passenger trains on one of the main lines. It's taken quite a lot of work to increase the capacity, but it wasn't too difficult in the end.
JGR wrote:When I use trains with full load orders, I often place some queuing sidings before the loading stations so that if trains come in faster than cargo is available to be loaded, they can queue up there without blocking unrelated traffic, or worse blocking traffic trying to leave the loading station.
Yup. In some cases I've got them queuing in depots, more often I've taken care there's enough length leading in, but it doesn't look like I've been that careful with every station.
Extreme network builder. screenshot thread

Diesel Power
Traffic Manager
Traffic Manager
Posts: 148
Joined: 18 Jun 2016 19:05

Re: JGR's Patch Pack

Post by Diesel Power » 03 May 2019 20:27

acs121 wrote:There's not even a stable version containing NRT and the latest changes yet AFAIK.
NRT has been merged with master and will be available in nightlies.

SimYouLater
Director
Director
Posts: 623
Joined: 03 Apr 2016 20:19

Re: JGR's Patch Pack

Post by SimYouLater » 03 May 2019 20:40

Diesel Power wrote:2 messages in 2 weeks is hardly pushy. JGR has mentioned in the past that it will be included when it's merged, this has now happened. I wasn't demanding it's release tomorrow, Just enquiring wether he is aware of this and if it's in the pipe line.
Sorry. It's just that if I'm told it's rude to nicely ask for a feature (someone criticized me about quoting JGR into a topic) then I don't see why anyone else should be allowed to ask about anything.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.

User avatar
acs121
Tycoon
Tycoon
Posts: 1933
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: JGR's Patch Pack

Post by acs121 » 03 May 2019 21:22

Diesel Power wrote:
acs121 wrote:There's not even a stable version containing NRT and the latest changes yet AFAIK.
NRT has been merged with master and will be available in nightlies.
Nightlies are NOT stable versions.
Nightlies are, like the word says, nightly releases for the purpose of testing new features, etc.

SimYouLater
Director
Director
Posts: 623
Joined: 03 Apr 2016 20:19

Re: JGR's Patch Pack

Post by SimYouLater » 04 May 2019 06:32

acs121 wrote:
Diesel Power wrote:
acs121 wrote:There's not even a stable version containing NRT and the latest changes yet AFAIK.
NRT has been merged with master and will be available in nightlies.
Nightlies are NOT stable versions.
Nightlies are, like the word says, nightly releases for the purpose of testing new features, etc.
Master is the new Stable, while Nightlies are still Nightlies. So yes, it is in stable.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.

User avatar
jfs
Director
Director
Posts: 541
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: JGR's Patch Pack

Post by jfs » 04 May 2019 07:16

SimYouLater wrote: Master is the new Stable, while Nightlies are still Nightlies. So yes, it is in stable.
You have no idea what you're talking about.

Stable = a release version that has a version number. For example 1.9.1 is a stable version, it has a version number and is not called "beta" or "release candidate". A stable version is generally tagged from a branch that has been thoroughly tested, and only received bugfixes and not new features, or other changes the developers consider risky in terms of potentially introducing new bugs.

Master = a term used in the git version control system to refer to the main development branch. Most software projects that use git for version control has the master be an unstable development version where all new features go in to. This means the master version will typically have many unknown and/or unfixed bugs. In OpenTTD the master branch is considered unstable.
The thing called master in git is directly equivalent to the thing called trunk in SVN.

Nightly = an automatic build from a certain development branch. In the case of OpenTTD nightly builds are made from the master branch, and because the master branch is unstable the nightly builds are considered unstable.

MarkShot
Engineer
Engineer
Posts: 119
Joined: 27 Mar 2019 11:30

Re: JGR's Patch Pack

Post by MarkShot » 05 May 2019 09:13

Jon,

Yesterday, I used your TIME TABLE|AUTOMATIC|SEPARATE function to smooth out the delivery of engineering supplies to multiple oil well heads.

It was beautiful to watch. All these small trains leaving the creating depot at once and after a few minutes being dispersed quite evenly in arrival at the well heads.

And it was perfect. Just how perfect? The same trains going up and down were routinely passing each other at the same time points.

Thank you!

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], JGR and 1 guest