Originally Posted by
Faelwen
... I tried to improve on your CGen scripts and got increasingly frustrated with the framework of Roll20 (not to mention the fact that they break them with every update).....
....
1) Once you've created and populated the spell node in the NPC, just add a single line of code to call the 3.5 Ruleset spell parser (SpellManager.parseSpell(spellNode)). It will parse the spell info to try to guess what spell actions are needed and automatically add them to the spell node. From my humble and short experience fiddling around with it, it seems to work as intended about perhaps 90% of the time.
2) Some spell libraries contain spell actions (e.g. Farnaby's spell library). You could scan these libraries and if a match is found, copy the actions along with the rest of the spell data.
Actually you can even do a combination of these possibilities. For example :
- Scan Farnaby's library, if spell is found, copy the spell actions.
- If spell isn't found. Scan your own library and if a match is found, call the 3.5 parser to generate the spell actions.
....