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/Skills/doc
From SpiritVale Wiki
Views
Read
Edit
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/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: <pre><nowiki>STYLE_SRC = "Module:GameInfo/styles.css"</nowiki></pre> == Inputs == Arguments are read from <code>frame.args</code> (handled by [[Module:GameInfo]]). Required: * <code>data</code> — JSON string payload (must decode to an object and contain <code>schema</code> = <code>1</code>) Optional: * <code>id</code> — HTML id for the root card. If omitted, one is generated from display name + index. * <code>index</code> — Used only for generating a stable id. Default <code>1</code>. * <code>notes</code> — Wikitext content shown in the Notes popup. * <code>debug</code> — If set to <code>1</code>, error output includes a nowiki preview of the first ~480 chars of the raw JSON. Example usage (shown as text only): <pre><nowiki>{{#invoke:GameInfo|Skills|id=...|index=...|notes=...|data=...}}</nowiki></pre> == Payload expectations (schema 1) == The payload is expected to contain the parts needed to build the full Skill card, including: * <code>identity</code> (name/description/sprite) * <code>level</code> (default/max) * <code>meta_row</code> (four meta cells) * <code>requirements</code> and <code>users</code> (optional grouped lists) * <code>scaling_top</code>, <code>core_stats</code> * <code>tabs</code> (mechanics, keywords, effects, events) Values may be either: * Plain strings/numbers, or * Objects like <code>{"text":"..."}</code>, or * Series objects like <code>{"series":[...]}</code> (used for level-based selection and emitted as <code>data-series</code>) == 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 (<code>sv-miss</code>) instead of a redlink image. == Keyword pills == Keyword pill strings in the form <code>Domain|Key</code> are expanded to the Definitions template: <pre><nowiki>{{def|Domain|Key}}</nowiki></pre> Other strings are rendered as plain text. == Interactive UI hooks == The module outputs semantic hooks used by site JS: * Popups use <code>data-sv-toggle</code> and <code>sv-hidden</code> * Tabs use <code>data-tabs</code> and <code>data-tabs-root</code> * The custom level slider uses <code>data-sv-slider</code> and ARIA slider attributes [[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/Skills/doc
From SpiritVale Wiki