Module:GameData/doc: Difference between revisions
From SpiritVale Wiki
More actions
No edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
and turns each one into a Lua dataset that other modules (like [[Module:GameSkills]], [[Module:GamePassives]], [[Module:GameSummons]], and [[Module:GameEffects]]) can use. | and turns each one into a Lua dataset that other modules (like [[Module:GameSkills]], [[Module:GamePassives]], [[Module:GameSummons]], and [[Module:GameEffects]]) can use. | ||
This module is | This module is '''not''' meant to be called directly from templates with <code>#invoke</code>. | ||
Instead, other Lua modules should <code>require</code> it and use the <code>load*</code> helper functions described below. | Instead, other Lua modules should <code>require</code> it and use the <code>load*</code> helper functions described below. | ||
| Line 42: | Line 42: | ||
* <code>version</code> – game / patch version string. | * <code>version</code> – game / patch version string. | ||
* <code>schema_version</code> – version number | * <code>schema_version</code> – JSON schema version number. | ||
* <code>generated_at</code> – timestamp when the file was generated by the external tool. | * <code>generated_at</code> – timestamp when the file was generated by the external tool. | ||
* <code>records</code> – array of objects (skills, passives, summons, effects, etc.). | * <code>records</code> – array of objects (skills, passives, summons, effects, etc.). | ||
* Each record must have an <code>"Internal Name"</code> field, used as the stable ID. | * Each record must have an <code>"Internal Name"</code> field, used as the stable ID. | ||
The exact fields inside each record depend on the data type and are handled by the type-specific modules (GameSkills, GamePassives, GameSummons, GameEffects). | The exact fields inside each record depend on the data type and are handled by the type-specific modules ([[Module:GameSkills]], [[Module:GamePassives]], [[Module:GameSummons]], [[Module:GameEffects]]). | ||
---- | ---- | ||