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

Dynamically changing stats for the summon elemental spell using macros/apis

I currently have a wizard with the summon elemental spell. As the spell goes, some stats are dependent on the level of the spell you used to cast (AC, HP, Damage on Hit), but others are dependent on your character's proficiency bonus (the elemental's proficiency bonus and number of attacks). Is there a way we can make these adjustments dynamically using macros or apis? To add further context, I am trying to have these summons as npc sheets i can just drag on the token layer or use a macro to summon and then get the prompt for what spell level i used to cast. I've seen the ability to set token attributes via something like tokenmod but i can't find anything that allows me to prompt for the spell level used to cast and adjust the raw stats from there.
1658776892
David M.
Pro
API Scripter
You could use the SpawnDefaultToken script (available on 1-click) to summon the token to the map. The script will allow you to override the bar values that exist for the default token prior to summoning. This will only affect that instance of the token. To use: install the script, then create a character sheet for the Elemental Spirit with a default token that "represents" it. Example Spawn macro (if you use bar1 for hp and bar2 for AC): !Spawn {{   --name|Elemental Spirit   --offset|1,0   --bar1|[[50 + (?{Cast at what level?|4|5|6|7|8|9}-4)*10]]   --bar2|[[11+?{Cast at what level?}]] }}  For the attacks/damage, I would make a "Slam" ability on the character sheet that is set up to be a token action. This will be available when you summon the token to the map. This ability should reference the spell attack modifier and spell level: For the attack: [[1d20 + @{spell_attack_bonus}]] For the damage: [[1d6 + 4 + ?{Cast at what level?|4|5|6|7|8|9}]] You can use whatever template you want.
Heck yes! Thank you so much!
1658777385
David M.
Pro
API Scripter
Cool, feel free to PM me or reply to this thread if you have any issues setting it up!