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:06, 25 February 2026 by Eviand (talk | contribs) (Created page with "Module:GameInfo/Skills renders the compiled “Skill card” payload used by {{#invoke:GameInfo|Skills}}. == Contract == This module expects a compiled JSON payload provided via <code>|data=</code>. It is strict (no backwards-compat / no schema guessing). == Entry point == GameInfo loads this module via Module:GameInfo and calls <code>render(frame)</code>. Typical invocation: <pre>{{#invoke:GameInfo|Skills|id=...|index=...|notes=...|data=...}}</pre> == TemplateSty...")
(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

GameInfo/Skills error: missing |data=

.

Contract

This module expects a compiled JSON payload provided via |data=. It is strict (no backwards-compat / no schema guessing).

Entry point

GameInfo loads this module via Module:GameInfo and calls render(frame). Typical invocation:

{{#invoke:GameInfo|Skills|id=...|index=...|notes=...|data=...}}

TemplateStyles

This module sets:

STYLE_SRC = "Module:GameInfo/styles.css"

GameInfo will emit that TemplateStyles tag before the rendered output.

Required arguments

  • data: JSON string payload (must decode to an object with schema=1)

Optional arguments

  • 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 1, error output includes a nowiki preview of the first ~480 chars of the raw JSON.

Payload schema (schema=1)

At minimum, the payload should include:

  • identity: display name, description, sprite info
  • level: default/max (used for slider + value selection)
  • meta_row: 4 meta cells (icon + label lines)
  • requirements / users: grouped lists (optional)
  • scaling_top: damage/modifier/scaling lines (supports series values)
  • core_stats: list of core stat cells (supports series values)
  • tabs: mechanics grid, keyword pills, effects/events reference cards

Values may be plain strings/numbers, or objects like:

  • {"text":"..."}
  • {"series":[...]} (emits data-series for JS and selects by level)

Images and missing icons

Image references are validated with a small existence cache. If a file page does not exist, 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:

{{def|Domain|Key}}

Other strings are rendered as plain text.

Interactive UI hooks

The module emits semantic hooks used by Common.js:

  • Popups: data-sv-toggle="1" with sv-hidden
  • Tabs: data-tabs="1" / data-tabs-root
  • Slider: data-sv-slider="1" with ARIA slider attributes