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 .
×

Substracting from a macro

1457553670

Edited 1457553990
Hello, First of all, I know basically nothing about macros so please forgive me if what I'm asking is absurd. I wrote this macro -which is working smoothly- and I was wondering if there was a way to subtract a number from it, as in "macro value - 5", for times when I'm temporally sick/hurt/etc and my rolls have a penalty. I'm sure there's a way to include penalties in macros but I'd rather calculate these things 'manually' to have a better control of my character. Thanks!
1457556295
Lithl
Pro
Sheet Author
API Scripter
That depends on how you've written the macro you have. You'll need to share what you've got for anyone to give you accurate advice on how to change it.
1457556600

Edited 1457556802
Brian said: That depends on how you've written the macro you have. You'll need to share what you've got for anyone to give you accurate advice on how to change it. Ok. One of them is a dropdown menu to choose which saving throw is pertinent in each case: /em tries to resist... &{template:pf_defense} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{name=Saving throw}} {{?{Saving throw type|Fortitude, **Fortitude**=[[ 1d20 + [[ @{Fort} ]] ]]|Reflexes, **Reflexes**=[[ 1d20 + [[ @{Will} ]] ]]|Will, **Will**=[[ 1d20 + [[ @{Will} ]] ]]} }}
1457557786
The Aaron
Pro
API Scripter
The easiest thing to do would be to inject an attribute reference that you can adjust: /em tries to resist...&{template:pf_defense} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{name=Saving throw}} {{?{Saving throw type|Fortitude, **Fortitude**=[[ 1d20 + [[ @{Fort} ]] + (@{FortAdjust})+(@{SaveAdjust}) ]]|Reflexes, **Reflexes**=[[ 1d20 + [[ @{Reflex} ]] + (@{ReflexAdjust})+(@{SaveAdjust}) ]]|Will, **Will**=[[ 1d20 + [[ @{Will} ]] + (@{WillAdjust})+(@{SaveAdjust}) ]]} }} You'd just need to update FortAdjust , WillAdjust , ReflexAdjust for individual changes, or SaveAdjust for an adjustment across the board.  You'd need to add those attributes at 0. to be sure things work. BTW : You have @{Will} in your Reflexes roll
The Aaron said: The easiest thing to do would be to inject an attribute reference that you can adjust: /em tries to resist...&{template:pf_defense} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{name=Saving throw}} {{?{Saving throw type|Fortitude, **Fortitude**=[[ 1d20 + [[ @{Fort} ]] + (@{FortAdjust})+(@{SaveAdjust}) ]]|Reflexes, **Reflexes**=[[ 1d20 + [[ @{Reflex} ]] + (@{ReflexAdjust})+(@{SaveAdjust}) ]]|Will, **Will**=[[ 1d20 + [[ @{Will} ]] + (@{WillAdjust})+(@{SaveAdjust}) ]]} }} You'd just need to update FortAdjust , WillAdjust , ReflexAdjust for individual changes, or SaveAdjust for an adjustment across the board.  You'd need to add those attributes at 0. to be sure things work. Thanks :). However, the reason I wanted it to be outside the macro is because most of the times I won't need to adjust anything (or so I hope... XD), so having to do it every time for no penalty would be kind of wasting time. All I want is some simple math, really. BTW : You have @{Will} in your Reflexes roll Whoops. Thanks!
1457560119

Edited 1457560156
The Pathfinder Character Sheet already includes fields that you may use to account for any miscellaneous adjustments to Saving Throws : Any changes you make to those fields will be reflected in @{Fort}, @{Ref} and @{Will}.
Silvyre said: The Pathfinder Character Sheet already includes fields that you may use to account for any miscellaneous adjustments to Saving Throws : Any changes you make to those fields will be reflected in @{Fort}, @{Ref} and @{Will}. I know, I know... but I'm using macros so that I don't need to open the character sheet for common (and not too uncommon) rolls, takes up most of the screen. I'll end up doing that if there's no other way, of course.
1457560809
vÍnce
Pro
Sheet Author
You can always drag/drop sheet rolls to the macro quick bar and/or create macros that trigger a roll directly.  No need to have the sheet open/  ;-)
Vince said: You can always drag/drop sheet rolls to the macro quick bar and/or create macros that trigger a roll directly.  No need to have the sheet open/  ;-) Yup, I read about that and already have a few showing. Pretty useful! I didn't know about the drag/drop feature, though. Interesting.
1457561288
Gen Kitty
Forum Champion
Pretty much every macro I write includes a 'Misc' modifier.  ?{Misc?|0} and ?{Misc to Hit?|0} and ?{Misc to Damage?|0} cover 99.99% of my needs.  You might consider adding a simple roll query to your macros too :)
GenKitty said: Pretty much every macro I write includes a 'Misc' modifier.  ?{Misc?|0} and ?{Misc to Hit?|0} and ?{Misc to Damage?|0} cover 99.99% of my needs.  You might consider adding a simple roll query to your macros too :) I thought about it while I was writing the macros, and I might do that in the end. From the replies I see here, it seems there is no easy way to make simple calculations including a finished macro in the line. Thanks :).
1457562650
The Aaron
Pro
API Scripter
Clairekun said: Thanks :). However, the reason I wanted it to be outside the macro is because most of the times I won't need to adjust anything (or so I hope... XD), so having to do it every time for no penalty would be kind of wasting time. All I want is some simple math, really. You'd set up the attributes once, when you create the macro, then adjust them only in the unlikely circumstance that you need to add a penalty/bonus for some duration.
The Aaron said: You'd set up the attributes once, when you create the macro, then adjust them only in the unlikely circumstance that you need to add a penalty/bonus for some duration. Hmmm... I wanted something to use in most of my macros, not only saving throws, so I guess I'll add a generic SaveAdjust or two for everything (having a temporary penalty in something I'm not going to roll wouldn't be a problem, I guess). I'll look into it. Thank you.