Module:GameEffects/doc
More actions
This is the documentation page for Module:GameEffects
Module:GameEffects
edit sourceModule:GameEffects renders effect / status data from Data:effects.json into a reusable infobox-style table.
It is intended to be used via a template (for example Template:Effect) so that status effects can be embedded on any page without creating individual pages for each effect.
This module:
- Loads data via Module:GameData →
GameData.loadEffects(). - Looks up effects 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 effect.
Data source
edit sourceEffect data comes from Data:effects.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.762333+00:00",
"records": [
{
"Name": "Aegis",
"Internal Name": "Aegis",
"Icon": "status-aegis.webp",
"Description": "...",
"Users": { ... },
"Mechanics": { ... },
"Status Effects": [ ... ],
"Status Applications": [ ... ],
"Effect Removal": [ ... ],
"Events": [ ... ]
}
]
}
Key fields for each effect:
"Name"– display name used on the wiki."Internal Name"– stable ID used as the main lookup key."Icon"– image file name for the status icon."Description"– human-readable description of the effect."Users"– who can use / apply this effect (classes, monsters, summons, skills, events, etc.)."Mechanics"– core numeric behavior, such as percent damage, percent healing, flat damage, and element information."Status Effects"– the underlying stat modifiers (e.g. Attack Speed, Elemental Damage, Damage Taken from Magic) with Base / Per Level / Expression values."Status Applications"– which statuses this effect applies to other entities (scope, status name, duration, chance, etc.)."Effect Removal"– how or when the effect ends (e.g. removed by hit, removed by attack, stacks with itself)."Events"– event hooks that trigger skills while the effect is active (e.g. On Take Hit Reflect → Counter Slash).
Output
edit sourceFor a given effect, the module renders a table with the CSS class spiritvale-effect-infobox.
Depending on what exists in the JSON record, the table may include:
- Header row with icon and effect name.
- Description text.
- Internal name (for debugging / internal reference).
- Users:
- Classes, Monsters, Summons, Events, Skills, and any linked Status Effects.
- Mechanics:
- Percent damage / healing.
- Flat damage.
- Element and element ID (if present).
- Status Effects:
- Each entry from
"Status Effects", showing type name and Base / Per Level / Expression values.
- Each entry from
- Status Applications:
- Each entry from
"Status Applications", showing scope (Self / Target), status name, duration, chance, and whether the duration is fixed.
- Each entry from
- Removal:
- Any entries from
"Effect Removal", such as "Removed by hit", "Stacks with itself", etc.
- Any entries from
- Events:
- Any entries from
"Events", such asOn Take Hit Reflect → Counter Slash.
- Any entries from
Rows are only shown if the underlying field exists in the JSON for that effect.
Public interface
edit sourceThe module exposes a single entry point for templates:
GameEffects.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 effect"Name".name– explicit display"Name"of the effect (equivalent to1).id–"Internal Name"of the effect (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 effect: ?
or:
Unknown effect: ?
Template:Effect
edit sourceThe recommended way to use this module is via a small wrapper template:
Template:Effect
Unknown effect: ?
Typical usage on any page:
| Description | Deals stacking damage over time. Damage scales with STR and AGI. |
|---|---|
| Internal name | Poison |
| Users | Classes: Acolyte, Knight, Mage, Rogue, Scout, Summoner, Warrior, Weaver Monsters: Bat Lord, Bloom, Blossom, Bogbloom, Cactus King, Earthworm, Fangroot, Fungi, Housefly Junk, Housefly Nom, Octopus Baby, Poison Bomb, Queen Worm, Spider Queen, Spider Robot, Spider Toxin, Spiderling Robot, Toadstool, Worm, Worm Creep Skills: Cure, Gunk Shot (NPC), Mass Cure, Venom Strike, Wide Poison (NPC) |
| Mechanics | Flat damage: 1 Element: None (ID 10) |
| Status effects | No Mana Regeneration – Base 1 |
| Removal | Stacks with itself |
or, explicitly:
| Description | Deals stacking damage over time. Damage scales with STR and AGI. |
|---|---|
| Internal name | Poison |
| Users | Classes: Acolyte, Knight, Mage, Rogue, Scout, Summoner, Warrior, Weaver Monsters: Bat Lord, Bloom, Blossom, Bogbloom, Cactus King, Earthworm, Fangroot, Fungi, Housefly Junk, Housefly Nom, Octopus Baby, Poison Bomb, Queen Worm, Spider Queen, Spider Robot, Spider Toxin, Spiderling Robot, Toadstool, Worm, Worm Creep Skills: Cure, Gunk Shot (NPC), Mass Cure, Venom Strike, Wide Poison (NPC) |
| Mechanics | Flat damage: 1 Element: None (ID 10) |
| Status effects | No Mana Regeneration – Base 1 |
| Removal | Stacks with itself |
Internal IDs can still be used when needed:
| Description | Deals stacking damage over time. Damage scales with STR and AGI. |
|---|---|
| Internal name | Poison |
| Users | Classes: Acolyte, Knight, Mage, Rogue, Scout, Summoner, Warrior, Weaver Monsters: Bat Lord, Bloom, Blossom, Bogbloom, Cactus King, Earthworm, Fangroot, Fungi, Housefly Junk, Housefly Nom, Octopus Baby, Poison Bomb, Queen Worm, Spider Queen, Spider Robot, Spider Toxin, Spiderling Robot, Toadstool, Worm, Worm Creep Skills: Cure, Gunk Shot (NPC), Mass Cure, Venom Strike, Wide Poison (NPC) |
| Mechanics | Flat damage: 1 Element: None (ID 10) |
| Status effects | No Mana Regeneration – Base 1 |
| Removal | Stacks with itself |
This keeps page wikitext simple while centralizing all JSON loading and formatting logic inside Lua.