User:PSGarak/Sandbox/VariantTable

From Fallen London Wiki

<noinclude>{| class="article-table mw-collapsible mw-collapsed" ! [[{{{Condition}}}|{{{Condition}}}]][[Category:{{{Condition}}}]] !Effect |-

|} </noinclude> 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 Storlet. The Effect argument describes what 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.

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."

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."

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]

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.

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

How the condition will be displayed on the header row.

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

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

Default
Text
Stringsuggested
Nth ValueValue N

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

Linerequired
Nth Value AliasAlias 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
Linerequired
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
Other Nth EffectSecond Effect N

The second effect when the Quality has Value N.

Default
Condition
Stringoptional