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 .
×

Dice roll as text lookup?

Is there a way to output a string of text relative to a random rolled dice (without using a rollable table so the macro can be on the chr and import to multiple games ) ?
1602151056

Edited 1602151566
Oosh
Sheet Author
API Scripter
Without a Pro sub there's not a clean way to do this. Two ways of achieving it on a free account are: 1) Use images of the text you want to show, saved on an image host where you can refer to them by number, e.g. image1 image2 image3 image4. See this post for more detail. You can then call one of the images with the syntax shown in that post (note the extra square brackets). 2) use a command button. First create an Ability macro for each output you need, plain text if you want, or something in a template, e.g. text1 to text6. Something like this: &{template:default} {{Text=Many bad things happen!}} Then call a random one with a command button - it needs an extra square bracket at the start. Not sure why, but it stops the roll from outputting its HTML and spoiling the link. Obviously change "bob" to your character sheet name: [[Button](~bob|text[[1d6]]) edit - Before you go banging your head against the wall trying, you won't be able to use a die roll to directly call an Attribute or Ability, due to order of operations. So a direct %{bob|text[[1d6]]} will not work, nor will @{bob|text[[1d6]]}. It only works with a command button because they're created after math is rolled. Also... you could just have a drop-down Query with your text options, and roll a die manually before running the macro and clicking on the relevant option: /r 1d3 followed by: &{template:default} {{name=Text}} {{?{What number did you roll?| 1,1=First text option| 2,2=Second text option| 3,3=Third text option}}}
Thank you - I will play with option 2 ,  .. was using the third option at the moment but was looking if I could streamline it