PDA

View Full Version : Ruleset bug 2



bratch9
September 13th, 2020, 23:17
Hi, "guardian of faith", is not showing any "radiant" damage, see attached, because the data_spell.lua file, sets the 'modifier', while the 'code' reads it from 'bonus'... "DB.setValue(nodeEntry, "bonus", "number", vDamage.bonus);" at 1932 in parsePCPower..

I'm not sure which is wrong !!

Further down the parsePCPower the damage/heal side from the spell text description side swaps over to using 'modifier' as its source.

The spell_data.lua documents 'modifier', so maybe its the 'parsePCPower' 1932 line that is wrong ?

Thanks, Pete

LordEntrails
September 14th, 2020, 01:19
What's the source/module? FGC or FGU? How about ruleset? Is this an extension issue?

bratch9
September 14th, 2020, 03:07
This is just 5E with 'player's' handbook loaded, to be able to add the spell to character.. same in FGC, FGU.

I've attached the FGC campaign.

-pete

Zacchaeus
September 14th, 2020, 09:49
This is one of the spells where it isn't the parser that is picking up the effects but rather it's in an override database in the ruleset. The error must be in the override since if you copy the spell and change it's name it correctly adds in the damage effect.

bratch9
September 14th, 2020, 13:00
yes, if you let the 5e rule set use the 'data_spell.lua' you get the zero damage, if you change its name and reparse you get damage but the wrong effect lines.. ( Hence the custom 'data_spell.lua' entry. )

["guardian of faith"] = {
{ type = "effect", sName = "NOTE: Guardian of Faith", sTargeting = "self", nDuration = 8, sUnits = "hour" },
{ type = "powersave", save = "dexterity", onmissdamage = "half", magic = true, savebase = "group" },
{ type = "damage", clauses = { { modifier = 20, dmgtype = "radiant" } } },
},


Because the 'parsePCPower' in 'manage_power.lua' line 1932 is 'DB.setValue(nodeEntry, "bonus", "number", vDamage.bonus);' and expects the 'vDamage.bonus' while the spell defined uses "{ modifier = 20,"..

so either, 'data_spell.lua'

-- { type = "damage", clauses = { { dice = { "d#", ... }, bonus= #, type = "", [stat = ""] }, ... } }
-- Each damage action can have multiple clauses which can do different damage types


["guardian of faith"] = {
{ type = "effect", sName = "NOTE: Guardian of Faith", sTargeting = "self", nDuration = 8, sUnits = "hour" },
{ type = "powersave", save = "dexterity", onmissdamage = "half", magic = true, savebase = "group" },
{ type = "damage", clauses = { { bonus = 20, dmgtype = "radiant" } } },
},

is required or, 'manage_power.lua'

DB.setValue(nodeEntry, "bonus", "number", vDamage.modifier );

changes in the ruleset might have larger knock on effect for saved data, which is why I said I'm not sure which solution would be the way to go to fix this one..

( I suspect { type = "damage", clauses = { { bonus = 20, dmgtype = "radiant" } } } is the best way and the instructions of usage to the top of the file so people dont get confused.. )