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

API script to mass create abilities on to Char sheet

Hello all, Wonder if someone might point me in the right direction.  I have a DMMacro character sheet that i use to keep all of my DM Macros and things that call API scripts  centrally and i've just gone and added a bunch of new tables that will form my random encounters list.  So what i'm looking for, if it's out there at all, is a way to mass create/import new "abilities" to that character sheet, in the same/similar way to the table exporter handles creating tables to this character sheet, rather then having to add 40+ new abilities manually.  Is there anything that covers this at all already? If it's relevant, i'm using the D&D 5e by roll20 character sheet. Thanks for any advice/help in advance
1600439062

Edited 1600441566
David M.
Pro
API Scripter
ChatSetAttr should be able to do that. It's available on the one-click, where you can also find the documentation. EDIT - Oops, sorry misread the OP.
1600439332
The Aaron
Roll20 Production Team
API Scripter
Can ChatSetAttr create Abilities?
1600441244
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
There are scripts that can create abilities (Token Action Maker is one), but ChatSet Att writes attributes, not abilities. It can be done, but it would probably need to be a custom script. I don't know of any off-the-shelf solution for your particular case.
1600441248
GiGs
Pro
Sheet Author
API Scripter
There's a script to create abilities, maybe called SetAbility?
1600442431
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I found this . There may be others.
1600443265

Edited 1600443276
GiGs
Pro
Sheet Author
API Scripter
This is the one I was thinking of:&nbsp; <a href="https://app.roll20.net/forum/permalink/5362387/" rel="nofollow">https://app.roll20.net/forum/permalink/5362387/</a> The script keith posted shows how simple it can be to add an ability if you just want to work off a preset list of abilities and their text.
1600458754
timmaugh
Pro
API Scripter
If I understand the OP, it sounds like you have a couple of tables that in the various combinations of their entries you would generate random encounters. And you want a button for each? Or do you have multiple tables of different encounter options, and you want a button for each table (to select an entry on the fly)?
1600463691

Edited 1600468211
Thanks for the input all,&nbsp; I'll see if i can work out the setabil one GiGs kindly linked timmaugh said: If I understand the OP, it sounds like you have a couple of tables that in the various combinations of their entries you would generate random encounters. And you want a button for each? Or do you have multiple tables of different encounter options, and you want a button for each table (to select an entry on the fly) it's the 2nd option, i have 40ish tables of random encounters, broken up by region, which i want to make "macros" for to call upon within a different macro that would all be stored on a DMMacro sheet that i have set up as abilities.&nbsp; just don't want to manually enter 40ish abilities if there's a quicker way to do it.&nbsp; Creating the Macro's isn't the issue, it's just the volume.
1600468759
timmaugh
Pro
API Scripter
If the tables are all formatted the same way, I wonder if you could have a simple/universal script that returned your entry based on you providing the table id and some row-identifier: !encountabular --table name --row id That way you could have a couple of abilities for high-usage tables/rows... but you could also have a macro set up with a ${query} for your tables and ${rows}. Even one that could be for random. Instead of 4000 abilities you had to add, you could get by with under a dozen. You could even get by with just one, if you wanted to. Can you share more of the table structure you have? And whether they are all formatted the same? Sample elements?
Hi Tim,&nbsp;&nbsp; of course i can.&nbsp; the tables i have made are the tables for encounters in Xanathars guide to everything.&nbsp; So each region type (forest, artic) etc has a bunch of tables split over CR rating.&nbsp; So Forest 1-4, 5-10 etc.&nbsp;&nbsp; With each one having their own list of encounters I have captured the "abilities" i need now, used Googledocs to concatenate the format of the wording for the macros and then just copied and pasted them in.&nbsp; i do wonder if something to do this might be of benefit to others?&nbsp;&nbsp;
1600614623
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you can make the Google doc A) Broad enough to have general usage, and B) Ensure it does not contain any copyrighted material, I will post a link to&nbsp; it in the list of similar macro parsers at the end of the Stupid Tricks &nbsp;index thread. Or more accurately, a link to your post that contains the explanation and link.