-
Notifications
You must be signed in to change notification settings - Fork 81
Beginners Guide to Modding
Before starting to create mods it is recommended to have previous experience in programming.
Download Visual Studio Here! You will want Visual Studio Community 2019 / 2022. It's free.
When installing select the option of Desktop Development in .NET (or similar, if you have questions, ask on the discord)
Create a new project with the template of Class Library:
and the Target Framework of .NET Standard 2.1:
Right click on References and select Add Reference...
In the new window select Browse... (bottom right)
Navigate to the game folder in which the dll of the game are located:
...\Steam\steamapps\common\Colony Survival\colonyserver_Data\Managed
Add the following DLL:
- Assembly-CSharp.dll
- UnityEngine.dll
Note: Depending on what your mod makes you need more dll files, VS will tell you when you need to add more.
Type your code (other tutorial) and compile
The result of this step is a .dll file
In order to your mod to detect your dll file you need to modify the modInfo.json of your mod and indicate the location of your dll with the dllpath key.
For Example:
[
{
"name": "TunnelDigger",
"version": "0.1.0.5",
"description" : "New type of digger.",
"enableddefault" : true,
"dllpath": "TunnelDigger.dll",
"compatibleversions":
[
"0.9.0"
]
}
]