Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

DnD_5e Character Sheet macro getting the correct ac

Is there a macro field for getting the active total ac? If the target is a monk, then they are using their "ac_no_armour", but if they are a fighter then I need to use the "ac" value. How can I accomplish getting the correct ac within a single macro?
1425584330
Actoba
Pro
Sheet Author
There is no "active" total ac field because the sheet is not aware of the current situation a character is in and therefore cannot decide for you whether the AC or AC_no_armour should be used. The sheet tracks the levels a character has in each class and those power some calculations...but these cannot be used to reliably determine which ac should apply. Mountain dwarf monks could be wearing armour, Someone with a few levels of monk but levels elsewhere may be wearing armour, similarly someone splashing a few levels of fighter with say barbarian may not be wearing armour. Essentially there's no way to automatically determine, with any confidence, which ac value should be used for a character at a given point in time. I can however look at adding an "effective ac" box to allow players to manually decide which ac value should apply right now. I'm not keen on this as it requires more player interaction to set and more importantly maintain, and doesnt really give them any tangible benefit...though i do see the benefit it would bring for people writing macros/scripts that want to "target" things. Is this what you meant?
Thanks for the response. How about the "worn" checkbox? If they have something worn, then it could send the "ac", else if nothing is "worn" it could send "ac_no_armour". This would mean that a monk that puts the clothes in the armour list, would have to set the AC of their clothes to effectively equal their unarmoured ac...which could be confusing. Or, maybe if it just went with the 90/10 rule and said that 90% of the time they are going to be using whichever gives them their highest AC, and just return max( ac, ac_no_armour )?
1425592705
Actoba
Pro
Sheet Author
The checkboxes that are on the armour section right now allow you to indicate whether a piece is : "Worn" and therefore the AC it gives should be counted towards the AC value "Unarmoured" - to indicate whether a particular entry gives it's bonus to ac_no_armour (like a shield for a barbarian would even if it wouldnt for a monk's unarmoured defense feature). As such these checkboxes only drive the calculation of these two values and not what would apply in a given situation. Similarly, taking the max is not approriate either because it depends entirely on the situation the character finds themselves in. I understand that 90% of the time a paladin will be wearing armour but it's the 10% of the time that I'll get complaints about. The sheet cant hope to cover every situation of course but i can see where a "contextual AC" would be useful for those of you that want to script/macro around whether things hit/miss. The problem is that there's no way of reliably determining that without some human interaction because of the differing situations characters can end up in and because of that i'd want to be careful that adding it in to support those that want to script stuff with it doesnt negatively impact other users or enforce a change for them that isn't necessary. Can you give me a use case for what you need it for? There is no max function for example (though there are of course mathematical workarounds for that) but something like that could easily be achieved if you are planning on using API scripting. Knowing what and how you want to use a contextual AC value might help to flesh out some options...(ie. if you are happy just using the max of the 2 values then you can use the mathematical workaround in your own macros to take the max of the 2 values)
Thanks so much for the help :) I'm new to Roll20, so trying to figure out the easiest way to manage my NPC/Monsters in an encounter. In the actions for my NPC, I am setting the effect (when relevant) to a macro like this: @{selected|token_name} swings club [[1d20+2]]([[1d20+2]]) at @{target|token_name}[[@{target|ac}]]([[@{target|ac_no_armour}]]). Damage: [[1d4]], on crit add [[1d4]]. This seems a good way to me for me to select my NPC, hit my Action macro, which then prompts me for the target and rolls for hit(adv/dis hit) against the target and shows me the targets AC so that I can determine hit without looking elsewhere. Of course it also goes ahead and rolls for damage just in case it hits. It works fine, except for that one monk that I have in the group...who of course is unarmored. If there is a better way to accomplish this, I am all ears.. Thanks again, Andrew
1425598777

Edited 1425598822
Actoba
Pro
Sheet Author
I would probably do it a similar way to you and just take note of who the target was and read the macro output approriately applying the correct AC depending on the target/situation. If you always want to apply the higher of the AC and ac_no_armour then you can change the ac section of your macro to the following bit of code that will return the highest of the two figures regardless...this is the mathematical workaround that represents max(ac, ac_noarmour) - ( (((@{target|ac}) + (@{target|ac_no_armour})) + abs((@{target|ac}) - (@{target|ac_no_armour}))) / 2 )
To make my attack macros work for PCs and for mooks I went away from targeting the AC value in the character sheet and instead use token" bar 2" value i.e. @{target|bar2}. So for the players I would select which AC value to allocate to token bar 2, AC for most characters and ac_no_armor for the barbarian, monk, wizard and such. For the mooks I'm assiging an AC value to bar 2 anyway so my attack roll calculations work for everyone. I hope that helps
I did what Eddie just suggested I have also faked the worn armour box for certain NPC's just to make it correct.
Thanks guys! All of that is very helpful.