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

Re: JGR's Patch Pack

Post by JGR »

vazoun51 wrote:Olympic Log Tug is a ship which can be refited to three different capacities of one cargo (80 t, 240 t, 400 t of wood). When you want an old vehicle to be automatically replaced by this one, you can't choose the capacity of the ship. Always the first one is selected. I am not sure if there are any other vehicles like that (in another GRFs) but if it is just one of the kind it probably doesn't worth the effort.
There isn't much that I can do about that really, it's probably something to bring up with the GRF author.
oberhümer wrote:It appears that infrastructure maintenance costs are not scaled by the day length factor in this patch pack, which obviously makes slow-paced play unreasonably easy. Could you fix this?
I'm not inclined to change this, or at least not by default.
Cargo generation rates (in real time terms) are inversely proportional to day length. Actual income in calendar time terms scales sub-linearly with day length.
Multiplying everyone's infrastructure costs from one release to the next would also seem to violate the principle of least surprise.
vazoun51 wrote:The default value is on when you enter the settings from the main menu. But whenever I enter it from the game it is always off. No matter savegame I chose or how I set it before.
Might be worth checking if you have any game or startup scripts which are editing it.

Edit:
Redirect Left wrote:Path based signals at the end of tunnels are static, and whilst they allow travel to flow through as normal when safe to do so, the signal does not momentarily turn green then back to red, it just stays on red.
This is fixed now and will be in the next release.
Last edited by JGR on 31 Mar 2017 23:20, edited 1 time in total.
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 »

JGR wrote: Edit:
Redirect Left wrote:Path based signals at the end of tunnels are static, and whilst they allow travel to flow through as normal when safe to do so, the signal does not momentarily turn green then back to red, it just stays on red.
This is fixed now and will be in the next release.
Cheers! Glad I could be of assistance... by giving you more work :mrgreen:
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: JGR's Patch Pack

Post by oberhümer »

JGR wrote:Cargo generation rates (in real time terms) are inversely proportional to day length. Actual income in calendar time terms scales sub-linearly with day length.
Multiplying everyone's infrastructure costs from one release to the next would also seem to violate the principle of least surprise.
I think the real problem is that we (and many other people) don't have the same concept of "day length factor", so a simple day length switch isn't enough, as I noticed was extensively discussed in the thread for the included day length patch. For me, it's generally slowing down the economy, with industry generation and closure rate, town growth rate and vehicle introduction/obsolescence rate divided by the day length factor in real time terms and everything else remaining constant.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

I have a few questions regarding the routefinding restriction in the 0.18 release. I find that there are 'Advanced' routefinding restriction features. However, I am unable to find any detail regarding to this.

