Skip to reading
Buttons, Labels & Text Boxes

The GUI-only {brace} tokens

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Labels and button captions have an additional GUI expansion step. These brace tokens are useful for a command line that follows the selected verb and hovered object.

Source table from The GUI-only {brace} tokens, page 13
TokenWhat a GUI label or caption displays
{command}The current verb display name and hovered target name, combined and trimmed.
{verb}The current verb's display name, such as Look.
{target}The current hovered target label. It can be empty over blank space.
{player}The active player's display name.
{playerId}The active player's ID.
{value}The element's runtimeValue, or its named variable's value; 0 is the fallback.
{max}The element's max, or maxValue; 100 is the fallback.
{visitor_name}A runtime variable whose exact ID is visitor_name. Other variable IDs can use the same brace form.

For a standard label or button with no value/max setup, {value} / {max} can simply read 0 / 100. These tokens do not mean “the words in a nearby text box”. Use the input-reading script in Chapter 12 for that.

Reserved GUI tokens are replaced before the general variable brace lookup. If a variable is called target, {target} still refers to the hovered object. Use $$target to display that variable without the reserved-token collision.

For variable text you also want in Show Message, prefer $$variable. A GUI {command} means the current verb-and-hover display; it is not a general record of the last sentence typed into the parser.

Page 13 of 46Permalink
Go to page