Coder Social home page Coder Social logo

oni-modloader's Introduction

ONI-Modloader

A mod loader for Oxygen Not Included based in Harmony

Community mods for ONI-Modloader and Community Hub

Example mods for ONI-Modloader

Forums in Klei

Disclaimers

  • Please DON'T REPORT BUGS you encounter to Klei while mods are active.
  • BE AWARE that many of the mods are still a WIP and may fail. If you are having problems use a clean ONI installation and try to test the mods one by one to narrow the error. Then post a issue in github.
  • We do not take any responsibility for broken saves or any other damage. Use this software at your own risk.
  • If you load a savegame, it requires that you have exactly the same mods when you saved it.

This project uses source code of and is based on:

NOTE: Compiled for SU-290532

Report Bugs for ONI-Modloader here: https://github.com/javisar/ONI-Modloader/issues

Quick Start

  1. Download the Latest Version
  2. Copy ModLoader.dll to ONI Managed "\OxygenNotIncluded\OxygenNotIncluded_Data\Managed" folder.
  3. Move your mods to "\OxygenNotIncluded\Mods" folder

How it works

The MODLOADER loads C# Harmony Patcher and also all Harmony Based mods in /Mods/ path. The INJECTOR changes some files in the game in order to call the MODLOADER every time you start the game.

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.

Harmony Based Mods

Are listed at the Community Hub

Installation

  1. Prerequisites:
    • Make SURE you're using the latest version from Github main branch.
    • Make SURE you're using a fresh install of ONI. Check Verify Integrity Files function in Steam in the ONI game Properties>LocalFiles tab.
    • Make sure you deleted all previous modloader file in:
      • \OxygenNotIncluded\OxygenNotIncluded_Data\Managed\
    • Note: You'll need to re-run the injector EVERY time ONI is updated from Klei.
  2. Click "Clone or Download" and "Download ZIP" for the current version as the releases may not be up to date.
  3. Copy the contents of the "Managed" folder to the folder ():
    • \OxygenNotIncluded\OxygenNotIncluded_Data\Managed\
  4. Execute 'Injector.exe'.
    • Check for errors in the console output.
    • 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.
  5. You should now find a folder called "Mods" in your ONI main directory. Otherwise, create "Mods" folder in the ONI main directory.
    • \OxygenNotIncluded\Mods\
  6. Check for error logs in:
    • \OxygenNotIncluded\OxygenNotIncluded_Data\Managed\Mod_Log.txt

Uninstallation

Remove ModLoader.dll from \OxygenNotIncluded\OxygenNotIncluded_Data\Managed\ folder.

Just rename 'Assembly-CSharp.dll.orig' to 'Assembly-CSharp.dll'and 'Assembly-CSharp-firstpass.dll.orig' to 'Assembly-CSharp-firstpass.dll'

Requirements

  • .NET Framework v3.5
  • Harmony Patcher v1.2.0.1
  • Visual Studio 2015

Creating a Mod

  1. Feel free to mess with any of the mods from https://github.com/javisar/ONI-Modloader-Mods
  2. 'Clone or download' the project from the mod repo.
  3. Copy the following files from ONI Managed folder '\OxygenNotIncluded\OxygenNotIncluded_Data\Managed' to the mod solution folder '\Source\lib'
    • UnityEngine.dll
    • UnityEngine.CoreModule.dll
    • Any needed unity UnityEngine.*.dll
    • Any needed ONI Assembly-CSharp-*.dll
  4. Open the solution with Visual Studio.
  5. Create a new class project.
    • To create a Project from scratch the right one is: Visual C#-Class Library (.NET Framework).
    • If you don't find it like when you have installed Visual Studio with Unity you need to tools-add tools or features and install: .NET Desktop Development.
    • It's available a Visual Studio Project Template
  6. Add the previous libs as references of the project.
  7. Compile it to generate the mod dll file.
  8. Check the tutorials at the end of the page.
    • Harmony is a code injector which will help you to inject your .dll with the help of the modloader.
  9. If you want to go into the ONI code you need to peek with a decompiler like JetBrains dotPeek or ILSpy.
  10. If you need more help please ask at The Discord Server in the Mod channel

Note: Dlls will be recognized by the mod loader if they reside in the main mod directory and subfolders.

Tutorials

Downloads

Choose 'Clone or Download'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.