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

Re: JGR's Patch Pack

Post by JGR »

wallyweb wrote: 01 Dec 2022 21:23
JGR wrote: 01 Dec 2022 20:36
wallyweb wrote: 01 Dec 2022 18:40 I resolved the class issue.
Now I have a problem similar to here, which you fixed in 48.1.
Now the issue is between the Bus Station Orientation menu and the Truck Station Orientation menus such that both bus and truck stations appear in each menu.
Here is the GRF and the save (The other two GRFs posted earlier are still valid):
You can set property 9 to the value 2 for a road stop spec to be available for both passengers and freight (bus and truck stops).
Yes, I tried that again just now and the result was the same in that I still see passenger and freight stops in both passenger and freight station orientations The difference now being that all stops are buildable irregardless of the orientation menu.
At least with 0, only the passenger stops are buildable even though both passenger and freight appear together in the passenger orientation menu ...
and with 1, only the freight stops are buildable even though both passenger and freight appear together in the freight orientation menu.

Image
I understand what you were getting at now. This should not be too difficult to resolve.
Edit: This is fixed now.
Last edited by JGR on 02 Dec 2022 19:40, edited 1 time in total.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

JGR wrote: 02 Dec 2022 19:14 I understand what you were getting at now. This should not be too difficult to resolve.
Should I continue with this?
wallyweb wrote: 02 Dec 2022 11:29 Upon reflection ...
The default road stops handle the separation of passenger and freight sprites correctly.
My road stop grf handles the separation of passenger and freight sprites correctly.
The problem must lie with my implementation of my Susmon grf.
I have begun a significant rework of Susmon based around my successful road stop work.
Stay tuned for updates.
This may take a while.
Thanks for your patience.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

wallyweb wrote: 02 Dec 2022 19:23
JGR wrote: 02 Dec 2022 19:14 I understand what you were getting at now. This should not be too difficult to resolve.
Should I continue with this?
wallyweb wrote: 02 Dec 2022 11:29 Upon reflection ...
The default road stops handle the separation of passenger and freight sprites correctly.
My road stop grf handles the separation of passenger and freight sprites correctly.
The problem must lie with my implementation of my Susmon grf.
I have begun a significant rework of Susmon based around my successful road stop work.
Stay tuned for updates.
This may take a while.
Thanks for your patience.
Road stop types which are only for the other bus/truck type should be properly disabled/greyed out in the right hand panel in the next release.

I'm not really sure what your re-work would entail but I would certainly not discourage you from continuing your work.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

JGR wrote: 02 Dec 2022 19:43 Road stop types which are only for the other bus/truck type should be properly disabled/greyed out in the right hand panel in the next release.

I'm not really sure what your re-work would entail but I would certainly not discourage you from continuing your work.
I was hoping to avoid the need for a grey out.
I am giving Road and Tram each with it's own Action 0, with Road defined first and then Tram defined separately as an overlay. I've done this before and it seemed to work well and was certainly more manageable from a coding point of view.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

STOP THE PRESSES!
STOP THE GREY!

Problem solved!
Passenger and freight each need their own class ID, In my case "SURP" (type 00; name 07 DC) and "SURF" (type 01; name 08 DC) respectively.
Class name is same for both: Sussmon - road (06 DC) but it does not get a class ID.

Now on to Trams. Stay tuned to this channel for a full report with pictures.

The full fix was quick and easy ...
Only the Action 0 needed to be modified.
Here is the modified GRF:
53_SusmonNRT_Alpha.grf
(128.02 KiB) Downloaded 44 times
and the picture ...

Image
Attachments
Susmon Demo, Jul 12th, 2001_Menus_FIX.png
(530.56 KiB) Not downloaded yet
User avatar
einsteinyh
Engineer
Engineer
Posts: 46
Joined: 15 Feb 2016 01:22
Location: Bogotá

Re: JGR's Patch Pack

Post by einsteinyh »

