#ac.base
1 messages · Page 1 of 1 (latest)
So problem is that ac.base can't be set to something in Active Effects?
my understanding was that only ac.bonus was supposed to be used for AEs
Well, you should still be able to change .base, and indeed you can when using a Custom formula.
Copying from above for reference:
Okay, far as I can tell, ac.base can't be changed via active effect currently. I'm not sure what the cause of this is, or whether it's intentional, expected, or unexpected. Will throw a ping at @wheat hound who can probably clarify when he's around.
In the meantime, you can work around this by targetingdata.attributes.ac.bonuswith an Add +5, will net you the same end result.
Or wait, hang on.
Okay that's super interesting.
You can't affectac.baseif your calc is set to Equipped Armor, which has a formula of@attributes.ac.base + @abilities.dex.mod.
But if you set it to Custom Formula, and enter the same @attributes.ac.base +@abilities.dex.modfor it, the .base override AE works.
There's some complications with AEs due to them applying before we get to prepareDerivedData, and I think we attempt to accommodate them in _computeArmorClass, but it's possibly not working correctly or we need some special handling.
It looks like the user wanted to create an item (https://www.dndbeyond.com/magic-items/robe-of-the-archmagi) which sets the formula for the actor's AC to be 15 + @dex.
Which, I guess could be seen as setting the ac.base to 15 alternatively.
Yeah, that was the example scenario.
I would recommend in that case they instead use an AE for ac.formula
Setting the formula via active effect is what items like Mage Armor do yeah
Yeah I think that might have been the way we intended for that to be accomplished
Sure, but my real question here is why does a Custom formula of @attributes.ac.base + @abilities.dex.mod behave differently from an Equipped Armor formula of (identically) @attributes.ac.base + @abilities.dex.mod?
It was a while ago now
What they were doing with the Robe AE — overriding .base — is a perfectly sane way to build that item.
And it does work.
You just need to use Custom for some reason.
Looks like this is the line:
https://gitlab.com/foundrynet/dnd5e/-/blob/master/module/actor/entity.js#L653
// Equipment-based AC
case "default":
if ( armors.length ) {
if ( armors.length > 1 ) ac.warnings.push("DND5E.WarnMultipleArmor");
const armorData = armors[0].data.data.armor;
const isHeavy = armorData.type === "heavy";
ac.dex = isHeavy ? 0 : Math.min(armorData.dex ?? Infinity, data.abilities.dex.mod);
ac.base = (armorData.value ?? 0) + ac.dex;
ac.equippedArmor = armors[0];
} else {
ac.dex = data.abilities.dex.mod;
ac.base = 10 + ac.dex;
}
break;
the 10 is hardcoded because all "armor" uses 10 as its value I believe
Ah, so this is a labelling issue.
Equipped Armor should not be listed as @attributes.ac.base + @abilities.dex.mod, but rather 10 + @abilities.dex.mod, I guess.
Either that or take out the hardcoding.
I read this wrong. The 'base' is taken from the item
So if the robe of the magi was "equipment" with an armor.value in the item's data of 15, it would work without AEs at all.
The item's armor.value is what sets the 'ac.base' if it exists, if it doesn't, 0 is used.
If no armor is equipped, 10 is used.
So maybe instead of 0 or 10 being hardcoded, using the actor data ac.base would work.
It doesn't feel like a very high prio change though since presumably 'configuring the robe "correctly"' would fix it.
It's certainly not high priority, but I do still think that overriding ac.base is the correct configuration for the robe, in this case.
Worth a write up, it's looking like an oversight on our part here. ac.base seems to not be useful really with the current implementation.
is this robe in the srd?
It is, yeah, and it uses the ac.formula override
mmm nope
An implementation of the Dungeons & Dragons 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com). This work is permitted under the Open...
No, it uses the one described
I think this is a compendium content bug then
I'm sure it must have been working in core then, and we probably messed it up when doing some further iterations
If our position is going to be that you can't touch ac.base when using the Equipped Armor calc, then I'd say it needs to not list @attributes.ac.base in its formula.