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

SmartAoE Using a Custom Rollable Table Character

I am trying to use David M.'s SmartAoE script for Ice Storm and in the notes he says, "Notes: I use a custom rollable table token "character" for the --controlTokName called GenericSpellAoE, set to image side 14, size 8." I'm new to scripting but have been able to find answers to most of my problems by searching the forums. Obviously, I can make a character called GenericSpellAoE but can't figure out how to make it using a custom rollable table so that, when the spell is cast, the image appears instead of the target symbol that normally appears when using SmartAoE. Can anyone help?
1672750687
David M.
Pro
API Scripter
You'll first need to make a Rollable Table Token (a multi-sided token) as described here . Set the "represents" property of that token to your  GenericSpellAoE sheet.  Then, set the default token of your GenericSpellAoE character to that token. This process is described here . Then in your SmartAoE macro, you will need to use the following three commands, with the appropriate values for each : --controlTokName -- controlTokSize -- controlTokSide
Hi David M. Fist, thanks for the response. I really appreciate it. I previously did exactly as you describe (I think). I created a Rollable Table called GenericSpellAoE. It has one Table Item called GenericSpellAoE and I attached to it the image I intend to use for the Ice Storm spell. I then clicked the Token button on the Rollable Table to produce the token. I set the Represents Character property to GenericSpellAoE. Then I opened the Character Sheet and set the default token to the token GenericSpellAoE. When I try to run the Ice Storm script  I always get the error: " (From SmartAoE):  D.Unhandled exception: Cannot read property 'match' of undefined" Any ideas what I'm doing wrong? Thanks again. Chris
1672795087
David M.
Pro
API Scripter
Hmm, t here are a million places in the code that uses the match function.  Can you post the macro you are using? I know you said the Ice Storm spell example, but I'd like to check for copy/paste errors. 
!smartaoe {{   --title|Ice Storm   --leftsub|Slot level ?{Cast at what level?|4,4|5,5|6,6|7,7|8,8|9,9}   --rightsub|DC @{selected|spell_save_dc} DEX   --titlecardbackground|linear-gradient(blue, cyan)   --oddrowbackground|#00ccff   --evenrowbackground|#edfcfc   --oddrowfontcolor|#000000   --tablebgcolor|#edfcfc     --controlTokName|GenericSpellAoE   --controlTokSize|8   --controlTokSide|14   --aoeColor|#00ccff50   --aoeOutlineColor|#0099ff   --aoeType|circle, float   --radius|20ft   --minGridArea|0.25   --minTokArea|0.25   --fx|burn-frost   --dc|@{selected|spell_save_dc}   --saveFormula|5eDEX   --damageFormula1|[[(?{Cast at what level?}-2)d8]]   --damageType1|Bludgeon   --damageFormula2|[[4d6]]   --damageType2|Cold   --ignore|SmartAoE_Ignore,1    --instant|1   --autoApply|0   --bar|1   --zeroHPmarker|dead   --desc|A hail of rock-hard ice pounds to the ground in a 20-foot-radius, 40-foot-high cylinder centered on a point within range. Each creature in the cylinder must make a Dexterity saving throw. A creature takes 2d8 bludgeoning damage and 4d6 cold damage on a failed save, or half as much damage on a successful one.%br%%br%Hailstones turn the storm's area of effect into difficult terrain until the end of your next turn. }}
1672842736
David M.
Pro
API Scripter
Ah ok, I should have read your previous post more closely. Since your rollable table token only has one side, I think the problem is that the current macro is trying to set it to side 14! Try changing the controlTokSide line to this: --controlTokSide|1 Note that a rollable table token is not required in order to use custom art. You could have one standard default token (not multi-sided) for each spell effect, and name each sheet accordingly. If used this way, the --controlTokSide line is not required (and will probably give you an error). The rollable table token method just allows you to have fewer sheets cluttering your journal and makes it easier to re-use the same art for another spell :)
1672854142

Edited 1672854172
Thanks David M. I should have mentioned that I also previously tried changing the 14 to a 1. That worked to bring up the artwork but then I lost access to the menu bar that enables me to rotate the effect and apply damage. I figured it must be because I didn't have the rollable table token set up correctly...I guess not. I don't want to take up your time, so I'll keep trying to figure this out. But if you have any ideas why the menu bar no longer shows, I'd appreciate some guidance.
1672854698
David M.
Pro
API Scripter
Ok, so the trigger buttons are just character "abilities" (macros) that are set as token actions. If you copy the appropriate trigger abilities from the default control token sheet to your GenericSpellAoE sheet and set them as token actions, then they will show up when the new control token is spawned. 
Thats what I was missing! Thanks! I just created an Evard's Black Tentacles spell that works too. Thank you very much for your help!