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

ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

MagicBuzz wrote: 22 Dec 2021 10:32 Hello,

I have an issue with the "Allow construction of tunnels under water" feature.

I don't know why, but it doesn't work as I expect it...

Any idea?

https://drive.manga-torii.com/index.php ... hYFKo6HWoj

-- Edit: Oops, forget about it. I didn't read the error message.
But IMO this could be improved a bit :
- With a parameter or at least a text near the parameter that recall tunnel heads must be between 5 and 8 tiles from water
- The control is only done a the begining of the tunnel : exit can be just beside water
- Why this limitation? Technical?
- The build tool should show the whole tunnel path in read when the requierements are not met: right now I clicked by accident, but noone would even try to click and see the error message that explain why it doesn't work
Living in Japan I can't more than 80KB/s from your ownCloud server, and after I downloaded the video you have already figured it out what's wrong lol.

Anyway the reason is that this is based on "Chunnel" Patch, which basically just enforce the distance to shore for realism. Since in real life you need some distance for the tunnel to actually go under the water itself.
Master Trams
Engineer
Engineer
Posts: 41
Joined: 09 Sep 2019 15:37
Contact:

Re: JGR's Patch Pack

Post by Master Trams »

Right, I've got my Wikipedia article on the history of the road vehicle open (https://en.wikipedia.org/wiki/Car#History), and my kph to mph converter open, so I'm going to make a suggestion about station catchment areas...

The general point to take away from this is that I want station catchment areas to be more realistic, instead of just a square (or rectangle) around a station. So, as a basic requirement, each station will still have this rectangle. However, if there is a road to be followed, the catchment area will extend beyond this rectangle, to the buildings either side of this road.

The vanilla game only starts in 1925, but we'll ignore that since there are NewGRFs that allow you to start as early as 1700! 1886 is generally considered the birth of the car, so we'll ignore the fact that horse and carts existed before then, and assume people walked everywhere. People generally walk at most at 4mph, at a push. Let's assume that, if there is no road, and only field, people will not want to walk for more than 0.5hrs. If there is a road, they'll walk for an hour. Thus, prior to 1886, station catchment areas will extend 2 tiles away from the station over non-road tiles, and 4 tiles away from the station over a road.
In 1886, however, the Benz Motorwagen gets invented and patented, and the car is born. This car can travel at a whopping 10mph! But at this time, off-road cars don't yet exist, so catchment area over non-road tiles will still be 2 tiles. On a road, however, the catchment area is now 10 tiles. Then, in 1897, the Präsident was built in Austria-Hungary, this being the next big thing in road travel. This could do a grand total of 19mph, but still couldn't go off-road. So the off-road catchment is still 2 tiles, while the on-road catchment is now 19 tiles. Now let's imagine that from 1900, walking in urban areas became a thing, so people will now walk through buildings to get to a station. They'll do this for an hour if they have to. So therefore, in 1900, we have the following catchment areas:
Fields: 2 tiles
Urban Buildings (exc. Industries): 4 tiles
Roads: 19 tiles

