-
Notifications
You must be signed in to change notification settings - Fork 0
Creating Your First Mod
Spiral edited this page Aug 19, 2026
·
1 revision
- See Creating a New Mod to get started
- When the code editor opens, you'll be greeted by your mod, which will only contain one file. This is the main file of your project and is where your mod connects to GoblinManager.
- See Using The Code Editor to learn about how to use the code editor.
- Also see Using GoblinManager to learn about Goblin Manager in your mod
- The main file with have the following logic.
-
[BepInDependency("GoblinManager", BepInDependency.DependencyFlags.HardDependency)]This requires that Goblin Manager be installed for the plugin to run -
[BepInPlugin("gmm.Test", "Test", "1.0.0")]This is the information of your Mod. It is used in the Goblin Manager UI. It also allows other mods to reference your mod via the GUID (the 1st argument). For example, the line above uses the GUID of Goblin Manager, "GoblinManager," to place a dependency on it. -
[ModDescription("This is the test mod")]Description of your mod used in Goblin Manager UI -
public class Test : ModEstablishes your main mod file's class, which inherits the Mod class from Goblin Manager -
public override void OnModLoaded(AssetBundle bundle)This method is executed on mod loaded. It is useful for checking if your mod was successfully loaded.
Full Snippet
[BepInDependency("GoblinManager", BepInDependency.DependencyFlags.HardDependency)]
[BepInPlugin("gmm.Test", "Test", "1.0.0")]
[ModDescription("This is the test mod")]
public class Test : Mod
{
public override void OnModLoaded(AssetBundle bundle)
{
Debug.Log("Test Loaded");
}
private void Awake()
{
Harmony.CreateAndPatchAll(typeof(Test));
}
}