Skip to content

Authoring Layouts Item

EmoTracker Community edited this page Apr 8, 2026 · 2 revisions

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 item type.

JSON schema

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.

Mouse behavior

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.

Examples

A single item with explicit sizing

{
  "type": "item",
  "item": "sword",
  "width": 48,
  "height": 48
}

Placing one item via canvas coordinates

{
  "type": "canvas",
  "width": 200,
  "height": 200,
  "content": [
    {
      "type": "item",
      "item": "hookshot",
      "canvas_left": 50,
      "canvas_top": 50,
      "width": 32,
      "height": 32
    }
  ]
}

Embedding a hosted dungeon prize next to other elements

{
  "type": "array",
  "orientation": "horizontal",
  "content": [
    { "type": "item", "item": "ep_prize", "width": 32, "height": 32 },
    { "type": "text", "text": "Eastern Palace" }
  ]
}

Tips and pitfalls

  • 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 whose codes field 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 / height explicitly. Setting both is recommended for predictable layouts.

See also

Clone this wiki locally