raiguard / EditorExtensions

Extends the Factorio map editor with new features, testing tools, and other utilities to aid with sandbox play and scenario creation.
https://mods.factorio.com/mod/EditorExtensions
Other
28 stars 8 forks source link

How to stop editor extensions? #28

Closed mfreel closed 3 years ago

mfreel commented 4 years ago

How do I stop the Mod? I uninstall it but I still have infinite resources in my inventory and the time of day does not change. How do I get the game to go back to normal?

raiguard commented 4 years ago

Re-enable the mod, go into the map editor, and un-freeze time in the time menu. Switch back to your character, then type /EditorExtensions disable-cheat-mode into the console. After that you can remove the mod.

mfreel commented 4 years ago

Thanks for the quick reply. Great mod, just can't get it to stop. I have the time running. When I run /EditorExtensions disable-cheat-mode when switching back to character (Cttl E, exit map editor) I get the error:

Error while running command "EditorExtensions": Given value has to be larger than or equal to: 0 stack traceback: EditorExtensions/scripts/cheat-mode.lua:85: in function 'update_character_cheats' EditorExtensions/scripts/cheat-mode.lua:102: in function 'disable' EditorExtensions/control.lua:32: in function <EditorExtensions/control.lua:27> stack traceback: [C]: in function 'newindex' EditorExtensions/scripts/cheat-mode.lua:85: in function 'update_character_cheats' EditorExtensions/scripts/cheat-mode.lua:102: in function 'disable' EditorExtensions/control.lua:32: in function <EditorExtensions__/control.lua:27>

and it boots back to the start menu. Disable the mod but still have infinite crafting that takes no time.

If I stay in the map editor and disable cheat mode it says : disabled cheat mode, and so has disabled the testing tools for this force.

Then it gives this error when Ctrl - E:

The mod Editor Extensions (1.6.0) caused a non-recoverable error. Please report this error to the mod author.

Error while running event EditorExtensions::ee-toggle-map-editor (ID 169) The mod Editor Extensions (1.6.0) caused a non-recoverable error. Please report this error to the mod author.

Error while running event EditorExtensions::on_player_toggled_map_editor (ID 118) Given value has to be larger than or equal to: 0 stack traceback: EditorExtensions/scripts/cheat-mode.lua:85: in function 'update_character_cheats' EditorExtensions/control.lua:449: in function <EditorExtensions/control.lua:406> [C]: in function 'toggle_map_editor' EditorExtensions/control.lua:328: in function <EditorExtensions/control.lua:325> stack traceback: [C]: in function 'newindex' EditorExtensions/scripts/cheat-mode.lua:85: in function 'update_character_cheats' EditorExtensions/control.lua:449: in function <EditorExtensions/control.lua:406> [C]: in function 'toggle_map_editor' EditorExtensions/control.lua:328: in function <EditorExtensions/control.lua:325> stack traceback: EditorExtensions/control.lua:328: in function <EditorExtensions/control.lua:325> stack traceback: [C]: in function 'toggle_map_editor' EditorExtensions/control.lua:328: in function <EditorExtensions__/control.lua:325>

Basically I don't have any crafting. All the craft items are infinite and makes them instantly using no mats.

I don't use any other mods.

Any thoughts? Thanks for the help by the way.

raiguard commented 4 years ago

Oh boy, that's not good. I'm sorry! Could you please upload the save file so I can take a look? nevermind, see edit.

In the meantime, you can remove the mod, then run /c game.player.cheat_mode = false to remove the infinite crafting. But you will still be left with infinite reach and some other things, which is why I wanted you to use EE's command.

Edit: actually, the crash has to do with the infinite reach. It appears that you were not given it when you enabled cheat mode, so when you're disabling cheat mode, it's putting it into the negative. The fix is to simply set a minimum of zero for the reach distance bonus. I'll get a patch out as soon as I can.

mfreel commented 4 years ago

Thanks again for all the help and work you do. Your mod is fantastic. I'll keep an eye out for your patch.

raiguard commented 4 years ago

The patch has been released, please try it again now.

raiguard commented 4 years ago

Did that solve it for you?