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

custom dice tables and having them as a macro.

hi i am trying to make several die macros that use different die. for example one of the d 6 has three 1's, two 2's and one blank. i have the die set up but i  would rather have it as a macro so my players can have it easier to just simply type X or click a button. can some one explain how to do this?

You can roll from a table using a macro, you just need to call the table within the macro like so.

/r 1t[table-name]

or

[[1t[table-name]]]
March 18 (6 years ago)

Edited March 18 (6 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter

Or for variable number of rolls (defaulting to 1):

/r ?{How many dice|1}t[table-name]
[[ ?{How many dice|1}t[table-name] ]]

So using this formula why doesn't this roll my table?

/w gm &{template:npcaction} {{rname= Outdoor Encounter }} {{description= Wilderness, Hills & Mountains 
[[ ?{How many dice}d?{Die Size}+?}1t[OutdoorEncounter]]] }}


Nevermind i got it! Here is the good code!

/w gm &{template:npcaction} {{rname= Outdoor Encounter }} {{description= Wilderness, Hills & Mountains 
[[?{How Many Dice}d?{Die Size}+?}]] [[1t[OutdoorEncounter]]] }}
March 18 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

What is the question mark doing at the end here?

[[?{How Many Dice}d?{Die Size}+?}]]

it is actually two queries with a pop up box for each to just enter the number you want. The first is how many dice you want and the second is what type of die such as a d10,d4 etc...

March 18 (6 years ago)

Edited March 18 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

In that case you just need

[[?{How Many Dice}d?{Die Size}]]

Or if you want to set defaults

[[?{How Many Dice|1}d?{Die Size|6}]]

The +?} you have at the end is incorrect syntax and is why your first version of the macro didnt roll the table.

I'll try it and see if it works but the code i posted may be incorrect but it works as intended. Thanks i will try yours when i get home.

March 18 (6 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

But what is the third one?

Ok tried it and it works great thanks GiGs! It is way cleaner. What does this script do?

[[?{How Many Dice|1}d?{Die Size|6}]]

Wow i like this one the best! What a great script!!!! Thanks again GiGs! Here is the finished code.

/w gm &{template:npcaction} {{rname= Outdoor Encounter }} {{description= Wilderness, Hills & Mountains 
[[?{How Many Dice|2}d?{Die Size|4}]] [[1t[OutdoorEncounter]]] }}
March 18 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

You're welcome :)

Looks like you figured out what the |2 does :)

thanks. 

ok im having a second proplem. my players dont see the macros and cannot add them to there quick bar.

March 18 (6 years ago)
GiGs
Pro
Sheet Author
API Scripter

Try this:

Open the macro, and scroll down, to see the Visible To Players option,and select All Players.

For some reason, the standard window when you open macros hides that, and its easy to miss.


March 18 (6 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Have you made them visible to the players? It easy to miss. With the macro window open for editing, scroll down and you will see a box that is labeled "Visible to Players (Optional). Add the players to that box (there is an option for All Players) and save the macro. The players should now have the macros showing in their collections tab and they may click the box to include them in the Macro Quickbar.

yes i did not see that. scrolling down is useful