Jump to content

[Tool] Auto-enable all mods


Recommended Posts

I was having trouble with the mods in my game, every time I started the game all mods had been disabled.

I guess some mod made the game crash instead of closing or something but anyhow, since I got tired och manually activating all mods every time I started the game I wrote a little script to do that for me.

Posting it here if someone else gets use of it, if I missed something just post a comment and Ill take a look at it!

https://github.com/emipa606/ONIModEnabler/releases/latest

Link to comment
Share on other sites

Since the game sets all mods as disabled when it crashes the file does not contain any info on what mods were enabled/disabled when the script runs. But i guess its possible to write some kind of listener that monitors the file and saves the last state before all mods are disabled.

Ill see what I can do.

Link to comment
Share on other sites

I may be wrong here, but there is a "crash count" in the mod-list. If the mod was disabled, the count is still 0. So you could check if the value is 0 or above. If its 0, assume the mod was not active, and so it was not triggered as possible faulty. That way you could ignore that mod, and wont change it to active.

Link to comment
Share on other sites

I just make a backup of mods.json by compress it to a rar file. I use this method because it is easier than just plain copy (either you have to delete and rename files, or copy backup from another folder etc..) - so right click, extract here, click yes to replace and done.

Only downside is, if you add new mods (or do any changes), then, suprise suprise, you have to make a new rar file :) .

Or, I started to use Notepad++ and if ONI disable all mods, he just asks if I want to update the file, if I click no then I just click save and it is in the state before launching ONI.

 

But do not think I say by this that your effort in making this script is for nothing - quite the opposite, I just added other options to do it the other ways/yourself :) . I think that a lot of people, who just "dont uderstand computers/OS in general that well" will find this usefull (click this - profit :D ).

 

Link to comment
Share on other sites

I just use a bat file I made...it's one line and I just placed it in the same folder as the mods.json file is.  I then just made a shortcut on the desktop that I click on before I open the game.

 

powershell -Command "(gc mods.json) -replace 'false', 'true' | Out-File -encoding ASCII mods.json"

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...