Thanks for taking a crack at it! Sorry, I'll try to explain better: In PF2e, bonuses that share a type do not stack; the best one is applied. If a character has three effects on their armor class—a +1 status bonus, a +2 status bonus, and a +1 circumstance bonus—the +2 status bonus overrides the +1 status bonus while stacking with the +1 circumstance bonus, resulting in a total bonus of +3. Same goes for typed penalties: the worst is applied. But penalties and bonuses of the same type overlap, so a +1 status bonus and a –2 status penalty would result in a –1 status penalty. I'm trying to set up macros to apply common bonuses and penalties, such as from spells or conditions, but currently I can't find a way to account for ones that can't stack. So if a character already has bonus of +2 in their status modifier for armor class (default value of the modifier is 0), and they get another buff that provides a +1 status bonus, they would end up with a +3 when ought to be a +2. But if that same character instead got a condition that applied a –1 status penalty, they should end up with a +1 bonus. The only mention of --evaluate I can find is this: --evaluate is a GM-only (unless you allow it to be used
by players via the configuration) option that will use JavaScript
eval() to evaluate the attribute value expressions. This allows you to
do math in expressions involving other attributes (see the example
below). However, this option is inherently dangerous and prone to
errors, so be careful. [...] If the current value of attr1 is 3 and the current value of attr2 is 2, !setattr --sel --evaluate --attr3|2*%attr1% + 7 - %attr2% will set the current value of attr3 to 15. I also realized it would need to be a command to replace the value, rather than modify it, as some of the attribute fields are not number-valued. I tested the following !modattr --sel --evaluate --armor_class_temporary|("%armor_class_temporary%" >= 3) ? "%armor_class_temporary%" : Math.min(2, "%armor_class_temporary%" + ?{Status Bonus}) and got Changing it from !modattr to !setattr resulted in this: