Skip to content

Setting up your development environment

redseiko edited this page Feb 12, 2025 · 5 revisions

Before you can start developing mods you must set up a development environment. This is common practice for all types of development.

Development Environment Checklist

  • Create a rip of the Valheim unity project.
  • Publicize your Valheim assemblies.
    • Follow this guide. This video is slightly outdated.
    • You must also publicize SoftReferences.dll.
  • Choose an IDE.
    • Visual Studio
    • Rider
  • Choose a Valheim modding template.
  • Set up your template as a template project in your IDE.
  • Download dnSpy to decompile Valheim codebase to review classes.

Detailed explanations

Valheim Unity Rip

Valheim uses the Unity Game Engine and games built in this engine use UnityEditor to much of the asset creation work. When you create a "rip" of the Valheim Unity project you are setting up a UnityEditor project with all the Valheim game files. This allows you to browse and better understand the game files and even make edits to them.

Publicize Valheim assemblies

Assemblies is where all the code for the game is stored. You will need to reference the game code in your mod and therefore you must make the game assemblies 'public', i.e. publicize them. Once you do this you will be able to reference vanilla code in your code project.

Choose an IDE

IDE stands for integrated-development-environment. It is a software application that is used by software developers to write code and build software. The common IDEs used by the Valheim modding community include Visual Studio Community and JetBrains Rider.

Choose a Valheim modding template.

There are many things others have already built that making building mods easier. You should use these templates and make a single folder inside them that you work out of. Name the folder "Source" or "Src".

Download dnSpy

dnSpy is a decompiler that allows you to browse the Valheim code base. You need to do this in order to learn what functions and variables are available for you to use in the game.

Clone this wiki locally