Sklore / HL_DD_5e_Colab

This is a community effort to add many options that the community felt were missing from the D&D 5e SRD Hero Labs release.
54 stars 31 forks source link

Barbarian's Ancestral Guardian feature "Spirit Shield" appears incorrectly in the Class Special Abilities summary list. #1062

Closed Payden-Pringle closed 2 years ago

Payden-Pringle commented 2 years ago

When looking at the Class Special Abilities list, it only adjusts the 1st instance's damage based on level.

For example, this is what it shows at level 6:

This is what it shows at level 10:

This is what it shows at level 14:

When Spirit Shield progresses as follows:

The issue seems to relate to this code: <eval phase="PostLevel" priority="10000">field[abValue].value += field[xCount].value</eval>

This is present in the original DMG - Classes for Death Cleric's Divine Strike where I believe it doesn't work either: <eval phase="PostLevel" priority="10000">field[abValue].value += field[xCount].value</eval>

Looking around, I can't find anywhere Divine Strike is referenced for a level 14+ Cleric that shows as 2d8 rather than 1d8. Interestingly, elsewhere this line appears, it is within CDATA, but adding <![CDATA[]]> around it in this instance doesn't cause it to evaluate correctly.

It is evaluating, as adjusting the abValue changes the final rendered value. Between not actually incrementing the abValue Field on subsequent passes, or not doing the subsequent passes altogether, I think it is neither, as the 1st value is incrementing, but only when level increases. So, it is incrementing the value, and it is doing multiple passes, but it's applying at the wrong point.

Strangely, the example merge script here follows this format: Wolf Lair - Hero Lab Kit Wiki - Merge Script

xCount appears to be a variable meant to count the number of times an ability is added to a character. i.e. if you have Spirit Shield twice, xCount should equal 2 rather than 1. But since it's adjusting with level, I think there's something fundamentally wrong with using this in this way.

In trying to find out how Brutal Critical or Sneak Attack are done, since they are probably handled in a similar way, I cannot as I'm unsure where the base system files are kept and if they are in the same language/format.

Fenris447 commented 2 years ago

In trying to find out how Brutal Critical or Sneak Attack are done, since they are probably handled in a similar way, I cannot as I'm unsure where the base system files are kept and if they are in the same language/format.

We're basically locked out of looking at them directly. The best you can do is to make New (Copy)'s of them and view them that way.

Fenris447 commented 2 years ago

Fixed it. I looked at Sneak Attack and it was almost the same thing, except the abValue counter was set to Final 10000 instead of Post-Levels 10000. And the render eval script was using the xIndex field instead of the abValue field. Once I made those changes, everything looks good with this feature.

Fenris447 commented 2 years ago

I also fixed Divine Strike for the Death Cleric.