Alter Mapgen Settings After Playing Map

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Engineer1701D
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Feb 12, 2019 6:04 pm
Contact:

Alter Mapgen Settings After Playing Map

Post by Engineer1701D »

After almost 200 hours of building and exploring a death world and not finding Uranium I decided to check the settings from the map string. Somehow I disabled Uranium all together (0 is what

Code: Select all

/c game.player..print(game.player.surface.map_gen_settings["autoplace_controls"]["uranium-ore"]["size"])
displays). I've read several threads here and some external threads on things related to console command to alter these settings. Thus far none succeed in changing size from zero.

Any ideas on how to enable Uranium generation?

Xeanoa
Fast Inserter
Fast Inserter
Posts: 190
Joined: Tue Apr 26, 2016 4:32 pm
Contact:

Re: Alter Mapgen Settings After Playing Map

Post by Xeanoa »


Engineer1701D
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Feb 12, 2019 6:04 pm
Contact:

Re: Alter Mapgen Settings After Playing Map

Post by Engineer1701D »

You may be right. I was hoping not to install any mods, but no different than using a console command (for achs I mean).

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Alter Mapgen Settings After Playing Map

Post by eradicator »

Map gen settings have to be written as a complete table.

This will set the values back to default:

Code: Select all

/c local mgs = game.player.surface.map_gen_settings mgs["autoplace_controls"]["uranium-ore"] = {frequency = 1, richness = 1, size = 1} game.player.surface.map_gen_settings = mgs
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Engineer1701D
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue Feb 12, 2019 6:04 pm
Contact:

Re: Alter Mapgen Settings After Playing Map

Post by Engineer1701D »

Ah hah. That sounds plausible. Just setting Uranium Size to 1 wasn't taking when I tried it.

I decided to use the mod suggested in the first response. It occurred to me since I had already disabled achs using commands that using a mod doesn't make it any worse, so I just installed that mod and changed Uranium Size to 1. I didn't want to default the other settings. They are all where I wanted them. I have discovered my first Uranium patch.... all 485K of it lol. I wanted it very rare and small but I guess I somehow set it to completely off by accident.... 200 hours ago.

Post Reply

Return to “Technical Help”