Development environment setup
In order to get started with Puck development, you will need to set up some sort of development environment on your host system. This document will guide you through setting up a mod development environment in Visual Studio Code, though most steps will also apply to other IDEs.
Prerequisites
Environment
Create a new folder anywhere on your system which will contain our project files. For the sake of this example, we'll create a folder called
MyPuckModon the desktop. The absolute path should look as follows:C:\Users\user\Desktop\MyPuckMod.Launch Visual Studio Code and open the
MyPuckModfolder within it.
Launch a new terminal window within Visual Studio Code.


Validate your .NET installation by executing a
dotnetcommand.
Execute a
dotnet new classlibcommand in order to set up a new .NET project. Since we're creating a Class Library (.dll), we use theclasslibtemplate.
Validate if all project files were generated within your project's directory.

Open the
MyPuckMod.csprojfile and remove theImplicitUsingsandNullabletags, since those features are not available in .NET 4.8. Speaking of .NET 4.8, replace the contents ofTargetFrameworktonet4.8, since we'll be targeting that particular .NET Framework version. YourMyPuckMod.csprojshould looks as follows:<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net4.8</TargetFramework> </PropertyGroup> </Project>Since we'll be targeting .NET 4.8, features like file-scoped namespaces will also be unavailable, so let's adjust the
Class1.csfile to the following:namespace MyPuckMod { public class Class1 { } }Execute the
dotnet buildcommand in the terminal in order to build our project.
Validate the generated .dll of your mod in
bin/Debug/net4.8
We're set up!
Awesome! This .dll is essentially our mod, though it does not do anything useful just yet. Not does it interact with the Puck in any way. We'll cover how to do so in the following steps, so stay tuned!
Last updated

