For developers of mods
These instructions are from pre-Gloomrot and are being revamped for the new patch
Resources
- Wetstone - library with some common functions that allows for reloading of mods.
- Project Template by @adainrivers
- VRising Database
How to make a VRising Mod
- Install BepInEx IL2CPP x64 version from this page (either into VRising or VRising_Server, depending on what you wanna mod): https://builds.bepinex.dev/projects/bepinex_be
- Run the game, it should create unhollowed dll’s under this folder: {steamfolder}\steamapps\common\VRising\BepInEx\unhollowed
- Follow to the tutorial: https://docs.bepinex.dev/articles/dev_guide/plugin_tutorial/index.html Please note that you need to use the il2cpp template, use the following commands:
dotnet new -i BepInEx.Templates --nuget-source https://nuget.bepinex.dev/v3/index.json dotnet new bep6plugin_il2cpp -n VRising.TestPlugin2
- Your csproj file should look like this, change to your steam library path, if you are working on a server mod then add \VRising_Server to the end (I know it’s a lot, just simplifies things):
https://gist.github.com/adainrivers/8f9430a9c131f8bf1fce7dbe814baf9a
-
To get decompiled method dumps etc: Download the Cpp2IL-2022.0.5-Windows.exe from https://github.com/SamboyCoding/Cpp2IL/releases/tag/2022.0.5 into an empty folder, then open a command prompt / powershell / etc. in that folder and run this command Cpp2IL-2022.0.5-Windows.exe –analysis-level=4 –game-path=”{PATH\TO\YOUR\GAME\FOLDER}” –exe-name=”Vrising” –analyze-all –parallel don’t folder to change {PATH\TO\YOUR\GAME\FOLDER} with full path of your game folder.
-
Sample project from Night https://github.com/matt-harp/PopupTotals
-
To debug your plugin using Visual Studio:
- Install Visual Studio Tools for Unity using Visual Studio Installer. You can find the component behind Individual components tab.
- Edit doorstop_config.ini (either in VRising or VRising_Server folder, depending on what you are modding) and change debugEnabled to true.
- Launch the game (or server) with the plugin.
- In Visual Studio goto Debug / Attach Unity Debugger, click to Input IP, enter 127.0.0.1:10000
Credit @adainrivers for original instructions.