Imagina RPG Docs
Creating worlds

Status screens

Learn how to design a status screen for your Imagina world, a panel of your own HTML and CSS that fills itself in from a journey's trackers, tables and characters and opens from a play button in a floating window. Covers presets, the template language, the preview and a table's Custom HTML look.

Early access

Status screens are in early access, open to a few verified creators for now. If the Status screens section is missing from your editor, your account does not have it. The feature may still change.

A status screen is a screen you design for your world in your own HTML and CSS, and that fills itself in from the journey: a character sheet, a quest journal, a bestiary, a case board, a ship's roster, a phone. It can show a character's current sprite and outfit, trackers as bars, a table as a timeline, a count of the secrets still kept. Players open it from a play button and it floats over the story in a window of its own, refreshed after every turn.

The storyteller never sees a screen, and opening one costs no turn.

A concrete example: a harbor mystery has a Case board screen. It draws the Suspicion tracker as a bar, lays out the three newest rows of the Leads table as notes, and ends on "2 leads still open". The player glances at it between turns and never has to ask where the case stands.

A screen or a table's look

Early access gives you two places to write a template, and they answer different needs.

  • One table on its own is a job for the table's own look. Set Display to Custom HTML in the table editor and the table shows your way wherever it is shown alone: a quest log as a checklist, a spell list as cards, a diary as a timeline. See Custom HTML look for a table.
  • A panel mixing trackers and tables is a status screen: a character page with two bars, an outfit, a portrait and the last three diary rows, in your world's own style.

Both use the same template language, the same presets and the same preview.

Making a screen

Open Images & display → Play buttons. With early access, a Status screens card sits under the play buttons. Click Add screen. A world holds up to five.

  • Name: the title of the screen's window in play, and its name among the pins. Up to 24 characters.
  • Frame: how the screen is dressed inside its window. With No frame it fills the window. Card sets it in a card. Phone sets it in a phone whose status bar shows the story's clock.
  • Icon: one of the play button icons. Left alone, it is a phone for the Phone frame and a notebook for the others.
  • Template: your HTML, up to 60,000 characters. Start from a preset and Insert sit above it. See Presets and Insert.
  • Bindings and Buttons: two reminders of the syntax covered below.
  • Preview: the screen as a player gets it, beside the template. See The preview.

A screen needs a play button to be reached. On the Play buttons card above, add a button, set Opens to A status screen and pick the screen. The choice appears once the world has a screen. One button is enough for several screens, because the title of an open screen's window switches between them. While no button opens any of them, each screen in the list reads No play button opens it yet.

Presets and Insert

You do not have to learn the template language from this page. Pick a preset, read what it wrote, and change it.

Start from a preset writes a working screen built from your world: its trackers, one of its tables and that table's columns, by their own names. It also sets the frame the preset is drawn for.

PresetIs
Plain panelIn the app's own colors, in a card
RPG status windowA blue menu box with a white rim
TerminalA green readout on black
Field notebookRuled paper and ink

A preset draws the trackers a player can see, the first player character's before the world's. Up to four trackers with a maximum become bars, and up to eight others show as a label and a value. Under them it lists the six newest rows of the first dynamic table players can see (or of the first reference table when the world has no dynamic one), and it adds the clock when the world keeps one. Hidden trackers, story variables and "Only if NSFW is on" items are left out.

Each preset explains the bindings it uses in HTML comments, so the template doubles as a lesson. Over a template that already holds something, the editor asks first: Replace takes the preset and Keep mine leaves your work alone.

Insert puts a snippet where your cursor is:

  • Tracker values: a visible tracker's value, by name.
  • Tracker bars: a ready-made bar, for trackers with a maximum.
  • Tables: a loop over one of your tables.
  • Story: {{player}} and {{clock}}.
  • Button: a button that writes a line into the action box. See Buttons.

A group only shows when the world has something to put in it. In a table's look, a This table group comes first. See Custom HTML look for a table.

Writing the template

The template is one piece of HTML with <style> blocks and style attributes. It follows the rules of the styled description panel: the same tags and the same CSS. What a screen adds is bindings, and one kind of button.

Bindings

