Text tagging

From OHRRPGCE-Wiki
Jump to navigation Jump to search
Wip.png
This article or section discusses a future engine feature which has not been completed or possibly even started yet, and is not yet available in nightly builds/SVN wip branch. If you wish to discuss this feature, feel free to use the talk page or contact the developers.

Texttags are special markup for text boxes and other strings of text. They are partially implemented but are not available for use, even in nightly builds. See this mailing list post for the original proposal

Revise.png
This article or section is not complete. If you wish, you may finish it, and remove this tag when you are done.

Embedding[edit]

These are old, and are available for use.

  • ${C#} = Hero name at caterpillar slot #
  • ${P#} = Hero name at party slot #
  • ${H#} = Name of hero ID #
  • ${V#} = Global Plotscript Variable ID #
  • ${S#} = Insert String Variable with ID #

In addition, ${V#} will eventually be able to embed any typed global variable, obsoleting ${S#} for strings. Most types would only have printable representations suitable for debugging, though.

Text options[edit]

These markup codes are implemented but WILL change!

  • ${F#} - switch to font #
  • ${K#} - set foreground kolour to #. -1 to return to default
  • ${KB#} - set background colour.

If the font is paletted, these changes colours 1 and 2 respectively. If the font is 1-bit (unpaletted) two layer, the background colour is the colour of the shadow/edge.

  • ${KP#} - use palette # (for paletted fonts). -1 to return to default
  • ${KP#} - flicker each printed letter between the colours from palette #, Angband-style! (for unpaletted fonts)

Text slice options[edit]

These markup codes aren't even implemented yet!

  • ${W#} - pause for # ticks
  • ${WK} - wait for keypress, while displaying a little down arrow animation that would probably be adjustable somewhere in General Game Settings
  • ${SC#} - slow text: wait # ticks between each non-whitespace letter (0 to resume normal text). Note: maybe we need to support fractional ticks or milliseconds here
  • ${SL#} - slow text: wait # ticks between each line (0 to resume normal text)
  • ${ST#} - set tag # on, for use by scripts waiting for a certain point to be reached - alternatively ${ON#}, ${OFF#}
  • ${SR#} - scroll the text up # lines, hiding the top # lines (more details on modes of scrolling below)
  • ${F#} - play sound effect #

(all text options also available in text slices)

Textbox options[edit]

  • ${PR#} - change the portrait picture to #
  • ${PA#} - play portrait animation #, when that is implemented. Actually I'm not sure about this one, because I wasn't planning on assigning numbers to animations, but always referring to them by name.
  • "${AN"grimace"}" is a bit much.

(all text slice options also available)