I am running Ubuntu 16.04 Linux headless and have found some issues generating maps. I get the same map under several condition including when "seed": null is set as per the example mag-gen-settings.json
"_comment_seed": "Use null for a random seed, number for a specific seed.",
"seed": null
Command line I used to generate worlds:
./bin/x64/factorio --map-gen-settings map-gen-settings.json --create saves/world.zip
What I have found (below is the seed line from the .json file, and the results on server from the /seed command:
"seed": null
/seed
1
"seed": ""
/seed
1
"seed": 1
/seed
1
^ This is actually correct
by removing the seed line completely
/seed
1
"seed":
0.000 Error Util.cpp:62: Unexpected character at map-gen-settings.json:23
^ Error from syntax incorrect
"seed": "123"
/seed
1
"seed": 123
/seed
4040535837
^ seed didn't match what I requested
ran again
"seed": 123
/seed
3000332189
^ a different seed was used
Summary:
Anytime I generate a map with null or a quoted number, I get a map with seed = 1.
Anytime I generate a map with a specific seed number, I get a random map.
I hope my notes are clear and this is helpful.
Thank you,
Mr Goodbits
[0.15.31] Linux headless server random map generation
-
- Inserter
- Posts: 25
- Joined: Mon Jun 27, 2016 9:33 pm
- Contact:
Re: [0.15.31] Linux headless server random map generation
Thanks for the report. I noticed as well that it's not working as desired
How it's meant to work:
How it's meant to work:
- If you give a seed in map-gen-settings.json it uses that.
- If you don't define a seed in map-gen-settings.json and you defined a seed via --map-gen-seed it uses that else it uses a random seed
- If you define no seed it uses "1" as the seed
- If you define a map-gen-settings.json seed it uses a random seed
- If you define a seed with --map-gen-seed it uses that.
If you want to get ahold of me I'm almost always on Discord.
-
- Inserter
- Posts: 25
- Joined: Mon Jun 27, 2016 9:33 pm
- Contact:
Re: [0.15.31] Linux headless server random map generation
I would recommend the process be:
if --map-gen-seed is provided, use that
then use map-gen-settings.json seed if given
then fall to random if none given anywhere
perhaps check for "--map-gen-seed random" on the command line to enable forcing random to over ride .json.
This would allow the runtime command line option to take precedence and over the json. I figure anything given on the command line should be used.
Thanks,
MrGoodbits
if --map-gen-seed is provided, use that
then use map-gen-settings.json seed if given
then fall to random if none given anywhere
perhaps check for "--map-gen-seed random" on the command line to enable forcing random to over ride .json.
This would allow the runtime command line option to take precedence and over the json. I figure anything given on the command line should be used.
Thanks,
MrGoodbits
Re: [0.15.31] Linux headless server random map generation
Thanks for the report.
Fixed for next release.
Fixed for next release.