-
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
This need tidying up ofc, but before I continue I would appreciate any input if there is a neater/better way of achieving what I want.
*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.
-
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
-
Thanks for the info Moon Wizard. I'll have a delve into the parser.
Cheers, Steve.