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

Fix #9433: Use world generation seed from openttd.cfg if provided #9435

Closed
wants to merge 1 commit into from

Conversation

@Taschi120
Copy link
Contributor

@Taschi120 Taschi120 commented Jul 11, 2021

Motivation / Problem

Fix #9433

Description

Code which overwrites user settings removed

Limitations

none that I'm aware of

Checklist for review

looks fine to me

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Jul 11, 2021

There are a few more places that overwrite _settings_newgame.game_creation.generation_seed, most related to Network games. They might need some love too, as otherwise starting a network game results in a similar issue ;)

Loading

@Taschi120
Copy link
Contributor Author

@Taschi120 Taschi120 commented Jul 11, 2021

Oh, yeah, you're entirely right.

Loading

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Jul 11, 2021

The more I think about this, the more I think generation_seed shouldn't be stored in openttd.cfg. It makes very little sense to store it there to me. Let me explain my thinking:

You can use -G on startup to force a seed. This I can fully understand, as that is something people sometimes want to do.

Other than that .. there are very few usecases where you want to force a seed. I can understand that you want to enter a seed number when you start a game .. but other than that .. it should always be a random value.

Why storing it in openttd.cfg is weird to me: if you ever by accident put a number in there that is not GENERATE_NEW_SEED, and looking at this PR many people already have that now in their openttd.cfg, you will always get the same map over and over and over and over and over again, without clear feedback why this is the case.

So the more I think about it, the less sense it all makes.

Either way, that does result in a real problem with this PR: as many people have non-GENERATE_NEW_SEED in their openttd.cfg, this PR would make my example a reality: maps will be very static all of a sudden for a lot of people :)

Maybe we should approach this problem differently, and put the seed in the "New Game" menu as many games do. And a "randomize" next to it. And always randomize it on opening the GUI. That way people who want a fixed value can fill it in there.
And we should stop storing it in openttd.cfg in my opinion :)

But that is just one opinion; I would love to hear others :)

Loading

@Taschi120
Copy link
Contributor Author

@Taschi120 Taschi120 commented Jul 11, 2021

Yes, I absolutely forgot to think about what happens to existing openttd.cfg files so I will retract this PR for now.

Personally I would also like a UI element for manually setting a seed. For implementing that, the "troublemakers" from #9433 will still need to be removed.

Loading

@Taschi120 Taschi120 closed this Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants