Adding a Room Template
A room template is one kind of chamber. It is the single most consequential thing you can add, because the GM deals templates onto every floor it builds.
Look at @Missing file before writing your own.
The fields
| Field | What it does |
|---|---|
name | Becomes the slug the floor references. Ashen Vault becomes ashen-vault. |
description | Two sentences. Shown to builders, not players. |
ambience | The GM reads this when the player arrives. Where the room's character actually lives. |
weight | How often it appears. Weight 3 is dealt three times as often as weight 1. |
allowsMonster / allowsEvent | Whether this chamber can hold a monster and whether it can hold an event. |
tiles | Ten images. See below. |
Write ambience for a GM working under a hard two-sentence budget. Give it three or four concrete, specific details it can pick one from — a material, a sound, a thing that is wrong. Do not write atmosphere in general terms; "an eerie and foreboding chamber" gives it nothing to say.
The ten tiles
This is the part that surprises people. A template needs ten images, not four.
A tile depicts which walls have doorways. It does not depict direction of travel, so entry and exit collapse into one unordered set:
| Key | Doors | Used for |
|---|---|---|
n e s w | one | the entrance room and the final dead end |
ne ns nw es ew sw | two | every room in the middle of the floor |
Keys are always written in n, e, s, w order — ns, never sn. The projection derives the key from the floor's path and looks it up directly, so a missing key means a room with no art.
Ten is the complete set for the current generator, which builds a single non-branching path. If floors ever branch, three- and four-door rooms would add five more keys.
Generating the art
Style is stored on the file type, not in your prompt. The room-template type carries its own imageStyleInstructions covering the pixel treatment, the top-down projection, the Gravebind palette, the fixed masonry border, and the door rule. So write prompts that describe only the floor material and which walls have doors:
A square dungeon room of fire-scorched grey stone, floor covered in pale
grey ash. There are TWO doorways: one in the NORTH wall at the top edge,
and one in the EAST wall at the right edge, each centered on its own wall.
The SOUTH and WEST walls are completely solid with no opening.
Naming the solid walls explicitly matters. Left unstated, doors appear where they were not wanted.
Two failures are worth knowing before you spend energy on them.
Name the material, then name the colour you actually want. A prompt that says "rust" gets you a bright orange floor filling the whole tile, because the model reads the material as a colour instruction and rust is orange. The type style now forbids chromatic floors outright, but you should still write "settled iron-rust dust, rendered as one dull greyed-out brown" rather than trusting the guard to catch you. The palette allows exactly one warm colour, ember, and a floor is never it.
Generate ONE tile and look at it before generating nineteen. The first Rustfall tile came back saturated, mottled and wearing a riveted metal wall instead of masonry — three faults, all fixable in the stored style, all of which would have been repeated ten times over. One tile costs 2,000 energy. Ten wrong tiles cost 20,000 and a rewrite.
Use --for "Room Templates/Your Room.room-template.json" so the type style applies, and --size square-1-1 — tiles must be square or they will not fill a cell.
Keeping ten tiles consistent
Generate the four single-door tiles first and get them right. Then generate the six pairs with --ref anchoring against them:
craft image generate --for "Room Templates/Your Room.room-template.json" \
--size square-1-1 --ref ".tmp/refs/your-room-n.png" \
--ref ".tmp/refs/your-room-e.png" --prompt "..."
Image-to-image holds palette and wall style far better than re-prompting from scratch. Two practical constraints: --ref paths must be workspace-relative — absolute paths are rejected — and .tmp/ is the safe place to stage them, since the workspace scanner ignores dot-directories while craft push rejects unknown extensions everywhere else.
A warning from experience: drift in your four singles propagates into all six pairs. Make the singles agree with each other before generating anything from them.
Before you push
Look at all ten tiles together as a contact sheet. Check every one has doors on exactly the walls its key names, and that the floor colour does not swing between tiles of the same template. A tile whose interior is nearly black will vanish against the map's background.