Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected cargo appears #2138

Closed
DorpsGek opened this issue Jul 11, 2008 · 17 comments
Closed

Unexpected cargo appears #2138

DorpsGek opened this issue Jul 11, 2008 · 17 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

George opened the ticket and wrote:

R13680
Undelivered cargo appears at unserviced industry

Attachments

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/2138
@DorpsGek
Copy link
Member Author

frosch wrote:

From newgrf specs (callback 3D):
"This callback should be used in conjunction with callback 2B, since the acceptance of the tiles and the acceptance of the industry itself should always agree. If you disable accepting a cargo via callback 3D, but forget to remove the acceptance from the tiles, the station will keep accepting the cargo and the player will keep getting the money, but the industry won't receive the cargo. On the other hand, if you remove acceptance from the tiles, but forget using callback 3D, your industry may still get the cargo. (For example, there may be another industry nearby whose tiles accept the cargo. This makes the station accept the cargo, and send it to the nearest industry, which happens to be yours, even though its tiles don't accept the cargo.)"

You can add ", instead it will be delivered to the nearest accepting industry no matter how far away" behind "but the industry won't receive the cargo."

If this is not the case, please report back.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4446

@DorpsGek
Copy link
Member Author

George wrote:

There is no tourist transportation in that save. Not me nor AI transport any tourist. It theoretically could be negative value in production callback, but then this should affect every industry, not the single one.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4447

@DorpsGek
Copy link
Member Author

frosch wrote:

Green company, road vehicle 8.

Btw. you added ECSBasic Vector in game. You should not add newgrfs in game, esp. not grfs containing new cargos or new industries.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4448

@DorpsGek
Copy link
Member Author

George wrote:

Hm, yes. But it transports tourists between 2 hotels, which have constant accepting and production. How can it affect industries?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4449

@DorpsGek
Copy link
Member Author

frosch wrote:

Thanks, 'accepted by a house' was the hint I needed. When tourists are delivered to the station, it proceeds like:

  1. The station accepts tourists because there are tourist accepting tiles (houses) around it.

  2. If the cargo has a 'town effect' like water or food, the town is noticed of the delivery.

  3. Then the cargo is delivered to the nearest industry, that accepts the cargo.

This causes these problems:

  1. When an industry accepts a cargo with a town effect, the whole cargo is delivered to both the industry and the town.
  2. When there are only houses around, which accept the cargo, it will also get delivered to the nearest industry accepting the cargo.

So basically cargos which are accepted both by industries and houses cause trouble currently. We need to find some way, to decide if the cargo is delivered to an industry or to a town/house. And if you deliver e.g. food to an industry, how shall it be distributed between town and industry?

IMO no easy questions...


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4450

@DorpsGek
Copy link
Member Author

George wrote:

Imho industries (whose tiles can accept cargo and are covered by a station) should get all the cargo first, and the cargo they can't accept should go to houses. Of cause the cargo that goes to the station that does not cover the industry, should go to houses only.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4452

@DorpsGek
Copy link
Member Author

frosch wrote:

Well, but is it sufficient that only one industry tile with 1/8 acceptance is covered by the station, to give everything to the industry. Or does the industry need 8/8 to accept it.
Also what about the standard steel mill, which accepts about 2/8 passengers when covered completely.

So I can think of:

  1. Decide station acceptance by suming up all tile acceptances in the coverage area (like it is done now). All cargo goes to the nearest industry with at least 1/8 acceptance in the station area. Remaining cargo goes to the town. Note: This will render callback 0x3D obsolete. Also players might complain that when they build a station near an industry, and when the town removes some houses, the station stops accepting the cargo.

  2. Sum tile acceptance separately for houses and industries [or even for each industry separately]. Station accepts cargo only if houses or industry [or a single industry] reaches 8/8 acceptance. Note: This will break compatibility as stations near e.g. original steelmill and only a few houses might no longer accept passengers. [Even worse if industry acceptance is summed separately]

  3. Station accepts cargo if houses and industries reach 8/8 acceptance together. Cargo is distributed to all houses and industries in the catchment area according to their fraction of the tile acceptance sum. Note: The player can no longer force the cargo to be delivered to only one industry by placing the station near to it. Also this will again render callback 0x3D obsolete.

  4. Threat houses like industries, e.g. if a single house with 1/8 acceptance is nearer than a industry everything goes to the town/house. Note: Players will go nuts, if the town decides to build a new house near their station, which causes the cargo to be no longer delivered to any industry.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4453

@DorpsGek
Copy link
Member Author

George wrote:

  1. CB 3D is used when two industries accept the same cargo. When the first one overflows, the second one starts to accept all the cargo. Also CB 3D can be used in the theoretical case when industry should accept cargo with its' tiles, but not take it into procession (some sort of my parameters to make game easier)

  2. sounds good for several industries, but absolutely bad for houses, because a player can hardly control their appearing and disappearing.

  3. yes, very hard to control.

Summery:
I like the most the idea to distribute the cargo among the industries according to their tiles accepting (modified 3) ). Industries, whose callback 3D declines this cargo accepting, are ignored (there are industries in ECS, factory for example, who accept cargo (coal) with its' tiles, but do not accept it as an industry). Houses are also ignored. If no industry wants to get the cargo, houses get all the cargo.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4454

@DorpsGek
Copy link
Member Author

DaleStan wrote:

TTD and TTDPatch do deliver cargo to both towns and industries, but they only deliver to an industry if it is sufficiently close to the station. (see CS:00137C74, 00560CAC, and checkstationindustrydist (at patches/fixmisc.asm:3469)) I recommend OpenTTD follow this lead.

1,3) I don't really mind rendering 3D obsolete, as long as it still works as documented -- 3D must still be called before the industry receives cargo.

And then there's the easy solution:
5) Industries (as opposed to industry tiles) must not accept cargoes that are accepted by houses, and vice versa.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4461

@DorpsGek
Copy link
Member Author

George wrote:

  1. Houses accept food, goods, tourists and tourists centres accept them too. I see no reason to break it.

as for 1,3 I think it would be better to divide cargo between industries, not to give all the cargo to only one industry. IMHO


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4469

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 7, 2008

George wrote:

Please change the Severity of the task to critical. I think it is a very important problem


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4845

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 8, 2008

George wrote:

Frosh, what did you mean with that?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4848

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 8, 2008

Belugas wrote:

A High Severity means the game is crippled with a serious problem that may, in short term, stop it to work, like a desynch or an imminent crash.
In this case, we are talking about a behaviour that is not acceptable, but does not render the game useless.
It's understood you consider it a very serious bug. But would the game crash with it? no. That's the point


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4849

@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 8, 2008

George wrote:

But why to change it to "Low"?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4850

@DorpsGek
Copy link
Member Author

Belugas wrote:

You would prefer Very Low?
Does it matter, for you, how Low it has been set?
It's not the level of severity that dictates how fast it's going to be fixed.
It depends more on if we have an idea to fix it or not. But the level only affects the sorting of the bugs.

And by the way, i've heard someone is trying to fix it.
Not me, since I barely have time to check stuff around.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4873

@DorpsGek
Copy link
Member Author

George wrote:

Well, may be I'm mistaking, but I think devs fix problems that are on the top of the list first.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138#comment4874

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r14530


This comment was imported from FlySpray: https://bugs.openttd.org/task/2138

@DorpsGek DorpsGek added NewIndustries flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant