
********** New version of the Mod here! ************* Hi All, This is my Macro for the D&D 5E Summon Beast spell. This is for the D&D 5e OGL by Roll20 character sheet. It requires three scripts in total; Scriptcards, SpawnDefaultTokens and SelectManager. There is a bit of setup to do before the Macro is usable. Here are the steps: 1. Create a new NPC Character and name it SummonBeast (no spaces). Probably a good idea to give it player permissions at this point. I would recommend giving control permission, but not adding it to a player's journal as this isn't a character you want to drag and drop. 2. Run the Macro for the first time and it will create a Multi-sided token (rollable table) which you can find under the collection tab, the one where all your macros are. 3. Next open the SummonBeast Table under the Collection tab and add your tokens to the three Beast types;Land, Air and Water. Unfortunately, the Macro can't add these automatically as it can't access the compendium, this is by Roll20 design. 4. Set this token as the SummonBeast NPC's token, setting how you want your bars and make sure to turn vision on. Vision is set automatically by the macro for each beast. Now any time you run the macro it will just cast the spell. What does this Macro Do? This macro will ask you what spell slot level you are using and automatically deduct it. Then it will ask you what type of Beast you are summoning. The token will appear to the right of the caster token and can be placed in whatever square the caster wishes. IMPORTANT: There is one important limitation with this Macro. It creates "Dummy" Actions and Traits on the NPC character sheet. This is necessary as the different beasts have a different number of Actions and Traits. I could have deleted these "dummy" sections instead of emptying them, but it would have required the addition of another script and I was trying to minimize the number of scripts needed. It is important that you DO NOT DELETE THE EMPTY ACTIONS AND TRAITS. Doing so will cause ScriptCards to crash your sandbox. !scriptcards {{
--#title|Summon Beast
--#sourceToken|@{selected|token_id}
--#emoteText|[*S:character_name] Casts Summon Beast.
--#bodyfontface|Helvetica
--#oddrowfontcolor|#290000
--#evenrowfontcolor|#290000
--#bodyfontsize|[&bodyFontSize]px
--#titlecardbackgroundcolor|#930c10
--#titlecardbackgroundcolor|#672223
--#titlefontcolor|#fffebd
--#titlefontsize|1.5em
--#titlefontshadow|0
--#oddrowbackground|#f7ce65
--#evenrowbackground|#f7ce65
--#oddrowbackground|#b3ab96
--#evenrowbackground|#b3ab96
--#subtitlefontcolor|#fffebd
--#tablebgcolor|#fffebd
--#lineheight|10pt
--#buttonfontsize|10px
--#buttonbackground|#930c10
--#buttonbackground|#672223
--#buttonbackground|rgba(103,34,35,1); display:inline-block;
--#buttonfontface|Tahoma
--#buttonpadding|8px
--#bodyfontface|Helvetica
--#bodyfontsize|14px
--#Debug|0
--&SummonBeast|@{SummonBeast|character_id}
--#Title|Summon Beast
--#leftsub|Level 2 | Conjuration | Action [br]
--#rightsub| 90' | V S M | Concentration 1 Hour
-->AllExist|
--X|
--:AllExist|
--Rfind|@{SummonBeast|character_id};Maul;repeating_npcaction;name
--&MaulExist|[*R:name]
--?"[&MaulExist]" -eq "Maul"|[
-->WhatSpellSlot|
--]|[
--+|[b]Creating Rollable Token Table for First Run[/b]
--!o#:tableid|SummonBeast
--+New Table ID|[&tableid]
--!oe:entryid|[&tableid];Land-Beast
--+New Entry ID|[&entryid]
--!oe:entryid|[&tableid];Air-Beast
--+New Entry ID|[&entryid]
--!oe:entryid|[&tableid];Water-Beast
--+New Entry ID|[&entryid]
--+Rollable Token Table SummonBeast created.| Find the table under Collection and set up your Land, Air and Water beast tokens.[br]Don't forget to link your new rollable token to your SummonBeast character sheet and turn vision on. The next run of this macro will just cast the spell.
--!or:[&SummonBeast]:npcaction|
name:Maul|
attack_flag:on|
attack_type:melee|
attack_target:one target|
attack_range:5 ft.|
attack_tohit:@{selected|spell_attack_bonus}|
attack_damage:1d8 + 4 + [$SlotLevel]|
attack_damagetype:piercing|
attack_tohitrange:|
attack_range:5ft.|
attack_target:one target|
attack_onhit:1d8 + 4 + [$SlotLevel]|
description:The beast has advantage on an attack roll against a creature if at least one of the beast’s allies is within 5 feet of the creature and the ally isn’t incapacitated.
--!or:[&SummonBeast]:npcaction|name:Multiattack|description:The beast makes a number of attacks equal to half this spell’s level (rounded down).
--!or:[&SummonBeast]:npctrait|name:temp|description:temp
--!or:[&SummonBeast]:npctrait|name:temp2|description:temp2
--]|
--X|
--:WhatSpellSlot|
--+At what level is the spell being cast?|
--+|[rbutton]2::WhatLVL;2[/rbutton][rbutton]3::WhatLVL;3[/rbutton][rbutton]4::WhatLVL;4[/rbutton][rbutton]5::WhatLVL;5[/rbutton][rbutton]6::WhatLVL;6[/rbutton][rbutton]7::WhatLVL;7[/rbutton][rbutton]8::WhatLVL;8[/rbutton][rbutton]9::WhatLVL;9[/rbutton]
--<|
--:WhatLVL|
--=SlotLevel|[&reentryval]
--=SlotsTotal|0
--=SlotsExpended|[*S:lvl[$SlotLevel]_slots_expended]
--?[$SlotsExpended.Raw] -eq [$SlotsTotal.Raw]|[
-->NoSlotsLeft|
--]|[
--?[$SlotLevel] -eq 0|NoSlot
--=SlotsLeft|[$SlotsExpended] - 1
--!a:[*S:character_id]|lvl[$SlotLevel]_slots_expended:[$SlotsLeft]
-->GetBeast|
--]|
--X|
--:NoSlot|
--X|
--:GetBeast|
--+What type of Beast are you summoning?|[br][rbutton]Land::Land-Beast[/rbutton][rbutton]Air::Air-Beast[/rbutton][rbutton]Water::Sea-Beast[/rbutton]
--X|
--:Land-Beast|
--&Type|1
--&hplvl|30
--!a:[&SummonBeast]|!npc_name:Land Beast
--Rfirst|[&SummonBeast];repeating_npctrait
--!a:[&SummonBeast]|[*R>name]:Pack Tactics|[*R>description]:The beast has advantage on an attack roll against a creature if at least one of the beast’s allies is within 5 feet of the creature and the ally isn’t incapacitated.
--Rnext|
--!a:[&SummonBeast]|[*R>name]:|[*R>description]:description:
-->CommonAttr|
--<|
--:Air-Beast|
--&Type|2
--&hplvl|20
--!a:[&SummonBeast]|!npc_name:Air Beast
--Rfirst|[&SummonBeast];repeating_npctrait
--!a:[&SummonBeast]|![*R>name]:Flyby|![*R>description]:The beast doesn’t provoke opportunity attacks when it flies out of an enemy’s reach.
--Rnext|
--!a:[&SummonBeast]|[*R>name]:|[*R>description]:description:
-->CommonAttr|
--<|
--:Sea-Beast|
--&Type|3
--&hplvl|30
--!a:[&SummonBeast]|!npc_name:Water Beast
--Rfirst|[&SummonBeast];repeating_npctrait
--!a:[&SummonBeast]|[*R>name]:Pack Tactics|[*R>description]:The beast has advantage on an attack roll against a creature if at least one of the beast’s allies is within 5 feet of the creature and the ally isn’t incapacitated.
--Rnext|
--!a:[&SummonBeast]|[*R>name]:Water Breathing|[*R>description]:The beast can breathe only underwater.
-->CommonAttr|
--<|
--:CommonAttr|
--=ACCalc|11 + [$SlotLevel]
--=hptotal|5 * [= [$SlotLevel] - 2] + [&hplvl]
--&Speed|30ft, 30ft climb
--=AttNum|[$SlotLevel] /2 {FLOOR}
--!a:[&SummonBeast]|!npc_type:Medium Beast, Unaligned|!npc_ac:[$ACCalc]|!npc_actype:natural armor|!hp:[$hptotal]|!hp^:[$hptotal]|!npc_hpformula:|!strength_base:18|!dexterity_base:11|!constitution_base:16|!intelligence_base:4|!wisdom_base:14|!charisma_base:5|!npc_speed:[&Speed]|!initiative_bonus:|!npc_challenge:|!npc_xp:|!npc_senses:Darkvision 60 ft., Passive Perception 12|!pb:@{selected|pb}|!npc_languages:Same as Caster
--+|Level [$SlotLevel] Slots Left: [$SlotsLeft]
--Rfirst|[&SummonBeast];repeating_npcaction
--Rnext|
--!a:[&SummonBeast]|[*R>description]:The beast makes [$AttNum] attack per round(half the spell's level rounded down).
--@token-mod| _ids @(selected|token_id} _set statusmarkers|Concentration::6498817
--@forselected|Spawn _name|SummonBeast _offset|1,0 _side|[&Type] _size|1 _expand|5,50 _tokenProps|has_night_vision:1,night_vision_distance:60,night_vision_effect:Nocturnal
--<|
--:NoSlotsLeft|
--+|[*S:character_name] has no level [$SlotLevel.Total] spell slots available.
--X|NoSlotsLeftStop
}}