Template:Variant table/doc
This Template creates a collapsible table summarizing how an Action or Storylet varies based on the player's qualities.
Usage[edit]
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[edit]
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[edit]
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[edit]
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Condition | Condition | Name of the Quality whose value has a game impact.
| Page | suggested |
Condition alias | Condition alias Condition appearance | How the condition will be displayed on the header row.
| Line | optional |
Condition type | Condition type | The type of effect the condition causes. Should be one of Text, Math, Quality, or Raw.
| String | suggested |
Condition nowrap | Condition 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.
| String | optional |
Nth Value | Value N | A value or range of values the quality may take. Represents one row in the table. | Line | required |
Nth Value Alias | Alias N Appearance N | How the value for the Nth row should be displayed. Only use if the Condition type is Quality. | Line | required |
Effect | Effect | Description of the effect caused by the player's qualities.
| Line | suggested |
Second effect | Second effect | Description of the second effect caused by the quality, if there is one. | Line | optional |
Nth Effect | Effect N | The observed effect when the Quality has Value N. | String | suggested |
Truncate | Truncate | If set to "no", the effects will not be subject to the 250-charcter limit. (Use for non-narrative variant texts like Game Instructions.)
| String | optional |
Other Nth Effect | Second effect N | The second effect when the Quality has Value N. | Unknown | optional |
Compact arguments | Compact | When present, Effect N can be elided. Instead the Value of Value N is N, and the Effect is the value of that parameter.
| Boolean | optional |
Display Unaccounted numbers | Show Unaccounted | If "yes", add a Wiki Note listing numbers missing from the table.
| String | optional |
Unaccounted minimum value | Unaccounted Min | [Display Unaccounted functionality] The minimum value the table should probe for (1 for most qualities)
| Number | optional |
Unaccounted maximum value | Unaccounted Max | [Display Unaccounted functionality] The maximum value the table should probe for (100 for most Airs)
| Number | optional |