Skip to main content

Custom Types

Custom types let you bundle several related values into one object that travels through your flows together. Instead of juggling a username list and a separate score list and hoping the indexes line up, define a Player type with both fields and store a single list of players.

A custom type is a name plus a set of primitive fields. Each field is one of:

  • Text — a string
  • Number
  • Boolean
  • Color (hex) — a #rrggbb string

Fields can carry an optional default value. Fields cannot hold other objects or lists — if you need many of something, make the variable a list of your custom type.

Custom types belong to your account: define one once and it's available in every flow, every overlay, and every variable store.

Defining a type

  • Custom Types page — the full manager: create, edit, and delete types, with warnings before destructive changes.
  • Flow editor → New Type — a quick-create dialog for when you're mid-flow and need a new type right away.

Type and field names must start with a letter and contain only letters, numbers, and underscores.

Using a type in flows

Once a type exists, two nodes appear in the add-node menu for it:

  • Create <Name> — one typed input per field. Wire values in, or type inline defaults for unconnected fields. Outputs the assembled object.
  • Break Apart <Name> — takes the object and exposes one typed output per field. Wire only the fields you need.

The object flows along edges as its own type — a Player output only connects to Player inputs, and every Player edge shares one color.

Lists of custom objects

Every list node works with custom-object lists. Two get extra power:

  • List Find — pick a match field; the node searches the list for the entry whose field equals the value and outputs the whole matching object. Find the player named bob, then Break Apart the result to read his score.
  • List Contains — same match-field option for pass/fail routing. Without a match field it compares whole objects structurally.

Storing custom values

All four variable stores accept custom-typed values, as single objects or lists:

StoreScopePersistence
Flow variablesone flowreset each run
Overlay variablesone overlaypersistent
Broadcaster variablesyour channelpersistent
Viewer (user) variablesper viewerpersistent

The Get/Set variable nodes type their handles from the variable's type, so a Player-typed variable only accepts Player objects. The variable managers on the site include object editors, so you can inspect and edit stored values field by field.

In {{template}} tokens, fields of a custom-typed variable are addressable by path — {{viewer.stats.score}} reads the score field of a viewer's stats variable. A token for the whole object renders as JSON.

Editing a type

Edits apply everywhere at once — every stored value of the type is migrated for you:

  • Adding a field is free: existing values gain the field's default the next time they're read.
  • Renaming a field carries all stored data over to the new name (and updates match fields on list nodes).
  • Changing a field's type converts stored values where possible (42"42"), and falls back to the field's default where not.
  • Removing a field deletes that field from every stored value. This cannot be undone — the editor warns you with a count of affected flows and variables first.

Open flow editors reload automatically when a type edit rewrites their flow, so nothing is lost to a stale tab.

Deleting a type

A type can't be deleted while anything still uses it. The delete dialog lists the flows and variable stores that reference it; clear those out and delete again.