Distribution Mode property for cargoes?

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

Moderator: Graphics Moderators

Post Reply
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Distribution Mode property for cargoes?

Post by fonso »

Currently cargo distribution in OpenTTD is switched on and off by a rather crude collection of settings: You can choose the distribution mode for passengers, mail, valuables, or "other" cargo. Internally this works by checking if the cargo belongs to the respective cargo classes, where passengers overrides mail and valuables, and mail overrides valuables. So far NewGRFs that define those cargoes have no way of finding out about those settings.

There has been a suggestion to expose the distribution mode as NewGRF property of cargoes. Like that NewGRFs could read (e.g. to reduce passenger production) or possibly set the distribution mode for specific cargoes. If NewGRFs were to be able to set the distribution mode for single cargoes, that would enable more fine grained control over which cargoes are distributed how. We'd need to define how the interaction with the settings works. I see the following possibilities:
  1. NewGRF overrides setting. You could still set the distribution mode for cargoes that don't specify the property, but if the NewGRF specifies it the player cannot change it.
  2. Setting overrides NewGRF. The NewGRF could specify the distribution mode and the setting would have a default value "NewGRF defined", which would accept that. By changing the setting to any of the actual distribution types the player could override the NewGRF property.
  3. No setting. Distribution mode would be manual unless some NewGRF is loaded that defines it.
Option 2 initially sounds like a good idea as it gives sufficient control to both the NewGRF author and the player. However, from an architectural point of view it seems messy. NewGRFs can already provide their own settings which could allow a player to choose a distribution mode for NewGRF defined cargoes. Having a separate setting elsewhere to override it is redundant and confusing. With that in mind Option 3 is not as extreme as it seems. We could provide a minimal NewGRF that just allows you to set the distribution mode for the default cargoes. Load that and you get the same options as before and some more.
The guy on the picture is not me, it's Alonso.
Transportman
Tycoon
Tycoon
Posts: 2792
Joined: 22 Feb 2011 18:34

Re: Distribution Mode property for cargoes?

Post by Transportman »

Option 2 would indeed be a mess, but for default cargoes it should not be needed to use a NewGRF to have CargoDist, so also no to option 3 on that part. I would go with option 1, with maybe an option in Advanced Settings to allow/disallow NewGRFs to set CargoDist settings (bit like the Vehicle never expires option).
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Distribution Mode property for cargoes?

Post by Eddi »

i don't like either of your 3 choices.

my thought went more into dividing cargos into (ca.) 3 categories:
  • "many-to-many" (e.g. passengers, mail)
  • "few-to-many" (e.g. goods, supplies)
  • "few-to-few" (other)
the NewGRF defines in which category the cargo belongs, and the player defines which distribution mode is used for each category.
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Distribution Mode property for cargoes?

Post by frosch »

I like Eddi's suggestion. Those cargo-relation-classes seem to better represent what a player is interested in.

However, the symmetric/asymmetric flag may be need a separate NewGRF flag. Maybe that flag should be NewGRF-only without player influence.

So:
  • NewGRF define symmetric/asymmetric per cargo type.
  • NewGRF define "many to many", "few to many", "few to few" per cargo type.
  • Player/Advanced settings define automatic/manual for those 3 classes.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: Distribution Mode property for cargoes?

Post by Supercheese »

I don't like cargodist as it is currently, so I always set everything to Manual, and I would like to see this option preserved. Newgrfs must not be able to say, "Tough, you must use cargodist, you cannot choose Manual."
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Distribution Mode property for cargoes?

Post by fonso »

The question if a cargo is one-to-many, many-to-many or many-to-one doesn't really depend on the cargo but rather on the number and production level of related industries and towns on the map, and on your personal playing style. There seems to be convention followed by most people:
  • Cargoes produced by houses and consumed by houses tend to be many-to-many
  • Cargoes produced by the same type of industry they're consumed by tend to be many-to-many
  • Cargoes accepted by several different industry types tend to be one-to-many (such as engineering supplies)
  • Cargoes produced by industries and consumed either by houses or by industries with town effect tend to be one-to-many
  • Everything else is usually many-to-one.
Did I miss anything?

We don't really need additional flags for that as we can figure it out from the cargo and industry specs. We could change the settings so that players would choose symmetric, asymmetric or manual for many-to-one, one-to-many, and many-to-many cargoes, respectively.
The guy on the picture is not me, it's Alonso.
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Distribution Mode property for cargoes?

Post by Eddi »

fonso wrote:The question if a cargo is one-to-many, many-to-many or many-to-one doesn't really depend on the cargo but rather on the number and production level of related industries and towns on the map
well, maybe, but the cargo is defined by the industry set, so the author probably has something in mind how it should work. a flag may be better than some convoluted heuristic about "what is 'many'?" which will almost definitely be screwed over by the next cargo scheme somebody implements.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Distribution Mode property for cargoes?

Post by fonso »

Eddi wrote:well, maybe, but the cargo is defined by the industry set, so the author probably has something in mind how it should work. a flag may be better than some convoluted heuristic about "what is 'many'?" which will almost definitely be screwed over by the next cargo scheme somebody implements.
Yes. We could use the heuristic for cargoes without explicit flag instead of the passenger/mail/valuables division, though, and only offer settings for many-to-many, many-to-one and one-to-many. What happens to the distinction between passengers, mail and valuables then? They'd all be many-to-many in temperate. Do people play with different settings for passengers and mail?
The guy on the picture is not me, it's Alonso.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Distribution Mode property for cargoes?

Post by FLHerne »

fonso wrote:Do people play with different settings for passengers and mail?
I never have, and none of my friends or anyone else I play with does either. :P
Why would anybody want to? They behave identically...

EDIT:
Eddi's proposed scheme is certainly better than the current one, because 'Other' cargoes defined by grfs have an enormous range of strange behaviours.
As a player (not an industry-set developer) I prefer it to Option 3 which takes control of a setting that massively changes the style of gameplay away from the user. Like scenarios - newgrf sets are important to the nature of a scenario, but having them enforced by the maker is annoying*. Options 1 and 2 are both rather silly.

*Yes, I know that's more for technical reasons now. Not the point.
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: Distribution Mode property for cargoes?

Post by romazoon »

i personnaly see an interest in differenciating mail and passenger -> i sometime put no cargodist effect on mail in order to need less capacities for mail on my lines and focus more on passenger (it also decrease profit from mail-> nice to make the game a tad harder)


same with the mail asymetric and passenger symetric -> mail do not always need to go back from where it comes(probably most of the time a mail is not gonna bring an answer-> think advertisement, post card, etc) but passenger usually always return home oneday ;)
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 14 guests