Table of Contents
Setup
Common
should have the following files:
└───Assembly-CSharp_unpacked
└───Assembly-CSharp_unpacked.csproj
└───mu3
├───mu3.exe
└───BepInEx
├───Assembly-CSharp-firstpass.dll
├───mscorlib.dll
├───UnityEngine.dll
└───UnityEngine.UI.dll
The unpacked assembly can be found here and unzipped with dotPeek/ILSpy.
The DLLs can be copied from mu3/mu3_data/Managed
.
mu3
can be symlinked/junctioned.
Once Common
is set up, run dotnet restore
in the root directory and in Assembly-CSharp_unpacked
, and open the solution in MSVS or VSCode or whatever. The DLLs will be copied to mu3/BepInEx/monomod
post-build automatically.
Best practices
- Everything must be independent from each other, but everything must also work in conjunction with each other and with the recommended mods from the old modpack.
- By convention, the bare
patch_
format is used unless it's not possible. - Put source files in namespace subdirs.
Troubleshooting
The type or namespace name could not be found
If you are getting a bunch of these errors, something may be wrong with your decompiled assembly, or my setup is wrong. Someone knowledgeable with dotnet could perhaps explain it (I'm just a tourist). A potential workaround is to add the unpacked assembly DLL to Common
and reference it in project files:
<Reference Include="Mu3Assembly"><HintPath>..\Common\Assembly-CSharp_unpacked.dll</HintPath></Reference>