I have figure out the "Slot" feature, which I believe you ought to advertise more. Maybe I am missing other obvious way to do this, but this has finally enable a proper single-track branch line where multiple train are allow in one direction at a time! (https://i.imgur.com/Bs3LdNm.png)

Feature request for slot: Can we have conditions for checking number of train in specified slots? A use case I can think of for this include: Single-track main line where multiple trains may enter in same direction at the same time (line signaled with bi-directional block signal). Or for single-track station with passing loop, only divert train into the loop if there is an express train following, otherwise stays on main line etc. (Even though passing loop in OpenTTD doesn't slow train down, this is for realism). A collapsible group for slots would also be nice, but not required. Sorry for lengthy list of feature requests for a feature that is very new. I appreciate this feature a lot.

On the other hand, I am unable to figure out how we should use the "Wait at PBS signal" other than to make train wait forever (?). Do you have some example use cases?

Unrelated to latest, and maybe in wrong topic, but I am unable to figure out how the condition "Entry PBS" works. An explanation would be appreciated.
User avatar
JGR
Tycoon
Tycoon
Posts: 2558
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

ino wrote:I have a few questions regarding the routefinding restriction in the 0.18 release. I find that there are 'Advanced' routefinding restriction features. However, I am unable to find any detail regarding to this.
I have figure out the "Slot" feature, which I believe you ought to advertise more.
I haven't advertised it as it's not in the most recent release, I merged it just after the 0.18.0 release, so that I could do some more testing/development.
ino wrote:Maybe I am missing other obvious way to do this, but this has finally enable a proper single-track branch line where multiple train are allow in one direction at a time! (https://i.imgur.com/Bs3LdNm.png)
This isn't quite possible yet, as it would need the slot occupancy conditional which you've mentioned below.
Without having actually implemented/tried it yet, I'll expect that you'd need to use a different slot for each of the two directions, and require that the slot for the opposite direction is empty at each entrance before passing the signal or acquiring the slot in the forward direction.
The main uses cases which I had in mind were preventing deadlocks or poor train regulation around: flat junctions with reverse at waypoint movements, adjacent flat junctions, and siding/bay-type stations with more trains than platforms.
ino wrote:Feature request for slot: Can we have conditions for checking number of train in specified slots? A use case I can think of for this include: Single-track main line where multiple trains may enter in same direction at the same time (line signaled with bi-directional block signal). Or for single-track station with passing loop, only divert train into the loop if there is an express train following, otherwise stays on main line etc. (Even though passing loop in OpenTTD doesn't slow train down, this is for realism).
This is something that I'm planning to implement, I've not got round to it yet.
ino wrote:A collapsible group for slots would also be nice, but not required. Sorry for lengthy list of feature requests for a feature that is very new. I appreciate this feature a lot.
I'm not anticipating that a player will have that many slots to need that? I can look into it, but it's not really top priority for me. No need to apologise, and thanks :).
ino wrote:On the other hand, I am unable to figure out how we should use the "Wait at PBS signal" other than to make train wait forever (?). Do you have some example use cases?
It's not very useful at the moment, as it's been effectively superseded by the slot acquire and wait instruction, which is implemented using the same mechanism.
The conditional for current slot occupancy will make it useful again, as there are cases where you'd want to hold a train at a signal depending on the occupancy of a slot without trying to acquire it.
ino wrote:I am unable to figure out how the condition "Entry PBS" works. An explanation would be appreciated.
When inside a PBS block, the entry PBS conditional can be used to test the tile of the signal which the reservation started (or would start) from, i.e. a PBS signal facing into the block.
I mostly use this to conditionally enable reserve through on exit signals depending on which entrance signal was used, for things like preventing junction overhangs on some types of flat junctions.
Ex TTDPatch Coder
Patch Pack, Github
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

JGR wrote:I haven't advertised it as it's not in the most recent release, I merged it just after the 0.18.0 release, so that I could do some more testing/development.
Oh. I did not realise it was not in the 0.18.0. I am using Linux, so when I saw a release (which is typically many days later) I just `git pull && make`
JGR wrote:I'm not anticipating that a player will have that many slots to need that?
A single-track main line would probably need two slots between each passing loops. Perhaps I am in the minority, but a lot of time I play on huge realistic map (mostly Japan), and I build using real-world reference, including a very long stretch of a single-track main line. A collapsible would be really nice, but it is not that important either.
JGR wrote:When inside a PBS block, the entry PBS conditional can be used to test the tile of the signal which the reservation started (or would start) from, i.e. a PBS signal facing into the block.
I mostly use this to conditionally enable reserve through on exit signals depending on which entrance signal was used, for things like preventing junction overhangs on some types of flat junctions.
I see. Thank you very much for the answers!
AkipTsaqif
Engineer
Engineer
Posts: 21
Joined: 28 Apr 2016 11:11

Re: JGR's Patch Pack

Post by AkipTsaqif »

Hi JGR, I have a question.
Roger & Co., 17 Nop 2025.png
(152.4 KiB) Not downloaded yet
As you see up there, there are 6 station platforms (1 is on the upper right).
Platform 1, 2, and 4 is for trains heading northwest
Platform 5 and 6 is for trains heading southeast
Platform 3 can be either northwest, southeast, or southwest

So my question is, how I can force a train to take platform 3 to go southwest without placing new signals near the station in platform 1, 2, and 4? I tried to use routefinding restriction in those presignals but can't figure it out since there is no signal in near platform to drive the train away.

Thanks. Sorry for bad english :)
Akip
User avatar
JGR
Tycoon
Tycoon
Posts: 2558
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

AkipTsaqif wrote:Hi JGR, I have a question.

Roger & Co., 17 Nop 2025.png
As you see up there, there are 6 station platforms (1 is on the upper right).
Platform 1, 2, and 4 is for trains heading northwest
Platform 5 and 6 is for trains heading southeast
Platform 3 can be either northwest, southeast, or southwest

So my question is, how I can force a train to take platform 3 to go southwest without placing new signals near the station in platform 1, 2, and 4? I tried to use routefinding restriction in those presignals but can't figure it out since there is no signal in near platform to drive the train away.

Thanks. Sorry for bad english :)
Akip
Using a waypoint instead of routing restrictions would work if a train may only use platform 3.
Without using waypoints you would indeed need to add signals in front of the other platforms. If you were to do this would remove the implicit path-finding penalty for trains heading into platform 3, but you could re-add this by use of a routefinding restriction penalty on the platform 3 signal.
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 »

Feature request:

In TTDPatch, the "wagon speed limits" feature set an increased speed limit for empty wagons (+ 20km/h). In fact, it even allowed for a parameter to tune the default empty wagon speed limit:
If the switch has a parameter (<num>), then this specifies how much faster empty train wagons are allowed to go. The default for this is 20 km/h.
This is a small but important feature being clearly missed in OTTD. Would be nice to get it included since different speed limits for empty/loaded wagons are standard in RL, and thus essential for modelling "realistic" train sets.

regards
Michael
Image
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: JGR's Patch Pack

Post by oberhümer »

Doesn't that work with callbacks already? It's also a modern phenomenon (starting 1960s?) as far as I know, so not really modelable using a simple setting.
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: JGR's Patch Pack

Post by andythenorth »

CB36 should work, triggered on station visit.

Untested by me for wagons, there might be some quirk of CB36 that precludes it, but eh. ;) https://newgrf-specs.tt-wiki.net/wiki/C ... s_.2836.29

