Changes

Jump to navigation Jump to search
52 bytes added ,  23:05, 9 October 2018
Line 4: Line 4:     
= Setup =
 
= Setup =
 +
== Project setup ==
 
To create your own mod start a .NET Class Library project in Visual Studio, targeted at the .NET 3.5 profile.  
 
To create your own mod start a .NET Class Library project in Visual Studio, targeted at the .NET 3.5 profile.  
 
Add a reference to the following libraries:
 
Add a reference to the following libraries:
Line 15: Line 16:  
Start by creating a class that implements the ModMeta abstract class, then implement as many classes that inherit from ModBehaviour as you want. Each ModBehaviour implementation will be instantiated once the mod is loaded.
 
Start by creating a class that implements the ModMeta abstract class, then implement as many classes that inherit from ModBehaviour as you want. Each ModBehaviour implementation will be instantiated once the mod is loaded.
    +
== Compile ==
 
When you're done, you can either compile your mod and place it in the game's folder, in a subfolder called "DLLMods", or create a new subfolder in the "DLLMods" folder and put your .cs files in that subfolder, and the game will compile them for you. Note that if you let the game compile the C# files for you, you are limited to C# version 3, but using the game's compiler is required, if you want to upload the mod to the Steam Workshop.
 
When you're done, you can either compile your mod and place it in the game's folder, in a subfolder called "DLLMods", or create a new subfolder in the "DLLMods" folder and put your .cs files in that subfolder, and the game will compile them for you. Note that if you let the game compile the C# files for you, you are limited to C# version 3, but using the game's compiler is required, if you want to upload the mod to the Steam Workshop.
    +
== Example mod ==
 
Here's an example of a mod that let's you change how many floors you can build on, complete with comments:
 
Here's an example of a mod that let's you change how many floors you can build on, complete with comments:
 
[http://swinc.net/FloorMod.zip Floor Mod] (Updated to work with Alpha 10.7+)
 
[http://swinc.net/FloorMod.zip Floor Mod] (Updated to work with Alpha 10.7+)

Navigation menu