PDA

View Full Version : [Very small visual bug] Dex listed in AC calculation though of Max Dex bonus



Kelrugem
November 17th, 2019, 05:42
Hi :)

As in the title the following happens when I e.g. wear a splint mail (max Dex bonus +0 but also similar bug for other max dex bonusses):


https://i.imgur.com/2U1MLF8.png


I have Dex = 20 and the +5 is still listed in the calculation but only visually, the result is still correct and therefore this is really only a very minor bug :) For the touch AC the display is correct

What I also realized: In the inventory is the toggle for the armor (for armor check penalty, max dex bonus and spell failure) which is automatically (un)toggled depending on whether the armor is carried or not. This does not happen for Max Dex = 0, one has then to toggle it manually :) (when an armor has Max Dex bonus greater than 0 and is equipped (i.e. the toggle is on) then it is also automatically toggled off when I change the max dex bonus to 0. The 0 seems to be interpreted as toggling off) But also not important since it can be toggled manually :)

3.5e without extensions :)

Thanks in advance :)

Best,

Kelrugem

Moon Wizard
November 17th, 2019, 06:04
Yes, the calculation only shows the possible Dex bonus; not the capped bonus. Not sure it's worth trying to fix, as it complicates this view by requiring a completely different field type that takes up more room (and there is no more room).

Regards,
JPG

Kelrugem
November 17th, 2019, 06:06
Yes, the calculation only shows the possible Dex bonus; not the capped bonus. Not sure it's worth trying to fix, as it complicates this view by requiring a completely different field type that takes up more room (and there is no more room).

Regards,
JPG

ah okay, makes sense, thanks for answering :) was not sure whether this is a bug, was the first time that I've seen it actively

eastsydneyboy
April 5th, 2020, 01:00
So it appears that equipping Splint Mail and Half-plate will give the wrong AC unless the user remembers to manually activate the armor modifiers through the interface.

For me, this seems a bit counter-intuitive and armor shouldn't be treated differently, just because it has a zero Max Dex Bonus. I ended up here because I could see that the Max Dex Bonus was not shown on the inventory listings for these items, and I don't believe that in this case, zero should be treated as non-existant.

My preference would be to see the Max Dex Bonus shown on the inventory description even if it's zero, and for the armor modifiers to be always active when equipping new armor. I'm not sure I understand why you would need to disable the armor modifiers. Does anyone have any insight into this?

Cheers,
ESB



Yes, the calculation only shows the possible Dex bonus; not the capped bonus. Not sure it's worth trying to fix, as it complicates this view by requiring a completely different field type that takes up more room (and there is no more room).

Regards,
JPG

Kelrugem
April 5th, 2020, 01:09
So it appears that equipping Splint Mail and Half-plate will give the wrong AC unless the user remembers to manually activate the armor modifiers through the interface.

For me, this seems a bit counter-intuitive and armor shouldn't be treated differently, just because it has a zero Max Dex Bonus. I ended up here because I could see that the Max Dex Bonus was not shown on the inventory listings for these items, and I don't believe that in this case, zero should be treated as non-existant.

My preference would be to see the Max Dex Bonus shown on the inventory description even if it's zero, and for the armor modifiers to be always active when equipping new armor. I'm not sure I understand why you would need to disable the armor modifiers. Does anyone have any insight into this?

Cheers,
ESB

oh, you're right, armor with DEX cap as zero do not apply that automatically, one has to check "Armor modifiers enabled" manually :)

Why this checkmark is there: Sometimes one may be able to ignore the armor penalties while keeping the armor class :) and with that checkmark that is easy to handle :) (maybe some spell which allows you to use once all of your DEX to AC and not just one point or something like that) Or you want to do some skill check without armor then that checkmark might be easier to use than donning the armor off (because players may tend to forget to don the armor later on, they maybe just assume they did so without doing it via the FG UI) :)

eastsydneyboy
April 5th, 2020, 03:28
I've coded up a quick extension for this fix, if anybody's interested.



local oldRef;

function onInit()
oldRef = CharManager.calcItemArmorClass;
CharManager.calcItemArmorClass = calcItemArmorClass_new;
end

function calcItemArmorClass_new(nodeChar)
oldRef(nodeChar);

local nMainMaxStatBonus = -1;

for _,vNode in pairs(DB.getChildren(nodeChar, "inventorylist")) do
if DB.getValue(vNode, "carried", 0) == 2 then
local bIsArmor, _, sSubtypeLower = ItemManager2.isArmor(vNode);
if bIsArmor then
local bIsShield = (sSubtypeLower == "shield");
if bIsShield then
else
local nMaxStatBonus = DB.getValue(vNode, "maxstatbonus", -1);

if nMaxStatBonus >= 0 then
if nMainMaxStatBonus >= 0 then nMainMaxStatBonus = math.min(nMainMaxStatBonus, nMaxStatBonus);
else nMainMaxStatBonus = nMaxStatBonus;
end
end
end
end
end
end

if nMainMaxStatBonus >= 0 then
DB.setValue(nodeChar, "encumbrance.armormaxstatbonusactive", "number", 1);
else
DB.setValue(nodeChar, "encumbrance.armormaxstatbonusactive", "number", 0);
end
end