RTC/Substitution Strings

From DmWiki
Revision as of 11:45, 21 August 2008 by Gilles (talk | contribs) (New page: RTC can use substitution strings for text displayed on walls, floors or scrolls or in system messages. Wherever you use one of these special strings, instead of the string itself being dis...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

RTC can use substitution strings for text displayed on walls, floors or scrolls or in system messages. Wherever you use one of these special strings, instead of the string itself being displayed, a special value will be displayed instead.

For example, you could create a FLOORITEM_TEXT containing the string

%MEMBER_LEADER% says 'Watch out for traps!'

. When playing the game, %MEMBER_LEADER% will be replaced with the name of the current party leader, for example

Gothmog says 'Watch out for traps!'

Available Substitution Strings

  • %MEMBER_RANDOM%
  • %MEMBER_LEADER%

The following substitution strings pick the name of the character in the party with the highest value of that statistic:

  • %MEMBER_HEALTH%
  • %MEMBER_STAMINA%
  • %MEMBER_MANA%
  • %MEMBER_FIGHTER%
  • %MEMBER_NINJA%
  • %MEMBER_PRIEST%
  • %MEMBER_WIZARD%
  • %MEMBER_STRENGTH%
  • %MEMBER_DEXTERITY%
  • %MEMBER_WISDOM%
  • %MEMBER_VITALITY%
  • %MEMBER_ANTI-FIRE%
  • %MEMBER_ANTI-MAGIC%

The location strings give the numerical party coordinates / direction. Could be displayed on a map scroll for example.

  • %LOCATION_X%
  • %LOCATION_Y%
  • %LOCATION_Z%
  • %LOCATION_D%

These strings display elapsed time since the dungeon was started:

  • %DAYS_TAKEN%
  • %HOURS_TAKEN%
  • %MINUTES_TAKEN%
  • %SECONDS_TAKEN%

These strings are only valid when playing a Timed Dungeon:

  • %DAYS_LEFT%
  • %HOURS_LEFT%
  • %MINUTES_LEFT%
  • %SECONDS_LEFT%


  • %VALUE:xxx%

The last item %VALUE:xxx% is an extra special case and can be used to display the value of the unique item in the dungeon with the ID of XXX, for example: %VALUE:item010203-1%

Where that string appears in a text string, when it is used in the dungeon, it will be replaced with the "value" of the specified item. What the value is depends on the item (e.g. for a monster it will be its health, for a standard object its charge, for counters its count, etc.)

Care should be taken when using this because items can be destroyed / converted etc. and therefore the text may be substituted with a value for an item that you're not expecting it to if the original item has gone. Therefore I'd recommend only using it with permanent items (e.g. counters), but it will work with anything if dungeon designers want to.