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 .
×

Need help with 5e OGL Character Sheet Macros.

Hello, I am relatively new to this whole macros business and honestly, completely lost. I am currently playing as a Ranger Hunter/Rogue Assassin and I am trying to get my Longbow macro working so that the ammunition is being tracked (we have the API on) as well as the following features. What I would like is a drop down query if I want to use my abilities such as Sneak Attack , Sharpshooter, Colossus Slayer, Hunters' Mark and Favored Enemy . This is my attempt so far:  @{Tryswynn Hawthorn|wtype}&{template:atkdmg} {{mod=+8}} {{rname=Longbow}} {{r1=[[@{Tryswynn Hawthorn|d20}cs>20 + 3[DEX] + 2[MOD] + 3[PROF]]]}} @{Tryswynn Hawthorn|rtype}cs>20 + 3[DEX] + 2[MOD] + 3[PROF]]]}} {{attack=1}} {{range=150/600}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d8+?{Favored Enemy|No, 0|Yes, 2 [Favored Enemy]}+?{Hunters Mark|No, 0|Yes, 1d6 [Hunters Mark]}+?{Colossus Slayer|No, 0|Yes, 1d8 [Colossus Slayer]}+ ?{Sneak Attack|No, 0|Yes, [[ ceil((@{Tryswynn Hawthorn|multiclass1_lvl}) / 2) ]]d6 [Sneak Attack]}+[[2*?{Sharpshooter|No,0|Yes,5 [Sharpshooter]}]] + 3[DEX]]]}} {{dmg1type=Piercing }} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d8+?{Favored Enemy|No, 0|Yes, 2 [Favored Enemy]}+?{Hunters Mark|No, 0|Yes, 1d6 [Hunters Mark]}+?{Colossus Slayer|No, 0|Yes, 1d8 [Colossus Slayer]}+ ?{Sneak Attack|No, 0|Yes, [[ ceil((@{Tryswynn Hawthorn|multiclass1_lvl}) / 2) ]]d6 [Sneak Attack]}+[[2*?{Sharpshooter|No,0|Yes,5 [Sharpshooter]}]][CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 {{desc=[Tryswynn draws his breath](Tryswynn Hawthorn|Maneuvers)}}   {{spelllevel=}} {{innate=}} {{globalattack=@{Tryswynn Hawthorn|global_attack_mod}}} {{globaldamage=[[0]]}} {{globaldamagecrit=[[0]]}} {{globaldamagetype=@{Tryswynn Hawthorn|global_damage_mod_type}}} ammo=ammo=Arrows {{r1=[[1d20+[[@{Tryswynn Hawthorn|dexterity_mod}]][ABILITY]+[[(@{Tryswynn Hawthorn|pb})]][PROF] + 2-?{Sharpshooter|no,0|yes,5}]]}} {{r2=[[1d20+[[@{Tryswynn Hawthorn|dexterity_mod}]][ABILITY]+[[(@{Tryswynn Hawthorn|pb})]][PROF]+2-?{Sharpshooter}]]}}|  -LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO @{Tryswynn Hawthorn|charname_output} Several issues, ammunition is taking out of the 5e OGL Class Resource and not the Arrows part of the sheet, each time I level up, I lose most of the macros. This is currently in my Longbow damage: 1d8+?{Favored Enemy|No, 0|Yes, 2 [Favored Enemy]}+?{Hunters Mark|No, 0|Yes, 1d6 [Hunters Mark]}+?{Colossus Slayer|No, 0|Yes, 1d8 [Colossus Slayer]}+ ?{Sneak Attack|No, 0|Yes, [[ ceil((@{multiclass1_lvl}) / 2) ]]d6 [Sneak Attack]}+[[2*?{Sharpshooter|No,0|Yes,5 [Sharpshooter]}]] This is in the ammunition: ammo=Arrows {{r1=[[1d20+[[@{atkattr_base}]][ABILITY]+[[@{atkprofflag}]][PROF] + @{atkmod}-?{Sharpshooter|no,0|yes,5}]]}} {{r2=[[1d20+[[@{atkattr_base}]][ABILITY]+[[@{atkprofflag}]][PROF]+@{atkmod}-?{Sharpshooter}]]}}|  -LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO|-LG2YhKNfWzkExh55oKO This is in the description: [Tryswynn draws his breath](Tryswynn Hawthorn|Maneuvers) And this is the Abilities portion which I think is a remnant part of the code I found online here for a similar issue:  &{template:atkdmg} {{desc=?{Maneuver|Precision Attack, **Precision Attack** [[1d10]] to hit When you make a weapon attack roll against a creature&#44 expend one superiority die to add it to the roll. Use this maneuver before or after the attack roll&#44 but before any effects of the attack are applied. | Trip Attack, **Trip Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to knock it down. Add the superiority die to the damage roll and if the target is Large or smaller&#44 it must make a Strength saving throw. On a failed save&#44 you knock the target prone  | Maneuvering Attack, **Maneuvering Attack** [[1d10]] damage When you hit a creature with a weapon attack&#44 expend one superiority die to maneuver one of your comrades into a more advantageous position. Add the superiority die to the damage roll and choose a friendly creature who can see or hear you. It can use its reaction to move half its speed without provoking opportunity attacks from the target of your attack.  | Menacing Attack, **Menacing Attack** [[1d10]] damage Save DC [[17]] Wis When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to frighten the target. Add the superiority die to the damage roll&#44 the target must make a Wisdom saving throw. On a failed save&#44 it is frightened of you until the end of your next turn. | Goading Attack, **Goading Attack** [[1d10]] damage Save DC [[17]] Wis When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to goad the target into attacking you. Add the superiority die to the damage roll and the target must make a Wisdom saving throw. On a failed save&#44 the target has disadvantage on all attack rolls against targets other than you until the end of your next turn  | Pushing Attack, **Pushing Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to drive it back. Add the superiority die to the damage roll&#44 if the target is Large or smaller&#44 it must make a Strength saving throw. On a failed save&#44 you push the target up to 15ft away from you. | Disarming Attack, **Disarming Attack** [[1d10]] damage Save DC [[17]] Str When you hit a creature with a weapon attack&#44 expend one superiority die to attempt to disarm the target&#44 forcing it to drop one item of your choice that it’s holding. Add the superiority die to the damage roll and the target must make a Strength saving throw. On a failed save&#44 it drops the object at its feet. ammo= Arrows}}} Could someone point me in the right direction as I have already read the wiki and just absolutely lost. Thanks. 
1530293598

