Kelrugem
July 28th, 2020, 23:17
Hi :)
I just wanted to update my extensions for the hotfix of today :) Thanks for the fix about custom DCs, but I see still some problem, the following code
local nDC = getActionSaveDC(nodeAction);
if nDC ~= nCustomDC then
DB.setValue(nodeAction, "savedctype", "string", "fixed");
DB.setValue(nodeAction, "savedcmod", "number", nCustomDC - nDC);
end
should be
DB.setValue(nodeAction, "savedctype", "string", "fixed");
DB.setValue(nodeAction, "savedcmod", "number", nCustomDC);
The previous version was about when the savedctype was not going to be fixed such that the "native DC" had to be taken into account (which though resulted into some scaling problems when the corresponding ability of the (N)PC got edited afterwards, as reported (at least this is what I think was the problem)
But when it is now defined as fix one does not need to subtract nDC :)
Though I understand the idea of the previous code. Because DC numbers in brackets of spell entries of NPCs are just meant as a result of the value, they are still dynamic with the ability. The previous code allows this dynamic, but not the new one; I just tested with the old code and it is dynamic and behaves as expected (in a positive way) (for both, PC and NPC)
Hence, I am not sure what exactly happened with the reported module, the reported things here, https://www.fantasygrounds.com/forums/showthread.php?38100-Official-Pathfinder-Modules-Bug-Report-Thread&p=529128&viewfull=1#post529128, looks like as if nDC got not subtracted in that module (as if it was 0?), when I understand it correctly. I hope I didn't provide a red hering related to this bug (sorry if so; when I wrote my suggestion related to this problem, then I didn't look at the code again, was just a spantaneous idea) :)
Therefore I am still more on the side of the first code, and I have no idea what went wrong in the reported module. May be related to how it got created?
Sorry for the stress-testing :) Now I took a closer look :) (but also a very edge case I think)
Best,
Kelrugem
I just wanted to update my extensions for the hotfix of today :) Thanks for the fix about custom DCs, but I see still some problem, the following code
local nDC = getActionSaveDC(nodeAction);
if nDC ~= nCustomDC then
DB.setValue(nodeAction, "savedctype", "string", "fixed");
DB.setValue(nodeAction, "savedcmod", "number", nCustomDC - nDC);
end
should be
DB.setValue(nodeAction, "savedctype", "string", "fixed");
DB.setValue(nodeAction, "savedcmod", "number", nCustomDC);
The previous version was about when the savedctype was not going to be fixed such that the "native DC" had to be taken into account (which though resulted into some scaling problems when the corresponding ability of the (N)PC got edited afterwards, as reported (at least this is what I think was the problem)
But when it is now defined as fix one does not need to subtract nDC :)
Though I understand the idea of the previous code. Because DC numbers in brackets of spell entries of NPCs are just meant as a result of the value, they are still dynamic with the ability. The previous code allows this dynamic, but not the new one; I just tested with the old code and it is dynamic and behaves as expected (in a positive way) (for both, PC and NPC)
Hence, I am not sure what exactly happened with the reported module, the reported things here, https://www.fantasygrounds.com/forums/showthread.php?38100-Official-Pathfinder-Modules-Bug-Report-Thread&p=529128&viewfull=1#post529128, looks like as if nDC got not subtracted in that module (as if it was 0?), when I understand it correctly. I hope I didn't provide a red hering related to this bug (sorry if so; when I wrote my suggestion related to this problem, then I didn't look at the code again, was just a spantaneous idea) :)
Therefore I am still more on the side of the first code, and I have no idea what went wrong in the reported module. May be related to how it got created?
Sorry for the stress-testing :) Now I took a closer look :) (but also a very edge case I think)
Best,
Kelrugem