-
Notifications
You must be signed in to change notification settings - Fork 8
Authoring Layouts Item
An item layout element displays a single tracked item, looked up by its code. This is the most basic way to put a single item from your items JSON into a layout — useful for placing one specific item exactly where you want it without going through an Item Grid.
See Authoring Layouts for the file format and base fields. This page only covers fields specific to the
itemtype.
Parsed in EmoTracker.Data/Layout/Item.cs. Matches the item branch in layouts.json.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type |
"item" |
yes | — | Literal string. |
item |
string | yes | — | A code identifying the item to display. Looked up via ItemDatabase.FindProvidingItemForCode at parse time, so the item must already be loaded. |
Plus the standard base fields from Authoring Layouts → Fields every layout element shares. Use width and height to control the displayed size.
The element behaves exactly like the same item appearing in an Item Grid cell — left/right click apply the item's normal click semantics (toggle, advance progressive, increment counter, etc.). See Item Types And Mouse Controls for the user-facing summary or Authoring Items for the full per-type breakdown.
{
"type": "item",
"item": "sword",
"width": 48,
"height": 48
}{
"type": "canvas",
"width": 200,
"height": 200,
"content": [
{
"type": "item",
"item": "hookshot",
"canvas_left": 50,
"canvas_top": 50,
"width": 32,
"height": 32
}
]
}{
"type": "array",
"orientation": "horizontal",
"content": [
{ "type": "item", "item": "ep_prize", "width": 32, "height": 32 },
{ "type": "text", "text": "Eastern Palace" }
]
}- The item must already be loaded. Items are looked up by code at parse time. If you're loading multiple items files, make sure all relevant items are loaded before the layout that references them.
-
The lookup uses
FindProvidingItemForCode, which returns the first item whosecodesfield includes the requested code. Make sure your codes are unique enough that the wrong item doesn't get picked. - For repeating arrangements, use Item Grid. It's a much smaller authoring footprint when you have a regular row × column arrangement.
-
The item element auto-sizes based on the item's natural icon size unless you set
width/heightexplicitly. Setting both is recommended for predictable layouts.
- Authoring Layouts — top-level format and base fields
- Authoring Layouts — Item Grid — for grids of multiple items
- Authoring Items — how items are declared and what their click behaviors are
-
layouts.jsonschema — authoritative JSON schema
- Installation
- Installing and Loading Packages
- Item Types and Mouse Controls
- Map Locations
- Map Location Colors
- Saving and Loading
- Multi-Tab and Window
- Autotracking
- NDI Broadcasting
- Twitch Chat HUD
- Note Taking
- Voice Control
- Keyboard Shortcuts