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

Newgrf: using production CB for primary production cause industries to show 'Production last month: 0' at game start #7411

Closed
andythenorth opened this issue Mar 25, 2019 · 0 comments
Labels
component: NewGRF This issue is related to NewGRFs

Comments

@andythenorth
Copy link
Contributor

andythenorth commented Mar 25, 2019

Version of OpenTTD

master at 43caef2

Expected result

There are two mechanics for newgrf industries to produce cargo without any input. For convenience I just refer to this as 'primary' industry production.

  • 'default' primary production on 256 ticks, driven by action 0 prop 10 or prop 25 and prod_level and OpenTTD's built-in production algorithm
  • primary production via production cb, on 256 ticks, driven by arbitrary calculations

At game start, each primary industry instance should show how much was produced in the previous month, even though the previous month didn't exist in the game timeline.

This helps player understand the production rate at that industry instance, via the industry window, or the industry directory.

Actual result

At game start:

  • for 'default' production OpenTTD simulates a month of production per industry instance, and the 'Production last month' value is displayed correctly
  • for the production cb, 'Production last month' value is displayed as 0, after one month of game time this then resolves to show the correct value

If this is not resolvable, then there are workarounds within the newgrf spec, by combining both default production and production cb. These workarounds are viable, they're just clunky.

Steps to reproduce

The attached FIRS v4 development release will show this issue for industries like Coal Mines, Fishing Grounds etc.
firs-1.tar.zip

FIRS v3 releases or older do not show this behaviour, as they use a hybrid of default production behaviour and production cb.

Screenshots

Using production cb, at game start, and after 1 month.
7411_game_start
7411_after_1_month

@andythenorth andythenorth added the component: NewGRF This issue is related to NewGRFs label Mar 25, 2019
PeterN added a commit to PeterN/OpenTTD that referenced this issue Mar 25, 2019
PeterN added a commit to PeterN/OpenTTD that referenced this issue Mar 25, 2019
PeterN added a commit that referenced this issue Mar 25, 2019
TrueBrain pushed a commit to TrueBrain/OpenTTD that referenced this issue Mar 30, 2019
TrueBrain pushed a commit that referenced this issue Mar 30, 2019
douiwby pushed a commit to douiwby/OpenTTD that referenced this issue Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs
Projects
None yet
Development

No branches or pull requests

1 participant