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

Image seeding API

Okay how hard would it be to make an api that say when a tree token was selected, if the api command was used would copy that token then randomly paste it throughout the map according to a seed formula Something like !seed 40. And that would make it randomly place 40 bushes on the map. Probably would require query each foot to see if something was in it, if not roll a dice behind the scenes, and repeat if it ends the map without putting down the required number of trees starts over from the beginning. And with some items like say trees put in the option to !seed-overlap 40 telling the api it can place it on other tokens. And if thats easy enough, how hard would it be to add say a feature on it like !seed-natural-selected 20 where it then puts up a pop up that says "draw selection box" and once you do it seeds the area within the selection box with say 20 bushes. With the natural setting allowing there to be edge overlap but not more then that.
1436705421
The Aaron
Pro
API Scripter
It would not be terribly difficult, with the caveat that the API is not capable of creating graphics where the imgsrc is not in a User Library (so wouldn't work for MarketPlace assets unless they have been downloaded and uploaded to a User Library.)
1436719199

Edited 1436719812
So you are saying if I selected a token that was already on the map, it could copy that image everywhere only if the token selected was in the user library... hmm... I don't suppose there is an api to upload a selected token to the user library? If not I guess this one idea I can scratch. Might still be useful but its no longer a certainty. And that makes it not worth the time. Still I might go back and try making it at a later time if I can figure out this javascripting beginner's help thingy for practice.
1436719866
The Aaron
Pro
API Scripter
You are correct. This is the reason why you haven't seen any scripts to move the part to a new page, or teleport a token across pages, or switch out the image of a token dynamically. There is no way for the API upload images to a user library. My most desired feature is for the API to have access to Market Place content. It is something that has been discussed many times, and will likely happen in the future. It can't happen soon enough in my opinion. =D
1436734938
vÍnce
Pro
Sheet Author
Please add a comment and/or vote for this suggestion. [API - Tags] API Access to Image Tags.
1437609632
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Vince said: Please add a comment and/or vote for this suggestion. [API - Tags] API Access to Image Tags. OMG I finally liked something Vince had to say! ;-) 
1437611095
vÍnce
Pro
Sheet Author
Stephen S. said: Vince said: Please add a comment and/or vote for this suggestion. [API - Tags] API Access to Image Tags. OMG I finally liked something Vince had to say! ;-)  I've missed you Stephen.  Still wating for your next big thing...
1437612942
The Aaron
Pro
API Scripter
Vince said: Stephen S. said: Vince said: Please add a comment and/or vote for this suggestion. [API - Tags] API Access to Image Tags. OMG I finally liked something Vince had to say! ;-)  I've missed you Stephen.  Still wating for your next big thing... I've seen it. It. Will. Blow. Your. Mind. Seriously, it is incredible.
voted