The LiFx ServerAutoloader is the server-side mod framework for Life is Feudal: Your Own. It turns an unmoddable dedicated server into one that discovers and loads mods automatically, exposes lifecycle and gameplay hooks, and registers custom items and crafting recipes into the game database — so multiple mods from different authors can run side by side without editing game files.
- Automatic mod loading — drop a folder with a
mod.csintomods/and it loads on server start. - Hook system — 20+ callbacks covering server lifecycle, player connections, spawns, deaths/kills/suicides, Justice Hour, swimming, and a 5-second tick. Mods register callbacks instead of overwriting game functions.
- Database registration — declare custom object types and recipes in script; the framework writes them into
sql/dump.sqlwith duplicate protection and validation (including the 100% quality-influence rule). - Client data export — exports
objects_types,recipeandrecipe_requirementto XML for building client modpacks. - Mod transparency — players see the framework version and every loaded mod (with its version) when they spawn.
- Bundled utilities — Jettison JSON library, SHA-256 hashing, and gameplay features from ServerUtility (offline raid protection, online alignment gain, loot drops) configured via
AutoloadConfig.cs.
| Page | What it covers |
|---|---|
| Getting Started | Mod requirements, folder layout, load sequence, full mod template |
| Hooks Reference | Every callback hook, with parameters and timing |
| API Reference | All LiFx:: functions and globals |
| Objects & Recipes | Adding custom items and crafting recipes |
| Configuration | AutoloadConfig.cs settings |
| Data Export | DB → XML export for client modpacks |
| Jettison JSON | The bundled JSON library |
// mods/ExampleMod/mod.cs
if (!isObject(ExampleMod))
{
new ScriptObject(ExampleMod) {};
}
package ExampleMod
{
function ExampleMod::version(%this) { return "1.0.0"; }
function ExampleMod::setup(%this)
{
LiFx::registerCallback($LiFx::hooks::onSpawnCallbacks, "onSpawn", ExampleMod);
}
function ExampleMod::onSpawn(%this, %client)
{
%client.cmSendClientMessage(2475, "Welcome to the server!");
}
};
activatePackage(ExampleMod);
See Getting Started for the full walkthrough.
Grab the latest release (art.zip) from Releases and place it in your dedicated server root. On first start the framework extracts its configuration to mods/AutoloadConfig.cs. Guides and troubleshooting live in the LiFx knowledge base.
| Path | Purpose |
|---|---|
main.cs |
The framework: mod loader, hook system, DB registration, data export |
AutoloadConfig.cs |
Default server configuration (extracted to mods/ at runtime) |
jettison.cs |
JSON parser/serializer |
sha256.cs |
SHA-256 implementation (framework build verification) |
dump.sql |
Pristine game-data dump used to rebuild sql/dump.sql each start |
ServerUtility/ |
Submodule: bundled gameplay features (utility.cs) |
art.bat |
Packs the release art.zip |
- ClientAutoloader — the client-side counterpart
- ServerUtility — gameplay features bundled with this framework
- lifxmod.com — project website
GNU General Public License v3. Publicly distributed mods built on this framework must comply with the license's source-sharing requirements.