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

Mirroring the Function of GM Table roll in a Macro. How does?

1458656642

Edited 1458656803
I'm looking at the advanced  Roll Queries , and I just familiar enough to coding to be tragically stupid. I know I'm looking to emulate conditional statement (a nested If , or Case statement) SPECIFIC USE: I have a character in a 5e campaign using homebrew with a randomized table event driven ability (Wild Surge)   1t[Wild_Surge] Their ability is to grant advantage on that roll   2t[Wild_Surge])   pick between the results. But they also can modify the resulting random roll upward by expending spell slots ?{SPELL SLOT|Option1|Option2|Option3|Option4|Option5}  - the % random table's elements are value oriented so that negative events are lower values on the table, better are higher. % (d100) Result 1 You explode, dealing (your level)d6 damage to every thing within 30ft of you (You immediately go to 0 HP), death saves are at disadvantage) 2 You instead create an explosion around yourself It functions like fireball except you’re a target too and damage is 9d4 piercing and slashing damage* 3 You cast Fireball 3rd level spell slot centered on you 4 Caster loses 1d10 maximum hit points until long rest ... 98 Your spell goes off as normal. If your spell does damage, it will do the maximum. 99 Spell Effect goes off as normal. Spell effectiveness (range, duration, area of effect, damage, etc.) is doubled. 100 Spell Effect goes off as normal. So I need to somehow PASS a modified d100 roll to the table for its result, or make a macro that uses conditional logic so that the roll + the queried value adjustment is factored into the result. If x = 1 then "/em explodes, dealing [[ @{target|level} d6]] Fire damage to every thing within 30ft of (@{Target|Name} goes immediately go to 0 HP), death saves are at disadvantage)" Else if x =2 Then " .... Is that possible?
1458680291

Edited 1458682314
Modnar Wylde said: But they also can modify the resulting random roll upward by expending spell slots I'm pretty sure this is a bit beyond the capabilities of a single Rollable Table. As such, I'll recommend that you recreate it within a PowerCards macro. e.g. !power {{ --name|Wild Magic Surge! --Rolled a|[[ [$R] 1d100 + ?{Level of Spell Slot Expended|—, 0|1|2|3|4|5|6|7|8|9} ]] -- ?? ?{Level of Spell Slot Expended} >= 1 ?? !|Character Name expends a Level ?{Level of Spell Slot Expended} Spell Slot! -- ?? $R == 1 ?? |Character Name explodes, dealing [[@{target|level}d6]] Fire damage to every thing within 30ft of (@{Target|Name} goes immediately go to 0 HP), death saves are at disadvantage. -- ?? $R == 2 ?? |etc. -- ?? $R == 3 ?? |etc. }}
I don't want to sound all.... OMG Silvyre you're the best, you're amazing (etc etc) Because, you are. clearly. I will see if the DM will allow powercards, right now we are not so I was hoping I missed something that would work without it, but thank you for an elegant solution.
You're very welcome! Happy rolling!
Thank you 
Could this be used to cast the random Eye beam from an Undead Beholder?
Nevermind I got it! Thanks, Now if I could figure out how to get it to pick a random PC as well. 
1460614689

Edited 1460614830
[code]  !power {{ --name|__Beholder__ --leftsub|Random Eye Beam --Rolled a|[[ [$R] 1d4]] -- ?? $R == 1 ?? |Paralyzing Ray. The targeted creature must succeed on a DC 14 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success.. -- ?? $R == 2 ?? |Fear Ray. The targeted creature must succeed on a DC 14 Wisdom saving throw or be frightened for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success . -- ?? $R == 3 ?? |Enervation Ray. The targeted creature must make a DC 14 Constitution saving throw, taking [[ 8d8 ]] necrotic damage on a failed save, or half as much damage on a successful one. -- ?? $R == 4 ?? |Disintegration Ray. If the target is a creature, it must succeed on a DC 14 Dexterity saving throw or take [[ 10d8 ]] force damage. If this damage reduces the creature to 0 hit points, its body becomes a pile of fine gray dust. }} [/code]  I wanna hide the roll but when I use the $ it hides the roll and everything after???
Try replacing "Rolled a" with "hroll".
1460616992

Edited 1460618541
!power {{ --name|__Beholder__ --leftsub|Random Eye Beam --hroll|[[ [$R] 1d4]] -- ?? $R >= 1 AND $R <= 45 ?? !Beam1|**Paralyzing Ray.** The targeted creature must succeed on a DC 14 Constitution saving throw or be paralyzed for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success.. -- ?? $R >= 46 AND $R <= 80 ?? !Beam2|**Fear Ray.** The targeted creature must succeed on a DC 14 Wisdom saving throw or be frightened for 1 minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success . -- ?? $R >= 81 AND $R <= 95 ?? !Beam3|**Enervation Ray.** The targeted creature must make a DC 14 Constitution saving throw, taking [[ 8d8 ]] necrotic damage on a failed save, or half as much damage on a successful one. -- ?? $R >= 96 AND $R <= 100 ?? !Beam4|**Disintegration Ray.** If the target is a creature, it must succeed on a DC 14 Dexterity saving throw or take [[ 10d8 ]] force damage. If this damage reduces the creature to 0 hit points, its body becomes a pile of fine gray dust. }}