So after looking through many peoples posts, and look at the Rollable Table wiki. I still not sure of the syntax to use Rollable tables if I want to use them as actual tables. Trying to recreate the Treasure Hoard tables from the 5e DMG so I can click a button and it output treasure. However I am not even sure where to start. I have the recursive table script by aaron but again... Not even sure how to start. Syntax wise I am lost in the layers needed. I also look at how someone would build tables without the API (which would be nice to have...) but again whether I use API or not is the issue, but i think they have different syntax for either of them and I'm mixing them up in my head. If I want to (Pseudocode): Int RandNum1to100 = (rand()%mod100) + 1;
string CRtablename = tablename + ceiling(characterlevel/5);
switch(CRtablename)
{
Case “CRtablename1“ : // Create 5 areas of generation 1-31, 31-60, 61-70, 71- 95, 96-100
If (RandNum1to100 < 31) {
//Roll and output amount of gold below is Roll20 syntax
[[5d6]] Copper Pieces
} elseif (RandNum1to100 < 61) {
//Roll and output amount of gold below is Roll20 syntax
[[4d6]] Silver Pieces
} elseif ( RandNum1to100 < 71) {
//Roll and output amount of gold below is Roll20 syntax
[[3d6]] Electrum Pieces
} elseif (RandNum1to100 < 96) {
//Roll and output amount of gold below is Roll20 syntax
[[3d6]] Gold Pieces
} else {
//Roll and output amount of gold below is Roll20 syntax
[[1d6]] Platinum Pieces
}
Break;
Case “CRtablename2“ : // Create 5 areas of generation 1-31, 31-60, 61-70, 71- 95, 96-100
If (RandNum1to100 < 31) {
[[4d6 * 100]] Copper Pieces
[[1d6 * 10 ]] Electrum
} elseif (RandNum1to100 < 61) {
[[6d6 *10]] Silver Pieces
[[2d6 * 10]] Gold Pieces
} elseif ( RandNum1to100 < 71) {
[[3d6 *10]] Electrum pieces
[[2d6 * 10]] Gold Pieces
} elseif (RandNum1to100 < 96) {
[[4d6 * 10]] Gold Pieces
} else {
//Roll and output amount of gold below is Roll20 syntax
[[2d6 *10]] Gold Pieces
[[3d6]] Platinum Pieces
}
Break;
Case “CRtablename3“ : // Create 4 areas of generation 1-20, 21-35, 36-75, 76-100
If (RandNum1to100 < 21) {
[[4d6 * 100]] Silver Pieces
[[1d6 * 100]] Gold Pieces
} elseif (RandNum1to100 < 36) {
[[1d6 * 100]] Electrum Pieces
[[1d6 * 100]] Gold Pieces
} elseif ( RandNum1to100 < 76) {
[[2d6 * 100]] Gold Pieces
[[1d6 * 10]] Platinum Pieces
} else {
[[2d6 * 100]] Gold Pieces
[[2d6 * 10 ]] Platinum Pieces
}
Break;
Case “CRtablename4“ : // Create 3 areas of generation, 1-15, 16-55, 56-100
If (RandNum1to100 < 16) {
[[2d6 * 1000]] Electrum Pieces
[[8d6 * 100]] Gold Pieces
} elseif (RandNum1to100 < 56) {
[[1d6 * 1000]] Gold Pieces
[[1d6 * 100]] Platinum Pieces
} else {
[[1d6 * 1000]] Gold Pieces
[[2d6 * 100]] Platinum Pieces
}
Break;
Default;
Break;
}
I would plan on doing this for magical items/gemstones/Art as well but I figured once I figured out how to do the Individual Treasure, the Treasure hoards would be easier to tackle. Again I just need to explain how the 1t[loot[loot]] thing works and how I can get it to work with inline rolls. also I know that the outer lookup table is the one that should have the items, Just not sure where in the format (either macro making side of table making side) to include dice rolls and such.... and how to incorporate that into the tables. Thank you for your time.