Module:GameInfo/Skills/doc
More actions
This is the documentation page for Module:GameInfo/Skills
Module:GameInfo/Skills renders the compiled “Skill card” payload used by Module:GameInfo.
Overview
This module is a strict renderer for a compiled JSON payload (schema 1). It does not attempt compatibility fallbacks or schema guessing.
Where it is used
This module is loaded by Module:GameInfo and called through the GameInfo entry points (for example the Skills route).
Styling
This module declares a TemplateStyles source so the wrapper can load the correct CSS:
STYLE_SRC = "Module:GameInfo/styles.css"
Inputs
Arguments are read from frame.args (handled by Module:GameInfo).
Required:
data— JSON string payload (must decode to an object and containschema=1)
Optional:
id— HTML id for the root card. If omitted, one is generated from display name + index.index— Used only for generating a stable id. Default1.notes— Wikitext content shown in the Notes popup.debug— If set to1, error output includes a nowiki preview of the first ~480 chars of the raw JSON.
Example usage (shown as text only):
{{#invoke:GameInfo|Skills|id=...|index=...|notes=...|data=...}}
Payload expectations (schema 1)
The payload is expected to contain the parts needed to build the full Skill card, including:
identity(name/description/sprite)level(default/max)meta_row(four meta cells)requirementsandusers(optional grouped lists)scaling_top,core_statstabs(mechanics, keywords, effects, events)
Values may be either:
- Plain strings/numbers, or
- Objects like
{"text":"..."}, or - Series objects like
{"series":[...]}(used for level-based selection and emitted asdata-series)
Images and missing files
File pages are checked with a small existence cache. If a file page is missing, the renderer outputs a small “?” badge (sv-miss) instead of a redlink image.
Keyword pills
Keyword pill strings in the form Domain|Key are expanded to the Definitions template:
{{def|Domain|Key}}
Other strings are rendered as plain text.
Interactive UI hooks
The module outputs semantic hooks used by site JS:
- Popups use
data-sv-toggleandsv-hidden - Tabs use
data-tabsanddata-tabs-root - The custom level slider uses
data-sv-sliderand ARIA slider attributes