addons.json

LitheraRP uses the official s&box Addon Project flow as a data pipeline. A creator builds an Addon Project targeting LitheraRP, creates a Lithera RP Addon Manifest custom resource, publishes it as a .litrpaddon package, and lists any required model/material/entity packages in the manifest. Addon Projects do not currently publish C# code, so this system imports config and mounts assets only.

Install only trusted manifests

Addons cannot execute C# code through this importer, but they can still modify server gameplay data. Applying enabled addons creates backups for changed config files and rolls back when validation fails.

Workflow

Use the in-game Admin Console → Addons tab for routine addon work: add an addon package ident, toggle entries, save the file, then use Apply Enabled. The same managed editor is also available from Admin Console → Config → Addons for advanced config workflows.

Common fields

FieldMeaning
enabledMaster switch for addon importing.
settings.mountAddonPackageMount the manifest package before loading the resource. Should stay true.
settings.mountRequiredPackagesMount packages declared by the manifest with withCode: false.
settings.maxPatchBytesMaximum JSON payload size for one manifest patch.
entries[].idLocal server id for this addon entry.
entries[].packageIdentPublished .litrpaddon package ident, for example creator.police_pack.
entries[].enabledWhether /config → Addons → Apply Enabled processes this entry.
entries[].manifestTitle, manifestVersion, requiredPackages, lastStatus, lastMessageMetadata written by the importer after an apply attempt.

Manifest patch modes

ModePurpose
MergeObjectDeep-merge an object into the object at jsonPath.
UpsertArrayByIdAdd or update one object, or each object in an array, inside the target array using idField. Preferred idempotent mode.
AppendArrayAppend payload values to an array. Avoid for repeatable installs unless duplicates are intended.

Supported target paths are the same safe config files exposed by /config, except configs/addons.json itself. The importer backs up every changed target under configs/addon_backups/, reloads affected sections, and rolls back the whole apply if validation fails.

Data addons vs asset addons

A simple data-only addon usually patches one or more safe config arrays with stable ids, such as configs/phone.json GPS locations, configs/social.json links, or configs/rules.json sections.

An asset addon can also publish models, materials, prefabs, or sound events through the s&box Addon Project and list any extra cloud packages in RequiredPackages. The manifest still only patches safe config files; the published assets are referenced from those configs using package-local paths.

C# gameplay code: planned, waiting on s&box

Letting addons ship custom C# is on the roadmap. It depends on s&box Addon Projects publishing runtime code, which Facepunch has announced is coming soon. As soon as it lands upstream, LitheraRP will adopt it and addons will be able to bring their own behavior.

Until then, new behavior must already exist in the gamemode as a reusable component (for example Sandbox.ConfigurableFirearmWeapon) or as a config option. The importer mounts assets and patches config; it does not execute custom code.

Example patch payload

Adding a community Discord link to configs/social.json:

1{
2 "TargetPath": "configs/social.json",
3 "JsonPath": "extraLinks",
4 "Mode": "UpsertArrayById",
5 "IdField": "id",
6 "PayloadJson": "{ \"enabled\": true, \"id\": \"northside_discord\", \"label\": \"Discord\", \"icon\": \"discord\", \"url\": \"https://discord.gg/example\", \"accentColor\": \"#5865F2\" }"
7}

Adding a GPS point to configs/phone.json:

1{
2 "TargetPath": "configs/phone.json",
3 "JsonPath": "gps.locations",
4 "Mode": "UpsertArrayById",
5 "IdField": "id",
6 "PayloadJson": "{ \"id\": \"northside_notice_board\", \"name\": \"Community Notice Board\", \"icon\": \"campaign\", \"category\": \"Community\", \"position\": \"-650 300 64\" }"
7}

Reload and apply

  • litherarp.addons_reload: reload configs/addons.json after a manual edit.
  • litherarp.addons_apply: fetch enabled .litrpaddon manifests, mount declared packages without code, import config patches, and roll back on validation failure.
  • litherarp.addons_reset: reset addon entries to shipped defaults.

See also Install an addon and Create an addon manifest in the workflows.