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
OzTrans
Tycoon
Tycoon
Posts: 1714
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

Eddi wrote: 24 Nov 2023 10:17
OzTrans wrote: 23 Nov 2023 23:36... Level Crossings ...
you probably need to fiddle with bounding boxes to get that to work, and probably never catch all corner cases. better to keep it in the ground sprite.
The bounding boxes are provided by the game; the GRF has no say in that. Keeping the stopping lines with the rail track is the actual problem. They will show up unnecessarily and are not wanted in the middle of the crossing.
kinda, sorta, maybe... the problem is, the crossing reservation updates happen rarely enough that you can get away with calculating adjacent crossings on the fly. but when you want to use that in drawing as well, it must be saved in the tile itself, or you get a potential performance hit. and level crossings are probably the most densely packed tile in the game, maybe tied with industry tiles.
I am sure there is room for 2 bits somewhere.
Quinch
Engineer
Engineer
Posts: 61
Joined: 15 Mar 2004 10:49

Re: JGR's Patch Pack

Post by Quinch »

Love the features in the patch pack - got a question, though, is there a list of hotkeys that can be used with the pack-specific features?
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Eddi wrote: 24 Nov 2023 10:17 kinda, sorta, maybe... the problem is, the crossing reservation updates happen rarely enough that you can get away with calculating adjacent crossings on the fly. but when you want to use that in drawing as well, it must be saved in the tile itself, or you get a potential performance hit. and level crossings are probably the most densely packed tile in the game, maybe tied with industry tiles.
There is no need to store such things in the tile itself.
OzTrans wrote: 23 Nov 2023 23:36 Unless there is another solution; can we have a new varact2 variable for rail types, that provides the following :

a) single rail track (crossing furniture north and south side) [value 3]
b) multi rail track (crossing furniture north side only) [value 1]
c) multi rail track (crossing furniture south side only) [value 2]
d) multi rail track (NO crossing furniture) [value 0]

This info should already be present for the Close Adjacent Level Crossings feature.

This would enable me to remove the extra rail types while still using my old solution.

Just something for consideration ...
Something along these lines should be doable.
Quinch wrote: 25 Nov 2023 23:54 Love the features in the patch pack - got a question, though, is there a list of hotkeys that can be used with the pack-specific features?
If you look in hotkeys.cfg, you can see and change the hotkeys for various features.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

OzTrans wrote: 23 Nov 2023 23:36 ...
I've added a new variable here which you should be able to use for this: https://jgrennison.github.io/OpenTTD-pa ... t_crossing
Ex TTDPatch Coder
Patch Pack, Github
Quinch
Engineer
Engineer
Posts: 61
Joined: 15 Mar 2004 10:49

Re: JGR's Patch Pack

Post by Quinch »

Quinch wrote: 25 Nov 2023 23:54 Love the features in the patch pack - got a question, though, is there a list of hotkeys that can be used with the pack-specific features?
If you look in hotkeys.cfg, you can see and change the hotkeys for various features.
Gotcha - looking through it, most of them seem to relate to the vanilla features. I don't suppose there are undocumented hotkeys for things like refit, load by cargo type, rename and so on?
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1714
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

JGR wrote: 26 Nov 2023 17:35 I've added a new variable here which you should be able to use for this ...
I do like what I see; thank you very much. I'll have a go at that.
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

The position of the train station can only be switched between "at the beginning" and "in the middle". "At the end" is missing.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 27 Nov 2023 16:54 The position of the train station can only be switched between "at the beginning" and "in the middle". "At the end" is missing.
By default, the default stopping position isn't shown: https://github.com/OpenTTD/OpenTTD/pull/11102

You can turn this off in the settings.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Where exactly should I set it so that it behaves as before?
Honestly, this is a pretty confusing change. Even from the given text, I didn't understand why exactly they changed it.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 27 Nov 2023 17:09 Where exactly should I set it so that it behaves as before?
Honestly, this is a pretty confusing change. Even from the given text, I didn't understand why exactly they changed it.
The "Hide default order stop locations" setting.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Thanks.
These news items should be turned off by default so it's up to players if they want them.
Regardless of the fact that this way the train needlessly created another, automatic stop. Maybe a mistake?
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 27 Nov 2023 17:23 Regardless of the fact that this way the train needlessly created another, automatic stop. Maybe a mistake?
Can you clarify what you mean by this?
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Sorry, now I realize that maybe when I tried to set it up, I put one of the positions wrong.
Two stations in the middle, even though one should have been at the beginning...
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Crash
Attachments
crash-20231128T161645Z.sav
(3.11 MiB) Downloaded 1061 times
crash-20231128T161645Z.zip
(11.61 KiB) Downloaded 1020 times
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

I can't say what triggered it because the game was running in the background.
But it's a fairly new game with very few changes, only to the objects if I remember correctly. I attached the crashlog additionally, I couldn't find it.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 28 Nov 2023 16:40 I can't say what triggered it because the game was running in the background.
But it's a fairly new game with very few changes, only to the objects if I remember correctly. I attached the crashlog additionally, I couldn't find it.
It just seems to be another text layout issue, I'll look into it.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Should I go back to the older version for now?
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 28 Nov 2023 18:51 Should I go back to the older version for now?
Is this crashing for you all the time?
It is up to you, but old versions will not be able to load new savegames.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

So far it hasn't fallen again. I meant more how likely it is to happen again.
I'll try to play and see.
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

I noticed something else. If I build a tram line, I can bulldoze it afterwards, if I don't want it there anymore, and the road will remain under it. But if I do the same to the trolleybus, I will also demolish the road underneath it.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 12 guests