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

Module:GameEffects/doc

From SpiritVale Wiki

This is the documentation page for Module:GameEffects

Module:GameEffects

edit source

Module: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:GameDataGameData.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 source

Effect 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).

For 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.
  • Status Applications:
    • Each entry from "Status Applications", showing scope (Self / Target), status name, duration, chance, and whether the duration is fixed.
  • Removal:
    • Any entries from "Effect Removal", such as "Removed by hit", "Stacks with itself", etc.
  • Events:
    • Any entries from "Events", such as On Take Hit Reflect → Counter Slash.

Rows are only shown if the underlying field exists in the JSON for that effect.


Public interface

edit source

The 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 to 1).
  • id"Internal Name" of the effect (optional fallback / power use).

Lookup order:

  1. If name or the first unnamed parameter is provided and matches a record’s "Name", that record is used.
  2. Otherwise, if id is provided and matches an "Internal Name", that record is used.
  3. 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 source

The recommended way to use this module is via a small wrapper template:

Template:Effect
 Unknown effect: ?

Typical usage on any page:

Poison
DescriptionDeals stacking damage over time. Damage scales with STR and AGI.
Internal namePoison
UsersClasses: 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)
MechanicsFlat damage: 1
Element: None (ID 10)
Status effectsNo Mana Regeneration – Base 1
RemovalStacks with itself

or, explicitly:

Poison
DescriptionDeals stacking damage over time. Damage scales with STR and AGI.
Internal namePoison
UsersClasses: 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)
MechanicsFlat damage: 1
Element: None (ID 10)
Status effectsNo Mana Regeneration – Base 1
RemovalStacks with itself

Internal IDs can still be used when needed:

Poison
DescriptionDeals stacking damage over time. Damage scales with STR and AGI.
Internal namePoison
UsersClasses: 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)
MechanicsFlat damage: 1
Element: None (ID 10)
Status effectsNo Mana Regeneration – Base 1
RemovalStacks with itself

This keeps page wikitext simple while centralizing all JSON loading and formatting logic inside Lua.