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
| Key | What it does |
|---|---|
name | Required. The key the values are saved under. It must be unique, so use a form like "PluginName.DataName". |
title | The section's title in the Inspector. When it is empty, the name is the title. |
description | Shown when the pointer is on the section's title. |
author, version | For you and the people who use your manifest. |
url | A help page. The section's ? button opens it. Without a url, the section has no ? button. |
prefabs | Required. 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. |
fields | Required. The list of fields. |
Field keys
| Key | What it does |
|---|---|
name | Required. The key the value is saved under. It must be unique in the manifest. |
type | Required. One of the types in the next table. |
default | The value a prefab starts with. When it is left out, the type's own default is used. |
label | The field's name in the Inspector. When it is empty, RustEdit makes the name readable: lootTier and loot_tier both show as "Loot Tier". |
description | Shown when the pointer is on the field. |
min, max | Numbers 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. |
options | Enums only: the choices. |
multiline | Strings only: true makes a text box with more than one line. |
Field types
| Type | Other names | Value | Default when left out |
|---|---|---|---|
bool | boolean | true or false | false |
int | integer | A whole number. A number with decimals is rounded. | 0 (or min) |
float | number | A number with decimals | 0 (or min) |
string | text | Text | Empty |
enum | One 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 | |
vector3 | vector | X, Y and Z. Write the default as [0, 1.5, 0] or {"x": 0, "y": 1.5, "z": 0}. | 0, 0, 0 |
color | colour | "#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.
| Problem | What 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. |