Mlie Posted September 1, 2019 Share Posted September 1, 2019 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 More sharing options...
ancienlee Posted September 2, 2019 Share Posted September 2, 2019 Emmm, I always use text editor to replace all 'false' to 'true' Link to comment Share on other sites More sharing options...
Mlie Posted September 2, 2019 Author Share Posted September 2, 2019 Yup, thats what this script does. Link to comment Share on other sites More sharing options...
SharraShimada Posted September 2, 2019 Share Posted September 2, 2019 Does it just enable all mods, or can it keep disabled mods disabled if i want ot have it on storage, but currently not active? Link to comment Share on other sites More sharing options...
Mlie Posted September 2, 2019 Author Share Posted September 2, 2019 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 More sharing options...
SharraShimada Posted September 3, 2019 Share Posted September 3, 2019 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 More sharing options...
Mlie Posted September 3, 2019 Author Share Posted September 3, 2019 Excellent idéa @SharraShimada, I have updated the script to only enable mods that has crash_count other than 0. This should now only enable mods that were enabled when the game crashed, thanks for the input! Link to comment Share on other sites More sharing options...
Jimmy_ONI Posted September 5, 2019 Share Posted September 5, 2019 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 ). Link to comment Share on other sites More sharing options...
Ashotep Posted September 6, 2019 Share Posted September 6, 2019 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 More sharing options...
Recommended Posts
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.