- Valheim (obviously)
- Microsoft Visual Studio 2019 (Details)
- Unity (Details)
- BepInExPack Valheim. Already installed if you installed the mod.
- Bepinex Publicizer (Details)
- Make sure all the software above is installed (see the Details for tips).
- Run Valheim once.
- This will generate the publicized DLLs using Bepinex Publicizer. In your Valheim install folder, it should create
valehim_Data\Managed\publicized_assemblies
.
- This will generate the publicized DLLs using Bepinex Publicizer. In your Valheim install folder, it should create
- Open Visual Studio, and choose
Clone a Repository
, then enter this repo's checkout URL, e.g. https://github.com/brandonmousseau/vhvr-mod.git - Update the CommonDir to point to your Valheim install:
- In the Visual Studio Solution Explorer, browse to
vhvr-mod\ValheimVRMod
. - Right-click
ValheimVRMod.csproj
, and Open With -> Source Code (Text) Editor. - Find the following line and update the path to point to your Steam library folder containing Valheim:
<CommonDir>C:\Program Files (x86)\Steam\steamapps\common\</CommonDir>
- Save the file and close Visual Studio.
- In the Visual Studio Solution Explorer, browse to
- In Unity Hub, go to Projects -> Add.
- Navigate to wherever you checked the source out above, and choose the
Unity\ValheimVR
folder. - Click the newly added project to open it in Unity.
- Go to File -> Build Settings, then click Build.
- Navigate to the
vhvr-mod\Unity\build
folder inside your mod checkout. - Select the folder for the build. The Unity project's build output should appear in
vhvr-mod\Unity\build
. - Close Unity.
- Open Visual Studio, and choose "Open a project or solution"
- Navigate to the the mod source folder, then
ValheimVRMod\ValheimVRMod.sln
. - Make sure the release settings in the toolbar show: "Debug" and "Any CPU".
- Click Build -> Build Solution.
- The mod will be built and installed to your Valheim directory. Check for the presence of
BepInEx\plugins\ValheimVRMod.dll
- The mod will be built and installed to your Valheim directory. Check for the presence of
Note: this isn't meant to be comprehensive, and ideally you've installed and worked with other IDEs before. I find it useful to have some reminders though especially when I'm not in my default environement.
- Install Visual Studio 2019 Community Edition.
- During install, it will prompt to choose some Workloads. I chose
.NET desktop development
,Desktop development with C++
, andGame development with Unity
. You can also add any of these later by redownloading/rerunning the installer and choosing "Modify".
- You'll need a Unity ID. This requires email verification and so forth, so best to get it out of the way first.
- Download Unity Hub, and log in.
- Install Unity.2019.4.21. If clicking that doesn't work, go to the
Unity Archive, then choose the
Unity 2019.x
tab at the top, thenUnity.2019.4.21
and click theUnity Hub
button.
This is a easier-to-use take on Assembly Publicizer, but feel free to go that route if you're more comfortable with it. This has the advantage of re-publicizing the assemblies when Valheim is updated.
- Download the zip of the most recent release.
- Unzip into your Valheim install folder; it should create a folder
BepInEx\plugins\Bepinx-Publicizer
with a couple of DLLs in it.