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

Wild Magic Surge Macro

Let me start by saying, I know there are API Scripts I can use and I can also use a Rollable table, but my DM doesn't know how to use either of those and doesn't want to learn, so I am trying to figure out a way of using a macro. That being said, I know macros can't store variables, so I am thinking that I will use an attribute on the character sheet to store the die roll.  Since EP (Electrum Pieces) attribute is never used, I want the macro to first roll a d20 and store the value (1-20) in the EP attribute.  This I can do and have done. !setattr --name @{selected|character_name} --ep|[[1d20]] Then I would like the macro to pull in the value of the EP attribute and if the value was anything but "1" then the macro would reset the EP value back to "0" and exit the macro.  But if the EP attribute value, is "1", then the macro would roll a d100 and replace the EP attribute value with the new value (1-100) !setattr --name @{selected|character_name} --ep|[[1d100]] Then I would like the macro to pull in the new value of the EP attribute and based on the value it would display to Wild Surge Result in the chat window:         01-02: Roll on this table at the start of each of your turns for the next minute, ignoring this result on subsequent rolls.         03-04: For the next minute, you can see any invisible creature if you have line of sight to it.         05-06: A modron chosen and controlled by the DM appears in an unoccupied space within 5 feet of you, then disappears 1 minute later. and so on. Then the macro would reset the EP attribute value back to "0" and exit the macro.  I am pretty new to macros and can figure out basic stuff, but this one is beyond my ability. Thanks in advance for help you can offer.
1753824379

Edited 1753824643
Gauss
Forum Champion
I had a bunch of stuff in here, but the more I thought about it the more the initial idea should be reworked.  Is there a reason you are using an attribute as a storage device? It isn't necessary. This can all be done with a macro and two Rollable Tables. No API Scripts required. I know you said your DM doesn't want to do it, but you can create the Rollable Tables yourself if they promote you to GM briefly.  Alternately, a Scriptcard can probably do this. 
1753824769

Edited 1753824911
I was trying to figure it out on my own before posting and I saw something similar talked about and that's what was suggested.  But I will do whatever is easier as long as it isn't API Scripts or Rollable Tables.  They won't promote me to GM.  I don't know this person, just a game I got into.  I am very limited.
1753825845

Edited 1753825908
Gauss
Forum Champion
!setattr is an API Script, the ChatSetAttr API Script. There may be a very involved way, but for that please post every option. When all the information is in I'll ping RainbowEncoder to see if they can do something with it. 
Thanks.  I had totally forgotten !setattr is an API Script.  I have it installed in my games.  I guess my idea isn't going to work.  Thank you anyway.