Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Join the Playtest on Steam Now: SpiritVale

Module:GameInfo/Skills/doc

From SpiritVale Wiki
Revision as of 05:08, 25 February 2026 by Eviand (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:GameInfo/Skills

Module:GameInfo/Skills renders the compiled “Skill card” payload used by Module:GameInfo.

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

edit source

This module is loaded by Module:GameInfo and called through the GameInfo entry points (for example the Skills route).

This module declares a TemplateStyles source so the wrapper can load the correct CSS:

STYLE_SRC = "Module:GameInfo/styles.css"

Arguments are read from frame.args (handled by Module:GameInfo).

Required:

  • data — JSON string payload (must decode to an object and contain schema = 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. Default 1.
  • notes — Wikitext content shown in the Notes popup.
  • debug — If set to 1, 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)

edit source

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)
  • requirements and users (optional grouped lists)
  • scaling_top, core_stats
  • tabs (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 as data-series)

Images and missing files

edit source

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

edit source

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

edit source

The module outputs semantic hooks used by site JS:

  • Popups use data-sv-toggle and sv-hidden
  • Tabs use data-tabs and data-tabs-root
  • The custom level slider uses data-sv-slider and ARIA slider attributes