Mod Development Introduction ‐ Simple Patching - HasteModding/HasteModding GitHub Wiki

[!WARNING] This section is heavily under development. You will mostly find notes for things we should expand on.

If you have more questions, check the #haste-mod-development-chat channel on the official Haste Discord server.

[!NOTE] This is an article for developers for writing code and patching the game, but you may not need to do that depending on what you are trying to accomplish. Check the "Use cases" section on the sidebar for prepackaged tutorials on how to do things.

  • Haste is made in Unity. Prior C# and Unity modding is required to mod Haste.
    • DLLs for any Unity game are always under (game root folder)/(game exe name)_Data/Managed
      • This contains Unity DLLs (Unity/UnityEngine.*.dll), C# Standard Library DLLs (System.*), other libraries used by the game, and the game's own code (Assembly-CSharp.dll)
      • For example, Haste's code is mostly inside (Haste's game folder)/Haste_Data/Managed/Assembly-CSharp.dll
    • Use tools like IlSpy or DnSpyEx to inspect the game's DLLs.
      • C# compiles to IL, or "Intermediate Language", which is a sort of high-level assembly-like language. These tools allow you to see both the IL code, and a C# decompilation.
  • Mods are installed via Steam Workshop items, even during development. The game has a menu to overwrite the DLLs loaded by Workshop items, so you can add your own in-development DLLs for testing. See Create and Setup a Workshop Item for Your Mod.
  • Haste provides bindings for MonoMod out of the box
    • Specifically, the game does Hook Generation. See our template for a simple patching example using those.
    • Other hooking libraries, like HarmonyX, can be used with dependencies on other Workshop Items. Our template's .steam.props can be configured to reference HarmonyX in your code.