PartialityModReloader

⭐ — (10 endorsements) 📥 344 downloads 📌 v0.1.0 📅 4/15/2020
⚪ Last updated 2020

By Laymain · Utilities

⬇ Download Mod Source: Nexus Mods ↗ 📅 Updated: 4/15/2020 📅 Created: 4/15/2020

🔍 Analysis

  • 🏆 #7 of 17 Utilities mods in this game by downloads

📋 About This Mod

This Partiality mod enables hot reloading your mods while the game is running.

Why

Modding has an ungrateful die and retry part which consist on

  • []Compiling a mod

    []Loading mod with Partiality

    []Launching the game

    []Going to the point you need to test your mod (ie. loading save game, open inventory, ...)

    []Discovering that your mod is not working because of...

    []Exiting the game

    []Updating your code

    []Returning to step 1 crossing your fingers...

    How it works

    • [] The mod watches the Mods folder for any file change

      [] Each updated .dll file is analysed for reloadable methods

      [] New methods are injected at runtime by re-pointing method implementations

      How to install

      • [] Install PartialityLauncher to enable your game modding

        [] Because current Partiality version locks .dll files which prevent us to overwrite loaded mods,

        you have to download this patched Partiality.dll (from laymain/Partiality) and copy it into PartialityLauncher\bin folder.[] Copy the latest version of PartialityModReloader into your game Mods subfolder

        How to use

        • [] Mark your reloadable methods by using the following attribute

          [] Enable PartialityModeReloader and your mod using PartialityLauncher

          [] Your mod marked methods will be reloadable at runtime when you update your .dll file

          Remarks

          • [] This mod is heavily inspired by Andreas Pardeike's (creator of Harmony) RimWorld Reloader mod.

            [] Why the choice of using MethodImplAttribute and not a custom Attribute?

            [] re-pointing method implementations at runtime does not work for inlined methods

            [] it is a framework attribute so you don't have to reference this library in your project

            Limitations

            • [] Only non-generic methods can be patched at runtime for now (including getters and setters)

              [] This mod does not reload your mod, it only update method implementations which means that

              all initialization code and hooks will not be called again (such as OnEnable method).[] Loaded assembly cannot be unloaded so each reload will increase the memory usage,

              enable this mod only when your are developing your mod to avoid memory leaks. Only AppDomain can be unloaded but communication between AppDomains implies that classesare Serializable which leads to an unnecessary complexity that you don't want to mess with.[] . Net runtime will not reload an assembly with the same version, you must increment your mod

              version. The CSharp Compiler can generate for you a random revision number which will change the AssemblyVersion

              on each build by setting a wildcard for the fourth part of the version:

              // Version information for an assembly consists of the following four values:

              // Major Version

              // Minor Version

              // Build Number

              // Revision

              // You can specify all the values or you can default the Build and Revision Numbers

              // by using the '' as shown below:

              Example

              using System;

              using Partiality. Modloader;

              using System. Runtime. CompilerServices;

              using UnityEngine;

              namespace DummyMod

              public class Mod : PartialityMod

              public Mod()

              ModID = nameof(DummyMod);

              Version = typeof(Mod). Assembly. GetName(). Version. ToString();

              author = "Laymain";

              public override void OnEnable()

              base. OnEnable();

              On. MenuManager. ToggleMap += OnToggleMap;

📊 Mod Details

Game
Outward Mods
Author
Laymain
Version
0.1.0
Downloads
344
Endorsements
10
Category
Utilities
Created
4/15/2020
Updated
4/15/2020
Tags
Stay Home. Make Mods.

🔧 How to Install Outward Mods

Install via a mod manager (Vortex or Mod Organizer 2). Most mods drop into the game folder.

📖 Full step-by-step install guide for Outward →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Outward commands, item IDs, and more.

Keep browsing — more Outward mods await

📋 All Outward Mods 🏆 Top 25 📂 More Utilities 👤 More by Laymain 🔎 Similar Mods 🌐 Best Utilities (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods