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

Token Mod API and Shapechange for Druids

1590553309

Edited 1590553503
Hopefully The Aaron will be able to help me out here. I have successfully (for the most part) set up the Druid Shapchange icon marco with the help of the token mod api and a lot of cutting and pasting and watching this clip&nbsp; <a href="https://www.youtube.com/watch?v=p4lpuEnxxHI" rel="nofollow">https://www.youtube.com/watch?v=p4lpuEnxxHI</a> . Other than the player not being able to control the token once he shape changed (which I fixed by placing a copy of the forms in his journal with a slightly different name and put those names into the code, which in turn allowed me to make some other changes to the monsters due to an item allowing him to keep certain stats after a shapechange, I wonder would there be a way to make these changes (to keep Int/Wis/Cha scores &amp; bonus) instead of having to change each sheet?) I also came across some issues with vision/light settings.&nbsp;&nbsp; I have been using The Aaron's light script I found in a thread and have tried putting that in, as some forms have darkvision, and one form (fire elemental) both emits light and has dark vision. I was hoping having the light settings in each selection would make it work with each token side, but it has not, and I have no idea how to do both the external light and the vision for the fire elemental. This is what I have so far, and have no idea where to go from here. /fx bomb-magic @{selected|token_id} !token-mod {{ &nbsp; --set &nbsp;&nbsp;&nbsp; ?{Choose Form|Boar,currentside#1 represents#@{Boar R|character_id} width#[[70]] height#[[70]] light_radius#120 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Polar Bear,currentside#2 represents#@{Polar Bear R|character_id} width#[[2*70]] height#[[2*70]] light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Rowan Scaldris,currentside#3 represents#@{Rowan Scaldris|character_id} width#[[70]] height#[[70]]&nbsp; light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Earth Elemental,currentside#4 represents#@{Earth Elemental R|character_id} width#[[2*70]] height#[[2*70]]&nbsp; light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Fire Elemental,currentside#5 represents#@{Fire Elemental R|character_id} width#[[2*70]] height#[[2*70]] light_radius#60 light_dimradius#30 light_hassight#yes light_angle#360 light_otherplayers#yes light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Air Elemental,currentside#6 represents#@{Air Elemental R|character_id} width#[[2*70]] height#[[2*70]]&nbsp; light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Water Elemental,currentside#7 represents#@{Water Elemental R|character_id} width#[[2*70]] height#[[2*70]] light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |Raven,currentside#8 represents#@{Raven R|character_id} width#[[70]] height#[[70]] light_radius#120 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Giant Owl,currentside#9 represents#@{Giant Owl R|character_id} width#[[2*70]] height#[[2*70]] light_radius#120 light_dimradius#=120 light_hassight#yes light_angle#360 light_otherplayers#no &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; bar1_link|hp bar2_link|ac &nbsp;&nbsp;&nbsp; bar3_link|speed &nbsp;&nbsp;&nbsp; name|"Rowan" &nbsp;&nbsp;&nbsp; showname|yes }} Thanks in advance. Whick
1590555982
The Aaron
Roll20 Production Team
API Scripter
I'm not completely sure what you're asking for help with... if it's having Darkvision and emitting light, that's not possible for Roll20 tokens using Legacy Dynamic Lighting. Updated Dynamic Lighting has that capability, but it's not quite ready for prime time.&nbsp;
Hey The Aaron. I guess that answers one part of the question, that it can't be done at the moment.&nbsp; Hopefully when the Updated Dynamic Lighting goes prime time I can hit you up for some help on that problem then. :) The other part of the issue is when I select a token side, which works and populates with the HP/AC/Speed as well as the macros for the "new" creature attacks etc, the lighting/vision does not change on the map for the token or populate in the advanced edit token tab for lighting (where I assume the changes would appear) So I figure either I have tried to mix and match two different operations for token mod that should not be mixed and matched, or I have a problem in the code somewhere.&nbsp; Since my coding ability consists of reading instructions and cutting and pasting, I have no idea where the error may be. If it is something that cannot be done in this way, then so be it, but I was attempting to cut down on things that could be forgotten when changing forms. Thanks for the quick reply and hopefully that makes it a little clearer.
1590587897
The Aaron
Roll20 Production Team
API Scripter
Hmm..&nbsp; Try putting the Roll Query all on one line like this: /fx bomb-magic @{selected|token_id} !token-mod {{ --set ?{Choose Form|Boar,currentside#1 represents#@{Boar R|character_id} width#[[70]] height#[[70]] light_radius#120 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Polar Bear,currentside#2 represents#@{Polar Bear R|character_id} width#[[2*70]] height#[[2*70]] light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Rowan Scaldris,currentside#3 represents#@{Rowan Scaldris|character_id} width#[[70]] height#[[70]] light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Earth Elemental,currentside#4 represents#@{Earth Elemental R|character_id} width#[[2*70]] height#[[2*70]] light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Fire Elemental,currentside#5 represents#@{Fire Elemental R|character_id} width#[[2*70]] height#[[2*70]] light_radius#60 light_dimradius#30 light_hassight#yes light_angle#360 light_otherplayers#yes light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Air Elemental,currentside#6 represents#@{Air Elemental R|character_id} width#[[2*70]] height#[[2*70]] light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Water Elemental,currentside#7 represents#@{Water Elemental R|character_id} width#[[2*70]] height#[[2*70]] light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Raven,currentside#8 represents#@{Raven R|character_id} width#[[70]] height#[[70]] light_radius#120 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no |Giant Owl,currentside#9 represents#@{Giant Owl R|character_id} width#[[2*70]] height#[[2*70]] light_radius#120 light_dimradius#=120 light_hassight#yes light_angle#360 light_otherplayers#no } bar1_link|hp bar2_link|ac bar3_link|speed name|"Rowan" showname|yes }} Also, that @{selected|token_id} isn't doing anything but putting the ID in the chat, so you can get rid of it unless that was your intended behavior.
The Aaron, thank you so much, you sir, are a Champion in more than the forum.&nbsp; If it is not too much of an imposition and if you have time, I did post one other query about a light based macro.&nbsp; Is it possible for you to have a look at it too, it may be that the function is not yet possible, like the sight v light for the fire elemental in this one. This one is for the Light Cantrip and the targeting of it on a token on the token layer. <a href="https://app.roll20.net/forum/post/8736954/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/8736954/slug%7D</a>