Module:Enchantment/data/doc

From Idlescape Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Enchantment/data

As this module includes functions, it has to be imported into other modules with require(), instead of using mw.loadData()


When adding new enchantments getTooltip() has to be manually transpiled and added to the final data.
https://github.com/Roblox/js-to-lua might help, but probably not worth the time and hassle for a few edits/additions.
Keep round() and toFixed() when updating the file as they're used by some of the getTooltip functions.


JS code to copy into browser console to get JSON:

var enchants = Idlescape.data.enchantments
for (var id in enchants) {
  enchants[id].desc = enchants[id].getTooltip(1, enchants[id].strengthPerLevel)
}
JSON.stringify(enchants)