Skip to content

Stage

A visual novel’s stage: a background filling its Size, and the characters inside it (each a Character) standing at its named Positions. The lines of a Dialogue direct it with tags, done as each line is said: “[background Park fade]” changes the background, “[show Ava left happy]” brings Ava on at the left looking happy (or, when she’s on already, moves her there and changes her face), “[move Ava right]” walks her over, “[hide Ava]” takes her off and “[hide all]” clears the stage; a tag can end with how it happens, cut, fade or slide. “Ava (happy): …” says a line with that expression. Whoever speaks is lit and the others on stage dimmed. Its AdvanceAction (Space, the gamepad’s A) moves the talk on as Interact and a click or tap do (finishing the line being typed first).

Part of the Visual Novels module: Visual novels: a Stage with backgrounds and the characters on it (Character), at named positions and with expressions, directed by the lines of a dialogue (“[show Ava left happy]”, “[background Park fade]”); the Visual Novel template, a short story with three endings; and Create Stage, Create Character and Create Reading Menus in the Entity menu.

A dialogue directs the stage it’s inside, or else the scene’s first. Its Background, Show, Hide, Hide All and Direct actions are there for a trigger, a wire or a script, and its Background and Speaking outputs for a text. What it shows (the background, who’s on, where and how they look, and transitions under way) is saved with the scene, so a rewind goes back to it. In a network game each machine keeps its own stage, for its own player’s reading.

Works with: Character (who stands on it, inside it); Dialogue (whose lines direct it)

Takes the player’s input only while it has focus (its Controllable): its Focus action hands it the input and takes it from everything else the same player plays.

Draws itself (its entity draws at Order -100 unless it has a Sprite, whose order counts).

In a network game, each machine keeps its own entity with this on it: it isn’t sent.

Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.

  • positions: lines of text: an array of strings, or one string with line breaks = [“Left: -4.5”,“Center: 0”,“Right: 4.5”]. Where characters stand, one per row: a one-word name and how far across from the stage’s middle (and, after a comma, how far up), e.g. “Left: -4.5” or “FarLeft: -7, -0.5”. Tags name them: “[show Ava left]”. (Positions, one per row: a one-word name and how far across from the stage’s middle, and after a comma how far up, e.g. “Left: -4.5” or “FarLeft: -7, -0.5”. The Inspector lists them a row each with the numbers set.) (Field: its own editor: Positions.)
  • backgrounds: lines of text: an array of strings, or one string with line breaks = [“Day: #8EC5FF #E8F4FF”,“Night: #0B1026 #2B3A67”]. The backgrounds it can show, one per row: a name and a picture (“Park: Backgrounds/park.png”), a color (“Night: #10183A”), or a color at the top running to another at the bottom (“Dusk: #F2A65A #3A2F5B”). Tags name them: “[background Park fade]”. (Backgrounds, one per row: a name and a picture (“Park: Backgrounds/park.png”), a color (“Night: #10183A”) or a color at the top running to another at the bottom (“Dusk: #F2A65A #3A2F5B”). The Inspector lists them a row each with the picture picked from the project’s or the colors shown.) (Field: its own editor: Backgrounds.)
  • background: text = “Day”. The background showing, one of Backgrounds: set it here for the one the game starts with. (Names one of its backgrounds (Backgrounds); the Inspector picks from them and flags a name that isn’t one. Empty for none.) (Field: its own editor: Choice Of.)
  • size: [x, y] = [16,9]. How big the background is, in world units (as much as the camera shows, for a whole screen). (Field: a vector.)
  • order: a whole number = -100. Where the background draws among the rest: under the characters (0) and the dialogue box. (Field: a number.)
  • backgroundTransition: one of Cut, Fade, Slide = “Fade”. How backgrounds change when a tag doesn’t say: “[background Park]”. (Field: one of its values.)
  • characterTransition: one of Cut, Fade, Slide = “Fade”. How characters come on and go off when a tag doesn’t say: “[show Ava]”. (Field: one of its values.)
  • transitionTime: a number = 0.5. Seconds a fade or slide takes. (Field: a number.)
  • moveTime: a number = 0.4. Seconds a character takes to walk to another position. (Field: a number.)
  • slideDistance: a number = 3. How far a character slides in from (or out to), past their position, toward the side of the stage they’re on. (Field: a number.)
  • dimOthers: a number = 0.45. How much darker the others on stage go while someone on it speaks, from 0 (not at all) to 1 (black). When nobody on stage speaks (a narrator), nobody is dimmed. (Field: a number.)
  • controllable: true or false = true. Takes the player’s input: off, its Advance Action doesn’t move the talk on (Interact and clicks still do). (Field: on or off.)
  • advanceAction: text = “Jump”. An input action that moves the talk on as well as Interact and a click: Jump is Space and the gamepad’s A. (Names an input action.) (Field: a name.)
  • skipAction: text = “Skip”. An input action that skips while it’s held: lines read before go by in a moment, stopping at choices and at a line not read yet (unless the player’s Skip Unread setting is on). Skip is Ctrl and the gamepad’s right trigger. (Names an input action.) (Field: a name.)
  • autoAction: text = “Auto”. An input action that turns reading on by itself on and off (see the player’s Auto Speed setting): Auto is A and the gamepad’s X. (Names an input action.) (Field: a name.)
  • leavingBackground: text = null. The background being changed from, while a fade or slide is under way. (Plain text: the background being left: the game sets it.) (Field: text.)
  • changing: one of Cut, Fade, Slide = “Cut”. How the background is changing. (Field: one of its values.)
  • changeLeft: a number = 0. Seconds left of the background’s change. (Field: a number.)

What anything can make it do with no code: a Trigger’s do when its message arrives, a Contraptions Wire’s input as its signal comes on, a script’s Game.Do(entity, “Name”).

  • Background (done with a name, its name: a trigger’s with). Changes the background to name, one of Backgrounds, as “[background Park]” does, with its BackgroundTransition.
  • Show (done with a name, its character: a trigger’s with). Brings the character called that on, as “[show Ava]” does: where they were last, or in the middle.
  • Hide (done with a name, its character: a trigger’s with). Takes the character called that off, as “[hide Ava]” does.
  • HideAll. Takes everyone off, as “[hide all]” does.
  • Direct (done with a name, its direction: a trigger’s with). Does a direction written as a dialogue tag says it, without the brackets: “show Ava left happy”, “background Night fade”.
  • Focus. Gives its entity the player’s input: whatever there and inside it has focus, and everything else the same player plays loses it (a platformer’s player stops on the arrow keys while a board takes them).

What anything can read with no code: a Counter’s, Bar’s or Text’s output, a Contraptions Wire’s output as its signal; Text shows names too, the rest read numbers, true as 1.

  • Background (a name). The background showing, one of Backgrounds: set it here for the one the game starts with.
  • Speaking (a name). The name of whoever on the stage is speaking now, or empty.
  • OnStage (a whole number). How many characters are on it now.

Not saved with the scene; scripts read them, and entity_get shows them as live while the game plays.

  • speaking: text. The name of whoever on the stage is speaking now, or empty.
  • onStage: a whole number. How many characters are on it now.

Scripts use it as Stage: its methods, events and values that aren’t saved with the scene.