-
November 23rd, 2020, 00:07 #1
Finding spells in modules different between FGC and FGU?
My PF2CreatureParser extension uses the following function to find modules containing spells:
Code:function InitSpellNodes() addToParseLog("InitSpellNodes starting..."); -- Find any modules with spells available. aSpellNodes = {}; for _,v in pairs(Module.getModules()) do local aModule = Module.getModuleInfo(v); addToParseLog("Checking " .. aModule.name); if aModule.loaded and aModule.hasdata then local nodeRoot = DB.getRoot(aModule.name); local nodeSpells = DB.findNode("reference.spells@" .. aModule.name); if nodeSpells then addToParseLog("Loaded spells from " .. aModule.name); table.insert(aSpellNodes, nodeSpells); end end end addToParseLog("InitSpellNodes complete."); end
-
November 23rd, 2020, 00:35 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,557
The hasdata and hastokens has been deprecated in FGU; since they are not needed. If you remove the aModule.hasdata check; then it should still work in both.
Regards,
JPG
-
November 23rd, 2020, 00:42 #3
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks