Hi everyone! I’m creating a custom version of the Moldway BECMI character sheet to apply some modifications. I’d like to add a way to automatically subtract ammunition when making a ranged attack. In the HTML, ranged attacks are not set as repeating sections, and each single attack has its own ammunition attribute that it refers to: <!-- BEGIN ranged weapon row 2--> <div class="sheet-row"> <div class="sheet-col-1-24"> <button type='roll' name="Attack_@{MissileWeaponName2}" value="&{template:odnd} {{combat=1}} {{name=@{Name}}} {{title=@{MissileWeaponName2} \n @{RangedDistance2}}} {{rangedattack=[[@{HitAC0}[THAC0] - (@{toHitRoll}[Dice Roll] + @{MissileToHit2}[Bonus] + @{Missile_Halfling}[Halfling] + (?{Bonus/Minus|0})[ADD'L BONUS])]]}} {{damage=[[@{MissileDmg_Die2}+@{MissileDmg_Bonus2}]]}}"></button> </div> <div class="sheet-col-1-16"><input class="inSmallNum_noBorder" type="number" name="attr_MissileAmmo2" value="0"></div> <div class="sheet-col-1-4"><input class="inMainTxt" style="width: 190px;" type="text" placeholder="-" name="attr_MissileWeaponName2"></div> <div class="sheet-col-1-7"><input class="inMainTxt" style="margin-left: 8px; width: 90px" placeholder="0/0/0" type="text" name="attr_RangedDistance2"></div> <div class="sheet-col-1-9" title="Scegli la distanza del target"> <select name="attr_RangeToTarget2" style="text-align: center; width: 80px;"> <option value="1">Corto</option> <option value="0">Medio</option> <option value="-1">Lungo</option> </select> </div> <div class="sheet-col-1-10 sheet-padr" title="Il Bonus magico verrà aggiunto in automatico sia al TXC che ai danni"><input class="inSmallNum_noBorder" style="margin-left: 4px" type="number" name="attr_RangedMagic2" value="0" step="1"></div> <div class="sheet-col-1-10" title="Il tuo bonus totale al TXC (Mod. Forza + Bonus Magico + Mod. Range)"><input class="inSmallNum_noBorder" style="margin-left: 4px" type="number" name="attr_MissileToHit2" value="[[@{RangeToTarget2} + [[@{MOD_DEX}]] + @{RangedMagic2}]]" disabled="disabled"></div> <div class="sheet-col-1-10" title="Scegli il dado-danno dell'arma"><input class="sheet-inSmallNum_noBorder sheet-center" type="text" name="attr_MissileDmg_Die2" value="d6"<br/></div> <div class="sheet-col-1-11" title="Il tuo bonus totale al Danno (Bonus Magico)"><input class="inSmallNum_noBorder" style="margin-left: 4px" type="number" name="attr_MissileDmg_Bonus2" value="@{RangedMagic2}" disabled="disabled"></div> </div> <!-- END ranged weapon row 2--> I tried modifying the roll’s value by adding a line that calls the ChatSetAttr script (installed in the campaign), but this command only works if the value contains only the ChatSetAttr call and not the attack roll. Basically, when I click the “roll” button, the sheet won’t recognize both commands at the same time — it only runs whichever one is written first (either the API command or the attack roll macro). Does anyone have ideas on how to make this work?