Macro for AC calculations

Hello,

I’m trying to figure out a way to build a Macro for AC calculations for D&D 5e. For example if you have Hide armor the AC is equal to 12 + {DexMod} (Max 2). It’s the Max 2 part that I’m getting hung up on.

Any help with this would be helpful.

Thanks in advance.

That would be 12 + min(DexMod, 2)

I know it sounds weird to use min instead of max, but it works.

That did the trick. Thanks.

Do you know if there is somewhere to go to see a list of “common” macros?

Hi @BalarRachi

You could check out our 5E SRD action collection on our Knowledgebase, it’s got all SRD spells and class feats for 5E in an Astral friendly format:

https://help.astraltabletop.com/official-content/5e-srd-actions/

You could also check our examples provided in our Syntax section of the Knowledgebase:
https://help.astraltabletop.com/dice/syntax/

Each of those sections have examples of common actions.

Finally, I’d strongly recommend going through the Tutorial Games. We’ve recently updated the Advanced Tutorial Game with a map specifically for character building and actions. You’re guided through an interactive tutorial which covers creating actions, advanced math and checkboxes for real-world situations like calculating max health automatically, or creating checkboxes that alter your stats and output.

Hope this helps!

Thanks for this. I’ve already checked out both Tutorials, but some of the more advanced Macros, I don’t have the hang of yet.

I’ve created an action for Second Wind for Fighters. Do you know if there’s a way to get the action to automatically add the dice roll to the Hit Points? I’ve been trying to figure something out, but have been unsuccessful.

Unfortunately, actions can’t modify stats yet. There are some feature requests to implement this, if you’d like to upvote them.

Thanks for that info. It definitely would be nice to be able to do that.