First minimal NML mod
First minimal NML mod
Section titled “First minimal NML mod”Make NeoModLoader load one tiny mod and print one unmistakable line to Player.log.
Do not add UI, Harmony patches, save data or game logic yet. First prove the skeleton loads.
Where the two files go
Section titled “Where the two files go”Keep mod.json and Main.cs together inside one mod folder — the same kind of folder NML uses for other installed mods. This project has not yet WBML-verified one universal NML install path across setups, so this page intentionally does not invent a Windows path. If you already have a working NML mod, its location is the safest local reference until the NML lifecycle/setup suite is documented.
MyFirstMod/├── mod.json└── Main.cs1. mod.json
Section titled “1. mod.json”Use the Starter Mod Generator if you do not want to write the manifest by hand.
A minimal shape used by the working generator is:
{ "name": "My First Mod", "GUID": "YourName.MyFirstMod", "author": "YourName", "version": "0.1.0", "description": "My First Mod", "targetGameBuild": 719, "Dependencies": [], "OptionalDependencies": [], "IncompatibleWith": []}Choose the GUID once and keep it stable after release.
2. Main.cs
Section titled “2. Main.cs”using NeoModLoader.api;
namespace YourName.MyFirstMod{ public class Main : BasicMod<Main> { protected override void OnModLoad() { LogInfo("[My First Mod] Loaded"); } }}3. Run the game and check Player.log
Section titled “3. Run the game and check Player.log”You are done when the log contains your exact marker:
[My First Mod] LoadedIf the line never appears, do not debug gameplay code yet. The problem is still in loading/compilation/manifest setup.
Open the Player.log Analyzer or the C# compile error guide.
Next step
Section titled “Next step”Add one feature from the Recipe Library. Keep the working load marker until the mod has become stable.