Hi JGR.
May I suggest implementing One-Way road bridges?
It'd be very useful to make elevated higways without needing additional terrain patches in their beginnings.
Maybe disabling custom bridgeheads in those cases could be necessary to avoid conflicts (like already implemented with signals on rail bridges).
Thanks.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Road bridges on sections of one-way road are already implicitly one-way. See here for details: https://github.com/JGRennison/OpenTTD-p ... -way-roads
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Valdez
Traffic Manager
Traffic Manager
Posts: 202
Joined: 23 Mar 2011 21:33
Location: Czech Republic

Re: JGR's Patch Pack

Post by Valdez »

JGR wrote: 26 Nov 2022 19:54
Valdez wrote: 25 Nov 2022 18:15 #4 - I haven''t had the presence of mind to screenshot this one and I've yet to try to replicate it, but I've had a PBS signal display "path set" aspect when I modified a rail junction behind it. No train was in either the crossing or any adjacent rail blocks. Looks like it was purely visual, but it made me go "WTF is going on" for a minute.
Have you got "Show path reservations for tracks" turned on? If not I'd suggest turning it on.
Are you using realistic braking?
If you manage to reproduce this I'll be sure to take a look.
The answers are "no" and "no", and anyway I couldn't reproduce it in the current version. Will keep my eyes open if it shows somewhere.

But another thing popped up - whenever I try to copy an airplane that's already en route, I get the "vehicle can't get into all stations" error, recreating the route manually and then copying aircraft that are stopped in the hangar works fine. Range shouldn't be an issue (the planeset I'm using is the rangeless variant of AV8, and the very same plane type was using the route just fine). DIdn't have this issue in 0.48.0.
My visits on the forums are sporadic only, so PMs may go unanswered for a long time. If you wish to report a bug etc., the best option is via DM or ping on r/Openttd Discord
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Valdez wrote: 04 Dec 2022 12:31
JGR wrote: 26 Nov 2022 19:54
Valdez wrote: 25 Nov 2022 18:15 #4 - I haven''t had the presence of mind to screenshot this one and I've yet to try to replicate it, but I've had a PBS signal display "path set" aspect when I modified a rail junction behind it. No train was in either the crossing or any adjacent rail blocks. Looks like it was purely visual, but it made me go "WTF is going on" for a minute.
Have you got "Show path reservations for tracks" turned on? If not I'd suggest turning it on.
Are you using realistic braking?
If you manage to reproduce this I'll be sure to take a look.
The answers are "no" and "no", and anyway I couldn't reproduce it in the current version. Will keep my eyes open if it shows somewhere.

But another thing popped up - whenever I try to copy an airplane that's already en route, I get the "vehicle can't get into all stations" error, recreating the route manually and then copying aircraft that are stopped in the hangar works fine. Range shouldn't be an issue (the planeset I'm using is the rangeless variant of AV8, and the very same plane type was using the route just fine). DIdn't have this issue in 0.48.0.
Most likely the aircraft in question has a "go to nearest hangar" order?
This will be fixed in the next release, but in the meantime cloning should work if this order is removed.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Valdez
Traffic Manager
Traffic Manager
Posts: 202
Joined: 23 Mar 2011 21:33
Location: Czech Republic

Re: JGR's Patch Pack

Post by Valdez »

JGR wrote: 04 Dec 2022 21:19 Most likely the aircraft in question has a "go to nearest hangar" order?
This will be fixed in the next release, but in the meantime cloning should work if this order is removed.
Yep, it does.
My visits on the forums are sporadic only, so PMs may go unanswered for a long time. If you wish to report a bug etc., the best option is via DM or ping on r/Openttd Discord
User avatar
einsteinyh
Engineer
Engineer
Posts: 46
Joined: 15 Feb 2016 01:22
Location: Bogotá

Re: JGR's Patch Pack

Post by einsteinyh »

JGR wrote: 04 Dec 2022 09:21 Road bridges on sections of one-way road are already implicitly one-way. See here for details: https://github.com/JGRennison/OpenTTD-p ... -way-roads
Yes, I'm aware of the current implementation which is really useful and I use a lot.
Also, I understand that, as the current implementation is pretty much enough for most use cases, my suggestion may not be anywhere near the top priority :oops: .

However, if you think you might give it a try somewhere in the future, I'm posting a better use case than the whole elevated highways I said before: to avoid one of the bridges not to be in practice One way due to lack of space to put the one way road where it ends in very crammed spaces.

