Thread: Editing Spell Data (5e)
-
June 12th, 2022, 11:11 #1
Editing Spell Data (5e)
I'm looking at amending the 'sName' field of some spells (in the Spelldata.lua file) to add additional text into the effects tab when the spells are added to the players character sheet.
I'm currently doing this when my extension initialises in the hope that it will remain compatible with other extensions if they are editing or amending the Spelldata file also.
(Just using the shield spell as an example).
Code:test=DataSpell.parsedata for key, value in pairs(test) do if key=="shield" then value[1].sName=value[1].sName.." ;(new text here)" end end
*Edit*
Also a question to the Devs...
Do spells from additional sourcebooks i.e. Xgte get placed in Spelldata.lua or do they go elsewhere.
Cheers, Steve.Last edited by Stv; June 12th, 2022 at 14:50.
-
June 13th, 2022, 18:00 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
Most spells attempt to parse the data directly from the spell text, which is not always able to be done cleanly. The data_spell.lua file is simply an override for how spells are parsed into actions.
If you are wanting to override the behavior of how a particular spell is parsed, I would just replace the whole thing (i.e. replace "shield" entry), instead of trying to inject into the details.
Regards,
JPG
-
June 13th, 2022, 18:36 #3
Thanks for the info Moon Wizard. I'll have a delve into the parser.
Cheers, Steve.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks