Template:Variant table

From Fallen London Wiki (Staging)
[[{{{Condition}}}|{{{Condition}}}]][[Category:{{{Condition}}} Text Uses]]"{{{Condition}}}" is not in the list (Unlock, Lock, Text, Formula) of allowed values for the "Use type" property.Effect
Template documentation (for the above template, sometimes hidden or invisible)

This Template creates a collapsible table summarizing how an Action or Storylet varies based on the player's qualities.

Usage

The Condition argument names the Quality that the Option or Storylet varies with. The Effect argument describes the type of change, such as "Title" or "Second paragraph of Description." The value of these two parameters are displayed as column headers in the table. Cells in the Nth row of the table are set with matching pairs of Value N and Effect N parameters. If Value N is supplied, but Effect N isn't, the template will set the tracking category Category:Pages with missing variant text. (This also supports the Second effect parameters and the Compact style, see below.)

The table usually summarizes the effect of one of the player's Qualities, and each row lists the game outcome of one value (or range of values) that Quality can take. The Condition type argument should be either "Text" or "Math," depending on whether depending on whether the game effect is textual (such as a title or description), or numeric (such as a challenge rating). If not set, Condition type defaults to "Text."

Advanced Parameters

The value of the Condition parameter is used to generate links and Categories. The Condition alias parameter can be used to change how the Condition Quality appears when displayed in the header row. If not supplied, the Quality is displayed as its own name. If no Quality is supplied, the column header will be "Condition."

In cases where the values are always simple (like plain numbers), the Compact parameter can save redundant typing. When this parameter is set, then parameter Value N on its own creates a matching pair of N and the value of the parameter, and the Effect N parameter is not used. In other words, |Value N = Foo is shorthand for |Value N = N|Effect N = Foo. Compact values are only allowed for Text or Math condition types.

Sometimes a single Quality has multiple effects on the page, such as altering both the title and description. A third column can be added, with a header set by Second effect and values set by Second effect N.

Occasionally, the table summarizes the effects of multiple Qualities, and each row lists the impact of an individual quality. In this case, the Condition type should be "Quality." The Value N parameter is used to create links and Categories, and the Alias N parameter can be used to change how it is displayed. The Alias N parameter has no effect unless the Condition type is "Quality." An effect caused by the absence of any relevant quality can be represented by the Value N parameter being present but empty.

Depending on the Condition type, values supplied to the Condition or Value N parameters are used to create links and add categories. To suppress this behavior (or manually create your own links and categories), set Condition type to "Raw."

Best Practices

When this table is used to describe variation in the text that is in the Description field of some Template, it should be placed in a way that comes after that Template, as closely as possible. Depending on the particular Template, this may mean the Wiki Note field, or immediately after the Template. Use in Summary fields is discouraged because that field represents player summaries of the truncated Description text, but sometimes it is the best available option. Note that the table does not appear when a page is transcluded via the {{Options}} Template.

Keep a single table focused. If you are having trouble fitting more data into a single table, consider splitting it into multiple tables. This template intentionally does not support more than three columns, multiple Condition Types, or intermediate header rows.

The Value N and Effect N arguments for a single N should be grouped together (with other N arguments, if applicable), and N should increase down the page. Out-of-order arguments will still display correctly, but please don't make it harder on other editors. The value of N should either increment per row, or match the value being displayed.

Examples

For several straightforward (albeit large) examples of this template for text and number information, see Persuade Furnace.

For an example with multiple effects, see Diving in the Magistracy.

For an example where each row is a separate quality, see Plan the next route across a ravine.

A table showing how this Action or Storylet varies based on the player's qualities.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
ConditionCondition

Name of the Quality whose value has a game impact.

Default
Condition
Pagesuggested
Condition aliasCondition alias Condition appearance

How the condition will be displayed on the header row.

Default
The Condition name if provided, or 'Condition' otherwise
Lineoptional
Condition typeCondition type

The type of effect the condition causes. Should be one of Text, Math, Quality, or Raw.

Default
Text
Stringsuggested
Condition nowrapCondition nowrap

If set to 'yes', nowrap will be applied to the Condition header. Disabling this can create some surprising behaviour when a table is expanded or collapsed so it's rarely useful to do so.

Default
yes
Stringoptional
Nth ValueValue N

A value or range of values the quality may take. Represents one row in the table.

Linerequired
Nth Value AliasAlias N Appearance N

How the value for the Nth row should be displayed. Only use if the Condition type is Quality.

Linerequired
EffectEffect

Description of the effect caused by the player's qualities.

Default
Effect
Linesuggested
Second effectSecond effect

Description of the second effect caused by the quality, if there is one.

Lineoptional
Nth EffectEffect N

The observed effect when the Quality has Value N.

Stringsuggested
TruncateTruncate

If set to "no", the effects will not be subject to the 250-charcter limit. (Use for non-narrative variant texts like Game Instructions.)

Default
yes
Stringoptional
Other Nth EffectSecond effect N

The second effect when the Quality has Value N.

Unknownoptional
Compact argumentsCompact

When present, Effect N can be elided. Instead the Value of Value N is N, and the Effect is the value of that parameter.

Default
Not compact
Booleanoptional
Display Unaccounted numbersShow Unaccounted

If "yes", add a Wiki Note listing numbers missing from the table.

Default
no
Stringoptional
Unaccounted minimum valueUnaccounted Min

[Display Unaccounted functionality] The minimum value the table should probe for (1 for most qualities)

Default
1
Numberoptional
Unaccounted maximum valueUnaccounted Max

[Display Unaccounted functionality] The maximum value the table should probe for (100 for most Airs)

Default
100
Numberoptional