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

Importing values to custom sheet

1631129378
borings b.
Pro
Marketplace Creator
Sorry if this has been asked before, i couldn't see anything particularly relevant already in the forums. If i have a custom sheet with empty values, like lets say all the core stats are just named fields, is there a way to import values to fill out that sheet? i have a separate website where the values are being kept, and i could have that website create the script to enter the values dynamically, but i can't really figure out where i would have players input the generated script to have their stat values imported, or if that is even possible.
1631132477
vÍnce
Pro
Sheet Author
An API script could be written to handle this off-sheet, or perhaps done on-sheet internally using a textbox field for input and sheetworker to process.  Export from your external location as a json, paste into the sheet, then use sheetworkers to parse the json (basically, match json key to a sheet attribute and set the attribute to the json value).  Easy-peasy.  I'm not qualified to actually demonstrate how to do this in js/sheetworker though. ;-(  But , perhaps someone else might be able to post an example...
1631133269
GiGs
Pro
Sheet Author
API Scripter
You might be able to do it without a script, by having your website write a bunch of command lines for chatSetAttr, a script that lets you edit and create attributes for a character.
1631135722
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Here are some examples of using this technique to write custom class features on the Shaped Sheet and custom Equipment on the OGL sheet .
1631146123
Finderski
Pro
Sheet Author
Compendium Curator
You also export the data in JSON format, and set up a field on the sheet where you paste the JSON (or any structured format, really) and have a sheet worker parse the data. 
1631192263
borings b.
Pro
Marketplace Creator
thanks yall, that was really helpful!