OpenTTD

Tasklist

FS#6604 - Console: generation seed that you set manually is overwritten with a random value in some cases

Attached to Project: OpenTTD
Opened by James (james1101) - Sunday, 13 August 2017, 16:42 GMT
Last edited by Daniele (Wolf01) - Friday, 25 August 2017, 18:44 GMT
Type Bug
Category Core
Status Closed
Assigned To Daniele (Wolf01)
Operating System Windows
Severity High
Priority Normal
Reported Version 1.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This bug annoys people who want to do a newmap using a specific seed.

Case A: Set seed from console then newmap from ingame
1. Set the seed via console (set generation_seed N)
2. Start newmap from ingame.
-> Seed is overwritten with random value
Case B: Set seed from console then newmap from console, all while in the intro
1. Abandon any game you may have running
2. Set the seed in the console
3. Start new map from console
-> Seed is overwritten with random value
Case C: Same thing as above but while the map settings window is open
1. Abandon any game you may have running
2. Open the map settings window by clicking on the New Game button.
3. Set the seed in the console
4. Start new map from console
-> Seed is overwritten with random value
Case D: While in intro, set seed in console then click Generate in Map settings
1. Abandon any game you may have running
2. Open the map settings window by clicking on the New Game button.
3. Set the seed in the console
4. Start new map via the map settings window
-> Seed *is not* overwritten with random value
Case E: Same thing as above but Control-click on new game button instead
1. Abandon any game you may have running
3. Set the seed in the console
4. Start new map via ctrl-clicking on the new game button
-> Seed is overwritten with random value

Out of the five cases there is only one way to set the seed before starting the game and not have it overwritten with a random value, and that is case / method D. I would like all five cases to not overwrite the seed with a random value each.

OpenTTD Version 1.7.1 running on Win 7 Ultimate.

This task depends upon

Closed by  Daniele (Wolf01)
Friday, 25 August 2017, 18:44 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Flyspray clean up: not obvious what else should be done with this, so closing now. If this offends, discuss with Wolf01 in irc. Thanks for the report :)
Comment by Daniele (Wolf01) - Friday, 25 August 2017, 14:18 GMT
I found why it does this and I'm working on it.
Also I'll discuss with devs about the reintroduction of the seed box removed 3 years ago.

EDIT: attached patch, needs to be reviewed

Had a talk with devs, the map seed must be set with "newgame [seed]" and not with "set generation_seed [seed]", so even if my incomplete patch solved the "set generation_seed" problem, it's not the right way to do it, by design.
Comment by frosch (frosch) - Saturday, 26 August 2017, 12:02 GMT
To clarify:
* The settings commands are easier to understand when inside a game. The intro GUI stretches the terms.
* The "setting" command changes settings of the current game. "setting_newgame" does the same for new games. In the intro GUI they are the same.
* The "generation_seed" setting is supposed to be the seed of the current game. Changing it inside a game is pointless.
* The "newgame" command starts a new game with a new seed. In particular executing it multiple times in succession within a game always gives you a new map.
* The "restart" command starts a new game with the same settings and same seed as the current one.

This task has two misconceptions:
* You are not supposed to change the "generation_seed" setting since it refers to the current game.
* You try to make "newgame" and "restart" the same thing, which essentially completely breaks the purpose of "newgame". You run "newgame" when you want to keep the settings but did not like the result of the seed.

I did not try whether "restart" works in the intro GUI or what it does.

Loading...