Definitely ships support different speeds per load amount - I did it in FISH, varying speed by % loaded. I later dropped it because I concluded it wasn't appropriate in a non-realistic set, but it was definitely worth exploring, and quite a nice feature.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: JGR's Patch Pack

Post by michael blunck »

But still. Should be an easy task to implement.

No reason to check for CB36 and speed property for each and every freight car?

regards
Michael
Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

In RL a wagon has no speed limit. Limits are arbitrarily imposed according to safety considerations of a track section, something that is quite nicely implemented in game by track types (or road types :wink: ). Maximum speed and acceleration of a train are determined by power and traction availability and wagon load factors while taking terrain (slope) into consideration. The player's challenge is to find the right combination of engines to efficiently pull a fully loaded manifest.
Last edited by wallyweb on 19 Apr 2017 10:51, edited 1 time in total.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: JGR's Patch Pack

Post by michael blunck »

wallyweb wrote: In RL a wagon has no speed limit. Limits are arbitrarily imposed according to safety considerations of a track section, something that is quite nicely implemented in game by track types (or road types ). Maximum speed and acceleration of a train are determined by power and traction availability and wagon load factors. The player's challenge is to find the right combination of engines to efficiently pull a fully loaded manifest.
In RL, the max allowed speed for a freight car is detemined by track class and loading weight:

Image
https://nl.wikipedia.org/wiki/Bestand:VTG_Falns_(1).jpg

I.e., this particular car may travel with a speed of 100 km/h ("S") with a load of 38 tons on track class "A", a load of 40.5 tons on track class "B1", etc, pp; and with a speed of 120 km/h on all track classes when empty ("00.0").


In the game, I found it annoying to see empty freight trains crawling along as if fully loaded, when even in RL this is not the case. :cool:

HTH
regards
Michael

[edit]But OK, I´ve now implemented it by CB. No need to discuss it further.[/edit]
Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

michael blunck wrote:In RL, the max allowed speed for a freight car is detemined by track class and loading weight:
A limit arbitrarily imposed by regulation. :wink:
[edit]But OK, I´ve now implemented it by CB. No need to discuss it further.[/edit]
:bow:
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 »

If you're using the arrow keys to negotiate the map, and go over an industry, the pop up window that displays industry info will stick open even after you scroll past that industry.
It'll stay there until you hover over another industry in which case it'll switch and hang with that industries data, or you move your mouse and it'll get rid of it.

Image
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
vazoun51
Engineer
Engineer
Posts: 20
Joined: 05 Sep 2015 21:23

Re: JGR's Patch Pack

Post by vazoun51 »

Another bug found. Game crashes if you try to make a new template with engine able to carry any other cargo then passengers and "Refit after buy" is toggled on. Can't provide crashlog since game states no crash information will be generated as I loaded an emergency savegame although I didn't do so.
selli69
Engineer
Engineer
Posts: 6
Joined: 13 Aug 2016 18:35

Re: JGR's Patch Pack

Post by selli69 »

Hi JGR!

First of all, thank you for the integration of load/unload by cargo type I suggested a while ago. It makes my gameplay much more interesting.

Today I will ask for intergration of the ATC patch. I think its a very useful function: Trains trapped behind a slower train (up to one signal block or 20 tiles away) will automatically slow down to match the speed of the slower train.

You can find the patch here : viewtopic.php?f=33&t=52085

If there is already a similar function included in your patchpack pls apologize for asking and pls give a quick hint where to find it in the settings.

Thanks forward!

selli
nigelb7
Engineer
Engineer
Posts: 5
Joined: 17 Dec 2016 00:56
Location: Herndon, Va, USA

Re: JGR's Patch Pack

Post by nigelb7 »

That ATC patch sounds like a great idea! I have no clue as to how much work would be involved to integrate it into the JGR Patch Pack.
User avatar
JGR
Tycoon
Tycoon
Posts: 2558
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote:If you're using the arrow keys to negotiate the map, and go over an industry, the pop up window that displays industry info will stick open even after you scroll past that industry.
It'll stay there until you hover over another industry in which case it'll switch and hang with that industries data, or you move your mouse and it'll get rid of it.
vazoun51 wrote:Another bug found. Game crashes if you try to make a new template with engine able to carry any other cargo then passengers and "Refit after buy" is toggled on.
These are fixed now, thanks for the bug reports.
vazoun51 wrote:Can't provide crashlog since game states no crash information will be generated as I loaded an emergency savegame although I didn't do so.
Most likely you previously loaded an emergency savegame and then saved the game. The emergency aspect is preserved in the game log.
I may look into making this more lenient at some point.
selli69 wrote:Hi JGR!

First of all, thank you for the integration of load/unload by cargo type I suggested a while ago. It makes my gameplay much more interesting.

Today I will ask for intergration of the ATC patch. I think its a very useful function: Trains trapped behind a slower train (up to one signal block or 20 tiles away) will automatically slow down to match the speed of the slower train.

You can find the patch here : viewtopic.php?f=33&t=52085

If there is already a similar function included in your patchpack pls apologize for asking and pls give a quick hint where to find it in the settings.

Thanks forward!

selli
This has been asked for before, I'm not inclined to include it.
It has the fairly fundamental flaw of not working at all in the presence of junction tiles.
Implementing this sort of functionality properly would need a quite different and more involved design.
Ex TTDPatch Coder
Patch Pack, Github
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 21 guests