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

Revision as of 05:00, 25 February 2026 by Eviand (talk | contribs) (Created page with "Module:GameInfo is the stable entrypoint for SpiritVale “GameInfo” renderers (Phase 4.1). == Contract == Pages are generated/updated by SVWT + pywikibot (compiled artifacts). This module reads arguments from <code>frame.args</code> only (no parent-frame wrappers). Submodules are pure renderers and must export <code>render(frame)</code>. == Entry points == <pre>{{#invoke:GameInfo|Skills|id=...|index=...|notes=...|data=...}}</pre> <pre>{{#invoke:GameInfo|Category|nam...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:GameInfo

Module:GameInfo is the stable entrypoint for SpiritVale “GameInfo” renderers (Phase 4.1).

Contract

Pages are generated/updated by SVWT + pywikibot (compiled artifacts). This module reads arguments from frame.args only (no parent-frame wrappers). Submodules are pure renderers and must export render(frame).

Entry points

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

The Category router is allowlist-only. Users cannot force arbitrary require() targets.

Routing

GameInfo routes only to modules listed in the internal allowlist. Currently supported:

TemplateStyles

GameInfo always emits one TemplateStyles tag per invocation. Default CSS:

  • Module:GameInfo/styles.css

Submodules may override by setting:

  • STYLE_SRC = "Module:GameInfo/skills.css"

Shared scaffolding

Args helpers

  • arg(frame, key, fallback) trims and returns a string.
  • int(frame, key, fallback, min, max) clamps integers.
  • bool(frame, key, fallback) supports 1/0, true/false, yes/no.

Container builder

box(opts) creates the canonical card shell:

  • root: div.sv-gi-card
  • top: div.sv-gi-top
  • bottom: div.sv-gi-bottom

Data attributes:

  • data-gi="1"
  • data-gi-phase="4.1"
  • data-level, data-max-level

Optional:

  • id (or root_id)
  • variant adds class sv-gi--<variant>

Convenience renderer

render_box(opts) builds the box and fills top/bottom with either HTML nodes or wikitext.

Error handling

If a route cannot be loaded or throws, GameInfo returns TemplateStyles plus a wiki-friendly error box:

  • div.sv-gi-error

Debug / wiring test

A simple sanity check exists:

{{#invoke:GameInfo|skeleton|id=sv-gi-test-1|level=1|max=10|variant=skills}}