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

Rollable Tables in Powercards?

Hi all, I've been looking through the various threads trying to find an answer but to no avail, so thought I would throw this out there - apologies if it's already been answered and I missed it. So i'm setting up a Rolemaster game and have a whole bunch of stuff working for me (at last!) and would like to add a weapon table lookup in my powercard script but I cannot work out how to get a call to a rollable table inside a powercard script. Can someone please give an example or let me know if this is just not possible please? Thanks in advance for your help. Manny
1594244385
GiGs
Pro
Sheet Author
API Scripter
Your best bet is to ask in the Power Cards API thread. As its a complex script with its own syntax, and a small but dedicated userbase, your best chance of egtting help with it is there.
Thanks for your help GiGs. I'm posting here too so the author of the Rollable Table script has a chance to see it, as he may be more clued-up.
You can call other api scripts from within power cards. So you could call the rollable table script, or recursive table script etc, depending on your exact use case
This is an example macro I use to call power cards from the recursive table api script to roll and build the treasure hoards from the d&d5e DMG. I completly rebuild and automated the whole Treasure hoard rollable tables this way. !rt[Delimiter:^^|Sort:true] !power --template|treasurehoard|[[6d6*100]];[[3d6*100]];[[2d6*10]];na;[[1t[Treasure-Hoard-Challenge-0-4]]];Small Hoard This is kinda the reverse way of what I posted in my last post. These Rollable tables contain more calls to other rollable tables etc and it is a whole convoluted mess, but this should be enough to understand the point.
1594319726

Edited 1594319952
Thanks Sven, I appreciate the assistance. Below is the power card script I've got to so far. What I want to do is extend it so it will lookup a rollable table after the attack roll, right at the bottom of the script. The rollable table will be a weapon attack table, so I want to plug in the result of the attack roll into that table - that's why I'm using the rollable table script. To lookup the value in the weapon attack table I use e.g. !rt broadsword-1 1d100 This is where I'm stuck. If you have any suggest on how to make last macro call, please let me know. !power {{    --name | @{character_name}   --leftsub | @{attack1name}   --rightsub | Type @{attack1select}   --Attack Bonus | [[ @{attack1bonus} ]]   --Target AT | [[ [$TargetAT] @{target|AT} ]]   --Attack Roll | [[ [$Atk] 1d100!>@{oeuproll}cf<@{attack1fumble} + @{attack1bonus} - [[ @{target|DB} ]] - [[ 0d0 + ?{parry amount} ]]]]  }}
Manny L. said: Thanks Sven, I appreciate the assistance. Below is the power card script I've got to so far. What I want to do is extend it so it will lookup a rollable table after the attack roll, right at the bottom of the script. The rollable table will be a weapon attack table, so I want to plug in the result of the attack roll into that table - that's why I'm using the rollable table script. To lookup the value in the weapon attack table I use e.g. !rt broadsword-1 1d100 This is where I'm stuck. If you have any suggest on how to make last macro call, please let me know. !power {{    --name | @{character_name}   --leftsub | @{attack1name}   --rightsub | Type @{attack1select}   --Attack Bonus | [[ @{attack1bonus} ]]   --Target AT | [[ [$TargetAT] @{target|AT} ]]   --Attack Roll | [[ [$Atk] 1d100!>@{oeuproll}cf<@{attack1fumble} + @{attack1bonus} - [[ @{target|DB} ]] - [[ 0d0 + ?{parry amount} ]]]]  }} First I would make that a power card template, and then feed it all the changing stuff as arguments. Here's a simplyfied example: Template in the PowerCard Templates Handout: mytemplatename: --name|~0$; --RT-Result|~1$ Macro: !rt !power --template|mytemplatename|@{character_name};[[ 1t[broadsword-1] ]] I know this is extremly simplyfied, and I'm not that fit with the recursive table syntax, but you should get the Idea from here.
Thanks again Sven - I'll take a look at this over the weekend and see if this helps. In the meantime, if someone else has a solid usable example I can borrow that would be awesome :-)