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

Add: new economy "frozen" that stops production changes and industry closures #8282

Merged
merged 1 commit into from Dec 14, 2020

Conversation

@ldpl
Copy link
Contributor

@ldpl ldpl commented Jul 28, 2020

OpenTTD production changing and industry closing scheme only supports default evenly-spread random industry generation. Even if scenario does some custom one it will be destroyed as the game goes. And while this issue can be somewhat worked around by using kluge industry sets like "manual industries" it's incompatible with other industry sets (including kluges) and can't be changed if player noticed the issue mid-game.

Doesn't need a savgame upgrade as it's just a bool->uint8 conversion.

@James103
Copy link
Contributor

@James103 James103 commented Jul 28, 2020

Does this prevent natural industry spawning or is that still controlled by the industry density setting? (I would bet on the latter)

@ldpl
Copy link
Contributor Author

@ldpl ldpl commented Jul 28, 2020

@James103 Yeah, I'm a fan of having settings as separate as possible so didn't see any reason to interfere with density.

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 14, 2020

Never been a big fan of having all these different kind of algorithms to do balancing of the game hardcoded in the game. That really should be something for an extension to control, as otherwise you never see the end of this. But I am guessing there is no NewGRF callback for the generic case (only for industries they introduce, I am guessing). I know there are more of these places in our code that are very .. opinionated. Nothing wrong with that, just means there will always be a group of people who would like to see it differently.

I digress. This PR basically only introduces a "do-not-change" mode to industries, if I get this right. The subject is a bit passive aggressive (clearly you are frustrated by something :P), making it a bit hard to see for me if that is the only thing (intended) to be changed here :)

I don't mind a PR like this, but we do need an upper-limit of how many "economies" we want to support. Supporting a "do-not-change" sounds like a sane one to have no matter what.

Two things that come to mind when reviewing:

  1. "stable", is that the right word to use here? As x = y + 1 is stable, but not what you mean. Not a native speaker, so just asking the question here :) "Production doesn't change"?
  2. "economy.type" somehow ticks me off, not sure why. "type" as variable feels odd. "economy.kind"? Dunno .. thinking out loud here, and splitting hairs.

@frosch123
Copy link
Member

@frosch123 frosch123 commented Dec 14, 2020

#7912 is about the same, but as GS feature.

@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Dec 14, 2020

If I've understood this correctly, it overlaps with requests to newgrf authors like https://www.tt-forums.net/viewtopic.php?p=1239097#p1239097

EDIT Misunderstood, PR has nothing to do with that request :)

src/lang/english.txt Outdated Show resolved Hide resolved
src/lang/english.txt Outdated Show resolved Hide resolved
@andythenorth
Copy link
Contributor

@andythenorth andythenorth commented Dec 14, 2020

"Change: add frozen economy type"

@ldpl ldpl force-pushed the stable-economy branch from 9ad15a5 to 28f55aa Dec 14, 2020
@ldpl ldpl changed the title Fix: Add stable economy type that doesn't ruin scenarios with non-standard industry generation Add: new economy "frozen" that stops production changes and industry closures Dec 14, 2020
@TrueBrain TrueBrain merged commit c9fd855 into OpenTTD:master Dec 14, 2020
6 checks passed
Milek7 added a commit to Milek7/OpenTTD that referenced this issue Dec 15, 2020
@ldpl ldpl deleted the stable-economy branch Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants