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 .
×

Tasha's Summon Entities Macro

Trying to set up a Macro button that a player can press on a when they pull out the summoned entity token that they can press. When they do press it, it will query what level of spell slot they used to cast the spell and automatically sets up the attributes of the NPC sheet to the proper HP, AC, ETC. In in turn, set up the token's stats.  I have been playing with macros for a bit, but I will admit my knowledge base is kinda lacking when it comes to this. I will manage to figure it out at one point I am sure, but I would rather get it done sooner if there is a macro wizard who can assist. Specifically working on the Summoned Fey, but any advice on how to do the others or if one macro would work for all. I'll take any advice, be it "hey, stupid, look at the list of helpful tricks its right there," or "hey, stupid, this is impossible."
That's less of a macro and more an API script. Alternatively, you can just premake different sheets for each possible spell level for the spell in question. Pair them with rollable tokens to reflect the different form choices in each spell. That's what I do as a free account.
1606598918

Edited 1606599293
David M.
Pro
API Scripter
Since you're Pro, a combination of the chatsetattr and token-mod scripts would work. Add a custom attribute (named SpellLevel) to the npc sheet you create for the Fey Spirit. You can default it to 3.  For the shortsword attack entry on the npc sheet, add 1d6+3[DEX]+@{SpellLevel} to the "on hit" field (type piercing), and 1d6 to the "on hit 2" field (type force)  For the "to hit" field, you could either hardcode, or link it to the caster by putting @{CharName|spell_attack_bonus}. Obviously replace "CharName" with the caster name. Since it is linked to caster, if you have more than one potential caster, you may want to name the npc "FeySpirit_CharName" or something. Then add the following as a token ability to the Fey Spirit sheet to modifiy the hp, ac, and SpellLevel custom attribute of the character sheet. This assumes you linked bar1 to hp and bar2 to npc_ac. !setattr --sel --silent --npc_ac|[[12+?{Spell Level|3}]] !setattr --sel --silent --hp|[[30+10*(?{Spell Level}-3)]] !token-mod --set bar1_max|[[30+10*(?{Spell Level}-3)]] !setattr --sel --silent --SpellLevel|?{Spell Level}[SpellMod] Example with caster spell attack of +5 and using a 4th level spell For some reason, it shows the attack bonus as +0 on the sheet, but it is actually using the +5 from @{CharName| spell_attack_bonus} Not sure why it is adding the extra +0 at the end, but it doesn't affect the total. In game, just drag out (or spawn ) the fey token, select it, and run the token action to update the attack and defense stats.