
New "MACRO / WEAPON ROLL MOD" question for you.
First off, I'm a terrible coder...it's been 33 years since I've taken a coding class, so...
I want to help a player with her sheet so that when she rolls a weapon attack, a Staff of Striking (w/Shillelagh cantrip), so that it asks her how many charges she wants to use for the attack (an input of 0-3).

First off, I'm a terrible coder...it's been 33 years since I've taken a coding class, so...
I want to help a player with her sheet so that when she rolls a weapon attack, a Staff of Striking (w/Shillelagh cantrip), so that it asks her how many charges she wants to use for the attack (an input of 0-3).
/me uses Force Charges from the Staff of Striking for [[?{How many charges (0-3)?}d6]] additional points of damage.First Question: I want to modify the above macro to put the input request earlier in the macro with a input user variable so it reads
"(player name) uses (x=input#) Force Charges from the Staff of Striking for ("x"d6) additional points of damage."Second Question: Can the buttons on the 5E sheet be modified to include a call out to this macro so that when she rolls the attack button, it completes the roll and then executes the above macro?Could one actually create an attribute for CHARGES on the Staff and use the variable in the macro to track its use and, if the # of charges = 0, automatically roll a 1d20 roll (1, the staff loses the power permanently), else state that "the staff is out of charges for the day"? I guess I would also need a way to add "new day charges" back to the staff, too....getting really complicated, right?
Here is the button data:Bonus Idea / Question:<button type="roll" name="roll_MeleeAttack1" value="&{template:5eDefault} {{weapon=1}} {{title=@{meleeweaponname1}}} {{subheader=@{character_name}}} {{subheaderright=Melee attack}} {{attack=[[1d20cs>@{meleeweaponcritrange1} + @{meleetohit1} + (@{global_melee_attack_bonus}) ]]}} {{attackadv=[[1d20cs>@{meleeweaponcritrange1} + @{meleetohit1} + (@{global_melee_attack_bonus}) ]]}} {{damage=[[@{meleedmg1} + @{meleedmgbonus1} + (@{global_melee_damage_bonus}) + 0d0]] @{meleedmgtype1}}} {{critdamage=Additional [[@{meleecritdmg1}]] damage}} @{classactionmeleeweapon}}">Attack</button>
Thanks, all.
Sal