
Hi all by no means am I
good at coding and all that. But I play around with it and I was wondering if there
is a way to have a lookup find how many cantrips, 1 st level ect…
spells a NPC or selected player has and have it show in the chat.
This is what I have as
on now, I wanted to see if you can call up an attribute like “spells_count_cantrip”
to get the count of cantrips and have the macro just get that amount so I do
not get errors like the one in the screen shot " selected|repeating_spell-cantrip_$4_spellname" . Thanks
w gm &{template:default}{{name=@{selected|character_name}
Spellcasting
}}{{ Spell DC
[[@{selected|spell_save_dc}]] = +[[@{selected|spell_attack_bonus}]] spell
attacks
}}{{
Cantrips =
[@{selected|repeating_spell-cantrip_$0_spellname}](~selected|repeating_spell-cantrip_$0_spell)[@{selected|repeating_spell-cantrip_$1_spellname}](~selected|repeating_spell-cantrip_$1_spell)
[@{selected|repeating_spell-cantrip_$2_spellname}](~selected|repeating_spell-cantrip_$2_spell)
[@{selected|repeating_spell-cantrip_$3_spellname}](~selected|repeating_spell-cantrip_$3_spell)
[@{selected|repeating_spell-cantrip_$4_spellname}](~selected|repeating_spell-cantrip_$4_spell)
}}{{ 1st (SLOTS) =
[@{selected|repeating_spell-1_$0_spellname}](~selected|repeating_spell-1_$0_spell)
}}{{ 2nd (SLOTS) =
[@{selected|repeating_spell-2_$0_spellname}](~selected|repeating_spell-2_$0_spell)
}}{{ 3rd (SLOTS) =
[@{selected|repeating_spell-3_$0_spellname}](~selected|repeating_spell-3_$0_spell)
}}