Module:GameSummons/doc
More actions
This is the documentation page for Module:GameSummons
Module:GameSummons
edit sourceModule:GameSummons renders summon data from Data:summons.json into a reusable infobox-style table.
It is intended to be used via a template (for example Template:Summon) so that summons can be embedded on any page without creating individual pages for each summon.
This module:
- Loads data via Module:GameData →
GameData.loadSummons(). - Looks up summons primarily by display
"Name"(what editors use), with"Internal Name"as an optional fallback. - Builds a table with only the fields that actually exist for that summon.
Data source
edit sourceSummon data comes from Data:summons.json, which is a JSON page with this top-level structure (see Module:GameData/doc for full details):
{
"version": "SpiritVale-0.9.3",
"schema_version": 1,
"generated_at": "2025-12-12T17:24:05.818161+00:00",
"records": [
{
"Name": "Angel Mage",
"Internal Name": "Angel Mage",
"Skill Name": "Summon Angel",
"Skill Internal Name": "SummonAngel",
"Attributes": [ ... ],
"Skills": [ ... ],
"Stages": [ ... ]
}
]
}
Each record is a single summon. Important keys:
"Name"– the display name (what players and editors will usually see and use)."Internal Name"– the stable ID used internally and available as an optional parameter for power users and tooling."Skill Name"– the name of the summoning skill."Skill Internal Name"– the internal ID of the summoning skill."Attributes"– a list of attribute blocks (Strength, Agility, etc., with Base and Per Level values where present)."Skills"– a list of active skills the summon can use."Stages"– evolution stages, with Unlock Level and monster names.
Output
edit sourceFor a given summon, the module renders a table with the CSS class spiritvale-summon-infobox.
Depending on what exists in the JSON record, the table may include:
- Header row with summon name.
- Internal name (for debugging / internal reference).
- Summon skill:
- Display skill name, and internal ID if present.
- Attributes:
- One line per attribute from
"Attributes", usually in the form:Strength – Base 5.0, 0.3 / LvHealth Points – Base 100.0
- One line per attribute from
- Skills:
- One line per entry from
"Skills", including:- Skill name
- Level
- Cooldown
- Cast Time (where present)
- Target Health (where present)
- One line per entry from
- Stages:
- One line per entry from
"Stages", usually in the form:Stage 1: Angel (Unlock Lv.1)Stage 2: Archangel (Unlock Lv.25)Stage 3: Angel Mage (Unlock Lv.50)
- One line per entry from
Rows are only shown if the underlying field exists in the JSON for that summon.
Public interface
edit sourceThe module exposes a single entry point for templates:
GameSummons.infobox(frame)
edit source
This is usually called via #invoke from a template, not directly from pages.
It accepts the following parameters (either passed directly or via a wrapper template):
1– unnamed parameter; treated as the summon"Name".name– explicit display"Name"of the summon (equivalent to1).id–"Internal Name"of the summon (optional fallback / power use).
Lookup order:
- If
nameor the first unnamed parameter is provided and matches a record’s"Name", that record is used. - Otherwise, if
idis provided and matches an"Internal Name", that record is used. - If nothing is found, a small error message is returned and the page is categorized for tracking.
Example direct usage (not recommended; normally use a template):
Unknown summon: ?
or:
Unknown summon: ?
Template:Summon
edit sourceThe recommended way to use this module is via a small wrapper template, for example:
Template:Summon
Unknown summon: ?
Typical usage on any page:
| Angel Mage | |
|---|---|
| Internal name | Angel Mage |
| Summon skill | Summon Angel (SummonAngel) |
| Attributes | Strength – Base 5.0, 0.3 / Lv Agility – Base 5.0, 0.3 / Lv Vitality – Base 10.0, 0.6 / Lv Intelligence – Base 10.0, 0.6 / Lv Dexterity – Base 10.0, 0.6 / Lv Luck – Base 5.0, 0.3 / Lv Health Points – Base 100.0 |
| Skills | Heal (Lv.1, CD 5 s, CT 1.5 s, Target HP 0.80) Holy Light (Lv.3, CD 5 s, CT 1.5 s, Target HP 1.00) Dissonance Well (Lv.3, CD 10 s, CT 1.5 s, Target HP 1.00) Resonance Well (Lv.3, CD 10 s, CT 1.5 s, Target HP 0.80) Sacred Aegis (Lv.2, CD 5 s, CT 1.5 s, Target HP 1.00) |
| Stages | Stage 1: Angel (Unlock Lv.1) Stage 2: Archangel (Unlock Lv.25) Stage 3: Angel Mage (Unlock Lv.50) |
or, explicitly:
| Angel Mage | |
|---|---|
| Internal name | Angel Mage |
| Summon skill | Summon Angel (SummonAngel) |
| Attributes | Strength – Base 5.0, 0.3 / Lv Agility – Base 5.0, 0.3 / Lv Vitality – Base 10.0, 0.6 / Lv Intelligence – Base 10.0, 0.6 / Lv Dexterity – Base 10.0, 0.6 / Lv Luck – Base 5.0, 0.3 / Lv Health Points – Base 100.0 |
| Skills | Heal (Lv.1, CD 5 s, CT 1.5 s, Target HP 0.80) Holy Light (Lv.3, CD 5 s, CT 1.5 s, Target HP 1.00) Dissonance Well (Lv.3, CD 10 s, CT 1.5 s, Target HP 1.00) Resonance Well (Lv.3, CD 10 s, CT 1.5 s, Target HP 0.80) Sacred Aegis (Lv.2, CD 5 s, CT 1.5 s, Target HP 1.00) |
| Stages | Stage 1: Angel (Unlock Lv.1) Stage 2: Archangel (Unlock Lv.25) Stage 3: Angel Mage (Unlock Lv.50) |
Internal IDs can still be used when needed:
| Angel Mage | |
|---|---|
| Internal name | Angel Mage |
| Summon skill | Summon Angel (SummonAngel) |
| Attributes | Strength – Base 5.0, 0.3 / Lv Agility – Base 5.0, 0.3 / Lv Vitality – Base 10.0, 0.6 / Lv Intelligence – Base 10.0, 0.6 / Lv Dexterity – Base 10.0, 0.6 / Lv Luck – Base 5.0, 0.3 / Lv Health Points – Base 100.0 |
| Skills | Heal (Lv.1, CD 5 s, CT 1.5 s, Target HP 0.80) Holy Light (Lv.3, CD 5 s, CT 1.5 s, Target HP 1.00) Dissonance Well (Lv.3, CD 10 s, CT 1.5 s, Target HP 1.00) Resonance Well (Lv.3, CD 10 s, CT 1.5 s, Target HP 0.80) Sacred Aegis (Lv.2, CD 5 s, CT 1.5 s, Target HP 1.00) |
| Stages | Stage 1: Angel (Unlock Lv.1) Stage 2: Archangel (Unlock Lv.25) Stage 3: Angel Mage (Unlock Lv.50) |
This keeps page wikitext simple while centralizing all JSON loading and formatting logic inside Lua.