Toggle search
Search
Toggle menu
115
248
25
2.7K
SpiritVale Wiki
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Upload file
Toggle preferences menu
Notifications
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
user-interface-preferences
Personal tools
Talk
Contributions
Create account
Log in
Join the Playtest on Steam Now:
SpiritVale
Editing
Module:GameInfo/doc
From SpiritVale Wiki
Views
Read
Edit source
View history
associated-pages
Module
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
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><nowiki>{{#invoke:GameInfo|Skills|id=...|index=...|notes=...|data=...}}</nowiki></pre> <pre><nowiki>{{#invoke:GameInfo|Category|name=Skills|...}}</nowiki></pre> The Category router is allowlist-only. Users cannot force arbitrary <code>require()</code> targets. == Routing == GameInfo routes only to modules listed in the internal allowlist. Currently supported: * Skills → [[Module:GameInfo/Skills]] == TemplateStyles == GameInfo always emits one TemplateStyles tag per invocation. Default CSS: * <code>Module:GameInfo/styles.css</code> Submodules may override by setting: <pre><nowiki>STYLE_SRC = "Module:GameInfo/skills.css"</nowiki></pre> == Shared scaffolding == === Args helpers === * <code>arg(frame, key, fallback)</code> trims and returns a string. * <code>int(frame, key, fallback, min, max)</code> clamps integers. * <code>bool(frame, key, fallback)</code> supports 1/0, true/false, yes/no. === Container builder == <code>box(opts)</code> creates the canonical card shell: * root: <code>div.sv-gi-card</code> * top: <code>div.sv-gi-top</code> * bottom: <code>div.sv-gi-bottom</code> Data attributes: * <code>data-gi="1"</code> * <code>data-gi-phase="4.1"</code> * <code>data-level</code>, <code>data-max-level</code> Optional: * <code>id</code> (or <code>root_id</code>) * <code>variant</code> adds class <code>sv-gi--<variant></code> === Convenience renderer === <code>render_box(opts)</code> builds the box and fills <code>top</code>/<code>bottom</code> 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: * <code>div.sv-gi-error</code> == Debug / wiring test == A simple sanity check exists: <pre><nowiki>{{#invoke:GameInfo|skeleton|id=sv-gi-test-1|level=1|max=10|variant=skills}}</nowiki></pre> [[Category:Lua modules]]
Summary:
Please note that all contributions to SpiritVale Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
SpiritVale Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Editing
Module:GameInfo/doc
From SpiritVale Wiki