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

[5e Shaped] Add Common Items Button

Is there a way to configure this button's payload in the API?   The idea is fantastic and simplifies the character creation process, but a lot of items (backpack, wineskin, etc.) are duplicated in the packs (Dungeoneer's, Explorer's, etc.).  As the DM, I'd rather be in more control of what spills out of that button click.   Also, being more in control of the button itself; to be shown for only one click at level 1 before it goes away, or never again after a 2nd level is achieved.
1530503132
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Unless you are comfortable delving into Javascript, it looks like it fires an event that runs a bit of code. It does not seem to send anything to the API, so I doubt it could be manipulated at the macro level. The API script ChatSetAttr can write items to the Equipment section. It's not a terribly complicated section and you could probably set up a number of "common items" macros.
Hmmm ... I used to know Javascript way back when but been out of practice for a while now and don't have any of the books I used to refer to.  Still, I could try a go at it and see what happens.  Thank you sir!
1530515171
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I would strongly recommend experimenting on a duplicate campaign. :)
Actually, I'd probably sandbox it to hello world before applying it there, but yeah.  Lol
1530548229
Jakob
Sheet Author
API Scripter
You don't actually need to use any Javascript to do this with ChatSetAttr, if that's what you intend to do.
1530548732
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'd second ChatSetAttr. Here's an example of something similar, for writing Class Features to Character sheets. You can probably adapt the linked spreadsheet to parse whole equipment lists.
Very Very nice you two.  I want to do this when I have more time.  Keith, that example really helps, so I'll definitely hit that up when I begin and post what I come up with, maybe others will find a use for it. 
On a related note, will adding class features be necessary once we get Charactermancer going?  They are focused on OGL atm, but will the parser between OGL and Shaped help us at some point?
1530571474
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Class features macro was written last year, before the Charactermancer came into being. Eventually, the Charactermancer will be able to import class and race features beyond level 1. The Shaped Sheet is uncertain. It already writes all base class (SRD) features, for instance. Speaking of which, whatever you do come up with, if you decide to post, be careful to include only SRD data. I laboriously added everything to my home game, but was careful to strip that out before sharing. You might also be interested in my  5e Spellbook Manager .
good call on that