Back in my 3.5 game I did ammo management as per this very complex macro (The bits in bold are the important areas of how I handled repeating sections for ammo.): !power {{
--format|attack
--emote|@{selected|token_name} attacks @{target|token_name}
--charid|@{selected|character_id}
--name|@{selected|weapon2name}
--leftsub|@{selected|weapon2type}
--rightsub|Crit: x@{selected|weapon2critmult}
--hroll|[[ [$ammo] ?{Ammo Type?|@{selected|repeating_ammunition_$0_ammoname},0|@{selected|repeating_ammunition_$1_ammoname},1|@{selected|repeating_ammunition_$2_ammoname},2|@{selected|repeating_ammunition_$3_ammoname},3|@{selected|repeating_ammunition_$4_ammoname},4|@{selected|repeating_ammunition_$5_ammoname},5|@{selected|repeating_ammunition_$6_ammoname},6} + 0d0]]
--?? $ammo.base == 0 ?? !ammo0|**Ammunition used:** @{selected|repeating_ammunition_$0_ammoname} ^^ **Notes:** @{selected|repeating_ammunition_$0_ammonotes}
--?? $ammo.base == 1 ?? !ammo1|**Ammunition used:** @{selected|repeating_ammunition_$1_ammoname} ^^ **Notes:** @{selected|repeating_ammunition_$1_ammonotes}
--?? $ammo.base == 2 ?? !ammo2|**Ammunition used:** @{selected|repeating_ammunition_$2_ammoname} ^^ **Notes:** @{selected|repeating_ammunition_$2_ammonotes}
--?? $ammo.base == 3 ?? !ammo3|**Ammunition used:** @{selected|repeating_ammunition_$3_ammoname} ^^ **Notes:** @{selected|repeating_ammunition_$3_ammonotes}
--?? $ammo.base == 4 ?? !ammo4|**Ammunition used:** @{selected|repeating_ammunition_$4_ammoname} ^^ **Notes:** @{selected|repeating_ammunition_$4_ammonotes}
--?? $ammo.base == 5 ?? !ammo5|**Ammunition used:** @{selected|repeating_ammunition_$5_ammoname} ^^ **Notes:** @{selected|repeating_ammunition_$5_ammonotes}
--?? $ammo.base == 6 ?? !ammo6|**Ammunition used:** @{selected|repeating_ammunition_$6_ammoname} ^^ **Notes:** @{selected|repeating_ammunition_$6_ammonotes}
?{Attack Type?|
Standard,
--Standard Attack:|[[ [$att] 1d20 + @{selected|bab} + @{selected|size} + @{selected|weapon2stat} + @{selected|weapon2enh} + @{selected|bar3} + @{selected|weapon2focus} + @{Buff|attbuff} ]] vs [[ [$tac] @{target|armorclass} +0d0 ]] AC
--?? $att.base == 1 ?? !fumble|[[ 1t[misstable] ]] ^^ **Fumble Check:** [[ [$fbl] 1d20 ]]
--?? $att.base == 1 AND $fbl.base == 1 ?? !fumbled|[[ 1t[Fumble] ]]
--?? $att.base <> 1 AND $att.total < $tac.total ?? !miss&#124;[[ 1t[misstable] ]]
--?? $att.base <> 1 AND $att.total >= $tac.total OR $att.base == 20 ?? !hit&#124;[[ 1t[hittable] ]] ^^ [[ 1@{selected|weapon2damage} + @{selected|bar2} + @{selected|weapon2damagestat} + @{selected|weapon2enh} + @{selected|weapon2specialize} + @{Buff|dambuff} ]] @{selected|weapon2type} damage!
--?? $att.base >= @{selected|weapon2critmin} ?? Critical Threat:&#124; [[ [$crit] 1d20 + @{selected|bab} + @{selected|bar3} + @{selected|size} + @{selected|weapon2stat} + @{selected|weapon2enh} + @{selected|weapon2focus} + @{Buff|attbuff} ]]
--?? $att.base >= @{selected|weapon2critmin} AND $crit.total >= $tac.total ?? Critical Hit:&#124;Additional [[ [[ @{selected|weapon2critmult} -1 ]]@{selected|weapon2damage} ]] @{selected|weapon2type} damage!
|
BAB2,
--BAB2:&#124;[[ [$att] 1d20 + @{selected|bab2} + @{selected|size} + @{selected|weapon2stat} + @{selected|weapon2enh} + @{selected|bar3} + @{selected|weapon2focus} + @{Buff|attbuff} ]] vs [[ [$tac] @{target|armorclass} +0d0 ]] AC
--?? $att.base == 1 ?? !fumble&#124;[[ 1t[misstable] ]] ^^ **Fumble Check:** [[ [$fbl] 1d20 ]]
--?? $att.base == 1 AND $fbl.base == 1 ?? !fumbled&#124;[[ 1t[Fumble] ]]
--?? $att.base <> 1 AND $att.total < $tac.total ?? !miss&#124;[[ 1t[misstable] ]]
--?? $att.base <> 1 AND $att.total >= $tac.total OR $att.base == 20 ?? !hit&#124;[[ 1t[hittable] ]] ^^ [[ 1@{selected|weapon2damage} + @{selected|weapon2damagestat} + @{selected|weapon2enh} + @{selected|bar2} + @{selected|weapon2specialize} + @{Buff|dambuff} ]] @{selected|weapon2type} damage!
--?? $att.base >= @{selected|weapon2critmin} ?? Critical Threat:&#124; [[ [$crit] 1d20 + @{selected|bab2} + @{selected|size} + @{selected|weapon2stat} + @{selected|weapon2enh} + @{selected|bar3} + @{selected|weapon2focus} + @{Buff|attbuff} ]]
--?? $att.base >= @{selected|weapon2critmin} AND $crit.total >= $tac.total ?? Critical Hit:&#124;Additional [[ [[ @{selected|weapon2critmult} -1 ]]@{selected|weapon2damage} ]] @{selected|weapon2type} damage!
|
Sneak Attack,
--Sneak Attack:&#124;[[ [$att] 1d20 + @{selected|bab} + @{selected|bar3} + @{selected|size} + @{selected|weapon2stat} + @{selected|weapon2enh} + @{selected|weapon2focus} + @{Buff|attbuff} ]] vs [[ [$tac] @{target|armorclass} +0d0 ]] AC
--?? $att.base == 1 ?? !fumble&#124;[[ 1t[misstable] ]] ^^ **Fumble Check:** [[ [$fbl] 1d20 ]]
--?? $att.base == 1 AND $fbl.base == 1 ?? !fumbled&#124;[[ 1t[Fumble] ]]
--?? $att.base <> 1 AND $att.total < $tac.total ?? !miss&#124;[[ 1t[misstable] ]]
--?? $att.base <> 1 AND $att.total >= $tac.total OR $att.base == 20 ?? !hit&#124;[[ 1t[hittable] ]] ^^ [[ 1@{selected|weapon2damage} + @{selected|bar2} + @{selected|weapon2damagestat} + @{selected|weapon2enh} + @{selected|weapon2specialize} + @{Buff|dambuff} + [[ ceil(@{selected|level}/2) ]]d6 ]] @{selected|weapon2type} damage!
--?? $att.base >= @{selected|weapon2critmin} ?? Critical Threat:&#124; [[ [$crit] 1d20 + @{selected|bab} + @{selected|bar3} + @{selected|size} + @{selected|weapon2stat} + @{selected|weapon2enh} + @{selected|weapon2focus} + @{Buff|attbuff} ]]
--?? $att.base >= @{selected|weapon2critmin} AND $crit.total >= $tac.total ?? Critical Hit:&#124;Additional [[ [[ @{selected|weapon2critmult} -1 ]]@{selected|weapon2damage} ]] @{selected|weapon2type} damage!
}
--?? $att.base == 1 AND $fbl.base == 1 ?? soundfx1|_play,delay:2|critmiss
--?? $att.base >= @{selected|weapon1critmin} AND $crit.total >= $tac.total ?? soundfx2|_play,delay:2|Critical Hit
--Notes|@{selected|weapon2specialproperties}
}}
!power --name|SR: @{target|spellresistance} DR: @{target|damagereduction} --whisper|GM
!playsound Arrow
!ammo @{selected|token_id} repeating_ammunition_$?{Ammo Type?}_ammoquantity -1