Module:Data/doc

Notice: This module is currently in limited alpha-testing. Currently this module only supports weapons, armors, and accessories. Support for ability materia, consumables, and enhancer units are pending.

This module is a work in progress. Do not convert pages which contain information that the module cannot display, however please do inform CodeHydro of the name of a such a page so that he may add support for such information.

Module:Data standardizes the output of various article pages and allows those pages to be transcluded like a Template so that updating that one page may automatically sync the information across all pages.

When using this module, the #invoke tag must be wrapped inside an onlyinclude tag, which must not contain any newline characters outside of the #invoke tag.

Empty template
Below is an empty template with commonly used parameters for equipment. Click inside to select all.

Data page (#invoke page)
{| class=wikitable style="width:100%"
 * colspan=3|

Intro section
! Parameter !! Description
 * || Takes the name of the item
 * || Usually left blank. Allows the specification of an image file when the image name does not match the form  where name is replaced with the value passed to.
 * || Takes the description (or "story") of the item
 * colspan=3|
 * || Takes the description (or "story") of the item
 * colspan=3|
 * colspan=3|
 * colspan=3|

Statistics section
! Parameter !! Description
 * || Takes the type of equipment (case sensitive). For weapons and armor, enter only the value normally displayed in parenthesis. For example, produces:
 * Type: Weapon (Great Sword)
 * style="line-height: 250%" |      || Takes either a whole number or a percentage value. For items that grant both a fixed and a percentage stat, enter both fixed and percentage parts with a   character between them.
 * Takes whatever element the weapon bestows upon the unit's attacks.
 * Takes a list of resistances separated by commas. Status ailments are autolinked.
 * Takes whatever element the weapon bestows upon the unit's attacks.
 * Takes a list of resistances separated by commas. Status ailments are autolinked.
 * Takes whatever element the weapon bestows upon the unit's attacks.
 * Takes a list of resistances separated by commas. Status ailments are autolinked.
 * Takes a list of resistances separated by commas. Status ailments are autolinked.
 * Takes a list of resistances separated by commas. Status ailments are autolinked.

Takes a list of ability/effect values separated by commas.
 * style="line-height: 250%" |
 * style="line-height: 250%" |

Values that do not contain  are treated as page names and will be autolinked. If a page name has a parenthetical, autolink will hide the parenthetical on the template page (but will show it on category pages).

For, you may list Status Ailments without links like so  and the ailment will be autolinked appropriately rather than being treated as a page name.

Note that eventually it is planned for tooltips (as shown above for Fire) to be automatically generated when autolinked once Module:Data has been extended to abilities. Takes a value which is appended to the end of the Additional effects bullet without autolink. This value is shown in bold in categories.
 * style="line-height: 250%" |
 * style="line-height: 250%" |

Example on category pages:


 * colspan=3 |
 * colspan=3 |

Notes section
! Parameter !! Description
 * || Enter any additional information related to the item. For example, this may include details on any unique ability it grants.
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |

Crafting Recipe section
! Parameter !! Description Takes a list of locations or events (separated by commas) where the recipe can be obtained. This list will appear in the "How to Obtain" section.


 * || Enter the cost to purchase the recipe from a shop.
 * || Enter the cost to use the recipe to craft the item.
 * || Takes a list of materials required to craft and their quantity, separated by commas.
 * || Enter the time it takes to craft the item. This parameter is no longer in use.
 * colspan = 2 |
 * colspan=3 |
 * || Enter the time it takes to craft the item. This parameter is no longer in use.
 * colspan = 2 |
 * colspan=3 |
 * colspan = 2 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |

Usage section
! Parameter !! Description
 * || Separate groups with semi-colons and items with commas. First item in group should be the group title, separated from the list with a colon. Autolinked.
 * || Separate groups with semi-colons and items with commas. First item in group should be the group title, separated from the list with a colon. Autolinked.


 * || Separate values with commas. Autolinked.
 * || Separate values with commas. Autolinked.


 * colspan=3 |
 * colspan=3 |

How to obtain section
! Parameter !! Description
 * style="line-height: 250%" |  || Enter the purchase cost of the item. If  is given, then  will be ignored and the Shops subsection will be replaced by Fat Chocobo. Item/item2 modes will show start quartz as the currency automatically.
 * style="line-height: 250%" |      || Enter location values separated by commas.
 * style="line-height: 250%" |      || Enter location values separated by commas.
 * style="line-height: 250%" |      || Enter location values separated by commas.

Location values which do not contain  will be placed inside double brackets automatically.

Note that the table form of and  are not currently available. This form will be added when Module:Data is extended to non-equipment types. (The only dropped equipment currently is Excalipoor which doesn't use the table form)
 * || Takes the name of the unit that provides this item as a Trust Mastery Reward.
 * || Takes the name of the unit that provides this item as a Super Trust Mastery Reward.
 * colspan=3 |
 * || Takes the name of the unit that provides this item as a Super Trust Mastery Reward.
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |

Equippable By section
! Parameter !! Description Enter Units that can use the item, separated by commas. This is usually meant for equipment that is locked to a specific unit.


 * }

Empty template
Below is an empty template with commonly used parameters for abilities. Click inside to select all.  < /onlyinclude>

Data page (#invoke page)
{| class=wikitable style="width:100%"
 * colspan=3|

Intro section
! Parameter !! Description
 * || Takes the name of the item
 * || Takes the image used by the item.
 * colspan=3 |
 * || Takes the image used by the item.
 * colspan=3 |
 * colspan=3 |

Statistics section
! Parameter !! Description
 * || Takes the ability's type (Case Sensitive). The valid types are ,  ,  ,  ,  ,.
 * || Takes a number representing the magic level.
 * || Takes a list of effects separated by new line characters. All effects are passed to this parameter EXCEPT:
 * Unconditional passive stat boosts/evasion (handled by the parameters)
 * Awakened effects (see )
 * || Takes a list of effects separated by new line characters. All effects are passed to this parameter EXCEPT:
 * Unconditional passive stat boosts/evasion (handled by the parameters)
 * Awakened effects (see )

For effects that enable other skills, you may also list special instructions called Overrides, which will be discussed in greater detail later.

Overrides
Override instructions may be used in two ways to:
 * provide information for enabled abilities that do not have a page (Leap)
 * display different text than is shown on the enabled ability's page (See Unlock Magic on Terra's page and hover pointer over the effect of Chaos Wave)

Usually overrides have no visible effect outside of (except in the case of randomly enabled skills, which display the conditional table is shown in the Abilities section).

Unlike awakening overrides (which can override all parameters), enabled effect overrides can only override the following parameters:

You do not need to override all three. Any remaining data will be fetched from the page if available or replaced with - if unavailable. (An override for is required if no page exists to avoid an error message, even if blank.)

They can take the form  or , according to personal preference (generally, the first is easier to read when there are multiple abilities being overridden, while the latter is easier to read when only one ability is being overridden).

Also unlike with awakening overrides, multi-line values must be kept on the same line, using or \n to delimit each line. Takes the frame (delay in 1/60 seconds) of each hit. Frames can be separated by either  or. If the parameter is delimited by either / or ;, this param must be delimited in the same way.
 * || Takes a chaining family name. Finds the corresponding chaining family and autolinks to it.
 * || Takes the number of hits. For randomized abilities, separate the hit count for each ability with either / or ; (interchangeable).
 * || Takes the number of hits. For randomized abilities, separate the hit count for each ability with either / or ; (interchangeable).
 * || Takes the number of hits. For randomized abilities, separate the hit count for each ability with either / or ; (interchangeable).

If there are fewer / or ; in than, the module will assume omitted values are for non-damaging abilities (e.g. when  has 4 values,  is equivalent to  and )


 * || Takes a number for the MP cost of the ability. For MP bonuses, use
 * || Highlights specified abilities. Finds the corresponding abilities within a given page's table and is controlled by a "Filter" button that highlights the background color of the specified abilities. Used for distinguishing 2 or more abilities can be multi-cast.
 * || Takes a number for the MP cost of the ability. For MP bonuses, use
 * || Highlights specified abilities. Finds the corresponding abilities within a given page's table and is controlled by a "Filter" button that highlights the background color of the specified abilities. Used for distinguishing 2 or more abilities can be multi-cast.
 * || Highlights specified abilities. Finds the corresponding abilities within a given page's table and is controlled by a "Filter" button that highlights the background color of the specified abilities. Used for distinguishing 2 or more abilities can be multi-cast.

Multi-cast spells are not included. Page translation currently does not work as the original name is required (e.g. use  instead of  ). ! colspan=2 |
 * - class=subheader

Passive Stats

 * || rowspan=8 | Takes a percentage value. This is for stat bonuses that have no requirements and are usable by any unit. Conditional bonuses (for example "when equipped with a Robe", should be defined in.
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |

Abilities section
! Parameter !! Description
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |

Notes section
! Parameter !! Description
 * || Enter additional notes about the ability, such as how it stacks and interacts with equipment or other abilities.
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |

Crafting Recipe section
! Parameter !! Description
 * || Takes a list of locations or events (separated by commas) where the recipe can be obtained. This list will appear in the "How to Obtain" section.
 * || Takes the cost to purchase the recipe from a shop.
 * || Takes the cost to use the recipe to craft the item.
 * || Takes a list of materials required to craft and their quantity, separated by commas.
 * colspan=3 |
 * || Takes the cost to use the recipe to craft the item.
 * || Takes a list of materials required to craft and their quantity, separated by commas.
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |

Usage section
! Parameter !! Description
 * || Takes separate groups with semi-colons and items with commas. First item in group should be the group title, separated from the list with a colon. Autolinked.
 * || Takes separate values with commas. Autolinked.
 * colspan=3 |
 * || Takes separate values with commas. Autolinked.
 * colspan=3 |
 * colspan=3 |

How to obtain section
! Parameter !! Description Location values which do not contain  will be placed inside double brackets automatically.
 * || rowspan=2 | Enter the purchase cost of the item. If  is given, then   will be ignored and the Shops subsection will be replaced by Fat Chocobo. Item/item2 modes will show start quartz as the currency automatically
 * -buy_gil
 * || rowspan=6 | Takes location values separated by commas.
 * -buy_gil
 * || rowspan=6 | Takes location values separated by commas.
 * || rowspan=6 | Takes location values separated by commas.

Tables may be entered using alternative markup as shown below:

Also accepts wikitable markup when  are escaped using   or Module:Wikitable, like so:


 * || Takes ability values separated by commas. Autolinked.
 * || Takes the name of the unit that provides this ability as a Trust Mastery Reward.
 * || Takes the name of the unit that provides this ability as a Super Trust Mastery Reward.
 * || Takes separate groups with semi-colons and items with commas for any other method of obtaining the ability, such as premium bundles.
 * colspan=3 |
 * || Takes ability values separated by commas. Autolinked.
 * || Takes the name of the unit that provides this ability as a Trust Mastery Reward.
 * || Takes the name of the unit that provides this ability as a Super Trust Mastery Reward.
 * || Takes separate groups with semi-colons and items with commas for any other method of obtaining the ability, such as premium bundles.
 * colspan=3 |
 * || Takes ability values separated by commas. Autolinked.
 * || Takes the name of the unit that provides this ability as a Trust Mastery Reward.
 * || Takes the name of the unit that provides this ability as a Super Trust Mastery Reward.
 * || Takes separate groups with semi-colons and items with commas for any other method of obtaining the ability, such as premium bundles.
 * colspan=3 |
 * || Takes the name of the unit that provides this ability as a Trust Mastery Reward.
 * || Takes the name of the unit that provides this ability as a Super Trust Mastery Reward.
 * || Takes separate groups with semi-colons and items with commas for any other method of obtaining the ability, such as premium bundles.
 * colspan=3 |
 * || Takes separate groups with semi-colons and items with commas for any other method of obtaining the ability, such as premium bundles.
 * colspan=3 |
 * colspan=3 |

Equippable By section
! Parameter !! Description
 * || Takes a comma separated list of units that can use this ability. This is usually meant for Ability Materia that is locked to a specific unit.
 * colspan=3 |
 * colspan=3 |
 * colspan=3 |

Ability Awakening section
! Parameter !! Description Awakening parameters are the only parameters relevant to abilities which are not included the Empty Template due to the uniqueness of awakenings. To be properly handled, the name of the parameter must have the form  where # is the awakening level and name must match either a unit listed in the  parameter or a skill listed in the  parameter.
 * style='white-space:nowrap;vertical-align:top'|
 * style='white-space:nowrap;vertical-align:top'|

Awakening parameters take a series of instructions, separated by newline characters, and are read sequentially. Though a little complex at first glance, writing these instructions should be fairly easy once you've learned the syntax.

There are four basic instructions:
 * Replace (or Strikeout) -
 * Override -
 * Append
 * Import

For the most part, bold and strikeout are handled automatically, though you may prevent automatic text formatting by including text, text, or text markup in the instruction. ! Instruction !! Description Replace Strikeout   (Operator: =>) Replace takes the form where A is a substring of the output of the previous result (unbolded and strikeouts removed) and B is the new substring.
 * - class=subheader
 * style='white-space:nowrap;vertical-align:top'|
 * style='white-space:nowrap;vertical-align:top'|

Any replacements made are cascaded to the next awakening level, so replacements should be adjusted accordingly, as shown in this example from Curaga:

Because replacements are based on the output, not the input, autolinked text must be manually linked in order to match. For example, based on Lovely Guard+1 for Marie:


 * }

If a replacement is a success on last section of the ability's page, it is usually successful on the Ability Awakening page as well, however, because bold and strikeouts are not stripped between awakening levels for the latter page, you will need to include the autobolded output when replacing text the text surrounding an autobolded substring [insert Unlimited example]]

Replace instruction from previous awakening levels do not survive recalculations, which can be triggered by override instructions (described in Override). However, those in the current awakening will be applied after any recalculation is done (and before append instructions).

Special cases

If B is omitted, this becomes a Strikeout instruction. Note that the first letter of the next word will be automatically capitalized if the striked text is from the beginning of the output.

Example from Pray (Replace instruction highlighted; blank comment is optional but helps readability):

If A is omitted (=> B), the text is inserted at the end of the last line. In contrast to an Append instruction, this does not put the text on a new line, as shown in this example from Aeroga:

If A contains ^ only (^ => B), the text is inserted in front of the first line instead, with the first letter of the first word uncapitalized automatically.

Override  (Operator: =) Override changes the value of any parameter (or sets the value when one is not there). This instruction takes the form where A is the parameter name being overridden and B is the new value assigned to it.
 * style='white-space:nowrap;vertical-align:top'|
 * style='white-space:nowrap;vertical-align:top'|

Will trigger a recalculation if overridden parameter is either or  (collectively referred to as recalculating overrides). Due to the multi-line-nature of these parameters, this module will include all operator-less lines which follow the override in the new value up to the next line which contains either = or =>. (Lines which follow overrides of non-recalculating parameters will not be considered part of the override and will be treated as Append.) If recalculation occurs, the whole effect output may be bolded automatically.

If the original unawakened effect is contained within the recalculated effect, then the original part will be unbolded. Conversely, if the recalculated effect is found within the base effect, the new effect will remain unbolded (See Chaos Wave)

Example from Tri-beam Laser: awk_mat= Power,23,15,12,4,2,500000 effect	= Randomly use: (30%) Tri-beam Laser (white) (30%) Tri-beam Laser (yellow) (30%) Tri-beam Laser (orange) (10%) Tri-beam Laser (red) Decrease fire, lightning, and light resistance (75%) for 3 turns to all enemies ability=
 * Ace+2=

Magic damage (4.2x) with ignore SPR (25%) to all enemies Magic damage (5.6x) with ignore SPR (25%) to all enemies Magic damage (22.5x) with ignore SPR (25%) to all enemies

Any Replace or Append instructions from previous awakenings will be lost upon recalculation, though those listed for the current awakening will be applied after recalculation (even if listed before a recalculating override). Recalculation is always done after all overrides have been processed.

Finally, although the awakening overrides resemble enabled effect overrides from the Statistics section, you cannot use the form  here. (Brackets are unnecessary for awakening overrides since they always apply only to the skill of the current page.) Append Append instructions are lines which do not contain any operators (= or =>) and which do not follow an override of or. These lines are appended to the end of the result as though it were a new effect line. Such is done without actually modifying the effect parameter, so no recalculation is triggered.
 * style='white-space:nowrap;vertical-align:top'|
 * style='white-space:nowrap;vertical-align:top'|

Example from Pray:

Empty lines are ignored. If a gap is desired, you may simply enter in front of the next line.

Appended effects have partial auto-linking for killers, equipment, and status ailments, but NOT for enabled abilities. They are also not pattern processed for auto-tables. (Full auto-linking and auto-table require overrides instead.)

Append instructions from previous awakening levels will not survive recalculation, however those in the current awakening will be applied after any recalculation is done (and after any Replace instructions).

Finally, do not use append instructions to add lines such as MP cost reduced to X or Hit count increased to X&mdash;override or  instead. Import Import all instructions from another awakening parameter simply by entering the target parameter name as the first line by itself. Must be the first instruction. You may include additional instructions afterwards.
 * style='white-space:nowrap;vertical-align:top'|
 * style='white-space:nowrap;vertical-align:top'|

Example from Curaga:

Note how inherits the value of  and the Replace instruction from.
 * }
 * Used for shop pages. This mode is the default whenever equipment pages are transcluded onto non-category pages. Non-equipment pages default to instead.
 * style="border-left:1px solid;padding:0.5em" |
 * }
 * Similar to item mode, except an icon will be included
 * Similar to item mode, except an icon will be included
 * Similar to item mode, except an icon will be included


 * style="border-left:1px solid;padding:0.5em" |


 * }
 * Used for recipes sold in shops.
 * style="border-left:1px solid;padding:0.5em" |
 * }
 * Variant of which skips the type column and sets  on the statistics cell. This mode automatically applied for non-equipment.
 * }
 * Variant of which skips the type column and sets  on the statistics cell. This mode automatically applied for non-equipment.
 * Variant of which skips the type column and sets  on the statistics cell. This mode automatically applied for non-equipment.
 * Variant of which skips the type column and sets  on the statistics cell. This mode automatically applied for non-equipment.

