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

TROOPS

I am looking for a script to clone the selected token and to produce n copies of it in a square array on the battle field. I would like to have four parameters token_name = name + number, and for filling in the Red, Green and Blue bubbles automatically which would be dice formulae For example select an orc token then enter the !TROOPS [n],[sn],[series name],[die formulae red bubble],[die formulae green bubble], [die formulae blue bubble] type !TROOPS 9,sn, orc, 2d8+2,14,30 would create a square array of 3x3 of cloned orcs with the red bubble set to 2d8+2, green bubble 14 and blue bubble 30. The orcs would have token names orc sn+0, orc+sn+2, ....... I was wondering is there already a script to do this sort of thing or should I write one ? Jack
1420355916
The Aaron
Pro
API Scripter
I don't think there is one yet. When you write it, be aware that the imgsrc may refer to an image you can't creat from the API.
1420397065
Gen Kitty
Forum Champion
The tokenmod script is a good place to look for inspiration, as is the token numbering script. Neither create new tokens, but both have code worth looking at for making your own script <a href="https://app.roll20.net/forum/post/1273423/#post-12" rel="nofollow">https://app.roll20.net/forum/post/1273423/#post-12</a>... <a href="https://app.roll20.net/forum/post/1257490/#post-12" rel="nofollow">https://app.roll20.net/forum/post/1257490/#post-12</a>...
Thanks I will have a go a writing one when I get round to it. I have got to finish building the my final dungeon of my campaign, before I run out of adventure for my players.