Map Edit for changing map settings (keep achievements)

This is the place to share custom user maps, scenarios, and campaigns.
Albrat
Inserter
Inserter
Posts: 34
Joined: Tue Feb 17, 2015 2:35 pm
Contact:

Map Edit for changing map settings (keep achievements)

Post by Albrat »

I have been playing on a multiuplayer server that we have 5.5 hours invested in for a Livestream (sundays) https://www.twitch.tv/wisp_cosmicguppy
Anyway, we started playing and found that we had a save game that is set to peaceful mode on. We wanted to remove the peaceful mode but using comand console to change the settings will disable achievements.

I spent a while looking for ways to change the setting without breaking our ability to gain achievements. I believe I have found a way to do this.

**NOTE : this takes some save file editing to achieve. ** BACKUP YOUR SAVE FIRST !!
BACKUP YOUR SAVE FIRST !!
BACKUP YOUR SAVE FIRST !!
BACKUP YOUR SAVE FIRST !!
BACKUP YOUR SAVE FIRST !!
BACKUP YOUR SAVE FIRST !!
BACKUP YOUR SAVE FIRST !!

(did you backup your save?)

I opened the save file (lets call it 1.zip). inside the zip I located the folder 1 (the save name) Then I extracted console.lua .

The extracted file was inside a folder "1" (save name) I opened the file for editing.

I located "script.on_event(defines.events.on_player_respawned ... " inside this part of the script I added the line of code "game.player.surface.peaceful_mode=false" (this is the piece of code that changes biters to agressive.)

I saved the file. Then went back up one folder and dragged the folder "1" into the 1.zip file (our save game .zip)

This should have over-written the old version of the control.lua file in the save.

Run the game and load up your save 1 ... Run your character naked into a biter base and insult one of them. (or just use a gun and squeeze the trigger against a biters head.) DIE!!! respawn and that is the code triggered in game. (any spawned biters run off the old code now. kill them to trigger the agresive biters.) On every death the code runs, so you could do the edit again and just restore the code or leave it as it is.

Basically this triggers a lua code segment without breaking achievements for the save game. (I also changed the respawn equipment to "steel-axe" instead of the gun and ammo, as we are beyond steel axes and do not need the gun / ammo on respawn).
Post Reply

Return to “Maps and Scenarios”