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 / Power Card Newbie

Hey everyone, I've been trying to build macros to support Psionic Powers where the caster can input Augment points and have the rolls and effects adjusted. But also desire the individual rolls to been seen and captured in the card.   This came up in context of 4e so been playing around with the 4e template which has the augment toggle but can't see the individual dice, yeah it work with 3d dice but too often they disappear so easily so better if it shows up in chat. I tried to use a chat macro but haven't found a way to set a local variable.  I came very close on this by setting an attribute on character sheet and then having it insert a "!" on a line to suppress that macro.  However for this to work i have to fire off a macro toe set the right Augment then a separate macro for the power, if i set the attribute in the same macro it still reads the old value.  This gives me the roll the way i want but not ideal... Having a local variabel i could set and use in the macro would be handy :)  Trying with power cards looked promising but when i hover over the resulting roll i don't see the individual resulting dice but rather the code to calculate the roll... I am sure i'm doing many things wrong but kinda of hitting a brick wall at the moment.   Any help would be appreciated! Jeff
1610132903
Andreas J.
Forum Champion
Sheet Author
Translator
I'm not sure what you mean with "local variable" but this might be useful: <a href="https://wiki.roll20.net/Complete_Guide_to_Macros_%26_Rolls#Roll_Queries" rel="nofollow">https://wiki.roll20.net/Complete_Guide_to_Macros_%26_Rolls#Roll_Queries</a>
Hi ᐰndreas J.&nbsp; Thank you for the quick response.&nbsp; By "local variable" i simply mean a value i can set that can then be used in terms of logic in multiple places in the same macro that set it. the ? operator is important part of this to capture user input but ti does not appear that I can use the&nbsp; value set as a variable but can only use it within one action.&nbsp; But maybe I'm not understanding how to use / deference the value set..&nbsp; So the set of 3 macros below will accomplish what I want.&nbsp; But since the value i set on the character sheet via !setattr aren't available in the macro that calls them (or at least avail dependably).&nbsp; My desire would be to accomplish having three different sets of macro commands fired based on&nbsp; inputting a list of augment values.&nbsp; And show the rolls like the /roll command does&nbsp; but in one macro&nbsp; Hopefully that makes sense :)&nbsp; Macro 1: to set Augment value&nbsp; !setattr --silent --name Osop --Augment|?{Augment|0|1|2}| Macro 2: to use Augment value to set AugmentX value affect logic&nbsp; !setattr --name Osop --Augment|2 Macro 3: to use AugmentX value to affect outcome / effect and reset all AugmentX flags /em Says What!! /em Aug = @{Augment} /em Aug0 = @{Augment0} /em Aug1 = @{Augment1} /em Aug2 = @{Augment2} @{Augment0}/em got here 0 @{Augment1}/em got here 1 @{Augment2}/em got here 2 @{test}/em got here 3 !setattr --silent --name Osop --Augment0|! --Augment1|! --Augment2|!&nbsp;