Frostdev

KilnAPI reference Guide

kiln.mod.json (manifest v2)

One file per mod folder (kiln/mods/<folder>/kiln.mod.json). JSON with // comments and trailing commas allowed. Schema: schema/kiln.mod.schema.json. Reference implementation: managed/Kiln.Host/Manifest.cs (the build task uses the same file). v1 manifests (id, name, version, apiVersion, entryAssembly, entryType, side) load unchanged.

{
  "id": "my-mod",                       // required: [a-z0-9][a-z0-9._-]{0,63}; not kiln, kiln.api, game, enshrouded, native, permissions
  "name": "My Mod",                     // default: the id
  "version": "1.4.0",                   // required: semver (1 / 1.2 are read as 1.0.0 / 1.2.0)
  "description": "…", "authors": ["…"], "license": "MIT", "url": "https://…",
  "icon": "icon.png",                   // the mod's icon: a 256 x 256 sRGB PNG in the mod folder (see "icon")
  "apiVersion": "0.2",                  // required: Kiln mod API (see below)
  "side": "server",                     // server (default) | client | both
  "clients": "none",                    // what joining players need: none | kiln | mod (default: server -> none,
                                        //   client/both -> mod; see "Clients" below)
  "dependencies": {
    "sample-lib": "^1.2",               // required, version range
    "kiln": ">=0.1",                    // the Kiln core itself (plain ranges also count dev builds as their release)
    "extras": { "version": "*", "optional": true }
  },
  "loadAfter": ["some-mod"],            // ordering only: when present, load after / before it
  "loadBefore": ["other-mod"],
  "incompatible": { "rival": "<3" },    // or ["rival"] (any version): this mod does not load when it is present
  "features": ["tick", "log.mirror"],   // capabilities this game build must have, fixed at boot (see "Asking what works")
  "entryAssembly": "MyMod.dll",         // a file in the folder; leave it out for a mod of data only (see below)
  "entryType": "MyMod.MyModClass",      // default: the only public Kiln.Mod subclass
  "exports": ["MyMod.Api.dll"],         // assemblies dependents compile against (shared at run time)
  "advanced": false,                    // opt into the advanced tier (ModInfo.Advanced)
  "steamMessages": false,               // the mod opens its own Steam peer message leases (see "steamMessages")
  "views": "prepare",                   // "advanced": the mod reads only advanced registry views (see "views")
  "systems": { "replaces": ["fuel_setup"] },  // the game's ECS programs the mod replaces, a declaration (see "systems")
  "writes": ["Fuel", "ScaleComponent"], // component types the mod writes through the game's write tracking (see "writes")
  "tests": { "autoRun": true, "timeoutSeconds": 20 },  // Kiln.Testing (testing.md)
  "boot": false,                        // true | "required": Mod.OnBoot runs before the game starts (see "Boot content")
  "updates": { "provider": "github", "repository": "me/my-mod" },  // where new versions are published (see "updates")
  "kilnBuild": { "version": "0.2.0-dev+20261106.0f0a3f6", "created": "2026-11-06T12:12:16Z" }  // written by the build
}

Unknown keys are kept but logged as warnings (mod my-mod: unknown key 'dependecies' (ignored)).

Built against which Kiln (kilnBuild)

