String Parsing

From Flexible Survival
Revision as of 14:58, 18 May 2011 by Sevenish (talk | contribs) (Created page with "<br> String Parsing refers to some of the underlying guts of the MUD. You can use it to liven up your creature submissions, rooms, and even your own description. == Basic Synta...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


String Parsing refers to some of the underlying guts of the MUD. You can use it to liven up your creature submissions, rooms, and even your own description.

Basic Syntax

String parsing processes only what is in between [brackets]. Keywords and functions should all be in lowercase, though the code is supposedly case sensitive. There should be no spaces after the [leading bracket or before the trailing bracket].

Line breaks are bad. Avoid them when parsing. [Set of parse code]{line break}[Another set of parse code] is fine.

[value] will return that value. Conditionals are formatted as [if X]item 1[otherwise]item 2[end if]. Randoms are [one of]X[or]Y[or]Z[at random]. Do NOT nest randoms.

Values

victor - returns the name of the winner in a fight (creature desc only)
loser - returns the loser of a fight (creature desc only)
player - returns the container of the description
looker - returns the viewer of a description

Sub-values

mutation/skin - returns skin mutation
mutation/head - returns head mutation
mutation/arms - returns arms mutation
mutation/torso - returns torso mutation
mutation/cock - returns groin mutation
mutation/legs - returns legs mutation

Example Code