Difference between revisions of "Tag Reference"

From Wildermyth Wiki
Line 63: Line 63:
* '''<roleName.selector:option1,option2,option3>''' options separated by ,
* '''<roleName.selector:option1,option2,option3>''' options separated by ,


{| class="wikitable"
|-
! selector !! example !! might render as !! explanation


|-
| mf|| <bookish.mf:his/her> towel.|| her towel.|| male/female. if the target is a male, the first option, otherwise the second option.
|-
| mf || <bookish.mf:his/her/their> towel.|| their towel.|| male/female. if the target is a male, the first option. If the target is a female, the second option. If neither, the third option is used.
|-
| awm || I hope to find <romantic.awm:some fine vixen/some wily fox>.|| I hope to find some fine vixen.|| Attracted to women/men. If the target is attracted to women, the first option. If attracted to men, the second option. If no attraction can be determined, one is picked randomly (but consistently for that character.)
|-
| town OR hometown || Oh no I can't go back to <goofball.hometown>! || Oh no I can't go back to Markvale! || Finds the hometown of the character, or maybe the origin town if no hometown can be determined.
|-
| whm|| Let me grab my <hothead.whm:shield/cloak/robe/pitchfork>! || Let me grab my cloak! || warrior/hunter/mystic/none returns different text depending on the class of the target. If none, an optional fourth clause is used. if no fourth clause is present, pretend to be a warrior.
|-
| cdgmt|| This place stinks of <foes.cdgmt:mushrooms and mold and muckdwellers./Drauv and doom and death./oozing flesh and miscellanious gorgonous gases./gear-oil and rotting bones./spells and spiderfarts.>|| This place stinks of gear-oil and rotting bones.|| cultist/drauven/gorgon/morthagi/trhixl - give different text depending on the flavor of a threat.
|-
| exists || &lt;hook.exists:<hook> looks suspicious.../Nobody knows...&gt; || Aryssa looks suspicious... || if this role exists, i.e. there is one or more match, return the first option, otherwise the second option if any.
|-
| sp|| &lt;party.sp:I'm all alone out here!/I am sure am glad you're with me.&gt; || I sure am glad you're with me. || If the role has zero or one matches, return the first option, otherwise the second option.
|}
exists
exists
sp
sp

Revision as of 11:35, 9 February 2018

Wildermyth accomplished Dynamic Writing by using Tags to control what text is inserted into a passage.

Tags use <angle brackets> and allow a fairly wide variety of functionality.

Note: mostly case insensitive Note: comma and slash as separators, most of the time!


Top-Level Tags

These are simple tags that work in any context and insert names of interesting things.

tag example might render as explanation
Town <town> Ninesprings Finds either the nearest town, or the origin town for the heroes.
Company <company> The Fellowship of the Eagle Gives the name of the player's company, which they get a chance to choose at the end of the introduction.
Site <site> Moosetunnel Finds the relevant site in a situation, if there is one, or falls back to the nearest interesting site.
Tower <tower> Cranespire Finds the name of the Heroes' main base, their home tower, which they gain control of during the introduction.

Role Tags

Most tags (and the most useful tags) rely on Story Roles. A role is used to refer to a particular target, usually a hero, and then select text depending on properties of the target.

Role tags use this form:

  • <roleName> gives the short name of the target
  • <roleName.tag...> most tags work like this, has a variety of effects depending.
  • <roleName.#.tag...> where # is a number like 1,2,3,4... Which is useful if more than one entity is assigned to a role.

Numbered roles are not generally recommended because they're a bit awkward to think about, but sometimes they're convenient if, for example, you know there are 2 heroes in the party and you just need to list them or something.

Names

Use these tags to insert names.

tag example might render as explanation
<leader> Barlox Use a plain role tag to show the short name, which, for heroes, is always their first name.
shortName <leader.shortName> Barlox Short name. Same as unadorned role.
firstName <leader.firstName> Barlox First name. Same as short name.
name <leader.name> Barlox Same as short name and first name.
lastName <leader.lastName> Spidermusk If the entity has a two-part name, return the last part.
fullName <leader.fullName> Barlox Spidermusk The whole name. Very formal.
singular <foes.singular> Gorgon Useful for monsters, if you want the singular version of the monster group name.
plural <foes.plural> Gorgons Gives the plural version of the name of a group of monsters.

Selectors

Selector tags select between alternatives, depending on some aspect or stat of the target. They usually take this form:

  • <roleName.selector:option1/option2/option3> options separated by /
  • <roleName.selector:option1,option2,option3> options separated by ,
selector example might render as explanation
mf <bookish.mf:his/her> towel. her towel. male/female. if the target is a male, the first option, otherwise the second option.
mf <bookish.mf:his/her/their> towel. their towel. male/female. if the target is a male, the first option. If the target is a female, the second option. If neither, the third option is used.
awm I hope to find <romantic.awm:some fine vixen/some wily fox>. I hope to find some fine vixen. Attracted to women/men. If the target is attracted to women, the first option. If attracted to men, the second option. If no attraction can be determined, one is picked randomly (but consistently for that character.)
town OR hometown Oh no I can't go back to <goofball.hometown>! Oh no I can't go back to Markvale! Finds the hometown of the character, or maybe the origin town if no hometown can be determined.
whm Let me grab my <hothead.whm:shield/cloak/robe/pitchfork>! Let me grab my cloak! warrior/hunter/mystic/none returns different text depending on the class of the target. If none, an optional fourth clause is used. if no fourth clause is present, pretend to be a warrior.
cdgmt This place stinks of <foes.cdgmt:mushrooms and mold and muckdwellers./Drauv and doom and death./oozing flesh and miscellanious gorgonous gases./gear-oil and rotting bones./spells and spiderfarts.> This place stinks of gear-oil and rotting bones. cultist/drauven/gorgon/morthagi/trhixl - give different text depending on the flavor of a threat.
exists <hook.exists:<hook> looks suspicious.../Nobody knows...> Aryssa looks suspicious... if this role exists, i.e. there is one or more match, return the first option, otherwise the second option if any.
sp <party.sp:I'm all alone out here!/I am sure am glad you're with me.> I sure am glad you're with me. If the role has zero or one matches, return the first option, otherwise the second option.

exists sp others....

Stat Selectors

Stat selector tags allow you to pick different text depending on stat values, or depending on which stat is higher.

<roleName.STAT.##:statIsHigh/statIsLow> test a stat against a value, and give different text depending on the outcome.

examples...


<roleName.STAT1/STAT2/STAT3:stat1IsBest/stat2IsBest/stat3IsBest> test any number of stats against eachother, return text depending on which one is highest.

examples...