Skip to main content

Custom Data Manifests

A manifest is a JSON file that tells RustEdit which fields to add to which prefabs. This page lists everything a manifest can hold. To set one up and use it, see Custom Data.

The manifest file​

A manifest is one JSON object. This is a short one:

{
"name": "MyPlugin.CrateSettings",
"title": "Crate Settings",
"description": "Settings the MyPlugin server plugin reads for each crate.",
"author": "Your name",
"version": "1.0.0",
"url": "https://example.com/myplugin/help",
"prefabs": [
"assets/bundled/prefabs/radtown/crate_normal.prefab",
"assets/bundled/prefabs/radtown/crate_*"
],
"fields": [
{ "name": "lootTier", "type": "int", "default": 1, "min": 1, "max": 3 },
{ "name": "mode", "type": "enum", "options": [ "Off", "Patrol", "Guard" ], "default": "Patrol" },
{ "name": "message", "type": "string", "default": "", "multiline": true, "label": "Message", "description": "Shown to players who open the crate." }
]
}

Top-level keys​

KeyWhat it does
nameRequired. The key the values are saved under. It must be unique, so use a form like "PluginName.DataName".
titleThe section's title in the Inspector. When it is empty, the name is the title.
descriptionShown when the pointer is on the section's title.
author, versionFor you and the people who use your manifest.
urlA help page. The section's ? button opens it. Without a url, the section has no ? button.
prefabsRequired. The paths of the prefabs that get the fields. A * stands for any text and a ? for one character, so "assets/prefabs/deployable/*" matches every prefab in that folder and its sub folders. Paths are not case-sensitive.
fieldsRequired. The list of fields.

Field keys​

KeyWhat it does
nameRequired. The key the value is saved under. It must be unique in the manifest.
typeRequired. One of the types in the next table.
defaultThe value a prefab starts with. When it is left out, the type's own default is used.
labelThe field's name in the Inspector. When it is empty, RustEdit makes the name readable: lootTier and loot_tier both show as "Loot Tier".
descriptionShown when the pointer is on the field.
min, maxNumbers only: the lowest and highest value. A value outside them changes to the nearest limit. With both, the field is a slider. If min is bigger than max, they are swapped.
optionsEnums only: the choices.
multilineStrings only: true makes a text box with more than one line.

Field types​

TypeOther namesValueDefault when left out
boolbooleantrue or falsefalse
intintegerA whole number. A number with decimals is rounded.0 (or min)
floatnumberA number with decimals0 (or min)
stringtextTextEmpty
enumOne of the options. The value is saved as the option's text. If you rename or remove an option, prefabs that had it get the default.The first option
vector3vectorX, Y and Z. Write the default as [0, 1.5, 0] or {"x": 0, "y": 1.5, "z": 0}.0, 0, 0
colorcolour"#RRGGBB", "#RRGGBBAA" or a name such as "red"White

Troubleshooting​

RustEdit checks each manifest when it loads it. A file or field it cannot use is left out, and a warning in the Notifications panel says why. After loading, a line says how many manifests were loaded, for example "[Custom Data] Loaded 2 manifests from ...". The example manifest counts too.

ProblemWhat to do
"is not loaded. It could not be read"The file is not valid JSON. Check the commas, quotes and brackets.
"is not loaded. It has no name"Add a name.
"is not loaded. The name ... is used by ..."Two manifests have the same name. The file that comes first by file path is used. Give the other one its own name.
"is not loaded. It lists no prefabs"Add at least one prefab path.
"is not loaded. It has no fields that can be used"Add fields, or fix the warnings about them.
"a field has no name" / "is in the list more than once"Give every field its own name.
"has the type ..."Use one of the types in Field types.
"the enum field ... has no options"Add options.
"the default ... cannot be read as its type"Fix the default. Until then, the type's own default is used.