-
Notifications
You must be signed in to change notification settings - Fork 9
Tutorial one: Creating your first mod.
Got setup and are ready and on fire to smash that keyboard like you've never done before?
We got good news for you, you don't have to.
We've made sure it's as easy as possible to create mods!
First you open your preferred IDE. (Notepad++ is NOT an IDE. It is a text editor.).
You create a new C# Class Library project since we want our output to be a .dll file.
Then you import UnityEngine.dll and Assembly-CSharp.dll.
When you got your first class in it should/could look like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestMod1
{
class I_Do_not_know_da_wae
{
}
}
It doesn't? Well then don't use Notepad++ for F*** sakes!
We have been so nice to create a MyMod class for you to setup a good template.
So you change your main class to this:
using SFSML;
using SFSML.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestMod1
{
[MyModEntryPoint] //This tells the modloader this is the class that implements MyMod and is your main class
class I_Do_not_know_da_wae : MyMod
{
public I_Do_not_know_da_wae() : base("{MOD NAME}","{MOD DESCRIPTION}","{MOD VERSION}")
{
//Only assign variables here. Doing mod related things might result in errors!
}
protected override void onLoad()
{
//Do shit here
ModLoader.mainConsole.log("Hello world", "My Cool Log Tag");
}
protected override void onUnload()
{
//Not in use at the moment. Will never be called. Don't worry
}
}
}
Now you compile your awesome mod.
You place it in %your game directory%/%sfs name% data/SFSML/mods/normal/
Restart the game and look how good your dev skills are!!
-> Tutorial two: Adding a config.
W W W EEEEE L PPPPP
W W W W E L P P
W W W W EEEEE L PPPPP
W W W W E L P
W W EEEEE LLLLL P
I'm not a modder, what can I do?
Good question, if you still want to help us you can do your best to track bugs in mods.
Or report spelling errors because I am a silly writer.
Or you can try to come up with good ideas that we could implement.
Or if you can't think of anything, you can spread our name.
Home Section
Welcome / Getting started with modding
What is SFS-ML?
Tutorial Section
Tutorial one: Creating your first mod.
Tutorial two: Adding a config.