Kiln.Sdk writes kilnBuild when it builds a mod (also into a project's own kiln.mod.json): the Kiln build of the Kiln.Api it compiled against, named as the runtime bundle is (<semver>+<yyyymmdd>.<git>, the commit's time in created). Don't write it by hand. Two dev builds both say 0.2.0-dev, so semver can't tell a mod that uses something newer than the player's Kiln; the stamp can:

  • The launcher compares the active profile's mods with the game's runtime (its receipt, and that bundle's created) and shows "Update Kiln" on Play, naming the mods built for a newer Kiln.
  • Kiln.Host compares with its own Kiln.Api's stamp before the mod loads: [W] [host] mod item-blocks 0.1.1 was built against Kiln 0.2.0-dev+20261106.0f0a3f6, newer than this runtime (0.2.0-dev+20261106.10a0d37): if it fails, update Kiln on the launcher's Runtime page. It still loads: the API only grows, so most such mods work.
  • When it fails on a Kiln member the runtime lacks (MissingFieldException, MissingMethodException, TypeLoadException or a missing Kiln.* assembly, in OnLoad, as its types load, or later), kiln.log and mods.txt say so plainly: item-blocks needs a newer Kiln runtime (it uses Kiln.StatusLook.Fire, which runtime 0.2.0-dev+20261106.10a0d37 doesn't have): update Kiln on the launcher's Runtime page. This works for mods without a stamp too.

Order: the semantic version, then created when both sides have it, else the day. A runtime or mod built from a tree without git has no stamp, and nothing is compared before the load.

Built for the Gate (gate, since 0.2.0-dev.32 round 3)

"gate": 1 says the mod is built for the Gate (generation 1); "gate": 0, or no such signal, says it was built before it (generation 0). It decides one thing: the base of the mod's relative ops (mul, add, raiseOnly, lowerOnly) in registry edits, data pack sections and Content.* calls.

  • Generation 0 (every mod built before the Gate): an op computes on the game's value, exactly as before, so the mod's numbers stay what they were. BigStacks' x4 on wood logs gives 250 x 4 = 1000, even where another mod's registry edit made them 2000.
  • Generation 1: an op stacks on the value beneath it in load order, other mods' changes included: x4 over that 2000 is 8000. A generation-1 layer lies above every generation-0 layer, whatever the load order. Conflicts shows both values.

Kiln.Sdk writes "gate": 1 into every mod it builds, generated or a project's own kiln.mod.json (unless that file says "gate"), and beside it kilnBuild.api, the mod API the mod compiled against. <KilnGate>0</KilnGate> in the project keeps generation 0; KILN141 names each relative op whose base moves when a mod is rebuilt. Without gate, a mod is generation 1 when its kilnBuild.api (read only beside a kilnBuild.version Kiln reads: a semantic version), or a data-only mod's apiVersion lower bound, is at least the Gate's switch API (0.2.33), else 0. A value other than 0 or 1 is ignored with a warning, never a refusal. A registry edit of a generation-1 mod that wants the game's value as its base says so on its op: {"mul": 4, "base": "game"}. native.json takes "gate" too (a native mod without it is generation 0); packages of other loaders hosted by Kiln (EMF, ShroudForge, EML, ...) are always generation 0. The generation holds for the process: a hot reload of a build of the other generation loads it, and its registry edits keep the start's generation until the next start (kiln.log: reload <id>: its new build is generation 1 (...); its registry edits keep generation 0 until the game (or the server) restarts).

Steam peer messages (steamMessages, since 0.2.0-dev.30.3)

"steamMessages": true says the mod talks to Steam users directly: it opens its own Steam peer message leases with SteamMessages.Open (Kiln.Network, ../network.md). It is a boolean, false by default; any other value refuses the manifest (steamMessages must be true or false). The mod reads it as ModInfo.SteamMessages.

  • Without it SteamMessages.Open throws InvalidOperationException before anything is called.
  • With it Kiln.Host admits the mod's native owner to kiln.net's Steam leases when it loads the mod. The leases are that owner's alone and close when the mod unloads (../services/net-steam-messages.md).
  • In the launcher a server's Mods page says "Talks to other players over Steam" on the facts of such a mod.
  • The opt-in is a declaration for trusted mods, not a sandbox: it says which mods use the public API for Steam messages, and does not stop other code in the game's process.
  • Steam peer messages reach players by Steam id, outside the game's connection and its admission: treat every message as untrusted, and prefer Kiln.Network's channels when the players are on the same server.

Registry views (views, since 0.2.0-dev.32)

A mod whose code uses RegistryViews (or RegistryView, RegistryViewEntry, an entry's Template, RegistryStage.View) gets the registry's values prepared while the game loads, and the views' catalog built on Kiln's worker at the end of the stage, so its first stable view read is ready (registries/views.md): "views": "prepare", the default. A mod that reads only advanced views (the game's own data by type: itemInfo, template, ...) never needs those values; "views": "advanced" says so, and the start skips the preparation for it (seconds of the load screen on a server; kiln.log names the mod). Any other value refuses the manifest (views '...' must be prepare or advanced). A stable view read by such a mod still works: it waits for the values the first time, as a read from code Kiln cannot see does.

What the mod does to the game's ECS programs (systems, since 0.2.0-dev.29)

systems is an object that says what the mod does to the game's own ECS programs (Kiln.Systems). Its one key is replaces: a list of up to 64 program names (letters, digits and _, 1 to 64 characters, such as fuel_setup) that the mod replaces with ProgramWrap.Replace. Any other key in systems fails the schema.

  • It is a declaration for tools. Only one mod per program can replace it (a second Replace is refused at run time, naming the holder); the list lets a tool find two mods that replace one program before play. The launcher and kiln lint do not read it yet, and listing a program or not changes nothing at run time: Kiln.Host only accepts the key.
  • Leave it out when the mod replaces no program.

The mod's icon (icon, since 0.2.0-dev.32.2)

A mod's icon is a mod-icon.png at the root of its folder, for mods of every framework (mod-icons.md: the picture, the default emblems). icon names another PNG in the mod folder instead, written relative to the folder with / between folders: icons/mod.png. Each name starts with a letter, digit, _ or - and holds only those and .; at most 200 characters; it ends in .png. So no .., no hidden file, no drive or root: the icon is always inside the mod folder. When the file it names cannot be shown (missing, not a PNG, over 1024 px a side or 2 MiB), mod-icon.png is used, else the Kiln emblem.

icon is never a reason to refuse a mod: a value Kiln can't read is ignored with a warning ("icon" is not read, so Kiln shows the default emblem for this mod (the mod loads): ...) and kiln lint reports it as KL103; the file itself is KL501, KL503 and KL506. A mod's code reads it as ModInfo.Icon (the full path; experimental, KILNX033), and Kiln.Ui's ModIcons gives the picture any mod shows, the default emblem included. A Kiln.Sdk project writes it with KilnIcon; a mod-icon.png beside the project file is copied into the mod without it.

Where new versions are published (updates, since 0.2.0-dev.28)

updates tells Kiln where to look for a newer version of the mod. The launcher and kiln updates check (cli.md) read it and show a notice with a link to the release page. That is all they do with it: nothing is downloaded, installed or switched on by a check, and nothing in the game reads the key or makes a request. A mod loads the same with or without it.

Two providers. Each takes only its own properties; a property it does not know makes the whole updates unreadable.

// releases of a public GitHub repository
"updates": {
  "provider": "github",
  "repository": "me/my-mod",            // required: owner/repo, not a URL
  "tagPattern": "v{version}",           // the release tag; {version} exactly once (default v{version})
  "asset": "my-mod-{version}.zip",      // the zip's file name in a release; {version} at most once (optional)
  "channel": "stable"                   // stable (default) | prerelease
}
// one file of a Nexus Mods page
"updates": { "provider": "nexus", "gameId": 5811, "modId": 310, "fileChainId": "90310" }
Property Rule
repository Two parts owner/repo, each 1 to 100 characters of A-Z a-z 0-9 _ . -, neither . nor ...
tagPattern {version} exactly once; before and after it at most 64 characters of A-Z a-z 0-9 . _ / -; no .., no //, no slash at the start or the end. A tag counts only when the whole tag matches and the part at {version} is a semantic version (as version above; a leading v only when the pattern has none before {version}). In a repository of several mods give each its own prefix: mods/my-mod/v{version}. There are no wildcards.
asset A file name, 1 to 200 characters of A-Z a-z 0-9 . _ - once {version} is filled in (with the version as the tag spells it); no ... Leave it out when your releases carry a kiln-release.json (kiln publish writes one, publishing.md): that file names the zip.
channel stable: releases that are not marked pre-release on GitHub and whose version has no pre-release part. prerelease: those too. Drafts never count.
gameId 5811 (Enshrouded).
modId The number of the mod's page: nexusmods.com/enshrouded/mods/<modId>.
fileChainId The id of the file whose versions are followed: the file itself, which keeps its id from upload to upload, not one version of it. A page's optional file is followed as that file, never replaced by the page's main file.

What Kiln does when it cannot read updates (a rule above is broken, or provider is one this Kiln does not know): the mod loads, the key is ignored with a warning ("updates" is not read, so Kiln cannot look for new versions of this mod (the mod loads): 'repository' must be owner/repo), kiln lint reports it (KL103, and the schema's finding for the property), and kiln updates check lists the mod as unsupported. Kiln never guesses a source from url.

From a project, Kiln.Sdk writes the key from build properties:

Property Manifest
KilnUpdatesRepository updates.repository (and provider github)
KilnUpdatesTagPattern, KilnUpdatesAsset, KilnUpdatesChannel tagPattern, asset, channel
KilnUpdatesNexusModId, KilnUpdatesNexusFileChainId modId, fileChainId (and provider nexus, gameId 5811)
KilnUpdatesProvider provider, when both groups are set

The same key, with the same rules, is read from a native mod's native.json.

Components the mod writes (writes, since 0.2.0-dev.27)

World.Write<T>, World.Update<T>, World.WriteField and World.WriteAt change a component through the game's own write tracking, so the save and players see the change (../services/world.md). They run inside one program of Kiln's in the game's scheduler, and the game fixes a program's access when the world starts. So the component types have to be known before that: writes lists them, by the game's short names (Fuel, CurrentTransform; letters, digits and _, up to 120 characters). At most 64 entries as written: a name listed twice counts twice and is read once. null or anything but a list of such names is not read: the mod still loads (as it did before tracked writes, when writes was a key nobody read), kiln.log warns once with the reason, and each of its tracked writes is refused with what is wrong with the list (WorldWriteState.ListRefused). The native reader, the managed reader and the schema share these rules; native/services/world/tests/parity.json holds the cases they are all tested on. Kiln.Sdk stops the mod's own build on such a list (KILN031). kiln.world reads the lists of every enabled server mod when the server starts.

  • Kiln.Sdk fills it. After the mod compiles, the build reads the built assembly and adds every generated component type the code passes to World.Write<T> or World.Update<T> to writes in the output's kiln.mod.json (the copy that is deployed and packed; the project's own file is not touched). Names the project's file lists stay.
  • List by hand what the code names only as a string (World.WriteField(e, "Health", …), World.WriteAt), and what the build says it cannot resolve: warning KILN030 for a call through the mod's own generic method (Set<T>(…) => World.Write<T>(…)) or with a type that is not a generated component.
  • A type that is not listed is refused, with the sentence that says what to add: the write's answer has Ok == false, Status == NotDeclared. Nothing is written raw instead. A new entry takes effect at the next server start, not on a hot reload.
  • A name that is no component of the running game build is left out alone (kiln.log names it, World.WriteInfo says UnknownComponent) and takes no place; the mod's other types still work. All mods together can list 91 types the game has: the game's limit for one program (OverLimit for the ones listed after them, in boot order). -p:KilnWrites=false turns the build step off (error KILN031: it could not read the built assembly or write the manifest).

Reserved ids: kiln (the core, usable as a dependency), kiln.api, game, enshrouded, native and permissions (they would collide with the config files <configDir>/native.json and permissions.json).

Boot content (boot, since 0.2.0-dev.28)

"boot": true makes Kiln run the mod's Mod.OnBoot once before the game starts, on a copy of the mod that is thrown away afterwards; what it stages is in the game from the first start (onboot.md). Leave it out (or false) for a mod without boot content.

  • true: a failure of the mod's boot content leaves this mod (and the mods that require it) out; the server starts without them.
  • "required": such a failure stops the start (exit code 0x4B01, kiln/state/boot.json and the last kiln.log line say why): before the game's entry point, or, for what only a loading world shows, while that world loads, before a player is in it. A bad entry in the mod's own files counts as such a failure.
  • Restarts. A boot mod loads only with its boot content in this process. Enabled after the start, left out by a failure, or changed since (any file in its folder but what Kiln writes there, or a setting read in OnBoot; see onboot.md): it does not load, and kiln.log says RestartRequiredBoot: .... Restart the server.
  • Dedicated servers and game clients (a hosted world, and a player's game that joins a server; clients since 0.2.0-dev.29). A process without the boot phase (safe idle, .NET off) does not load a mod with boot.
  • In a Kiln.Sdk project, <KilnBoot>true</KilnBoot> (or required) writes the key into the generated kiln.mod.json; a kiln.mod.json of your own beside the project with the key works too.

Clients

clients tells servers and the launcher what a player's game needs to join a server that runs the mod:

Value Player needs Example
none nothing: vanilla clients join server logic, chat commands, world edits through the game's own build paths
kiln Kiln on the client, not this mod: the server sends the mod's definitions (ContentSync) new items cloned from existing ones
mod this mod on the client: the server's modpack delivers it (checked by its kdh1 hash) icons, retextures, models, client code

Without the key: side: "server" means none, client and both mean mod. Every value is valid with every side. The loader itself does not act on it; Kiln.Network (REJECT/WELCOME required[]) and the launcher (modpacks) do. A loaded mod that states kiln or mod itself makes the server refuse vanilla clients, unless network.json has modSync: off. A value that only comes from the side default doesn't, because many both mods work with vanilla clients. A Kiln client without a mod that states mod is refused too, with a message naming the mods, unless network.json sets modSync to warn or off. It needs side: both to be checked, and optionalMods exempts one. The refusal carries the server's modpack, so the launcher can offer it. A client let in anyway (modSync: off) doesn't get entities of new templates, but a new item it meets can still crash it: see Clients without Kiln.

Mods of data only

A mod needs no code. Without entryAssembly (and entryType) Kiln.Host loads the folder as a mod with nothing to run: it has its id, version, dependencies, side and a place in the load order, a line in the mod list (kiln/logs/mods.txt, the launcher's state/mods.json) and unloads and reloads like any mod. What the folder holds belongs to it: data packs for kiln.content (content/*.json, content.md), assets for kiln.assets.

// kiln/mods/pack-only/kiln.mod.json, with kiln/mods/pack-only/content/items.json beside it
{ "id": "pack-only", "version": "1.0.0", "apiVersion": "0.2", "side": "both", "clients": "kiln" }
[host] mod pack-only 1.0.0 loaded in 0.4 ms (data only: no entryAssembly)

A key that is present must still be a .dll file name (an empty entryAssembly is refused). Before dev.22 Kiln.Host refused a manifest without it (kiln.mod.json: 'entryAssembly' is required) and the folder's data packs were skipped. Kiln.Sdk, which builds code, still requires the key to name the assembly it builds (KILN001).

Versions and ranges

Range Means
*, empty any version
1.2.3, ^1.2.3, ^1.2, 1.2 compatible: >=1.2.3 <2.0.0; for 0.x the minor is breaking (^0.2 = >=0.2.0 <0.3.0), as in Cargo/npm
~1.2 patch updates: >=1.2.0 <1.3.0
=1.2.3 exactly; =1.2 = 1.2.x
1.x, 1.2.* wildcards
>=1.0 <2, >1.2, <=2.1 comparators; space or comma = AND
1.0 - 2.0 inclusive hyphen range (2.0 partial: up to <2.1.0)
[1.0,2.0), [1.0,), (,2.0], [1.2.3] Maven/Forge intervals; [1,2),[3,4) unions
^1 \|\| ^3 either

An exclusive upper bound <X.Y.Z also excludes the pre-releases of X.Y.Z (<2 rejects 2.0.0-beta); pre-releases inside a range match. apiVersion is special: a bare version means "this API or a later one with the same major" (the mod API stays additive within a major, 0.x included), so "0.1" mods load on API 0.2. The running Kiln's API: Kiln.Mods.RuntimeApiVersion (0.2.37 in 0.2.0-dev.32.9). The const Kiln.Mods.ApiVersion is obsolete: it is copied into a mod when the mod is built, so it says the API the mod was built against. A release refuses to ship when a public member of the previous release was removed (tools/release/api-gate.sh, and pack.sh compares against KILN_API_BASELINE). A release also builds its SDK packages as a NuGet feed (sdk/feed/); its URL is given here once it is published.

Mod API 0.2.37 (Kiln 0.2.0-dev.32.9). The 0.2.0-dev.32.9 SDK writes "apiVersion": "0.2.37" by default. A mod that uses UiKit, UiDraw.MeasureHintBar, Combat.OnDamageCalculated, ActionSpeed.SetCategory and the other category calls, ClientSkills.Unlock / Unlearn / ResetAll, NoClip.SetQuietly, ModIcons.Image or UiGameArt.Image needs it: a Kiln before 0.2.0-dev.32.9 refuses the mod at load. Also put "kiln": ">=0.2.0-dev.32.9" under dependencies, so players see the floor in plain words (see action-speed.md).

Requiring a particular Kiln dev release

For the kiln dependency only, a plain range such as >=0.2.0 also accepts 0.2.0-dev.30.8 as 0.2.0, preserving existing mods' release-style requirements. An alternative containing an explicit pre-release version instead compares the actual version throughout that alternative. For example, >=0.2.0-dev.30.9 rejects dev.30.8 and accepts dev.30.9, dev.30.10, dev.31 and stable 0.2.0. Numeric identifiers compare by value; build metadata (+...) never affects precedence. Use =0.2.0-dev.30.9 (or [0.2.0-dev.30.9]) for exactly that pre-release, not a minimum.

Each OR alternative (||, or an interval union) is independent: >=0.2.0-dev.30.9 || =0.2.0 still accepts dev.30.8 through the plain second alternative. Within one alternative, every comparator uses the actual version if any operand mentions a pre-release; >=0.2.0 <0.3.0-dev.1 therefore rejects 0.2.0-dev.30.8. Parser-generated upper bounds do not make an otherwise plain range explicit. Ordinary mod dependencies, incompatibilities and apiVersion keep their existing matching rules; they do not get this Kiln-only release fallback.

What the loader does (Forge's ModSorter + dependency checks)

At the first server-world step (a client: in the menu; its side "server" mods at each hosted world's first step, see docs/kiln/client.md), for every folder with a kiln.mod.json (a .disabled file skips the folder):

  1. Read and validate the manifest. Errors name the field; the folder is reported as folder:<name>.
  2. Reject duplicates (the first folder in name order keeps the id), mods for the other side (skipped, not an error), an apiVersion this Kiln does not provide, features that are unavailable or depend on the session (see below).
  3. Check dependencies and incompatibilities until nothing changes (a failure can fail its dependents): missing required dependency, version mismatch (also for a present optional one), kiln version, declared incompatibility.
  4. Order: dependencies (required and present optional), loadAfter and loadBefore edges; ties by id. Mods in a cycle fail together, with the cycle in the message; their dependents fail next round; bystanders load.
  5. Load in that order. A mod whose load throws (bad entry type, OnLoad exception) fails, and so do the mods that require it.

A rejected mod never stops the others. kiln.log says why, for example:

[E] [host] mod sample-missing-dep 1.0.0 not loaded: missing dependency sample-nowhere ^1.0
[E] [host] mod sample-needs-lib2 1.0.0 not loaded: needs sample-lib [2.0,3.0), found sample-lib 1.2.0
[E] [host] mod sample-cycle-a 1.0.0 not loaded: dependency cycle: sample-cycle-a -> sample-cycle-b -> sample-cycle-a (each must load after the next)
[E] [host] mod sample-after-cycle 1.0.0 not loaded: dependency sample-cycle-a * did not load (failed: dependency cycle: …)
[I] [host] mod sample-client-only 1.0.0 skipped: side 'client': not loaded on a server
[W] [host] mods: 13 loaded, 9 failed, 1 skipped; load order: …

The same reasons are in Mods.All (ModEntry.State, .Error), the control command mods and kiln/logs/mods.txt. A later load <folder> or reload <id> retries mods that failed for want of that mod.

Asking what works

What works on this game build and side, and why something does not, is one table of capabilities (services/caps.md). From a mod:

if (!Capabilities.Is("items.fuel")) { Log.Warn(Capabilities.Why("items.fuel")); return; }
  • Capabilities.Is(name) is true when the capability works here. Get(name) returns its row (state, reason, reason text, source), Why(name) one sentence to log, All every row. Any thread. Game.HasFeature asks the same table.
  • CapabilityChangedEvent (bus, tick thread) reports a row that is new, changed or removed.
  • A member marked [RequiresCapability("name")] throws KilnUnavailableException naming that capability when it is off (contract.md). Nothing checks the attribute at run time; the analyzer KILN121 reads it and warns where a marked member is used with no check before it.

features in the manifest. Each name must be a capability that is available and fixed at boot:

  • an unavailable one refuses the mod with the reason: needs feature gameplay.craft, unavailable: symbol gameplay/CraftRecipe: gameplay/CraftRecipe.find[0]: 0 matches [symbol-missing];
  • one that depends on the session (SessionDependent, reported pending at least once, such as identity.players) is refused as a requirement: check Capabilities.Is at run time instead;
  • a <service>.<thing> row that a managed service registers exists only after that service was first used, which is usually after the manifests were checked. Such a name is refused as "no capability of this name is registered", with the same advice. Sigdb features (items.fuel, tick) and kiln.<service> rows are there from boot.

The refusal is in kiln/state/mods.json, Mods.All and kiln.log. Works on a test server (dev.26); not run in a client.

Exports: shared mod APIs

Each mod has its own collectible load context. Assemblies resolve in this order: Kiln.Api (shared), Kiln's shared assemblies in kiln/host (Kiln.*), the exports of the mod's dependencies (transitively; loaded in the providing mod's context, so a type is the same type on both sides and static state is shared), then the mod's own folder. A mod only sees exports of mods it depends on.

Pattern: put the API in its own assembly (MyLib.Api.dll), ship it in the provider's folder, list it in exports, and have dependents reference it with Private="false" (compile only; see mods/samples/SampleConsumer). The entry assembly can be exported too.

Because a dependent holds the provider's types, reloading or unloading a provider cascades: its dependents (transitively, in reverse load order) unload first, then the provider, then everything loads again in order.

Enshrouded is a trademark of Keen Games GmbH. Kiln is unofficial.