Cargo aging and disappearing questions

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
ebla71
Route Supervisor
Route Supervisor
Posts: 499
Joined: 14 Apr 2021 21:48
Location: Earth

Cargo aging and disappearing questions

Post by ebla71 »

Question about the "aging" and subsequent disappering of cargo from stations:

- Is it correct that cargo once produced is not controlled by the industry it generated anymore but by a station that it got allocated to?

- Is it further correct that the rate at which cargo "ages" and then disappears is related to the rating of the station it is waiting at?

- Is there a way to modify that cargo aging - with the aim of certain non-perishable cargos not to "age" at all?

- And if so - can that be done in an industry NewGRF or will it require another add-on?

- Finally, can anybody suggest some good NML programming examples? I've been looking at some sets that I think do what I have in mind but I don't fully understand how it is done.

Background: I play very large maps in which it is difficult to "feed" long industry chains if you want to play with a realistic number of vehicles (e.g. only one or two train on a certain route, leading to long intervals between serving a station).

On the "input side" of an industry, I want cargo to wait until everything necessary to produce has arrived (that I something I understand better with "stockpiling") but on the "output side" I also want to have "non-perishable" cargo like steel or wooden products sit around and wait forever until picked up while for example food might disappear (= get thrown away) if waiting somewhere for too long.
_dp_
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 18 Dec 2013 12:32

Re: Cargo aging and disappearing questions

Post by _dp_ »

ebla71 wrote: 15 Aug 2024 23:35 - Is it correct that cargo once produced is not controlled by the industry it generated anymore but by a station that it got allocated to?
Yes.
ebla71 wrote: 15 Aug 2024 23:35 - Is it further correct that the rate at which cargo "ages" and then disappears is related to the rating of the station it is waiting at?
Yes, but it's not called cargo aging as that's a different thing (it affects payments). I call it "decay" but it doesn't seem to have any particular name in OpenTTD code.
ebla71 wrote: 15 Aug 2024 23:35 - Is there a way to modify that cargo aging - with the aim of certain non-perishable cargos not to "age" at all?
Not directly but there are some ways to influence station rating.
ebla71 wrote: 15 Aug 2024 23:35 - And if so - can that be done in an industry NewGRF or will it require another add-on?
It can be influenced by newgrf that defines cargo with station rating callback (https://newgrf-specs.tt-wiki.net/wiki/C ... _.28145.29).
There is also a sandbox option to fix all station ratings at 100% (cargo will still disappear of there is more than 4k stockpiled).
ebla71
Route Supervisor
Route Supervisor
Posts: 499
Joined: 14 Apr 2021 21:48
Location: Earth

Re: Cargo aging and disappearing questions

Post by ebla71 »

_dp_ wrote: 16 Aug 2024 13:03 There is also a sandbox option to fix all station ratings at 100% (cargo will still disappear of there is more than 4k stockpiled).
Oh - that's very nice, didn't notice that option so far :D
User avatar
GarryG
Tycoon
Tycoon
Posts: 6212
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Cargo aging and disappearing questions

Post by GarryG »

ebla71 wrote: 15 Aug 2024 23:35cargo aging
I never thought of it that way .. if we failed to collect the cargo within a certain time the company found some one else to deliver it in stead. (As if we have some invisible competition).
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
ebla71
Route Supervisor
Route Supervisor
Posts: 499
Joined: 14 Apr 2021 21:48
Location: Earth

Re: Cargo aging and disappearing questions

Post by ebla71 »

GarryG wrote: 16 Aug 2024 22:57 I never thought of it that way .. if we failed to collect the cargo within a certain time the company found some one else to deliver it in stead. (As if we have some invisible competition).
You can think of it this way - but if you enojy to play really large maps (and I'm currently working on a 4096x4096 one) it get's super annoying if cargo disappears too quickly and therefore you cannot "feed" long industry chains. At least if you want a realistic (= very low) number of vehicles on a certain direction and not "saturate" a station with hundreds of trucks or dozens of trains waiting to pick things up.

With food-related cargo, it might make some sense but tons of steel suddenly disappearing into nothingness just because not picked up in time is weird.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 9 guests