-
Notifications
You must be signed in to change notification settings - Fork 137
LEGACY General Vortex Harmony Mod Loader
Vortex’s mod loader has been developed to be easily extensible and hopefully cover most if not all modding/patching patterns that can be applied to C# written games/projects. Given that several patterns have already been established for older games, the mod loader has a set of defined Mod Types which it uses to identify and apply the correct pattern when injecting the mods into the game. We do expect to have to constantly improve this functionality as new use cases appear.
The mod loader functionality is executed by the game itself at runtime once the previously injected VortexPatcher::Patch()
method is called by the game.
As seen in the image above, the patcher method has been inserted inside the game’s GameManager::Awake()
method. (The RunUnityPatcher()
function is part of Vortex’s In-Game UI library which is added to Unity3D games)
Once the game invokes the VortexPatcher.Patch() method, the mod loader, will query the VortexMods directory and start loading the mods which pass the identification/validation stage.
The mod loader uses the mod’s manifest file to retrieve the mod’s entry-point which it will attempt to invoke as defined for the mod’s type; for the entry-point to be invoked correctly, the method **must **be statically declared for obvious reasons. It is the mod author’s responsibility to implement his own Harmony patches and/or use Cecil/Reflection code inside his mod’s assembly to add to/change the game’s functionality.
By default the Vortex Mod Type passes a “VortexMod” object to the mod’s entry point method which can be used to access mod specific data, several utility functions and assign functions to delegates; most importantly, the VortexMod object offers access to logger methods which can be used to log errors and information throughout the mod’s execution. All logging messages are saved inside Vortex’s appdata folder C:\Users\{YOUR_USERNAME}\AppData\Roaming\Vortex\harmony.log
please note that mods are currently loaded in alphabetical order, this is something we aim to enhance in the near future so that mod users could organize their load order from inside Vortex.
Different mod managers have defined their own modding pattern for each game they manage. Mod identification/validation refers to the process that the Vortex Mod Loader goes through when trying to identify how it is expected to store and use a mod’s data, and how to correctly invoke the mod’s entry point method. Thankfully the underlying data/modding pattern is nearly identical for all Unity3D games and by extension - nearly identical for all Unity3D specific mod managers; Vortex separates the outstanding functionalities using “Exposed Mod Type Classes”.
This wiki and the Vortex Readme document contains a lot of information, please take your time and read these instructions carefully.
We provide detailed changes for each Vortex release.
If you have any questions about Vortex usage or want to share some information with the Vortex community, please go to one of the following places:
- About
- Install
- Troubleshooting
- Troubleshooting
- Developers
- Troubleshooting
- Developers
- Valheim
- Bannerlord
- BepInEx
- How to test a game extension
- How to package a game extension
- How to upload an extension to Nexus
- How to submit a game extension for review
Warning
The below documentation has not been checked for quality since migrating to GitHub Wiki and the information contained is potentially out of date and\or repeated.
- Frequently Asked Questions
- Getting Started
- Deployment Methods
- Downloading from Nexus Mods
- Managing File Conflicts
- Managing your Load Order
- Managing Save Games
- Setting up Profiles
- Keyboard Shortcuts
- How to create mod installers
- External Changes
- The Vortex Approach to Load Order
- Moving Vortex to a new PC
- Modding Skyrim Special Edition with Vortex
- Modding Mount & Blade II: Bannerlord with Vortex
- Modding Monster Hunter: World with Vortex
- Modding The Witcher 3 with Vortex
- Modding Baldur's Gate 3 with Vortex
- Modding Stardew Valley with Vortex
- Modding Valheim with Vortex
- Error Messages
- Misconfigured Documents Folder
- .NET 6 Install Issues
- Downgrading Extensions
- Command Line Parameters
- Introduction to Vortex extensions
- Creating a game extension (JavaScript)
- Creating a theme
- Game detection
- Adding a main page
- Adding a load order page
- Building UI with Vortex and React
- Packaging an extension
- Introduction
- Packaging extensions
- Project management
- Harmony Patcher Exectuable
- Vortex Harmony Mod Loader
- Setting up your dev environment
- Creating a theme
- Creating a game extension