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 here.
×
×
Cookie Preferences
We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
How would I make a specific macro or script for PCs taking damage that takes into account any resistances they have? Sounds like an easy one but I'm new to the API stuff and I'm frying my brain here...
If the characters have an attribute such as 'Resistance.Fire', your macro could do something such as [[ (3d6+6) -@{target|Target|Resistance.Fire} ]] But you'd need to make sure all your players had attributes for the resistances, if only set to 0, because macros fail in weird and sometimes cryptic ways if you try to call an unset attribute. ^_^ I hope this helps!
Given just how many different resistances someone could have (and thus need to be added to the macro), I would instead recommend a bit of manual entry. Ask person rolling if DR detracts from their damage: [[ ( 1d8 or whatever your damage is ) - ?{Any DR reducing damage?|0} ]] If you're looking for something specificlly API based, I would recommend posting in the API forum.
Well... it depends on the system. Some systems have just a handful of resistances, which makes my macro useful. Some systems are much more freeform, making the manual entry more reasonable :>
Hey thanks fellas, I'll try these out. I was looking to make a macro where it would ask you if you had any resistances and then subtract that entry and these both look useful. Thanks again!
Still having an issue. Here is my damage macro "!alter @{target||token_id} 2 -?{Damage Taken|0}". I just click and it deducts from the health bar what I input. How can I add a variable to that for resistances and get it to work or automatically deduct it? Something either where I add a resist attribute to the character sheet and it is deducted or a query where the player can just input the resist value and it is deducted. This is probably easier than I'm making it... I'm using D&D 4e rules if that helps.