Skip to content

Draft: Text prompt features

Lactozilla requested to merge text-prompt-features into next

WIP!

New:

  • Added USDF-SRB2 DIALOGUE parser
  • Added multiplayer support
  • Implemented text sound support
    • textsound in USDF-SRB2
    • TEXTSFX in SOC
  • Added choices support
  • Added to Lua:
    • P_StartTextPrompt
    • P_EndTextPrompt
    • player.promptactive

Text commands

A text command starts with a { and ends with a }. After the {, there must be the command name. Optionally, after the command name, there may be a parameter. Whitespace after the { and before the } is ignored.

Text commands are parsed in page dialog text. They may be escaped by typing a backslash (\) before the { character. (Example: \{Escaped})

List of commands:

Name Description Parameter
DELAY Adds a pause. Optional; default is 12
PAUSE Similar to DELAY, but the player's inputs are ignored during the pause. Optional; default is 12
SPEED Changes the text speed. A speed of 0 causes the text to be typed instantly. Text speed in frames; must be an integer
NAME Changes the narrator name. Narrator name; must be a string
ICON Changes the narrator icon. Icon name; must be a string
CHARNAME Is replaced by the player skin name. None
SUPERNAME Is replaced by the player skin super name. None
PLAYERNAME Is replaced by the player netgame name. In singleplayer, this acts the same as CHARNAME None
NEXTPAGE Immediately causes the text prompt to go to the next page. None
WAIT Pauses the writing of the text, and waits for the player's input to resume typing. None
COLOR Changes the text color. Optional. Accepted parameters: WHITE, MAGENTA, YELLOW, GREEN, BLUE, RED, GRAY, ORANGE, SKY, PURPLE, AQUA, PERIDOT, AZURE, BROWN, ROSY, INVERT. Default is WHITE

COLOR commands are parsed and supported in page names and choice text.

Choices

A page may have multiple choices that the player may select. A choice may have a conversation or page to go to whenever it is selected. It may also execute a linedef, or end the conversation. Choices may specify if they are the highlighted choice whenever the list is presented to the user, or the choice to be highlighted whenever the player presses Spin.

srb20396

Edited by Lactozilla

Merge request reports