Does NML have callbacks to Cargodist?
Moderator: Graphics Moderators
- BermudaTri
- Engineer
- Posts: 12
- Joined: 14 Sep 2015 04:50
Does NML have callbacks to Cargodist?
I'm fiddling around with the cargo station_rating callback, and I thought it might be a good mechanic to have station rating dependent on the number of networked accepting stations. For example: a coal mine is happier and more trusting of your company if they can choose from multiple steel mills/power plants to sell coal to.
I can see the stations getting this information from Cargodist somehow, because cargo is generated in the station with destinations in mind. So shouldn't there be some way in NML to get the total number of possible destinations and feed that back into the station_rating callback?
I can see the stations getting this information from Cargodist somehow, because cargo is generated in the station with destinations in mind. So shouldn't there be some way in NML to get the total number of possible destinations and feed that back into the station_rating callback?
Re: Does NML have callbacks to Cargodist?
no. because that is an incredibly hard number to calculate.
- BermudaTri
- Engineer
- Posts: 12
- Joined: 14 Sep 2015 04:50
Re: Does NML have callbacks to Cargodist?
That's...interesting.
So if I connect grain & beef farm "A" to mills "B" and "C" and meat packer "D", cargodist will split grain into "B" and "C" destinations, but I can't get the number "2" out of it? And I can't get the number "1" from beef being only distributed to "1" location?
I'm not trying to find "Total possible destinations across the entire map", I'm trying to find "How many destinations does cargodist pick from when assigning destinations?"
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Does NML have callbacks to Cargodist?
All serviced ones (including those which have been serviced until reasonably recent, iirc 2 years).BermudaTri wrote: ↑18 Jun 2021 01:57That's...interesting.
So if I connect grain & beef farm "A" to mills "B" and "C" and meat packer "D", cargodist will split grain into "B" and "C" destinations, but I can't get the number "2" out of it? And I can't get the number "1" from beef being only distributed to "1" location?
I'm not trying to find "Total possible destinations across the entire map", I'm trying to find "How many destinations does cargodist pick from when assigning destinations?"
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Does NML have callbacks to Cargodist?
that's the thing. cargodist does not assign destinations. each cargo package only knows its "next hop", and the station itself doesn't care. and whatever the station window displays is just statistical mumbojumbo.BermudaTri wrote: ↑18 Jun 2021 01:57 I'm not trying to find "Total possible destinations across the entire map", I'm trying to find "How many destinations does cargodist pick from when assigning destinations?"
Re: Does NML have callbacks to Cargodist?
Interesting, I was pretty sure that each existing packet has its final destination assigned...
Re: Does NML have callbacks to Cargodist?
What about the cargo linkgraph? I can see how passengers going to x via y would be statistical magic, but for industries it's often direct links, so could it be possible to use the number of direct links from a station for a given cargo?
Who is online
Users browsing this forum: No registered users and 14 guests