[example] ! colspan=2 | For abilities only
 * This mode is generally only explicitly declared to emulate category displays on non-category namespace. When an item page is transcluded in category namespace, Module:Data will use category mode automatically. Psuedo-category pages for abilities such as Ability Materia and Special Abilities (Passive) also default to this mode.
 * style="border-left:1px solid;padding:0.5em" |
 * }
 * Used to make a tooltip. This is the only mode that cannot be customized or extended.
 * Creates a table row with no default cells. See
 * Similar to custom except that cells will not be placed on a new table row.
 * - class=subheader
 * Used to make a tooltip. This is the only mode that cannot be customized or extended.
 * Creates a table row with no default cells. See
 * Similar to custom except that cells will not be placed on a new table row.
 * - class=subheader
 * Similar to custom except that cells will not be placed on a new table row.
 * - class=subheader
 * Similar to custom except that cells will not be placed on a new table row.
 * - class=subheader
 * conditional
 * [placeholder]
 * awaken
 * [placeholder]
 * }
 * [placeholder]
 * }

Parameters
The following parameters can also be used on  tags:

For magic words, see.

Wrappers
Creating tables and their headers can be simplified by using, automatically creating the proper table headers and allows you to define any desired table headers. The wrapper takes the following parameters

Example:

Extension and customization
Each table can be extended to include additional information by providing the attribute's name as parameters. If the transclusion uses, these parameters are required in order to display a table row.

The data in the cells can be further modified using the format. Anything after the  will be displayed in the cell, and the parameter will be displayed in place of. The parameter may be omitted if the cell only contains custom text. If you want to include the @ symbol in your text, you can use.

Example: Simple Extension

Example: Custom Table

Example: Fetching Data

Magic Words
In addition to parameter names, you may also pass magic words for more complex output: {| class=wikitable ! Applies to !! magic word !! colspan=2 | Description
 * rowspan=5 |
 * rowspan=5 |

Shows the item name with a link. Shows the item's type with link to category.
 * | LINK
 * TYPE
 * TYPE
 * TYPE

Shows formatted stats and effects. Shows a linked icon.
 * STATS
 * STATS
 * ICON
 * ICON
 * ICON

Shows a linked name, icon, and category. Omits the table wrap. Used when table has multiple rows.
 * BADGE
 * BADGE
 * rowonly
 * colspan=2 |
 * rowonly
 * colspan=2 |
 * colspan=2 |

Example: Shows full table given Awakened Ability. Shows "Conditional" header along with row. Used for abilities unlocked by other abilities.
 * rowspan=2 |
 * table
 * colspan=2 |
 * colspan=2 |
 * conditional
 * colspan=2 |
 * colspan=2 |
 * }