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

troubling with using ammunition via macro

Hi I have installed the companion api, which let me use the ammunition when making an attack from the sheet (using d&d 5e by roll 20). But since I try to use macros more and more, to speed up the combat and to use special abilities like smite and so. But can I via the companion API spent the ressources from the sheet. For instance here is the macro I use for Lay on Hands &{template:atkdmg} {{normal=1}} {{mod=on ***@{target|token_name} ***}} {{rname=LAY ON HANDS }} {{attack=1}} {{r1=[[?{Number of points to Heal|@{repeating_resource_$1_resource_left}}]]}} {{dmg1flag=1}} {{damage=1}} {{dmg1=[[@{repeating_resource_$1_resource_left}-?{Number of points to Heal}]]}} {{dmg1type=points left}} {{desc=You can spend 5 HP's to Cure one Disease, or Neutralize one Poison, each round.}} @{charname_output} But when I check the sheet afterwards it still shows the maximum, it hasn't spent any, even though it does write the lower number. Is there a way to let it reduce the ressource. Do I need to instal another API, like the one called AMMO too? Because I am also trying to work on a macro for Smite, which work so far with the damage, but I still manually have to spent the spell-slot I hope it makes sense, and look forward to any help. Kim
You need to put the line "ammo=Lay on Hands,?{Number of points to Heal}" in your macro. &{template:atkdmg} {{normal=1}} {{mod=on ***@{target|token_name} ***}} {{rname=LAY ON HANDS}} {{attack=1}} {{r1=[[?{Number of points to Heal|@{repeating_resource_$1_resource_left}}]]}} {{dmg1flag=1}} {{damage=1}} {{dmg1=[[@{repeating_resource_$1_resource_left}-?{Number of points to Heal}]]}} {{dmg1type=points left}} {{desc=You can spend 5 HP's to Cure one Disease, or Neutralize one Poison, each round.}} ammo=Lay on Hands,?{Number of points to Heal} @{charname_output}
Kyle G. said: You need to put the line "ammo=Lay on Hands,?{Number of points to Heal}" in your macro. &{template:atkdmg} {{normal=1}} {{mod=on ***@{target|token_name} ***}} {{rname=LAY ON HANDS}} {{attack=1}} {{r1=[[?{Number of points to Heal|@{repeating_resource_$1_resource_left}}]]}} {{dmg1flag=1}} {{damage=1}} {{dmg1=[[@{repeating_resource_$1_resource_left}-?{Number of points to Heal}]]}} {{dmg1type=points left}} {{desc=You can spend 5 HP's to Cure one Disease, or Neutralize one Poison, each round.}} ammo=Lay on Hands,?{Number of points to Heal} @{charname_output} I tried to add that, and still it isn't reducing the number of lay on hands.
My divine smite macro so far is &{template:atkdmg} {{mod=mod}} {{rname=Divine Smite}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[([[{(?{Spell Slot Level|1|2|3|4|5}+?{Smite fiend or undead?|N,1[non-fiend]|Y,2[***fiend or undead***]}),6}kl1]])d8]] }} {{dmg1type=radiant}} {{dmg2flag=1}} {{dmg2=[[([[{(?{Spell Slot Level}+?{Smite fiend or undead?}),6}kl1]])d8]] }} {{dmg2type=radiant  if CRIT}} {{desc=**@{selected|character_name}** ***Smiting*** the **@{target|token_name}** with a level **?{Spell Slot Level}** spell slot!}} And there I need a way to let it use a spell-slot from the sheet. I have tried both to add {{spelllevel=?{Spell Slot Level}}} and the ammo=?{Spell Slot Level} but none seem to work, and there is no problem about using spell-slot when casting spells from the sheet, so the companion api is working as it should do. I guess I just don´t kow how to add it to a macro. don´t know if it is important knowledge, but the macros are placed in the sheets abilities as a token action