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

Spell book macro

April 11 (7 years ago)

Edited April 11 (7 years ago)
Does anyone have a good spell book macro for both PC and NPC? Please share.
Sorry 5e OGL

April 11 (7 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
What sheet/system?
Here is my spellbook macro for NPCs. Unfortunately it requires you to modify it for each NPC  that uses it.

@{wtype} &{template:default}{{name=@{selected|character_name} Spellcasting
}}{{Spell Save DC @{selected|npc_spelldc}= @{selected|npc_spellattackmod} to hit with spell attacks
}}{{Cantrips
=[@{repeating_spell-npc_$0_spellname}](~selected|repeating_spell-npc_$0_spell)
[@{repeating_spell-npc_$1_spellname}](~selected|repeating_spell-npc_$1_spell)
[@{repeating_spell-npc_$2_spellname}](~selected|repeating_spell-npc_$2_spell)
[@{repeating_spell-npc_$3_spellname}](~selected|repeating_spell-npc_$3_spell)
[@{repeating_spell-npc_$4_spellname}](~selected|repeating_spell-npc_$4_spell)
}}{{1st level (4 slots)
=[@{repeating_spell-npc_$5_spellname}](~selected|repeating_spell-npc_$5_spell)
[@{repeating_spell-npc_$6_spellname}](~selected|repeating_spell-npc_$6_spell)
[@{repeating_spell-npc_$7_spellname}](~selected|repeating_spell-npc_$7_spell)
[@{repeating_spell-npc_$8_spellname}](~selected|repeating_spell-npc_$8_spell)
}}{{2nd level (3 slots)
=[@{repeating_spell-npc_$9_spellname}](~selected|repeating_spell-npc_$9_spell)
[@{repeating_spell-npc_$10_spellname}](~selected|repeating_spell-npc_$10_spell)
}}{{3rd level (2 slots)
=[@{repeating_spell-npc_$11_spellname}](~selected|repeating_spell-npc_$11_spell)
}}
April 12 (7 years ago)

Kyle G. said:

Here is my spellbook macro for NPCs. Unfortunately it requires you to modify it for each NPC  that uses it.

@{wtype} &{template:default}{{name=@{selected|character_name} Spellcasting
}}{{Spell Save DC @{selected|npc_spelldc}= @{selected|npc_spellattackmod} to hit with spell attacks
}}{{Cantrips
=[@{repeating_spell-npc_$0_spellname}](~selected|repeating_spell-npc_$0_spell)
[@{repeating_spell-npc_$1_spellname}](~selected|repeating_spell-npc_$1_spell)
[@{repeating_spell-npc_$2_spellname}](~selected|repeating_spell-npc_$2_spell)
[@{repeating_spell-npc_$3_spellname}](~selected|repeating_spell-npc_$3_spell)
[@{repeating_spell-npc_$4_spellname}](~selected|repeating_spell-npc_$4_spell)
}}{{1st level (4 slots)
=[@{repeating_spell-npc_$5_spellname}](~selected|repeating_spell-npc_$5_spell)
[@{repeating_spell-npc_$6_spellname}](~selected|repeating_spell-npc_$6_spell)
[@{repeating_spell-npc_$7_spellname}](~selected|repeating_spell-npc_$7_spell)
[@{repeating_spell-npc_$8_spellname}](~selected|repeating_spell-npc_$8_spell)
}}{{2nd level (3 slots)
=[@{repeating_spell-npc_$9_spellname}](~selected|repeating_spell-npc_$9_spell)
[@{repeating_spell-npc_$10_spellname}](~selected|repeating_spell-npc_$10_spell)
}}{{3rd level (2 slots)
=[@{repeating_spell-npc_$11_spellname}](~selected|repeating_spell-npc_$11_spell)
}}

How would i use this for a PC?


A PC macro would be more slightly more complex because instead of just putting the spells in the right order, you also have to differentiate between the different spell levels

So instead of using @{repeating_spell-npc_$0_spellname} you would need to use @{repeating_spell-cantrip_$0_spellname} or @{repeating_spell-1_$0_spellname}
April 15 (7 years ago)
It was loads of work but I got it done made macros with name like Spell1-0 for level 1 first slot and put %{selected|repeating_spell-1_$0_spell} in it. Then created a PowerCard nested macro to list the spells and call the right macros. Since I am using %{selected|repeating_spell-1_$0_spell} in another macro its just like clicking on the spells in the sheet. Now if I can find away to so the prepared spells I will be all set. Something like change the text color of prepared spell would be awesome.




April 18 (7 years ago)
Updated to show Prepared Spells.