trevice 13 Posted March 1 (edited) ONI-Modloader A modloader for Oxygen Not Included based in Harmony. It allows to load mods contained in independent dll files. Please refer to the following github Readme for updated information and instructions: https://github.com/javisar/ONI-Modloader/ This project uses source code of and is based on: https://github.com/zeobviouslyfakeacc/ModLoaderInstaller https://github.com/spaar/besiege-modloader https://github.com/pardeike/Harmony https://forums.kleientertainment.com/topic/81296-mod159-materialcolor-onionpatcher/ Contributors: TheRealKillface, trevice Projects ModLoader: The modloader itself. Injector: It injects the call to the modloader in 'Assembly-CSharp.dll' OnionHook: Just a helper to generate IL code for the Injector. Mod Examples AlternateOrdersMod: The Fabricators and Refineries will alternate between infinity orders. CameraControllerMod: Enable further zoom-outs in play and dev mode (taken from Onion patcher). FastModeMod: Duplicants will build an dig very fast ImprovedGasColourMod: Replaces the oxygen overly with gas colors. Also visualizes the density (taken from Onion patcher, modified). InsulatedDoorsMod: Doors can be constructed using any buildable element (ie: Abyssalite). Also it adds a new element (WIP) called Insulated Pressure Door. MaterialColor: Adds an overlay option to visualize what a building is made of (taken from Onion patcher). PressureDoorMod: Removes the energy need for the mechanized pressure door and makes it buildable from all material. SensorsMod: It modifies some ranges y automation sensors (taken from Onion patcher). StorageLockerMod: Storage lockers won't need a foundation to be built SpeedControlMod: Overwrites the method SpeedControlScreen.OnChange. Fast Speed set to behave like Ultra Speed in debug mode. Installation Make sure you're using a fresh install of ONI, meaning you'll need the original/unpatched Assembyl-CSharp.dll and Assembly-CSharp-firstpass.dll as it comes with a clean install. Note: You'll need to re-run the injector every time ONI gets updated. Click "Clone or Download" for the current version as the releases are currently not up to date. Copy the contents of the "Managed" folder to: ...\OxygenNotIncluded_Data\Managed\ Execute 'Injector.exe'. It will create a backups of 'Assembly-CSharp.dll' and Assembly-CSharp-firstpass.dll with the extension ".orig" and a new patched set of dlls. You should now find a folder called "Mods" in your ONI main directory. Otherwise, copy the extracted "Mods" folder. Move or copy all the mods you'd like to use from the extracted "Mods" folder to the newly created "Mods" in the ONI main directory Also move to this folder all the mods you want to run. Run the game and check ../OxygenNotIncluded_Data/output_log.txt for any errors. Please don't report bugs you encounter while mods are active. People at Klei work hard and shouldn't be bothered with bug reports which might originate from mods. Alternative Installation Download last version in Release section. Unzip into the ONI main directory. Execute 'Injector.exe' (only if you have the unpatched dlls ) Remove all unwanted mods from "Mods" folder. Uninstallation Just rename 'Assembly-CSharp.dll.orig' to 'Assembly-CSharp.dll' and 'Assembly-CSharp-firstpass.dll.orig' to 'Assembly-CSharp-firstpass.dll'. Creating a Mod Requeriments: .NET Framework 3.5 Harmony Patcher Mono.Cecil Visual Studio 2015 Copy the following files from a Previously Patched ONI folder to the solution folder '\Modloader\lib\': Assembly-CSharp.dll Assembly-CSharp-firstpass.dll Assembly-UnityScript-firstpass.dll UnityEngine.dll UnityEngine.UI.dll Open the solution with Visual Studio. Create a new mod or modify any of the examples. ILSpy can help you to find what methods/properties you want to mod. Compile it to generate the mod dll file. Downloads All downloads Tutorials https://github.com/pardeike/Harmony/wiki/ https://github.com/roxxploxx/RimWorldModGuide/wiki/SHORTTUTORIAL:-Harmony https://github.com/UnlimitedHugs/RimworldHugsLib/wiki/Introduction-to-Patching https://github.com/UnlimitedHugs/RimworldHugsLib/wiki/Detouring Disclaimer We do not take any responsibility for broken saves or any other damage. Use this software at your own risk. Edited March 27 by trevice Updated info 5 3 Share this post Link to post Share on other sites
The Plum Gate 274 Posted March 1 Yes, maybe a better explanation and examples? Share this post Link to post Share on other sites
trevice 13 Posted March 8 There you have some more information and examples. 1 Share this post Link to post Share on other sites
trevice 13 Posted March 21 Added a new example Insulated Doors Mod 1 Share this post Link to post Share on other sites
TheRealKillface 8 Posted March 26 Sent a pull request with some refinements and the basic addition of the MaterialColor mod by Etiam. Those changes are NOT included in the 0.2 release. Until further notice by trevice, get the latest additions here https://github.com/Killface1980/ONI-Modloader * PressureDoorMod: Removes the energy need for the mechanized pressure door and makes it buildable from all material. * StorageLockerMod: Storage lockers won't need a foundation to be built. 1 Share this post Link to post Share on other sites
Repseki 6 Posted March 27 I feel like I'm missing something, which is completely possible, but I can't seem to locate "injector.exe" in the master branch at all. Just makes trying to install things a little more confusing for anyone not at least a little familiar with github. Share this post Link to post Share on other sites
trevice 13 Posted March 27 I've merged the changes from TheRealKillface (nice work!) and updated the Readme file. Also I made a release that may be easier to install (with the Alternative Installation) for those who want to try it. Hope it helps. 1 Share this post Link to post Share on other sites
Gaons 3 Posted March 28 so, i was using TheRealKillFace release and it was causing my dups to not breathe. since i changed to trevice v0.3 the problem was solved btw, nice work! now the game seens a lot more colorful and enjoyable =) 1 Share this post Link to post Share on other sites
trevice 13 Posted March 28 7 hours ago, Gaons said: so, i was using TheRealKillFace release and it was causing my dups to not breathe. since i changed to trevice v0.3 the problem was solved btw, nice work! now the game seens a lot more colorful and enjoyable =) Actually, the not breathing effect was a mod I was playing with, but it wasn't quite working. Share this post Link to post Share on other sites
Gaons 3 Posted March 28 Trevice, if its not your concern i ask for your apologies, but the rock granulator and its upgraded form are not working properly after the v0.3. they require no input, but also doesnt come any output. and when i turn them off and try to turn on, my dupes get bugged performing the work and dont move anymore. Share this post Link to post Share on other sites
djn16 1 Posted March 29 (edited) Remove AlternateOrdersMod.dll, ur rock granulator will work Edited March 29 by djn16 Share this post Link to post Share on other sites
eggsvbacon 25 Posted March 29 (edited) Hey there, having a bit of a problem. Making a pneumatic door out of material other than the standard ones and directing a dupe to lock it in horizontal mode causes a error in which the hud says "Error Occured, please restart game." and all dupe activity loops. This doesn't happen when the InsulatedDoors mod is removed on the latest game version. I really want to use the mod though, any idea what's going wrong? Edit: This just repeats over and over in the output log: NullReferenceException: Object reference not set to an instance of an object at Worker.Work () <0x00145> at GameStateMachine`4/State/<ToggleWork>c__AnonStorey31<WorkChore`1/States<Door>, WorkChore`1/StatesInstance<Door>, WorkChore`1<Door>, object>.<>m__1 (WorkChore`1/StatesInstance<Door>,single) <0x000c6> at BucketUpdater`1<WorkChore`1/StatesInstance<Door>>.Update (WorkChore`1/StatesInstance<Door>,single) <0x00064> at UpdateBucketWithUpdater`1<WorkChore`1/StatesInstance<Door>>.Update (single) <0x00197> at StateMachineUpdater/BucketGroup.AdvanceOneSubTick (single) <0x000b9> at StateMachineUpdater.AdvanceOneSimSubTick () <0x000bb> at Game.SimEveryTick (single) <0x00111> at (wrapper dynamic-method) Game.Update_Patch2 (object) <0x00479> Edited March 29 by eggsvbacon Share this post Link to post Share on other sites
Gaons 3 Posted March 29 10 hours ago, djn16 said: Remove AlternateOrdersMod.dll, ur rock granulator will work i see, did it and works fine now. ty! Share this post Link to post Share on other sites
trevice 13 Posted March 30 On 29/3/2018 at 1:00 AM, Gaons said: Trevice, if its not your concern i ask for your apologies, but the rock granulator and its upgraded form are not working properly after the v0.3. they require no input, but also doesnt come any output. and when i turn them off and try to turn on, my dupes get bugged performing the work and dont move anymore. On 29/3/2018 at 8:36 AM, eggsvbacon said: Hey there, having a bit of a problem. Making a pneumatic door out of material other than the standard ones and directing a dupe to lock it in horizontal mode causes a error in which the hud says "Error Occured, please restart game." and all dupe activity loops. This doesn't happen when the InsulatedDoors mod is removed on the latest game version. I really want to use the mod though, any idea what's going wrong? Edit: This just repeats over and over in the output log: NullReferenceException: Object reference not set to an instance of an object at Worker.Work () <0x00145> at GameStateMachine`4/State/<ToggleWork>c__AnonStorey31<WorkChore`1/States<Door>, WorkChore`1/StatesInstance<Door>, WorkChore`1<Door>, object>.<>m__1 (WorkChore`1/StatesInstance<Door>,single) <0x000c6> at BucketUpdater`1<WorkChore`1/StatesInstance<Door>>.Update (WorkChore`1/StatesInstance<Door>,single) <0x00064> at UpdateBucketWithUpdater`1<WorkChore`1/StatesInstance<Door>>.Update (single) <0x00197> at StateMachineUpdater/BucketGroup.AdvanceOneSubTick (single) <0x000b9> at StateMachineUpdater.AdvanceOneSimSubTick () <0x000bb> at Game.SimEveryTick (single) <0x00111> at (wrapper dynamic-method) Game.Update_Patch2 (object) <0x00479> New version available. Fixed (momentarily) AlternateOrdersMod. It's being a pain in the ass to make it work. Disabled InsulatedDoorsMod from the release. It's not working at all. Be aware that many of the mods are only examples and can fail in many ways. 1 Share this post Link to post Share on other sites
Pan_opticon 1 Posted March 30 Would it be possible to make a patch which will force a game to use uncompressed saves as in the older versions? Share this post Link to post Share on other sites
Gaons 3 Posted March 31 12 hours ago, trevice said: New version available. Fixed (momentarily) AlternateOrdersMod. It's being a pain in the ass to make it work. Disabled InsulatedDoorsMod from the release. It's not working at all. Be aware that many of the mods are only examples and can fail in many ways. ty!!! Share this post Link to post Share on other sites
MidnightSteam 66 Posted April 4 On 3/30/2018 at 2:27 PM, Pan_opticon said: Would it be possible to make a patch which will force a game to use uncompressed saves as in the older versions? Yes it would be possible. Share this post Link to post Share on other sites
Pan_opticon 1 Posted April 4 2 hours ago, MidnightSteam said: Yes it would be possible. Can someone do this, please? I've tried, but unsurprisingly got no luck. Share this post Link to post Share on other sites
MidnightSteam 66 Posted April 4 6 hours ago, Pan_opticon said: Can someone do this, please? I've tried, but unsurprisingly got no luck. I would like to know why you want to do this. If it interests me then I might look into it. No promises. If your goal is to edit the Stats of the Duplicants, then try out my MaxAttribute mod where your Duplicants run faster than The Flash, build faster than The Flash, pee faster than The Flash, etc... Here's the link to my fork - GitHub fork Share this post Link to post Share on other sites
Gaons 3 Posted April 4 2 hours ago, MidnightSteam said: I would like to know why you want to do this. If it interests me then I might look into it. No promises. If your goal is to edit the Stats of the Duplicants, then try out my MaxAttribute mod where your Duplicants run faster than The Flash, build faster than The Flash, pee faster than The Flash, etc... Here's the link to my fork - GitHub fork i downloaded v0.3.1 from your releases and i found some foulder named modloader. what i do with it? trevice release was just copy and paste, but yours come with some other things that i dont know where to put to work fine. Share this post Link to post Share on other sites
MidnightSteam 66 Posted April 4 @Gaons Do what you normally do with ModLoader but get the DLL in my folders and move them into your Mod folder(C:\Program Files (x86)\Steam\steamapps\common\OxygenNotIncluded\Mods) Share this post Link to post Share on other sites
Gaons 3 Posted April 4 10 minutes ago, MidnightSteam said: @Gaons Do what you normally do with ModLoader but get the DLL in my folders and move them into your Mod folder(C:\Program Files (x86)\Steam\steamapps\common\OxygenNotIncluded\Mods) and where exactly is .dll for maxattribute? cant seen to find. i see at ur github but when i download, doesnt come with Share this post Link to post Share on other sites
MidnightSteam 66 Posted April 4 (edited) @Gaons https://github.com/Midnight-Steam/ONI-Modloader/tree/master/ModLoader/MaxAttributes/MaxAttributes/bin/Release Oh I see, I gotta move them over to the Mods folder. I'll get on it. Edited April 4 by MidnightSteam Share this post Link to post Share on other sites
Gaons 3 Posted April 4 @MidnightSteam i'm new to github and didnt know how to download directly these files, just by releases. sorry for the inconvenience, my fault. and ty for the patience Share this post Link to post Share on other sites
MidnightSteam 66 Posted April 4 6 minutes ago, Gaons said: i'm new to github @Gaons You and me. Now they are all in the Mods folder. Thanks for the heads up. 1 Share this post Link to post Share on other sites