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

Staff of Striking, Part II

Okay, I have written my macro and I can get the staff to ask for the number of charges and add the result to the damage output, but... It does not add it to the versatile damage, nor does it deduct the appropriate number of charges from the charges for the staff. Is there a way to set the number of charges used as a variable that can then be referenced for these other two? My macro is below. @{Nightbreeze|wtype}&{template:atkdmg} {{mod=+5}} {{rname=Staff of Striking}} {{r1=[[@{Nightbreeze|d20}cs>20 + 2[PROF] + 3[MAGIC]]]}} @{Nightbreeze|rtype}cs>20 + 2[PROF] + 3[MAGIC]]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[?{Charges|0,1|1,2|2,3|3,4}d6 + 3[MOD] + 3[MAGIC]]]}} {{dmg1type=Bludgeoning }} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[1d8 + 3[MOD] +3[MAGIC]]]}} {{dmg2type=Bludgeoning }} {{crit1=[[1d6[CRIT]]]}} {{crit2=[[1d8[CRIT]]]}} 0 {{desc=}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Nightbreeze|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=Bonus Damage}} ammo=Charges @{Nightbreeze|charname_output}
Yes, you can reuse a query by using the same name later on. You don't have to specify the values after the first query too, so if you make changes to a query in the future you only need to update the first query. @{Nightbreeze|wtype}&{template:atkdmg} {{mod=+5}} {{rname=Staff of Striking}} {{r1=[[@{Nightbreeze|d20}cs>20 + 2[PROF] + 3[MAGIC]]]}} @{Nightbreeze|rtype}cs>20 + 2[PROF] + 3[MAGIC]]]}} {{attack=1}} {{range=}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[?{Charges|0,1|1,2|2,3|3,4}d6 + 3[MOD] + 3[MAGIC]]]}} {{dmg1type=Bludgeoning }} {{damage=1}} {{dmg2flag=1}} {{dmg2=[[ ?{Charges} d8 + 3[MOD] +3[MAGIC]]]}} {{dmg2type=Bludgeoning }} {{crit1=[[1d6[CRIT]]]}} {{crit2=[[1d8[CRIT]]]}} 0 {{desc=}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Nightbreeze|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=Bonus Damage}} ammo=Charges @{Nightbreeze|charname_output}
Okay, that's a huge help! Thanks, Kyle. But now for the second half of the question. Can I have the charges used reference that variable to deduct the proper number of charges?
With an API script like ChatSetAttr or the 5e OGL Companion script, yes. The exact command depends on which script you use however. For the 5e Companion script, you would simply the charges in the ammo section of the rolltemplate. For ChatSetAttr you would need to add an API command on a new line at the end of you macro.
Fantastic! Thanks, Kyle! I knew that someone here would know!