Then, in 1908, the first affordable car comes in: the Ford Model T. Not only is it affordable, it's also quite nippy, capable of 42mph. Now isn't that quick! But... With the increased speed, people start viewing the car as an alternative to public transport... So now, they will only drive 30mins to a station, compared to the previous 1hr. This means the on-road catchment for stations increases to 21 tiles. Still quite good. In 1921, Citroën became the first non-Ford automobile company to use the production line. This led to, in 1934, the Citroën Traction Avant entering the market (French for Front Traction... It was the first front-wheel drive car!). Now, I'm not too sure if I can rely on the top-speed I've found (there isn't one mentioned in the Wikipedia article... In fact, this isn't mentioned in the article. Only it's maker is), but apparently this could do 87mph when it first came out in 1934... I'm going to play it safe and say 50mph as an average top-speed. This means the on-road catchment area increases to 25 tiles. Right, from here, the "History" section of the article ends, so I'm just going to take a list of current car manufacturers, and take what I perceive to be major developments in the car industry.

1938: Volkswagen Beetle - 72mph. I'm rounding this down to 55mph.
On-road catchment increases to 27 tiles.
1948: Morris Minor - 73mph top speed (supposedly). I'm rounding this down to 60mph.
On-road catchment increases to 30 tiles.
1962: Renault 8 -

Ah, you know what, I've got better things to be doing. Let's just say in 1959, car speed increases to 70mph, and on-road station catchment increases to 35 tiles. This is because the M1 opened in 1959. As for off-road travel, in 1989, the Landrover defender comes out, so field station catchment increases to 20 tiles (70mph, off-road, you do the maths).

There's my suggestion, any questions?
I love distracting myself from my day job by doing my day job thanks to OpenTTD JGR!
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Master Trams wrote: 28 Dec 2021 19:04 (snipped)
In many places people don't drive to/from railway station. They take busses. And you can already build that in-game, too, to extend the range of station. I strongly oppose this idea, at least if it's implemented without option to turn it off.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

Master Trams wrote: 28 Dec 2021 19:04 There's my suggestion, any questions?
Just a couple or three or four...
It would seem that your catchment areas could extend beyond the local authority maximum: 20 tiles from the town's center.
Landrover 1989? ... The Jeep was around since before the end of WW2. I remember doing doughnuts in one in a farmer's field somewhere around 1960. Remarkably, since I am writing this, I must have survived.
My 1965 Morris Minor could do a blistering 50 mph downhill with a good tailwind.

On the whole your idea has merit, but it could stand some serious tweeking.
User avatar
jfs
Tycoon
Tycoon
Posts: 1760
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: JGR's Patch Pack

Post by jfs »

It sounds like you want to play Transport Fever. It uses "distance the traveller is capable of going along the road to reach the station".
Taschi
Route Supervisor
Route Supervisor
Posts: 425
Joined: 11 Oct 2014 22:58

Re: JGR's Patch Pack

Post by Taschi »

Your whole proposed model creates a dynamic where increased availability and performance of cars leads to increased usership of public transport, which is entirely the opposite of how that worked out in real life. Generally, people who have to use a motorway to get to the nearest train station will just take that same motorway to whereever they actually want to go.

Also, the dynamics and statistics you mention is entirely dependent on country - car ownership rates vary, and have historically varied, massively by country, and so do factors like the average age of cars, the quality of roads, speed limits, congestion et cetera. For example, in Japan, to this day, the highest speed you will be allowed to do on any road is 100km/h, or about 60 mph. And the idea that people will go offroading at 70mph while they're commuting to work is maybe something that happens somewhere in the middle of Australia (but I kind of doubt it), not something that people will do in industrialized regions with developed road networks.

Also also, buildings in OpenTTD generally are placed in towns and cities. It doesn't really matter if you own a Porsche Taycan and can pull about 125mph / 200km/h in first gear if you are using town roads which tend to be limited to about 30mph / 50km/h in many places, and also tend to be crowded, have many intersections, and generally just aren't built for high speed. The way you are modeling things, in present day, a single railway station would be sufficient to serve most OpenTTD towns pretty much entirely, and I don't think that is realistic. I grew up in a town with 10k-ish people and even there, we at least had a couple of bus stops mostly serving regional lines, which fed onto the railway line.

Even disregarding those massive realism problem in your proposed "realistic" model, such things just do not work well together with the inherent abstractions of how OpenTTD models the world - heck, I don't think they work well with how Transport Fever 2 models the world, for that matter. In real life, my impression is that the people who would use their car to go to the train station are those who live too far away from the station to comfortably walk, do not have a reliable public transport link to said station, and live fairly close to the station so that doing a "park and ride" still has an advantage to them in comparison to just driving to the destination. To me, that's mostly people who live in some hamlet that's maybe 5 kilometers away from the nearest town with railway access, or people from a somewhat underconnected suburb which is still reasonably close to the city center. And, well, those hamlets just don't exist in OpenTTD's model of relatively uniformly sized towns with nothing (or at least nothing that has an impact on passenger traffic demands) in between them.

So personally I believe your ideas are neither very realistic, nor do they fit into OpenTTD.
Tsylatac
Engineer
Engineer
Posts: 50
Joined: 26 Dec 2015 01:04

Re: JGR's Patch Pack

Post by Tsylatac »

v0.44.1 changelog wrote:If a vehicle's next order is for the current station when leaving, start loading again without moving, instead of leaving.
Would it be feasible to have this work with conditional orders as well? If I do -

1. Go to Dock A
2. Jump to order 1 when Load percentage is less than 50
3. Go to Dock B

- my ship will not remain at Dock A waiting for at least a half full load as I hoped, but as with vanilla, will leave, circle around, and return, doing this endlessly until loaded enough.

Thank you again for making this game so much more playable and enjoyable JGR, and have a lovely new year!
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Tsylatac wrote: 31 Dec 2021 09:23
v0.44.1 changelog wrote:If a vehicle's next order is for the current station when leaving, start loading again without moving, instead of leaving.
Would it be feasible to have this work with conditional orders as well? If I do -

1. Go to Dock A
2. Jump to order 1 when Load percentage is less than 50
3. Go to Dock B

- my ship will not remain at Dock A waiting for at least a half full load as I hoped, but as with vanilla, will leave, circle around, and return, doing this endlessly until loaded enough.

Thank you again for making this game so much more playable and enjoyable JGR, and have a lovely new year!
Using conditional orders like this works for trains, but not for the other vehicle types at the moment. I can see about adding ship support.
Happy new year to you too.
Ex TTDPatch Coder
Patch Pack, Github
SomeIndianGuy
Engineer
Engineer
Posts: 65
Joined: 19 Nov 2018 19:26
Location: West Bengal,India

Re: JGR's Patch Pack

Post by SomeIndianGuy »

Here attached are two crash reports related to the same save that occured within a timespan of roughly 15 minutes. I am using the current version of the patchpack.
Attachments
Crash Report(s).tar
(22.02 MiB) Downloaded 52 times
Nothing to put here!
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

SomeIndianGuy wrote: 09 Jan 2022 15:01 Here attached are two crash reports related to the same save that occured within a timespan of roughly 15 minutes. I am using the current version of the patchpack.
Unfortunately a fix in the most recent release introduced a regression. This was fixed on Friday. I'll most likely be doing another release quite shortly.
Ex TTDPatch Coder
Patch Pack, Github
SomeIndianGuy
Engineer
Engineer
Posts: 65
Joined: 19 Nov 2018 19:26
Location: West Bengal,India

Re: JGR's Patch Pack

Post by SomeIndianGuy »

Okay, got it. What actually triggers it?
Nothing to put here!
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

SomeIndianGuy wrote: 09 Jan 2022 15:14 Okay, got it. What actually triggers it?
Re-routing cargo at a station during link graph job finalisation when a flow stat is invalidated and the next hop has the highest ID for flows for that cargo from that station.
It is an iterator misuse bug, bit careless on my part really.
Ex TTDPatch Coder
Patch Pack, Github
SomeIndianGuy
Engineer
Engineer
Posts: 65
Joined: 19 Nov 2018 19:26
Location: West Bengal,India

Re: JGR's Patch Pack

Post by SomeIndianGuy »

Noted.
Nothing to put here!
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 »

Possible glitch?
If you destroy terrain then zoom out before it has returned to 'grass', the terrain is never updated from the brown back to green, it is only updated when you zoom back in. However, this doesn't occur if you destroy the ocean, it updates as the sea naturally reclaims the land.
Note: I have made use of the extended zoom levels in the patch pack, and use up to 64x. I cannot recreate this in vanilla OpenTTD 12.1, even at the max zoom it offers (8x)
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote: 09 Jan 2022 20:25 Possible glitch?
If you destroy terrain then zoom out before it has returned to 'grass', the terrain is never updated from the brown back to green, it is only updated when you zoom back in. However, this doesn't occur if you destroy the ocean, it updates as the sea naturally reclaims the land.
Note: I have made use of the extended zoom levels in the patch pack, and use up to 64x. I cannot recreate this in vanilla OpenTTD 12.1, even at the max zoom it offers (8x)
Thanks, this should be sorted now.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: JGR's Patch Pack

Post by 3iff »

Upgraded from 43.1 to 44.2.

The signal gui now appears whenever I select signals (it didn't used to - i'd disabled it) and it defaults to the path signal with a no-entry. I just want a non-fancy path signal.

I've looked in the .cfg file but cannot seem to set it back to how it used to be.
Any idea what I need to do to get it back to the previous settings (vanilla path signal and no signal gui).

Thanks.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

3iff wrote: 11 Jan 2022 10:57 Upgraded from 43.1 to 44.2.

The signal gui now appears whenever I select signals (it didn't used to - i'd disabled it) and it defaults to the path signal with a no-entry. I just want a non-fancy path signal.

I've looked in the .cfg file but cannot seem to set it back to how it used to be.
Any idea what I need to do to get it back to the previous settings (vanilla path signal and no signal gui).

Thanks.
Upstream have done various alterations in this area, take a look here for more context:
https://github.com/OpenTTD/OpenTTD/pull/8688
https://github.com/OpenTTD/OpenTTD/pull/9617
Ex TTDPatch Coder
Patch Pack, Github
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: JGR's Patch Pack

Post by 3iff »

Thanks for that info.

Looks like someone screwed it up, changing something that wasn't really broken.
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 »

3iff wrote: 18 Jan 2022 10:09 Thanks for that info.

Looks like someone screwed it up, changing something that wasn't really broken.
I'd agree with this. I don't know why it now defaults to path signals upon opening the game, especially if you're loading a savegame that specifically was left using non-path signals as the last used. I came here to report this bug, but noticed this post and tested it in OTTD 12.1 vanilla, and can confirm this happens in both, irritatingly.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 15 guests