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 .
×
May your rolls be merry + bright! 🎄
Create a free account

[Help] Interaction With External Sources

So, I am developing my own game, and using python to do so.  I am wondering how I can have a character sheet access external information/art.  Any generic method is good; if there is a way to send information to a website and get information/art back from it that would work for me. I understand that iframe is not allowed, since this is a security issue.  What I'm wondering is how to get access to Python scripts I've wrote (assume they will be available as a flask app on the web, so any generic web scrape ability is fine) in a roll20 character sheet.  Basically I need a way to let Python and Postgres do the heavy lifting. Any reasonable way to import external information/pngs into roll20 (not manually) would be appreciated.  
1501528733
The Aaron
Pro
API Scripter
Nothing like that is supported.  Short of writing some kind of local screen scraping/injection extension, you won't be able to connect them.
1501528805
Lithl
Pro
Sheet Author
API Scripter
You can get an image from the web on a character sheet with an <img> element. That's it. However, if you're linking to your own server, you could certainly generate dynamic images (serve up something different to the same url depending on some conditions). Unfortunately, you wouldn't be able to pass parameters to the url like example.com/my-dynamic-image.png?strength=@{strength} -- the attributes system isn't going to manage the attribute reference in the image url.
Brian said: You can get an image from the web on a character sheet with an &lt;img&gt; element. That's it. However, if you're linking to your own server, you could certainly generate dynamic images (serve up something different to the same url depending on some conditions). I thought so as well, but that's not the case... &nbsp;I have a dynamic image test app up at <a href="http://www.basicenglishtranslator.com/draw/*.png" rel="nofollow">http://www.basicenglishtranslator.com/draw/*.png</a> &nbsp;which reads the name of the png you're looking for, and redirects to a black or white logo if the name has odd or even letters. &nbsp;Shows up in a character sheet as a broken image. &nbsp;The target images do show up if img links directly.
Darin L. said: Brian said: You can get an image from the web on a character sheet with an &lt;img&gt; element. That's it. However, if you're linking to your own server, you could certainly generate dynamic images (serve up something different to the same url depending on some conditions). I thought so as well, but that's not the case... &nbsp;I have a dynamic image test app up at <a href="http://www.basicenglishtranslator.com/draw/*.png" rel="nofollow">http://www.basicenglishtranslator.com/draw/*.png</a> &nbsp;which reads the name of the png you're looking for, and redirects to a black or white logo if the name has odd or even letters. &nbsp;Shows up in a character sheet as a broken image. &nbsp;The target images do show up if img links directly. Actually, I was wrong... it totally worked when I retried it in the preview page of the character sheet. &nbsp;Now to set file names to use a draw program...