4

I created a game with the largest starting base parameter. I forgot if I checked or not the peaceful mode case before seeding the map.

Is there a way to access this information?

  • 1
    Please change the accepted answer. – Kenny Evitt Apr 20 '19 at 18:36
1

You cannot check if it was enabled or not. However, what you can do is enable/disable it with the console.

Go to options and look at the keybinding to open the lua console. You can find the binding in the game tab.

Once you open the console, type the following command

/c game.player.surface.peaceful_mode=BOOL

Replace BOOL with TRUE if you want to enable it or FALSE if you want to disable it.

You can have a look at all the other commands here.

Keep in mind that using console commands will disable achievements.

  • 3
    Thanks for the answer and for notifying us that "using console commands will disable achievements". There is an another way I found to check and keep achievement on: players can look in achievements tab if those that require peaceful mode off are still possible. If in peaceful, they will be marked as "impossible". But it requires at least one not achieved yet. – Galabyca Apr 2 '17 at 21:57
  • 3
    Maybe you don't know so much about the Factorio Lua API, but game.player.surface.peaceful_mode is a read/write property, so it is possible to read it as well. See my answer. – Simon Forsberg Apr 22 '17 at 18:59
  • 3
    @SimonForsberg You're right, I dont know much about lua, but I think this is a bit more about how the game implements the commands. Anyway, I think the accepted answer should change to yours. – TheBird956 Apr 23 '17 at 23:39
  • @TheBird956 If you don't want to edit your own answer, and of course that's fine, you can delete it (unless it being accepted prevents you from doing that, which it might). – Kenny Evitt Apr 20 '19 at 18:36
8

You can use the following console command to check whether or not peaceful mode is enabled:

/c game.player.print(game.player.surface.peaceful_mode);

Keep in mind that using console commands will disable achievements, but you can save your game, run the command, and reload your game afterwards to avoid achievements from being disabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.