Getting started
So, you want to develop a mod for TUNG! That's awesome! Fortunately, with PiTUNG it's very easy to create a simple mod.
Setting up the environment
First, you must create a Visual Studio project. Once it's loaded, go to its properties and set the target framework version to .NET 3.5
. Alternatively, you can download the mod template and place it in %HOMEPATH%\Documents\Visual Studio 2017\Templates\ProjectTemplates
. There will now be an entry in the "Create Project" dialog that will automatically set up a PiTUNG mod project for you!
Then, you will need a PiTUNG binary. There are three ways of getting ahold of one:
Downloading the latest stable release
Go to the latest release in GitHub and download the PiTUNG.dll
file.
Downloading the latest unstable release
This is the version compiled from the latest commit to the GitHub repo, so it will probably be unstable and should only be used when you want to test out some new features, but never in production.
To get it, simply download the artifact from AppVeyor.
Compiling from source
//TODO
Now that you've got a PiTUNG binary:
- Download a copy of TUNG either here or here and extract it to a folder.
- Install PiTUNG as you normally would.
- Go to
{install folder}\The Ultimate Nerd Game_Data\Managed
and copy theAssembly-CSharp.dll
file to wherever you want, take note of its location. - Add
PiTung.dll
andAssembly-CSharp.dll
to your project's references. Create a new file called
MyMod.cs
and replace its content with this code:using PiTung; using System; public class MyMod : Mod { public override string Name => "Example mod"; public override string PackageName => "me.myname.ExampleMod"; public override string Author => "john_doe"; public override Version ModVersion => new Version("0.1"); }
Compile it and copy the output DLL file to
{TUNG installation}/mods
.- Congratulations, now you've got a mod that does absolutely nothing!
You can now take a look at the API documentation for more information about the API.