Skip to content

Authoring Layouts LastClearedLocation

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

Authoring Layouts — Last Cleared Location

A last cleared location element shows the most recently cleared location — a one-card display that updates whenever the player marks a location fully cleared. It's a small, stateless display useful as a streaming overlay element.

See Authoring Layouts for the file format and base fields. This page only covers fields specific to the last_cleared_location type.

JSON schema

Parsed in EmoTracker.Data/Layout/LastClearedLocation.cs. Note: this type is not currently listed in the schema's element-type enum, so VS Code may show a validation warning. The parser supports it.

Field Type Required Default Description
type "last_cleared_location" yes Literal string.
compact boolean no true Whether the location card is rendered in compact form (single icon + count) or full form (the same expanded card you'd see in a location popup).

Plus the standard base fields from Authoring Layouts → Fields every layout element shares.

Behavior

The element subscribes to the location database's LastClearedLocation property, which the runtime updates every time a section flips to the Cleared state. When that property changes, this element re-renders to show the new location.

If no location has been cleared yet (or the runtime resets LastClearedLocation to null), the element shows nothing.

Examples

A small reminder card in a corner

{
  "type": "last_cleared_location",
  "compact": true,
  "h_alignment": "right",
  "v_alignment": "bottom",
  "margin": "10"
}

A full card inside a status area

{
  "type": "container",
  "background": "#FF222222",
  "content": {
    "type": "array",
    "orientation": "vertical",
    "content": [
      { "type": "text", "text": "Last Cleared:" },
      { "type": "last_cleared_location", "compact": false }
    ]
  }
}

Tips and pitfalls

  • The element auto-refreshes. No script wiring is needed.
  • It can be empty. If no location has been cleared yet (fresh tracker, after a reload), the element renders as nothing. Author your surrounding layout to tolerate this — for example, by hiding the parent group when the element is empty isn't directly possible from JSON, but you can wrap it with text saying "Most recently cleared:" so an empty element doesn't look broken.
  • compact: true is the right default for tight UI like a streaming overlay. compact: false is for cases where the element has space to show full chest counters and section names.
  • Schema status. The last_cleared_location element type is currently absent from the layouts schema's enum, so VS Code's JSON validator may flag it. The parser still supports it.

See also

Clone this wiki locally