I run D&D 3.5e and use the Players Roll All The Dice variant and the Roll20 built-in D&D 3.5e character sheet. Because players roll a lot more dice using this variant than normal, it's important for them to know their roll modifiers for those new rolls. As such, I wanted to create a tool for my players that allows them to look up all of their roll modifiers at any time. Likewise, I wanted the tool to tell me what all of the various NPC/monster "scores" are that oppose those rolls, so I needed it to calculate the simple number which a player would need to beat. That is, I needed something that would output something like this: Flat-Footed AC for Bob: +4 = 14 (Subtract lost Dodge bonus) A number of these values have "conditionals" in them. For example, for Flat-Footed AC, you lose your Dex bonus (if you had one), but keep a Dex penalty. I needed to represent these conditions in my tool, but the only tool I had available was macros/abilities because I can't afford Mentor level (for custom character sheets). I can't do something like... [[ @{selected|dexmod} < 1 ? @{selected|dexmod} : 0 ]] ...because there's no "conditional" syntax available in macros/abilities (although it would be really nice if you could). That meant that I had to use Dice Representation to display all of these modifiers and all of their innate conditionals, which I could represent in-game through a GM whisper. /w gm Flat-Footed AC for @{selected|character_name}: +[[ @{selected|modifier} ]] = [[ @{selected|modifier} +10 ]] (Subtract lost Dodge bonus) Through experimentation, I found the following formulas for creating very simple conditionals using only Dice Representation. I figure they might be very useful to some people on here. Assume that in the formulas all ALL_CAPS variables are integers that you plan on replacing with actual integers (or attributes that are integers) when you implement them. ( Note: if you replace a variable with an explicit negative number, Roll20 Order of Operations must have that negative number in parentheses.) [[ ( 1 - ( floor( ( MINIMUM_VALID_NUMBER - 1 - ATTRIBUTE ) / ( abs( MINIMUM_VALID_NUMBER - 1 - ATTRIBUTE ) + 0.001 ) ) + 1 ) ) ]] ...returns 1 for all integers MINIMUM_VALID_NUMBER or more, and returns 0 for all other integers. This means that I can do... [[ ATTRIBUTE * ( 1 - ( floor( ( MINIMUM_VALID_NUMBER - 1 - ATTRIBUTE ) / ( abs( MINIMUM_VALID_NUMBER - 1 - ATTRIBUTE ) + 0.001 ) ) + 1 ) ) ]] ...and it'll return ATTRIBUTE when it's an integer that is greater than or equal to the MINIMUM_VALID_NUMBER and will be 0 for all other integers. Likewise, for a situation where above a certain maximum you should ignore that value (such as ignoring a Dex Bonus when flatfooted but keeping a penalty), you can use... [[ ( floor( ( MAXIMUM_VALID_NUMBER - ATTRIBUTE ) / ( abs( MAXIMUM_VALID_NUMBER - ATTRIBUTE ) + 0.001 ) ) + 1 ) ]] ...to return 1 for all integers MAXIMUM_VALID_NUMBER or less, and return 0 for all other integers. Inside a macro, you'd write... [[ ATTRIBUTE * ( floor( ( MAXIMUM_VALID_NUMBER - ATTRIBUTE ) / ( abs( MAXIMUM_VALID_NUMBER - ATTRIBUTE ) + 0.001 ) ) + 1 ) ]] ...and it'll return ATTRIBUTE when it's an integer that is less than or equal to the MAXIMUM_VALID_NUMBER and will be 0 for all other integers. Thus, to accomplish ignoring a Dex Bonus but keeping a Dex Penalty, I can write the following (using the default template and the Defense Bonus variant ): /w gm &{template:default} {{name=AC Roll Modifiers for @{selected|character_name} }} {{Flat-Footed=+[[ @{selected|DefenseBonus}-(@{selected|DefenseBonus}*@{selected|Is Wearing Physical Armor?}) + @{selected|acitembonus} + @{selected|shieldbonus} + @{selected|size} + @{selected|armorclassnaturalarmor} + @{selected|armorclassdeflectionmod} + @{selected|armorclassmiscmod} + @{selected|dexmod} * ( floor( ( (-1) - @{selected|dexmod} ) / ( abs( (-1) - @{selected|dexmod} ) + 0.001 ) ) + 1 ) ]] = [[ @{selected|DefenseBonus}-(@{selected|DefenseBonus}*@{selected|Is Wearing Physical Armor?}) + @{selected|acitembonus} + @{selected|shieldbonus} + @{selected|size} + @{selected|armorclassnaturalarmor} + @{selected|armorclassdeflectionmod} + @{selected|armorclassmiscmod} + @{selected|dexmod} * ( floor( ( (-1) - @{selected|dexmod} ) / ( abs( (-1) - @{selected|dexmod} ) + 0.001 ) ) + 1 ) +10 ]] (Subtract lost Dodge bonus)}} In the above example we also see a different kind of conditional in the math for the Defense Bonus: @{selected|DefenseBonus}-(@{selected|DefenseBonus}*@{selected|Is Wearing Physical Armor?}) In my version of the Defense Bonus variant, Immaterial Armor stacks with the Defense Bonus, so I can't just use the @{selected|acitembonus} attribute to determine whether the Defense Bonus applies. As such, I created a custom attribute for all creatures called "Is Wearing Physical Armor?" which is a boolean 1 or 0 depending on whether or not that's the case (admittedly, the formula could be made simpler if the attribute was "Is NOT Wearing Physical Armor", but that's splitting hairs). Anywho, I wanted to point out this other kind of conditional because with this math formula many useful applications could exist for non-mentors where you have an attribute which is a boolean 1 or 0.