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 for rage

Hey guys! Can anyone write me a macro that would roll a 1d10 and based on what it rolls it gives us the number of the roll plus a short text result.
So if i roll a 1 it would say i rolled a 1 and tell me  -->  Shadowy tendrils lash around you. Each creature of your choice that you can see within 30 feet of you must succeed on a Constitution saving throw or take 1d12 necrotic damage. You also gain 1d12 temporary hit points.   If i roll a 2 it would tell me i rolled a 2 and write -->  You tp up to 30 feet to an unoccupied space you can see. Until your rage ends, you can use this effect again on each of your turns as a bonus action. etc :)
1637938763
David M.
Pro
API Scripter
Easiest way would be to just make a rollable table with 10 entries?
1637941302
Brian C.
Pro
Marketplace Creator
Compendium Curator
Just note that if rollable table entries start with a number, they will only emit the number and not the rest of the text. You will want to wrap it in parenthesis. (1) Shadowy tendrils... (2) You tp up to 30 feet, expending one roll...
1637942738

Edited 1637942781
timmaugh
Forum Champion
API Scripter
David's solution would be the easiest, I think. However, if you need more manipulation to the roll before you retrieve the value (or a different manipulation every time), rollable tables might come up short. For instance, you roll from a rollable table with something like: [[ 1t[ResultsTable] ]] And the probabilities are governed by the weighting of the items in that table. If you want the probabilities to change from roll to roll, you'd have to do that manually. Maybe one character should roll straight against the table, but another person should be guaranteed a value no lower than a 3 (as some sort of demonstration of proficiency). In that case, I'd suggest Muler (working with ZeroFrame and SelectManager). These are all metascripts. With Muler, you can retrieve manipulated results using any modifications to the roll: get.ResultsMule.ResultsTable.[[1d10+3]].value/get ZeroFrame will extract the value of the roll and send it to the Muler call to retrieve the item from the Mule. Then, for a result like your example of a roll of 1, you could include inline rolls right in the result, and they will resolve (because ZeroFrame will recursively process them): Shadowy tendrils lash around you. Each creature of your choice that you can see within 30 feet of you must succeed on a Constitution saving throw or take [[1d12]] necrotic damage. You also gain [[1d12]] temporary hit points. Your embedded rolls are already made, and they are hoverable to show what was rolled (though for these it would be straightforward). Full Setup To do this, you'd create a Mule (an ability) on a character. I'll call that character "MuleBoy", and I'll call the ability/mule "RageResults". Fill that ability with text in the format of roll=value, like this: <=1=Shadowy tendrils lash around you. Each creature of your choice that you can see within 30 feet of you must succeed on a Constitution saving throw or take [[1d12]] necrotic damage. You also gain [[1d12]] temporary hit points. 2=You tp up to 30 feet to an unoccupied space you can see. Until your rage ends, you can use this effect again on each of your turns as a bonus action. 3=... ... >=10=... You could then use this in a roll template output (using ZeroFrame constructions). !&{template:default}[[1d10]]{{name=Rage! Rage! Ever, ever rage!}}{{Roll $[[0]].value=get.MuleBoy.RageResults.$[[0]].value/get}}{&mule MuleBoy.RageResults}{&simple} Output:
Install powercards !power {{ --name|@{selected|token_name} Rage --hroll: |[[ [$Rage] 1d10 ]] --?? $Rage == 1 ?? !Rage1|Insert Result Here --?? $Rage == 2 ?? !Rage2|Insert Result Here --?? $Rage == 3 ?? !Rage3|Insert Result Here --?? $Rage == 4 ?? !Rage4|Insert Result Here --?? $Rage == 5 ?? !Rage5|Insert Result Here --?? $Rage == 6 ?? !Rage6|Insert Result Here --?? $Rage == 7 ?? !Rage7|Insert Result Here --?? $Rage == 8 ?? !Rage8|Insert Result Here --?? $Rage == 9 ?? !Rage9|Insert Result Here --?? $Rage == 10 ?? !Rage10|Insert Result Here }}
Great, I'll give that a try!