EDIT: When I say Two way, I mean One way, sorry for the confusion :roll:
Thanks .

Simplified example:
Example.PNG
Example.PNG (114.71 KiB) Viewed 1671 times
Real Ingame example (the golden tubular bridges at the center):
Image
Attachments
Real Usecase.png
(360.47 KiB) Not downloaded yet
User avatar
Valdez
Traffic Manager
Traffic Manager
Posts: 202
Joined: 23 Mar 2011 21:33
Location: Czech Republic

Re: JGR's Patch Pack

Post by Valdez »

Got something else

If I have highlighted station coverage for an airport and move that airport (by building another over it), the highlights in the area that the new airport doesn't cover don't disappear, they persist even after I close the airport's window.

The only way to remove them is to build another airport that covers that area, then demolish it.

Hopefully that's sufficient description to recreate the issue.
My visits on the forums are sporadic only, so PMs may go unanswered for a long time. If you wish to report a bug etc., the best option is via DM or ping on r/Openttd Discord
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Valdez wrote: 07 Dec 2022 07:46 Got something else

If I have highlighted station coverage for an airport and move that airport (by building another over it), the highlights in the area that the new airport doesn't cover don't disappear, they persist even after I close the airport's window.

The only way to remove them is to build another airport that covers that area, then demolish it.

Hopefully that's sufficient description to recreate the issue.
This is fixed now, it will be in the next release.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7248
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

Something I've started running into, but struggling a bit with is some timetable stuff, let's call them Problem 1 & 2. I used to just have everything set to automate & auto separation by default, however I've run into an issue. Some trains are now being timetable to wait faaar to long (sometimes 10+ days) at a station, which in turn congests the rest of the network as it all has to wait for all trains sharing that timetable to slowly pass a station. I'm not sure what causes this, so in a sense this is problem 1.

