Build your first mod
More actions

This beginner guide takes about 10–15 minutes. You need a text editor. You do not need prior programming experience.
A mod package has one required information file, a Lua file for the instruction in this example, and an optional settings file:
mod.jsondescribes the mod, its version, and the capabilities it requests.src/mod.luacontains the Lua code.extended.mod.jsonis optional. It can define player-facing settings.
1. Make a folder for the mod
Open your Enshrouded game folder, then open its mods folder. Make a new folder called yourname.first-mod.
mods/yourname.first-mod/
├── mod.json
└── src/
└── mod.lua
2. Add mod.json
Create mod.json in the new folder. Change the ID, name, author, and description to match your mod.
{
"$schema": "https://shroudforge.net/schemas/1.8.0/manifest.schema.json",
"id": "yourname.first-mod",
"name": "My First Mod",
"version": "1.0.0",
"authors": ["Your name"],
"description": "Writes a message.",
"license": null,
"icon": null,
"capabilities": [],
"dependencies": []
}
The id should uniquely identify the package. The name is the display name. Leave version as 1.0.0 for this example. The empty capabilities and dependencies lists are enough for this example.
See mod.json for the fields and the canonical schema.
3. Add the Lua instruction
Inside the src folder, create mod.lua and add this line:
shroudforge.log.info("My first mod loaded")
This sends a message to the ShroudForge log.
4. Find the mod in the game
Start Enshrouded. Press F9 to open the Mods window. Your mod should appear in the list. Press F10 to open the messages and look for My first mod loaded.
If ShroudForge cannot find the mod, check that its folder is inside the game's mods folder. Downloaded mods can use different folder layouts, so follow their creator's instructions.
Next steps
Add player-facing switches or sliders with extended.mod.json. For Lua modding concepts, continue with Modding with Lua. Use the searchable Lua API reference for exact function documentation.