#ac.base

1 messages · Page 1 of 1 (latest)

untold gull
#

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

dry sail
#

Well, you should still be able to change .base, and indeed you can when using a Custom formula.

untold gull
#

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 targeting data.attributes.ac.bonus with an Add +5, will net you the same end result.
Or wait, hang on.
Okay that's super interesting.
You can't affect ac.base if 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.mod for it, the .base override AE works.

jolly basin
#

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.

untold gull
dry sail
#

Yeah, that was the example scenario.

jolly basin
#

I would recommend in that case they instead use an AE for ac.formula

untold gull
#

Setting the formula via active effect is what items like Mage Armor do yeah

jolly basin
#

Yeah I think that might have been the way we intended for that to be accomplished

dry sail
#

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?

jolly basin
#

It was a while ago now

dry sail
#

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.

untold gull
#
      // 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

dry sail
#

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.

untold gull
#

hmmmmm

#

maybe?

dry sail
#

Either that or take out the hardcoding.

untold gull
#

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.

dry sail
#

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.

jolly basin
#

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.

untold gull
#

is this robe in the srd?

jolly basin
#

It is, yeah, and it uses the ac.formula override

untold gull
#

mmm nope

dry sail
#

No, it uses the one described

untold gull
#

I think this is a compendium content bug then

jolly basin
#

I'm sure it must have been working in core then, and we probably messed it up when doing some further iterations

dry sail