regenerate map without "cheating..."?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
nuhll
Filter Inserter
Filter Inserter
Posts: 922
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

regenerate map without "cheating..."?

Post by nuhll »

So i make abig mistake and generated my map i played for hours now with wrong settings (and without RSO) having 100 and 1000 of small useless ore fields everywhere. Now after i enabled RSO, i ahve normal patches back (in new discovered areas)...


i found a cmd to regenerate the ores, but is there a way without loosing all archivements? (or not getting new)
Also possible to change richness (or in my case how rar they are) in game?

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: regenerate map without "cheating..."?

Post by Jap2.0 »

No, you can't change anything to do with the resources without disabling achievements - you might want to see this thread if you're comfortable using a hex editor and messing around with your save, though.
There are 10 types of people: those who get this joke and those who don't.


keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: regenerate map without "cheating..."?

Post by keyboardhack »

Yes it's possible to change the richness without losing all archivements. It's still cheating though :)
Can't give the most specific steps to do it right now but it's something like this.
  • Go to the location of your save file
  • Unpack/extract/unzip your savefile.
  • In you unpakced savefile open control.lua
  • At the bottom of the file add

    Code: Select all

    script.on_event(defines.events.on_tick, function(event)
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["crude-oil"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["iron-ore"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["copper-ore"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["coal"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["stone"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["uranium-ore"].richness = "very-good"
    end)
  • Save the file
  • Zip the save again and you should be good to go.
Waste of bytes : P

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: regenerate map without "cheating..."?

Post by orzelek »

AFAIK using mod added command will not affect achievements - only the /c commands.
You should be able to use /rso-regenerate to run the regen.

As for richness - if above works then you can change RSO options before doing the regen. You will be only able to change it for all the ores this way.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: regenerate map without "cheating..."?

Post by Jap2.0 »

Ah, yeah, you can add arbitrary lua in your save, and if RSO has a command, that should work as well (though that command won't change the richness).
There are 10 types of people: those who get this joke and those who don't.

metis_seeker
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Apr 24, 2018 12:01 am
Contact:

Re: regenerate map without "cheating..."?

Post by metis_seeker »

Don't mods such as RSO already disable achievements? If not then I'll start using mods more!

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: regenerate map without "cheating..."?

Post by Jap2.0 »

metis_seeker wrote:Don't mods such as RSO already disable achievements? If not then I'll start using mods more!
There are separate modded and unmodded achievements. Only the unmodded achievements sync with Steam.
There are 10 types of people: those who get this joke and those who don't.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: regenerate map without "cheating..."?

Post by Koub »

Technically, regenerating a map IS cheating. What you're looking for is "How to cheat the game without it knowing you have cheated, so that you can get achievements you shouldn't get - because you would have cheated".
The right answer would be restart a new game, with the settings you wanted.
Koub - Please consider English is not my native language.

metis_seeker
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Apr 24, 2018 12:01 am
Contact:

Re: regenerate map without "cheating..."?

Post by metis_seeker »

Jap2.0 wrote:There are separate modded and unmodded achievements. Only the unmodded achievements sync with Steam.
Oh, okay. That makes sense.

nuhll
Filter Inserter
Filter Inserter
Posts: 922
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: regenerate map without "cheating..."?

Post by nuhll »

Its not cheating.

I can set this options before i start the map and get the archivements even when i select "very rich".

I just didnt know that i have 2 iron deposit 4000 chunks around my spawn xD

Thanks for the help to the others.

neoc
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Sun Apr 24, 2016 4:31 pm
Contact:

Re: regenerate map without "cheating..."?

Post by neoc »

keyboardhack wrote:Yes it's possible to change the richness without losing all archivements. It's still cheating though :)
Can't give the most specific steps to do it right now but it's something like this.
  • Go to the location of your save file
  • Unpack/extract/unzip your savefile.
  • In you unpakced savefile open control.lua
  • At the bottom of the file add

    Code: Select all

    script.on_event(defines.events.on_tick, function(event)
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["crude-oil"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["iron-ore"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["copper-ore"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["coal"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["stone"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["uranium-ore"].richness = "very-good"
    end)
  • Save the file
  • Zip the save again and you should be good to go.
I tried changing the map_gen_settings in an already generated map. After the change, when I print the changed value, it remains unchanged though. It seems that the map_gen_settings table is read only. I can however make a deepcopy, change that copy, and assign it to the map_gen_settings entry in the surface. Unfortunately it doesn't seem to make a difference when doing an RSO regenerate call.

Can someone confirm that the settings are read only?

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: regenerate map without "cheating..."?

Post by orzelek »

Try calling regenConfig through remote interface on RSO.
RSO has no idea that you modified the map settings and it reads them only at game start or after mod changes.
I think that adding any mod and then loading game will also refresh settings. You can then save and remove the mod.

neoc
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Sun Apr 24, 2016 4:31 pm
Contact:

Re: regenerate map without "cheating..."?

Post by neoc »

orzelek wrote:Try calling regenConfig through remote interface on RSO.
RSO has no idea that you modified the map settings and it reads them only at game start or after mod changes.
I think that adding any mod and then loading game will also refresh settings. You can then save and remove the mod.
Thanks! Which settings are relevant for RSO by the way? I think I remember reading that some of the ore settings are ignored because of the way RSO generates ores. Richness perhaps, or frequency? Size does matter as far as I know.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: regenerate map without "cheating..."?

Post by orzelek »

neoc wrote:
orzelek wrote:Try calling regenConfig through remote interface on RSO.
RSO has no idea that you modified the map settings and it reads them only at game start or after mod changes.
I think that adding any mod and then loading game will also refresh settings. You can then save and remove the mod.
Thanks! Which settings are relevant for RSO by the way? I think I remember reading that some of the ore settings are ignored because of the way RSO generates ores. Richness perhaps, or frequency? Size does matter as far as I know.
RSO is using all three for ores but frequency works differently then in base game (description on mod page has details).
For biters frequency and size is used, richness has no function.

BeSt-Com
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Aug 29, 2015 10:26 am
Contact:

Re: regenerate map without "cheating..."?

Post by BeSt-Com »

neoc wrote:
keyboardhack wrote:Yes it's possible to change the richness without losing all archivements. It's still cheating though :)
Can't give the most specific steps to do it right now but it's something like this.
  • Go to the location of your save file
  • Unpack/extract/unzip your savefile.
  • In you unpakced savefile open control.lua
  • At the bottom of the file add

    Code: Select all

    script.on_event(defines.events.on_tick, function(event)
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["crude-oil"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["iron-ore"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["copper-ore"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["coal"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["stone"].richness = "very-good"
    	game.surfaces.nauvis.map_gen_settings.autoplace_controls["uranium-ore"].richness = "very-good"
    end)
  • Save the file
  • Zip the save again and you should be good to go.
I tried changing the map_gen_settings in an already generated map. After the change, when I print the changed value, it remains unchanged though. It seems that the map_gen_settings table is read only. I can however make a deepcopy, change that copy, and assign it to the map_gen_settings entry in the surface. Unfortunately it doesn't seem to make a difference when doing an RSO regenerate call.

Can someone confirm that the settings are read only?
This works great for me, thanks a lot.
My problem: crude-oil gives me only 1%, that is definitely not enough. Now it works ;-)

Post Reply

Return to “Gameplay Help”