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 macro help

Hi all! I'm looking at creating a macro for a wild magic sorcerer.  Each time they cast a spell, they have a chance of triggering a random outcome (from a list of 100 outcomes on the Wild Magic Table).  So they have a 5% chance base + 5% per spell level.  For example, if casting a 5th level spell, they have a 30% chance of a wild magic outcome (5% base + 5%*5 spell level = 30%).  I'm thinking it would be easiest to have a pop up window where the player is prompted to enter the spell level then it would roll the percentile dice.  If failed (less then target %, so 30% in above example) then a d100 outcome dice is rolled.    With that outcome dice, I'm looking to have the outcome listed, so something like if a 16 is rolled then 16 = "outcome description".  it would be nice to be able to send that outcome to the DM without anyone else, including the rolling player, knowing what it was, just to give the DM some flexibility to tweak things if needed.  I know that's a lot.  I appreciate any advice anyone can give!  Thanks!
1707917644

Edited 1707917717
GiGs
Pro
Sheet Author
API Scripter
There is something you cannot do in Roll20 without a script (requiring a Pro subscription): rolls that depend on a conditional. Here's something that is easy to do: roll d% against a target, and show a button to click. If the button shows a 1 (success), the user then clicks the button to roll on the wild magic table.
Thanks for that.  Couple of things. I'm not very familure with buttons and I'm having a difficult time setting up and getting what you described to work.  Some help on what that would look like would be appreciated. Secondly, is there a way to display the wild magic table outcome once that button roll is done?  I was looking at roll tables, but I don't think they can be used for specific outcomes (so a roll of 53 equals outcome 53), and I can't use text in tables, only images.  Is that correct?
1707930501

Edited 1707931490
Gauss
Forum Champion
For the basic roll, here is how you set that up:  Construct two tables:  Table #1: name it 0WildMagic one entry, name it: No Wild Magic Table #2: name it 1WildMagic create all the entries your Wild Magic table has, name them what the entry shows.  Example: entry 1: Sparkles drop from the sky entry 2: Fog appears and so on In the spell's description put the following:  [[1t[[[{1d100}>##]]WildMagic]]] You will need to change the ## for each spell level.  Example, in level 1 spells put 10 , in level 2 spells put 15, and so on.  ie: [[1t[[[{1d100}>10]]WildMagic]]]  The result of all that is it will put "No Wild Magic" or the text of the Wild Magic that appears in the spell's description.  Now, this won't make it secret as that isn't possible without the Pro subscription. However, you could put that into an Ability macro, turn it into a Chat Menu button, and have the DM roll it to themselves.  Example of that:  Ability name: WildMagic1 Ability body: /w GM  [[1t[[[{1d100}>10]]WildMagic]]] In the spell description have:  [Roll Wild Magic](~Charactername|WildMagic1) Note: the above is for level 1 spells.  For level 2 spells you would have to make a second Ability macro, change 10 to 20, change 1 to 2 Example of that:  Ability name: WildMagic2 Ability body: /w GM  [[1t[[[{1d100}>20]]WildMagic]]] In the spell description have:  [Roll Wild Magic](~Charactername|WildMagic2)
Thanks Gauss.  That's super helpful! I'm assuming this works for PCs who's character sheet is in Roll20 and won't work for imported sheets from D&DBeyond or others due to lack of access to descriptions boxes of spells? Also, just for my understanding instead of just cut and pasting, as far as the syntax is concerned, for  [Roll Wild Magic](~Charactername|WildMagic1), is:      [Roll Wild Magic]  = inserts a button     |WildMagic1  = activates the Ability But not sure what the ~ stands for and rules for charctername (exact character name on character sheet, I'm assuming)? 
1708020594
Gauss
Forum Champion
Yes, this is for a character sheet in Roll20. If you are using DDB character sheets it would be a good idea to state that at the start as it limits the options.  Normally the command to activate an Ability macro is %{charactername|abilityname} Chat Menu buttons change that to (~charactername|abilityname) Yes, exact character name on the sheet. 
Awesome!  Thanks!
1708086840

Edited 1708087402
Evan
Pro
Follow up for you and another question. So, I set up macros as above and after a bit of fussing, they work great.  I added them to the bar and I now have this: Clicking on each of those gives (receptively): So I was thinking, to get rid of the clutter, I can add them all into a drop down menu which then connect to the macros so I only have one button on the bottom of the screen.  After some forum searching, finding out that you can't just attach to macro name but need to enter macro content for drop downs, then replacing some brackets with html code, if finally got things to work and giving me the same chat output as above, but minus the GM whisper (I initially left that out of the code to see if I could get it to work first).  Once I got it working, I added the GM whisper part back in, but now I'm getting this: As you can see from the above pic, result is the same whether I use /w GM or /gmroll. This is my code: ?{Spell Level|Level 1, /gmroll [[1t[[[{1d100}<10]]WildMagic]]]|Level 2, /gmroll [[1t[[[{1d100}<15]]WildMagic]]]|Level 3, /gmroll [[1t[[[{1d100}<10]]WildMagic]]]} What do I need to add so it reads the /gmroll as part of the activation and not just prefix wording? What am I missing? 
Just a clarification with that code.  I only did to spell level 3 for now.  I will add the other levels once its working.  And I know that 3rd level modifier should read <20 (I was using that one to play around with display messages and didn't reset it to the proper number when I screen shot)
1708093851
GiGs
Pro
Sheet Author
API Scripter
It looks like you have a space before /gmroll. You should remove that.
That did it!  Thanks!
1708107154
Gauss
Forum Champion
Got it all figured out?
Yup.   Just in case anyone else is looking to do the similar without a Pro sub, what I did initially I ended up doing individual macros per spell level used with their appropriate odds to proc wild magic.  This is rolled by the player and whispered directly to the GM.  I later changed that to one macro that has a dropdown menu where you pick the spell level.  Again whispered to GM if wild magic happens or not. Then a second macro (again the player rolls and it is whispered to the GM) that rolls a d100.  That displays a number, along with a clickable text that opens a handout for the GM of the 100 choices of wild magic (wild magic table).  Each entry in the table has a clickable link that whispers the player what the effect is. Thanks Gauss and GiGs for the assist!!