Problem 1 led me to Problem 2. I'm never entirely sure if I've disabled the above, manually set everything 1 or 0 days and then selected autofill with the ctrl+click to try and enforce the 1 day stuff even if something is delayed by a thousand years in front it sticks to "cool good for you, I'm only here for 1 day though, bye y'all". Is it possible to add some sort of feedback that this timetable is currently being auto-filled with (attempted) waiting times left unaltered? Maybe an asterisk after the Autofill name or similar? Just a cue so you or I am aware "yep, this is currently what I'm doing". Disabling the automate & auto separation is a visible change, the button is 'unclicked' so to speak, ctrl+click on autofill has no feedback (or i am missing it? that's also possible!)

Of course, I'd love to hear any ideas behind problem 1 too, as if I can resolve that, problem 2 isn't much of an issue to start with. Also leads me to another question, is there any way of setting all waiting times (well 'stay at stations') to 0 or 1 in one big manner, any console commands for 'clear scheduled timetable' or similar, if not, is that something that could be done, doesn't need a GUI entry I wouldn't think, just a sneaky little console trick? With over 4000 trains it's a bit of a chore finding & fixing as I get to them, or more like, they start causing issues through problem 1.

Image purely incase I've described this badly you're not sure what I am referring to.
Image
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote: 08 Dec 2022 02:50 Something I've started running into, but struggling a bit with is some timetable stuff, let's call them Problem 1 & 2. I used to just have everything set to automate & auto separation by default, however I've run into an issue. Some trains are now being timetable to wait faaar to long (sometimes 10+ days) at a station, which in turn congests the rest of the network as it all has to wait for all trains sharing that timetable to slowly pass a station. I'm not sure what causes this, so in a sense this is problem 1.

Problem 1 led me to Problem 2. I'm never entirely sure if I've disabled the above, manually set everything 1 or 0 days and then selected autofill with the ctrl+click to try and enforce the 1 day stuff even if something is delayed by a thousand years in front it sticks to "cool good for you, I'm only here for 1 day though, bye y'all". Is it possible to add some sort of feedback that this timetable is currently being auto-filled with (attempted) waiting times left unaltered? Maybe an asterisk after the Autofill name or similar? Just a cue so you or I am aware "yep, this is currently what I'm doing". Disabling the automate & auto separation is a visible change, the button is 'unclicked' so to speak, ctrl+click on autofill has no feedback (or i am missing it? that's also possible!)

Of course, I'd love to hear any ideas behind problem 1 too, as if I can resolve that, problem 2 isn't much of an issue to start with. Also leads me to another question, is there any way of setting all waiting times (well 'stay at stations') to 0 or 1 in one big manner, any console commands for 'clear scheduled timetable' or similar, if not, is that something that could be done, doesn't need a GUI entry I wouldn't think, just a sneaky little console trick? With over 4000 trains it's a bit of a chore finding & fixing as I get to them, or more like, they start causing issues through problem 1.

Image purely incase I've described this badly you're not sure what I am referring to.
Image
On problem 1, if you've got a save where this problem arises, it'd be good to take a look at it.
It may be worth looking at what your timetable rounding company setting is.

If you select a wait time, you can ctrl-click the change time button to set the wait time for all orders in the list.
Also, using the lock button, you can fix a particular time, so it won't be changed by automate/autofill. This can be useful if you want a specific short wait time at a station.
Also, in some cases it can make sense to set the leave early flag.

Personally, I never use the autofill feature, and I've never tried to use the ctrl-click autofill mode. I can take a look at what that is supposed to do and see if that can be improved.

There isn't any way to modify more than one set of orders at once.
If you aren't already you should be using shared orders for your train groups though.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Valdez
Traffic Manager
Traffic Manager
Posts: 202
Joined: 23 Mar 2011 21:33
Location: Czech Republic

Re: JGR's Patch Pack

Post by Valdez »

Problem 1 IMO is that the arrangement and capacity of the usual stop results in a positive feedback loop.

Personally while I use autofill, I avoid the congestion issue by liberal use of "leave early" flags on stops and having my trains and RVs do their waiting times in depots at the endpoints of their route (or sometimes even just the starting point), and while that has some downsides of its own it's been working well enough for me.

Speaking of "leave early" flags.. would it be possible to add a way to quickly add it to multiple station orders (or perhaps even a setting to use it by default)?
My visits on the forums are sporadic only, so PMs may go unanswered for a long time. If you wish to report a bug etc., the best option is via DM or ping on r/Openttd Discord
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7248
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

JGR wrote: 08 Dec 2022 09:57 If you aren't already you should be using shared orders for your train groups though.
Yes, I use shared orders for all units on a specific route, but I'm currently at over about 125 groups across the entire network.
JGR wrote: 08 Dec 2022 09:57 It may be worth looking at what your timetable rounding company setting is.
If you're referring to "Round up auto-filled timetable times to multiples of this many tickets" the setting is currrently 'default'", whilst the vehicle separation factor is 50%.

Every so often the network jams up, usually due to a badly placed first signal at a junction allowing a train to be stopped across a junction and whilst I try to fix it at soon as I notice it, because OTTD runs 24/7 in the background, it can take a while to see. I wonder if that doesn't help things and it starts to acquire those additional days there?

For the longer ones I've gone through and used the padlock option, which to be honest I hadn't ever noticed being there, so I'll see if that helps certain trains doing massive cross-map journeys from causing slow downs at key hub stations again.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
Argus
Tycoon
Tycoon
Posts: 1204
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

After the update, my labels are too big, how do I make them smaller? It seems that it behaves completely differently now, I had to work with both the text size and the interface...
And which size exactly determines, for example, the text for the length of the train in the depot?
It would be a hundred times better if the configuration file didn't have to be edited for every stupid thing. :cry: :roll:
Attachments
Adams & Co., 26. led 1964.png
(575.17 KiB) Not downloaded yet
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 14 Dec 2022 21:08 After the update, my labels are too big, how do I make them smaller? It seems that it behaves completely differently now, I had to work with both the text size and the interface...
And which size exactly determines, for example, the text for the length of the train in the depot?
It would be a hundred times better if the configuration file didn't have to be edited for every stupid thing. :cry: :roll:
The scaling has been changed upstream, see here: https://github.com/OpenTTD/OpenTTD/pull/10114
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1204
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Thank you, it's beautiful, but I didn't understand how to set it up simply. I changed the config file about ten times before I got the font sizes reasonable and the labels and stop names are still giant.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 24 guests