> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/content-packs/layout-and-manifest.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# Layout and manifest

This page shows what goes in a pack folder and what `pack.json` says. Start here when you create a pack, and come back for the file rules when a pack gets refused.

## Layout

```
my-pack/
├── pack.json                       required
├── models/<name>/model.json        a voxel model, with its .vox files next to it
├── models/<name>/<part>.vox
├── data/item_models.json           item to model
├── data/entity_models.json         entity type to model
├── data/animations.json            model to state to clip
├── animations/<clip>.json          keyframe clips
├── icons/<name>.png                item icons
├── backdrops/<name>.jpg|png        loading-screen backdrops
└── shaders/<name>.wgsl             terrain hook and screen effects
```

Only `pack.json` is required. A pack with only a shader is valid.

A pack is a folder, a `.zip` of that folder, or the `content/` folder of a plugin jar. In a `.zip` and in a jar, `pack.json` is at the root of the pack.

## `pack.json`

```json
{
  "format": 1,
  "namespace": "emberhold",
  "name": "Emberhold",
  "version": "1.0.0",
  "description": "The keep of the ember lords.",
  "backdrops": { "keep": { "file": "backdrops/keep.jpg", "place": "Emberhold Keep" } },
  "terrain_shader": "shaders/terrain.wgsl",
  "screen_effects": { "ember_haze": "shaders/ember_haze.wgsl" }
}
```

| Field            | Required | Rule                                                                                                                                            |
| ---------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `format`         | yes      | `1`.                                                                                                                                            |
| `namespace`      | yes      | 1 to 64 characters of `a-z 0-9 _ . -`. Unique on the server. `core` and `aethercube` are reserved for the game's own content.                   |
| `name`           | yes      | At most 64 characters.                                                                                                                          |
| `version`        | yes      | At most 32 characters.                                                                                                                          |
| `description`    | no       | At most 200 characters.                                                                                                                         |
| `backdrops`      | no       | Backdrop name to `{ "file", "place" }`. The client requires `place`, the caption the screens show, at most 64 characters. At most 32 backdrops. |
| `terrain_shader` | no       | Path of a `.wgsl` file. See [Shaders](https://docs.aethercube.fr/developers/content-packs/shaders.md).                                          |
| `screen_effects` | no       | Effect name to the path of a `.wgsl` file. At most 32 effects. Several may name the same file.                                                  |

`name` and `version` count characters, not bytes, and so does `description`. Before it logs or sends them, the server removes the control and format characters (Unicode categories Cc, Cf, Zl and Zp) from `name`, `version` and `description`, and it refuses a pack whose name or version is nothing else. The client does the same to everything it shows, `place` included.

**Unknown keys are an error**, here and in every JSON file of a pack. A typo makes the pack refused, which is better than a pack that loads and quietly misses half its content.

## Ids

Backdrops and screen effects are named `<namespace>:<name>`. With the manifest above:

| Id                     | Use                                                                     |
| ---------------------- | ----------------------------------------------------------------------- |
| `emberhold:keep`       | `LoadingScreen.backdrop`, or `loading_screen.backdrop` in `server.yml`. |
| `emberhold:ember_haze` | `ScreenEffect.effect`.                                                  |

Models are named by `model_id` in their `model.json`, as `namespace:name`. A pack may give a model the id of a built-in model to replace it. For example, `core:wild_boar` reskins the boar. A later pack wins over an earlier one.

## File rules

Every file of a pack must follow these rules, or the pack is refused. They are strict on purpose: paths and sizes are checked on the client before anything is read, so a hostile server cannot make it write outside its cache or fill the disk.

| Rule           | Value                                                       |
| -------------- | ----------------------------------------------------------- |
| Path segment   | `[a-z0-9_.-]{1,64}`: lower-case, no `..`, no empty segment. |
| Whole path     | At most 200 bytes, `/`-separated, relative.                 |
| Extensions     | `.json`, `.vox`, `.png`, `.jpg`, `.wgsl`, `.txt`, `.md`.    |
| Entries        | 1 to 4096 per pack. No duplicates.                          |
| `.json`        | At most 1 MiB.                                              |
| `.png`, `.jpg` | At most 4 MiB and 2048 by 2048 pixels.                      |
| `.vox`         | At most 2 MiB.                                              |
| `.wgsl`        | At most 128 KiB.                                            |
| `.txt`, `.md`  | At most 64 KiB.                                             |

The server and the client apply these limits to every file of the pack, whether `pack.json` refers to it or not. The server also applies exactly the client's rules for layout, so it never accepts a pack the client refuses:

* A segment may not contain `..`, and may not be `.`.
* The extension is what follows the last dot of the last segment. A segment that starts with its only dot (`.json`) has none, so it is refused.
* A file under `icons/` is `icons/<name>.png`, with nothing between: `icons/sub/x.png` is refused.
* A backdrop needs both `file` and `place`.

## How data files merge

`data/item_models.json` and `data/entity_models.json` merge over the client's own tables, entry by entry. The lookup order for the model of an item or a creature is:

1. The pack's data files.
2. The `model` of the plugin's `ContentRegistry` entry (the `model` field of the `ItemDefinition` or `CreatureDefinition`).
3. The client's own tables.

An item or creature with no model is drawn as a fallback: a box for a creature, the client's drawn icon for an item.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/content-packs/layout-and-manifest.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
