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

Issue with roll table in macro

Hi. I am new to macros. I created a roll table for wild magic surges in D&D5e. Now I am trying to create a macro for it that only the DM can see the results, but I wanted to use a nice looking format. I used this macro which I butchered from another template: /w gm &{template:npcaction} {{rname= Wild Magic Surge }} {{name=}} {{description=[[1t[wild-magic-surge]]]}} I want it to show the description for the Table Item rolled, below the title "Wild Magic Surge". Instead I get the actual number rolled. Any suggestions? What am I doing wrong?
1622970994

Edited 1622971214
Ziechael
Forum Champion
Sheet Author
API Scripter
I would assume that you have the number as part of the table result, probably the first character. In that case the table sees it as a custom die and will only take the number. For tables of results like this you want to only use the text and then use the weighting to ensure that the probability of returning a given result is accurate as per the table. ie. a table with 100 results, each as likely as another would have a weighting of 1 for each entry, however if there were 99 results and one of them was on a roll of 99 or 100 then it would be weighted 2 and the rest would still be 1. It's best to think of it in terms of percentages where possible. If you really want the number as part of the result, everything bar the 2nd option below will work:
Thank you Ziechael! Having the numbers  at the beginning of the text was definitely the issue here. I changed the format as suggested and it worked.  Much appreciated!
1623054622
Ziechael
Forum Champion
Sheet Author
API Scripter
We are honoured OP, we've attracted a bot! (Reported) selinda said: You can use a field validation rule to specify a criterion that all valid field values must meet. You should not have to specify the current field as a part of the rule unless you are using the field in a function.
1623054683
Ziechael
Forum Champion
Sheet Author
API Scripter
Norbert R. said: Thank you Ziechael! Having the numbers  at the beginning of the text was definitely the issue here. I changed the format as suggested and it worked.  Much appreciated! Anytime, these things can be a fun ride! Happy rolling :)