Dicey Table

The Script Console

The script console (em-script-console) is a strip pinned under the viewport, below the stage and above any open item-editor tab. It exists only to show you what your Table Scripts are doing while you test them with Play Scripts — it is not present at all until there is something to show it.

The script console strip open below the viewport showing a system message that no scripts are compiled yet

When it appears#

The strip renders only while scriptsRunning is true, or while it still holds output from a previous run — so stopping scripts does not clear the console out from under you, but a fresh scene with scripts that have never been run shows no console at all.

The header#

Element Does
Chevron + SCRIPT CONSOLE Toggles the body collapsed/expanded. Collapsing keeps the header (and the running badge) visible while hiding the log lines.
Scripts running (N) Shown only while running. N is the number of script instances — scene scripts plus every per-entity attachment — not the number of distinct script assets.
Clear Empties the entry list. Disabled when there is nothing to clear. Does not stop a running script.

Entry kinds#

Every line has a timestamp (HH:MM:SS, 24-hour, your locale) and one of four kinds, styled distinctly:

Kind Written by Example
log A script's own log(...) call Whatever string the script passed
broadcast A script's broadcast(...) call Prefixed with a broadcast source tag
diagnostic A script failure caught by the host The error message, optionally followed by a stack snippet on a second line; prefixed with {scriptName} · {phase} when known
system The shell itself Start/stop messages, the compiled-script count, and the auto-Frozen→Live notice

The console keeps at most 200 entries — the oldest are dropped silently once you exceed that, so a chatty tick script cannot grow the strip without bound. It also auto-scrolls to the newest entry as lines arrive.

What you will see across a typical run#

  1. Starting N compiled script(s) (M instance(s))… — a system line, as soon as you press Play Scripts.
  2. Simulation switched to Live so scripts can interact with physics. — a system line, only if you were on Frozen.
  3. Scripts running. — a system line once the host has actually started.
  4. Whatever the scripts themselves log or broadcast, interleaved as they run.
  5. Scripts stopped. — a system line when you press Stop (suppressed on an internal, silent teardown such as the one Restart performs before starting the new run).

If none of your project's scripts have been compiled yet, pressing Play Scripts produces a single line — No compiled scripts — open a script and Save to compile. — and nothing starts. Saving a script in its Monaco editor tab is what compiles it.

What it does not do#

The console is output-only. There is no input line, no way to invoke a script function from here, and nothing you do in this strip is saved anywhere — clearing it, collapsing it, or leaving Edit Mode all discard its contents with no trace in the scene document. Diagnostics routed through this console are the editor-only path; they are unrelated to the this.log event path used elsewhere in the runtime (see the caveat on Welding about a different log path that, as of this writing, is not wired into Edit Mode at all).

What the script console writes#

Control Written where
Any entry appearing Nothing — in-memory only, capped at 200 entries
Clear Nothing — empties the in-memory list
Collapse / expand Nothing — view state only

See also#