Edited 1530295776
Just a quick update, I seem to have made a macro button not directly linked the weapon I wish to roll but it is calculating the correct information. The issue remains with the ammo tracking not working anymore and I have double checked that it is enabled and followed the guide to link it up. Is there a way to link the ammo through coding rather than the class field in the weapons tab? New code is here: @{Tryswynn Hawthorn|wtype}&{template:atkdmg} {{mod=+[[@{dexterity_mod} + @{pb} +@{archery_bonus}]]}} {{rname=Longbow}} {{r1=[[@{Tryswynn Hawthorn|d20}cs>20 + @{dexterity_mod}[DEX] + @{pb}[PROF] + @{archery_bonus}[ARCHERY] - ?{Sharpshooter|No, 0| Yes, 5 [Sharpshooter]}]]}} @{Tryswynn Hawthorn|rtype}cs>20 + @{dexterity_mod}[DEX] + @{pb}[PROF] + @{archery_bonus}[ARCHERY]]]}} {{attack=1}} {{range=150 ft. / 600 ft.}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d8 + ?{Sneak Attack|No, 0|Yes, [[ ceil((@{Tryswynn Hawthorn|multiclass1_lvl}) / 2) ]]d6 [Sneak Attack]} + ?{Favored Enemy|No, 0| Yes, 2 [Favored Enemy]} + ?{Hunters Mark|No, 0|Yes, 1d6 [Hunters Mark]} + ?{Colossus Slayer|No, 0|Yes, 1d8 [Colossus Slayer]} + [[2*?{Sharpshooter|No, 0|Yes, 5 [Sharpshooter]}]] + @{dexterity_mod} [DEX]]]}} {{dmg1type=Piercing }} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d8 +?{Sneak Attack|No, 0|Yes, [[ ceil((@{Tryswynn Hawthorn|multiclass1_lvl}) / 2) ]]d6 [Sneak Attack]} + ?{Hunters Mark|No, 0|Yes, 1d6 [Hunters Mark]} +?{Colossus Slayer|No, 0|Yes, 1d8 [Colossus Slayer]}[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 @{Tryswynn Hawthorn|global_attack_mod} @Tryswynn Hawthorn|global_damage_mod} @{Tryswynn Hawthorn|global_damage_mod_crit} {{globaldamagetype=@{Tryswynn Hawthorn|global_damage_type}}} @{Tryswynn Hawthorn|charname_output} Update 2, I got the ammo tracking working but I would like the code placed inside the weapon being used on the 5e OGL sheet. @{Tryswynn Hawthorn|wtype}&{template:atkdmg} {{mod=+[[@{dexterity_mod} + @{pb} +@{archery_bonus}]]}} {{rname=Longbow}} {{r1=[[@{Tryswynn Hawthorn|d20}cs>20 + @{dexterity_mod}[DEX] + @{pb}[PROF] + @{archery_bonus}[ARCHERY] - ?{Sharpshooter|No, 0| Yes, 5 [Sharpshooter]}]]}} @{Tryswynn Hawthorn|rtype}cs>20 + @{dexterity_mod}[DEX] + @{pb}[PROF] + @{archery_bonus}[ARCHERY]]]}} {{attack=1}} {{range=150 ft. / 600 ft.}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d8 + ?{Sneak Attack|No, 0|Yes, [[ ceil((@{Tryswynn Hawthorn|multiclass1_lvl}) / 2) ]]d6 [Sneak Attack]} + ?{Favored Enemy|No, 0| Yes, 2 [Favored Enemy]} + ?{Hunters Mark|No, 0|Yes, 1d6 [Hunters Mark]} + ?{Colossus Slayer|No, 0|Yes, 1d8 [Colossus Slayer]} + [[2*?{Sharpshooter|No, 0|Yes, 5 [Sharpshooter]}]] + @{dexterity_mod} [DEX]]]}} {{dmg1type=Piercing }} 0 {{dmg2=[[0]]}} {{dmg2type=}} {{crit1=[[1d8 +?{Sneak Attack|No, 0|Yes, [[ ceil((@{Tryswynn Hawthorn|multiclass1_lvl}) / 2) ]]d6 [Sneak Attack]} + ?{Hunters Mark|No, 0|Yes, 1d6 [Hunters Mark]} +?{Colossus Slayer|No, 0|Yes, 1d8 [Colossus Slayer]}[CRIT]]]}} {{crit2=[[0[CRIT]]]}} 0 @{Tryswynn Hawthorn|global_attack_mod} @Tryswynn Hawthorn|global_damage_mod} @{Tryswynn Hawthorn|global_damage_mod_crit} {{globaldamagetype=@{Tryswynn Hawthorn|global_damage_type}}} ammo=@{other_resource_name} @{Tryswynn Hawthorn|charname_output}