Changing Map Settings during gameplay

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.
lieblingsbesuch
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Apr 11, 2017 1:27 pm
Contact:

Changing Map Settings during gameplay

Post by lieblingsbesuch »

Hey Guys, I am playing a map in "peace mode", and found out it is kinda lame; Enemies do not spread and it is no challenge to kill them.

Can I uncheck "Peace mode" maybe due to manipulate the existent savegame or something?

Thanks in advance.
Loewchen
Global Moderator
Global Moderator
Posts: 10201
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Changing Map Settings during gameplay

Post by Loewchen »

Open console (see keybindings on how).

Code: Select all

/c game.player.surface.peaceful_mode = false
You will not gain the ability to obtain achievements for this map though.
BenSeidel
Filter Inserter
Filter Inserter
Posts: 591
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Changing Map Settings during gameplay

Post by BenSeidel »

You can also modify the control.lua in the save game (under the directory that has the saves name). Pick an event that you can trigger and use that. My favourite is on_player_ammo_inventory_changed, as it's quick to trigger. (insert or remove anything from your weapon area in the bottom right hand of the screen).

Just paste this at the bottom of the control.lua code and recompress the zip (WinRar detects a change in the open file and asks you if you would like to save it to the zip, so it's really easy):

Code: Select all

script.on_event(defines.events.on_player_ammo_inventory_changed, function(event)
game.player.surface.peaceful_mode = false
end)
You can put any LUA command in there and it will trigger, without disabling achievements. I use it to enable/disable my trains. Put a pistol in, my trains start moving, take my pistol out and the trains stop moving.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Changing Map Settings during gameplay

Post by steinio »

You also need to kill all biters with the old setting via script.

Something like this: viewtopic.php?f=18&t=29787

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts
Post Reply

Return to “Technical Help”