A binding is a name in double braces, replaced by a value from the journey each time the screen is shown. It is written {{kind:name|option|option}}. Tracker, table, column and character names are the ones you gave them in the editor, and capitals do not matter.

BindingGives
{{tracker:Suspicion}}The tracker's value as the player's panel shows it (60/100)
{{tracker:Suspicion|num}}, |max, |minIts numbers. Empty for a Text tracker
{{tracker:Suspicion|percent}}0 to 100 between its minimum and maximum, for the width of a bar
{{character:Nora|outfit}}The outfit Nora wears now. Empty on her base look
{{character:Nora|sprite}}, |portraitA picture of her, for src or a CSS url()
{{#rows:Leads}} ... {{else}} ... {{/rows}}The block once per row, and the {{else}} part when there is none
{{row}}, {{col:Status}}, {{index}}Inside a rows block: the row's name, one of its cells, its number
{{cell:Leads|The night ferry|Status}}One cell, by row name and column
{{count:Leads}}The number of rows
{{clock}}, {{clock|day}}, {{clock|time}}The world clock, when the world has one
{{player}}The player character's name
{{#if:tracker:Mood=Wary}} ... {{else}} ... {{/if}}The block when the condition holds

A tracker drawn as a bar:

<p>Suspicion {{tracker:Suspicion|num}} / {{tracker:Suspicion|max}}</p>
<div class="bar"><i style="width: {{tracker:Suspicion|percent|default:0}}%"></i></div>

The three newest open rows of a table, each styled by its status:

<ul>
  {{#rows:Leads|where:Status=Open|newest|limit:3}}
  <li class="lead s-{{col:Status|slug}}">{{row}}: {{col:Note}}</li>
  {{else}}
  <li>No open leads.</li>
  {{/rows}}
</ul>

A line that only shows past a threshold, and a count:

{{#if:tracker:Suspicion|num>=80}}
<p class="alert">The harbor watch is looking for {{player}}.</p>
{{/if}}
<p>{{count:Leads|where:Status=Closed}} leads closed</p>

The options:

  • Filters. Rows blocks and counts take where:Column=Value, where:Column!=Value or where:Column~text (contains). Several filters must all hold. The column name is the row's own name.
  • Order and size. A rows block takes newest (last row first, since the storyteller adds rows at the end) and limit:3.
  • Conditions. {{#if:...}} compares with =, != or ~ for text and >, >=, <, <= for numbers. The comparison goes last. With no comparison, the block shows when the value is neither empty nor 0.
  • default:Text stands in for an empty value.
  • slug turns a value into a class name: Bent once becomes bent-once. That is how a status picks a style, as in the rows example above.
  • show-hidden lets one binding read what players do not see. See What players never see.

A binding that finds nothing shows nothing. The preview lists every tracker or table a binding could not read, with the reason. Blocks nest four deep at most.

Comments are notes

An HTML comment is a note to yourself. Comments are dropped before the screen is filled in, with any binding inside them, so players never receive them.

<!-- {{tracker:Suspicion|percent}}: a number from 0 to 100, for the width of a bar. -->

That makes a comment the quick way to switch a block off while you work. The one exception is the pair <!--nsfw--> and <!--/nsfw-->, which marks a passage. See What players never see.

Pictures

A character's sprite is the one on stage this turn and portrait is their portrait. Both only exist for characters the journey has met, so wrap the picture in a condition:

{{#if:character:Nora|sprite}}
<img src="{{character:Nora|sprite}}" alt="Nora" />
{{/if}}

The world's own pictures go by the names the styled description panel uses: asset:cover, asset:background, asset:cast/nora for a portrait, and extra:Harbor map for an Extra Image by its label.

What is removed when shown

A screen cannot run anything and loads nothing from outside your world. These are taken out before a player sees it:

  • Scripts, event handlers such as onclick, iframes and forms.
  • Outside resources: pictures that are not the world's, @import, @font-face, and any url() that is not one of your pictures.
  • position: sticky and fixed, so no bar stays pinned while the screen scrolls.
  • Blur in filter.
  • <nav> (use a div) and data- attributes of your own. Style by class.
  • Backslash escapes in CSS. Type the character itself, ✓ and not \2713.

Tabs still work without scripts, with radio buttons and labels as on the description panel. Give each radio an id and the tab a player was on stays open when the screen refreshes.

Buttons

A screen can do one thing: put a line in the player's action box.

<button data-write="I go and read the notice board.">Notice board</button>

Pressing the button writes its line after whatever the player already typed and hands them the box. It never sends. The player reads the line, edits it if they like, and plays the turn.

Bindings work inside data-write, so a row can carry a button about itself:

{{#rows:Leads|where:Status=Open}}
<button data-write="I follow up on the lead: {{row}}.">{{row}}</button>
{{/rows}}

A line holds up to 300 characters once its bindings are filled in, and a longer one is cut. A <button> without data-write is removed, and so is data-write on anything but a button. A button cannot open another screen, roll dice or send a turn.

Design for dark

Players always see a screen on a dark surface, whatever theme they use. You design one look and every player gets it. The Phone frame is the exception: its screen is light, like a lit phone.

A screen that sets its own background and text colors is left as you wrote it. To sit in the app like one of its own panels instead, build from these properties:

PropertyIs
--sa-inkThe text color, already the screen's default
--sa-muteSecondary text
--sa-softA faint fill, for a cell or the track of a bar
--sa-surfaceWhat is behind the screen: the window or the card
--sa-borderA hairline
--sa-accentThe accent color

In the Phone frame the same properties hold light values, so a screen built from them works in every frame. The Plain panel preset is written this way.

With no frame or in a card, a screen is as tall as its content and the window scrolls it. --sa-screen-height is the visible height of the window, for a frameless screen that paints to the bottom: min-height: var(--sa-screen-height). In the Phone frame the screen already fills the phone.

Do not use @media (prefers-color-scheme). It follows the player's device, not Imagina's theme.

The preview

The preview fills the template in the way play does, as you type and before you save, and draws it in its frame at the size of the window it opens in.

  • Preview picks the journey it reads. The start of a new journey is a fresh journey of this world. Below it come your own journeys of this world, the twelve played most recently, each read at its latest turn.
  • The start of a new journey reads the world as last saved. A tracker or table you just added shows as a binding that finds nothing until you save. A world that was never saved has no preview yet.
  • NSFW off shows the screen as a player without NSFW content gets it. The switch appears on a world that is not rated NSFW and has "Only if NSFW is on" items or an NSFW passage in the template.

Under the screen:

  • Writes: the line of the button you last pressed in the preview.
  • The bindings that show nothing, each with its reason: no tracker by that name, a table hidden from players, a block that is never closed.
  • Hard to read: text whose contrast with what is behind it is too low, with the ratio. Text over a gradient or a picture is not judged, and neither is text in a closed tab.
  • Removed when shown: every part of the template that was taken out.

None of these stops a save. In play, you also get the list of bindings that show nothing under your own world's screens. Players do not.

In play

A play button opens the screen in a floating window over the story, on every layout. A second tap closes it, and the button's label works as a slash command like any play button's. See Play buttons.

  • The window is dragged by its bar and snaps into a corner. A double tap on the bar switches between a small and a large size, the corner grip resizes it, and it can be tucked against a side of the screen.
  • Several at once. Each screen opens in its own window, so a player can keep two character pages up beside a pinned table or the map. The window's title is a picker for the world's other screens.
  • Pinned. Back to pins docks the screen in the Pins tab of the side panel (the pins sheet on phones), next to the pinned tables. From there, Pop out over the story floats it again and Unpin removes it. A pinned screen counts toward the journey's five pins.

Who gets the screens. Players need nothing. A world's screens follow its author's account: while you have early access, every player of your world gets them. If your account loses access, the screens and the buttons that open them drop out of every journey, and nothing is deleted from the world.

In a party. Guests get the play buttons and the screens like the host. A guest's screen reads their own character: their own trackers plus the world's shared ones, and {{player}} is their character's name. Tables, the clock and the cast belong to the journey, so the whole party reads the same ones.

Edits and versions. A journey plays its own copy of the world, so an edited template reaches journeys started after the edit, or updated to the new version.

Language. A screen is not translated. Every player reads it as you wrote it.

What players never see

A screen is filled in before it is sent, so what a player may not see never reaches their device.

  • Hidden state stays hidden. A tracker set to Hidden, one set to Revealed later that has not appeared yet, a story variable, a table players only see behind a spoiler and a hidden row all show nothing, in values, counts, cells and conditions alike.

  • Unless the binding ends with show-hidden. Each binding asks for itself: the option on a rows block does not cover another table or tracker read inside it. This is how a locked area works. Count what is still kept, and list only what has come out:

    <p>{{count:Case files|show-hidden|where:Status=Sealed}} files still sealed</p>
    {{#rows:Case files|show-hidden|where:Status=Opened}}
    <p>{{row}}: {{col:Summary}}</p>
    {{/rows}}
  • NSFW comes first. In a journey with NSFW off, "Only if NSFW is on" trackers, tables and outfits do not exist, and no binding brings them back, show-hidden or not. A passage between <!--nsfw--> and <!--/nsfw--> is cut from the template for those journeys, bindings included.

  • Characters follow the story. Only characters the journey has met have a sprite, an outfit or a portrait.

  • Journey values are text. Whatever a tracker or a cell holds is shown as plain text. It is never read as HTML or as a binding.

Custom HTML look for a table

A table shows as a list. With early access you can give it a look of your own instead, for the places where it is shown alone.

In the table editor, set Display to Custom HTML. A Template field opens with the same Start from a preset and Insert buttons as a screen, and the same preview under it.

The template is a status screen's, with one addition: {{#rows}} ... {{/rows}} and {{count}} name no table and read this table's own rows. Everything else works too, so a look can still show a tracker or count another table.

<ul>
  {{#rows|where:Status!=Done}}
  <li class="quest s-{{col:Status|slug}}">{{row}}: {{col:Reward}}</li>
  {{else}}
  <li>No quests yet.</li>
  {{/rows}}
</ul>
<p>{{count|where:Status=Done}} done</p>

Starters. Start from a preset offers four looks written against the table's own columns, each explained in comments. A dynamic table lists its newest row first.

  • List: each row with all its columns.
  • Checklist: a mark per row, set by its status. It reads the column named Status (or the first Choice column). For a Choice column it writes one style rule per choice and guesses which ones mean done or failed. Correct the guesses in the CSS.
  • Cards: a tile per row, for a cast, a catalog, a collection.
  • Log: entries on a timeline, for what happened.

In Insert, This table holds the table's own {{#rows}} loop, {{row}} and one entry per column.

Where it shows. In the table's pin, in its floating window and from a play button that opens the table. While a player uses the row filter, the rows come back as a list. The Memory popup always keeps the list, and so does a table players only see behind a spoiler. The storyteller never sees the look.

A look has no frame, and it follows the same dark surface, the same hidden rows and the same party rules as a screen. The rest of the table editor is covered in Tables.

Limits

  • Five screens per world, against three play buttons. One button reaches every screen through the window's title.
  • Name: 24 characters. Template: 60,000 characters, for a screen and for a table's look alike.
  • A button's line: 300 characters.
  • Blocks nest four deep.
  • A very large screen is cut short. Once filled in, a screen stops growing past 240,000 characters. A rows block stops on a whole row, and the preview says the rest was left out. Use limit on long tables.

Common mistakes

  • No play button. A screen nobody can open. Add one button that opens A status screen.
  • Rebuilding one table as a screen. A table shown alone only needs a Custom HTML look, which also dresses its pin.
  • Designing on white. Players get the screen on a dark surface. Read Hard to read in the preview before you publish.
  • A name that does not match. A renamed tracker or table leaves its bindings empty, and the preview lists them. A renamed column or character is not listed: its binding is simply empty, so look at the screen itself after a rename.
  • Notes with live bindings in CSS. Only HTML comments are dropped. A binding inside a /* */ comment in a <style> block is still filled in.
  • show-hidden on a secret. The option shows the value to every player. Use it for a count or a filtered list, not to print the secret itself.
  • Text values in a style. Put only numbers there (percent, num), and quote every attribute a binding sits in.
  • State only the screen knows. The storyteller never reads a screen. Anything the story should react to belongs in a tracker or a table, and the screen only shows it.

Frequently asked questions

On this page