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

[Thinking About] Recycle Bin map

1392468198
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I have been playing around with the Random Dungeon Generator.. and sometime you just want to edit out one tile. Anyone played around with the idea of a cycle bin map? That is forcing images to the center of one map so its easy to delete them later?
1392468418
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
You would want a cursor and for it to work something like HoneyBadger 's [Script] Highlight Token at Top of Initiative script I would think.
Is the Generator running off of the Rollable Table still? I believe you can right click and choose the side on the token, right?
1392488419
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
That is a good point... I was just using it as an array for the URL. I have never really looked at the object for them....
1392489828
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
"sides" and "currentSide"... not in the wiki. {"_id":"-JFqoonKI3-szM24ObuL", "_pageid":"-FqomyPWIZop67NxAJy", "left":697, "top":415, "width":70, "height":70, "rotation":0, "layer":"walls", "isdrawing":true, "flipv":false, "fliph":false, "imgsrc":"<a href="https://s3.amazonaws.com/files.d20.io/images/3069163/7vbzjy9NOY2OvQ9Xw4TeYQ/med.jpg1392120308" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/3069163/7vbzjy9NOY2OvQ9Xw4TeYQ/med.jpg1392120308</a>", "name":"", "gmnotes":"", "controlledby":"", "bar1_value":"", "bar1_max":"", "bar1_link":"", "bar2_value":"", "bar2_max":"", "bar2_link":"", "bar3_value":"", "bar3_max":"", "bar3_link":"", "represents":"", "aura1_radius":"", "aura1_color":"#FFFF99", "aura1_square":false, "aura2_radius":"", "aura2_color":"#59E594", "aura2_square":false, "tint_color":"transparent", "statusmarkers":"", "showname":false, "showplayers_name":false, "showplayers_bar1":false, "showplayers_bar2":false, "showplayers_bar3":false, "showplayers_aura1":false, "showplayers_aura2":false, "playersedit_name":true, "playersedit_bar1":true, "playersedit_bar2":true, "playersedit_bar3":true, "playersedit_aura1":true, "playersedit_aura2":true, "light_radius":"", "light_dimradius":"", "light_otherplayers":false, "light_hassight":false, "light_angle":"", "light_losangle":"", "sides":"https%3A//s3.amazonaws.com/files.d20.io/images/3069163/7vbzjy9NOY2OvQ9Xw4TeYQ/med.jpg%3F1392120308|https%3A//s3.amazonaws.com/files.d20.io/images/3069165/SCfeLOvwLG2tf_knYUhy6g/med.jpg%3F1392120329|https%3A//s3.amazonaws.com/files.d20.io/images/3069267/HHjsy4VWddMghtcIzOtSgw/med.jpg%3F1392122487|https%3A//s3.amazonaws.com/files.d20.io/images/3069269/nadLThcG_d1uoRQBkdCExw/med.jpg%3F1392122519|https%3A//s3.amazonaws.com/files.d20.io/images/3069270/HQvl3jtGEt3cny5OEUGj_w/med.jpg%3F1392122535|https%3A//s3.amazonaws.com/files.d20.io/images/3069273/4iIptraiMMbJHHpg0nWQSg/med.jpg%3F1392122557|https%3A//s3.amazonaws.com/files.d20.io/images/3069275/EqSRRpXq9VkpjRP_JRjzWQ/med.jpg%3F1392122582|https%3A//s3.amazonaws.com/files.d20.io/images/3069277/5y36umLfl2zPItOS4Fgqtg/med.jpg%3F1392122609|https%3A//s3.amazonaws.com/files.d20.io/images/3069280/_-K5ap868m7ePNNu__l1Gw/med.jpg%3F1392122633|https%3A//s3.amazonaws.com/files.d20.io/images/3069282/ls85u1Y_cw8ws4xD0W_nPw/med.jpg%3F1392122655|https%3A//s3.amazonaws.com/files.d20.io/images/3069284/rpoyT1Yu5H8u_M-qBm3zaw/med.jpg%3F1392122676|https%3A//s3.amazonaws.com/files.d20.io/images/3069288/n7DlmPlUq51eDvxSFu51yQ/med.jpg%3F1392122702|https%3A//s3.amazonaws.com/files.d20.io/images/3109841/4T4Bh7MWlj7lH7bqsImgFQ/med.jpg%3F1392463167|https%3A//s3.amazonaws.com/files.d20.io/images/3069293/S2qOrKvDVgUWO6fbPhXvTQ/med.jpg%3F1392122764|https%3A//s3.amazonaws.com/files.d20.io/images/3069294/Z-uK03oPxnb1ZeyIbUyIxQ/med.jpg%3F1392122795|https%3A//s3.amazonaws.com/files.d20.io/images/3069298/Si1T0ZJ2b2xt7EmAcdw8Ag/med.jpg%3F1392122825|https%3A//s3.amazonaws.com/files.d20.io/images/3069299/NeQIXy22ev13Vg2_WhvDfw/med.jpg%3F1392122840|https%3A//s3.amazonaws.com/files.d20.io/images/3069302/rept9RR4yiEKuCIG5u6fhg/med.jpg%3F1392122871|https%3A//s3.amazonaws.com/files.d20.io/images/3069305/RLB_VSNtKngSST5TSzB9bg/med.jpg%3F1392122888|https%3A//s3.amazonaws.com/files.d20.io/images/3069308/X3meybeMEQmt_c64P-SFig/med.jpg%3F1392122919|https%3A//s3.amazonaws.com/files.d20.io/images/3069311/GKLgdvrnBwfcCKjlaYGPCA/med.jpg%3F1392122953|https%3A//s3.amazonaws.com/files.d20.io/images/3069313/5Wfr6L5wJWSRXjShiBTU1A/med.jpg%3F1392122981|https%3A//s3.amazonaws.com/files.d20.io/images/3069314/oTZ-x4XbVeVHuwkOE0zXAw/med.jpg%3F1392123007|https%3A//s3.amazonaws.com/files.d20.io/images/3069315/IeuPju-cbWTFIkcK4_0QVg/med.jpg%3F1392123045|https%3A//s3.amazonaws.com/files.d20.io/images/3069316/IooPZUL8kLXw8CfKLPZKbA/med.jpg%3F1392123075|https%3A//s3.amazonaws.com/files.d20.io/images/3069318/9fCBpSZasdboFxuX0iOd1A/med.jpg%3F1392123106|https%3A//s3.amazonaws.com/files.d20.io/images/3069322/x_16wiEJ9TQQ1VKBLYM4pw/med.jpg%3F1392123157|https%3A//s3.amazonaws.com/files.d20.io/images/3069324/3DZmavojCPA_oMLR-rvJSQ/med.jpg%3F1392123180|https%3A//s3.amazonaws.com/files.d20.io/images/3069326/iA3Try9dof4hG_evFZSzHA/med.jpg%3F1392123204|https%3A//s3.amazonaws.com/files.d20.io/images/3069327/5HHmIJGADzOUWtG3bniGlg/med.jpg%3F1392123237|https%3A//s3.amazonaws.com/files.d20.io/images/3069331/CHyywhTZpawQ03uYaNBG5Q/med.jpg%3F1392123365|https%3A//s3.amazonaws.com/files.d20.io/images/3069334/grPu30y3mumsMIavJ3-hmQ/med.jpg%3F1392123393|https%3A//s3.amazonaws.com/files.d20.io/images/3069335/0CV8QZIH93icooYvHacbRg/med.jpg%3F1392123416|https%3A//s3.amazonaws.com/files.d20.io/images/3069336/nJi80k1voZYBk1NGR0sxZQ/med.jpg%3F1392123435|https%3A//s3.amazonaws.com/files.d20.io/images/3069340/nwskQ7_1GmnGuy9YR2A2Tw/med.jpg%3F1392123483|https%3A//s3.amazonaws.com/files.d20.io/images/3069342/UExXlHoPVuWSOajuw4Rc0Q/med.jpg%3F1392123518|https%3A//s3.amazonaws.com/files.d20.io/images/3069343/2_WEcHbNFbbqrBEEYBfc2w/med.jpg%3F1392123545|https%3A//s3.amazonaws.com/files.d20.io/images/3069345/R7IJ7cpuvabGJszl0Q-rFQ/med.jpg%3F1392123589|https%3A//s3.amazonaws.com/files.d20.io/images/3069348/rxjXTGdmnDJo-rtpR6wcOQ/med.jpg%3F1392123623|https%3A//s3.amazonaws.com/files.d20.io/images/3069351/JeDQvWMwiQHktpLFizs4Jg/med.jpg%3F1392123654|https%3A//s3.amazonaws.com/files.d20.io/images/3069352/wiBSBZ6Ro0aLOLCprPtXqA/med.jpg%3F1392123694|https%3A//s3.amazonaws.com/files.d20.io/images/3069353/JC4UseGPeF4bmwiE-csFzA/med.jpg%3F1392123730|https%3A//s3.amazonaws.com/files.d20.io/images/3069354/pmlxZLNXgIveYY2BPyZ4ZA/med.jpg%3F1392123750|https%3A//s3.amazonaws.com/files.d20.io/images/3069355/5r7fRBnGWJgW3qAmkBKqew/med.jpg%3F1392123771|https%3A//s3.amazonaws.com/files.d20.io/images/3069357/46730OwXw4JZ0D3AXY1n1A/med.jpg%3F1392123784", "currentSide":0, "lastmove":"", "_type":"graphic", "_subtype":"token", "_cardid":""} "isdrawing":true, "currentSide":0, "sides": url code... "|" delimited
I've been doing it by right clicking on the tile and going to "choose side"
1392498186
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
This is working like a windshield wiper on a duck's butt.... (which would be excellent!) Randomize... choose side... rotate or flip and "click" [dynamic light]. Hope to be complete today.
I'll trust you on that one lol I'm actually really excited about the auto dynamic light generation. That's one of the biggest time consuming preparations in my current campaign.
1392503579
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
"currentSide" cannot be set through API... :( Still think it can be part of it... just have to track the rotation and flips to align the dynamic light paths.
1392503756
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
We still cannot delete objects so i think a recycle bin map might be useful for some applications.... Think of Matt's doors.. its a door graphic, a switch graphic and a path object... I would rather shove all three to a recycle map on one layer and delete them later.
hm.. that's a valid point.. This is proving to be a troublesome task lol
1392506628

Edited 1392506745
Matt
Pro
Stephen S. said: "currentSide" cannot be set through API... :( You can set the 'currentSide', but need to do an additional step to have the image update as well. You need to set the 'imgsrc' to a item listed in the 'sides' attribute. Here's a function that has worked well for me. Sides start at 0. var SetMultiSide = function (obj, side) { obj.set({ currentSide: side, imgsrc: decodeURIComponent(obj.get("sides").split("|")[side]).replace(/med\.png/g, "thumb.png"), }); }
1392511778
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
You are setting the URL and making sure there is parity... by choosing the URL based on the "side" you want. Was hoping that was done server side.... but what you have would work great, I was just trying to be really lazy :P
1392516052

Edited 1392517566
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Close... still need this recycle bin because if you want to clear the map its a pain to go between layers. _pageid :( readonly