
Sam, I had a thought concerning the macro text. The html for the macro button is hard-coded to look like this: <button type="roll"
name="roll_repeating_weapon_0_Attack"
title="%{selected|repeating_weapon_0_Attack}"
value=
"/em is attacking with @{repeating_weapon_0_name}
Attack Result: [[1d20 + (@{repeating_weapon_0_proficiency} + (((@{repeating_weapon_0_enhance} + @{repeating_weapon_0_masterwork}) + abs(@{repeating_weapon_0_enhance} - @{repeating_weapon_0_masterwork})) / 2) + @{repeating_weapon_0_attack} + @{repeating_weapon_0_attack-type} + @{armor-proficiency})]]
(Needs at least [[(@{repeating_weapon_0_crit-target}) + (@{repeating_weapon_0_proficiency} + (((@{repeating_weapon_0_enhance} + @{repeating_weapon_0_masterwork}) + abs(@{repeating_weapon_0_enhance} - @{repeating_weapon_0_masterwork})) / 2) + @{repeating_weapon_0_attack} + @{repeating_weapon_0_attack-type} + @{armor-proficiency})]] to crit.)
Damage Result: [[@{repeating_weapon_0_damage-dice-num}d@{repeating_weapon_0_damage-die} + (@{repeating_weapon_0_enhance} + @{repeating_weapon_0_damage} + @{repeating_weapon_0_damage-ability})]]
Crit: @{repeating_weapon_0_crit-target}/x@{repeating_weapon_0_crit-multiplier}
Crit Confirm: [[1d20 + (@{repeating_weapon_0_proficiency} + (((@{repeating_weapon_0_enhance} + @{repeating_weapon_0_masterwork}) + abs(@{repeating_weapon_0_enhance} - @{repeating_weapon_0_masterwork})) / 2) + @{repeating_weapon_0_attack} + @{repeating_weapon_0_attack-type} + @{armor-proficiency})]]
Crit Damage: +[[(@{repeating_weapon_0_damage-dice-num} * (@{repeating_weapon_0_crit-multiplier} - 1))d@{repeating_weapon_0_damage-die} + ((@{repeating_weapon_0_enhance} + @{repeating_weapon_0_damage} + @{repeating_weapon_0_damage-ability}) * (@{repeating_weapon_0_crit-multiplier} - 1))]]
Type: @{repeating_weapon_0_type}
Notes: @{repeating_weapon_0_notes}
@{attack-notes}"
class="btn">
</button>
(Spacing added for ease of reading.) What if you used the search-and-replace JS function to add "repeating_weapon_0_" to each variable reference in the macro text as follows: <button type="roll"
name="roll_repeating_weapon_0_Attack"
title="%{selected|repeating_weapon_0_Attack}"
value=macro-text-0.replace("{","{repeating_weapon_0_")
class="btn">
</button> (note: I don't know where the macro text is stored, so I'm not sure how to reference it. I just used macro-text-0 as a stand-in.) That assumes that every variable reference within the macro is internal, but I think we users would be willing to accept that to get the macro-text as a Token Action. I may be way off; I haven't coded since high school 14 years ago, so I'm just shooting from the hip. But I thought I'd toss it out there.