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 .
×

Can I load an image in a character sheet based on a attribute value?

I'm making a custom sheet for a homebrew and I want my sheet to calculate the character's defense based on some other values, then pull an icon for the defense. The file will be like "defense-4.png" if the defense is 4, or "defense-2.png" if it is 2, etc.  Is this something I can do?
I tried something like this with a drop down menu. I couldn't get it to work though. I can guarantee it would require a sheet worker, but beyond that, I'm afraid I'm not much help.
You'd definately need a worker of some sort to update sheet content on a change or trigger. If you're talking about a macro/template output instead of a sheet graphic, that's fairly easy to do.  You just have to make sure you use VERY tiny images and have them hosted somewhere reliable.  (Take a look at Pathfinder Sheet for examples of roll icons)
1489124153
Lithl
Pro
Sheet Author
API Scripter
Assuming you have a finite set of images, you can check out what I did with the Arkham Horror character sheet. On the Arkham Horror sheet, I've got a sheet worker script using a <select> attribute to set a number of other attributes, including a radio button which will show/hide an image. Without a script, you could also have the <select> and the radio buttons use the same name.