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

Macro help

1459625794

Edited 1459625854
Hello everyone! I need a tiny bit of assistance. So me and my group are playing Dark Heresy 2nd Edition currently, and it's starting to become a pain to calculate how much damage is done. What I'm trying to write currently is a macro that inverts their total armor (Example [[-@{HArmour}+-floor(@{Toughness}/10)]] ) Prompts for the penetration (?{Penetration|0} and damage ?{Damage?|0} to output the amount of damage that was done. The issue crops up when doing penetration. What it needs to do is compare the total for the first half against 0 (Since the rules state penetration does nothing once it passes through the armor.) and use the lowest Value. (Example If a target has 6 Armor, being hit with a Penetrating weapon of 2, they would have 4, which would reduce incoming damage. VS a target with 6 Armor, with a weapon that penetrates 8, wouldn't have -2 Armor.) Edit: I'm terrible with words and math, so I hope that made sense.
Sounds like you could use a few  Keep / Drop functions.
Awesome! Thank you! Took a little wiggling, but I've gotten results. @{selected|token_name} takes [[{[[-@{selected|HArmour}+-floor(@{selected|Toughness}/10)]] + [[?{Penetration?|0}]], [[0]]}kl1 + ?{Damage?|0}]] wounds to the head! Inverts the Armor, Adds penetration (While leveling out to 0 if over.) Then adds the damage to the Negative( Or Null) value. For others interested in these macros for Dark Heresy 2nd Edition: @{selected|token_name} takes [[{[[-@{selected|BArmour}+-floor(@{selected|Toughness}/10)]] + [[?{Penetration?|0}]], [[0]]}kl1 + ?{Damage?|0}]] wounds to the Body! @{selected|token_name} takes [[{[[-@{selected|ArArmour}+-floor(@{selected|Toughness}/10)]] + [[?{Penetration?|0}]], [[0]]}kl1 + ?{Damage?|0}]] wounds to the Right Arm! @{selected|token_name} takes [[{[[-@{selected|AlArmour}+-floor(@{selected|Toughness}/10)]] + [[?{Penetration?|0}]], [[0]]}kl1 + ?{Damage?|0}]] wounds to the Left Arm! @{selected|token_name} takes [[{[[-@{selected|LrArmour}+-floor(@{selected|Toughness}/10)]] + [[?{Penetration?|0}]], [[0]]}kl1 + ?{Damage?|0}]] wounds to the Right Leg! @{selected|token_name} takes [[{[[-@{selected|LlArmour}+-floor(@{selected|Toughness}/10)]] + [[?{Penetration?|0}]], [[0]]}kl1 + ?{Damage?|0}]] wounds to the Left Leg!