I've been trying to make an ability. For an Ancestral Weapon upgrade called Hardy - "You can use an action to spend up to half your hit dice,
recovering that much health. You must complete a long rest
before you can use this ability again." I've been trying to use a roll query in the ability since you must first choose how many hit dice to spend. I don't want to hard code the numbers in as I'd have to change it after every level. My biggest issue so far is that any time I try to divide or minus from a called attribute it fails to perform the mathematical operation. It currently does provide a query and rolls a dice but only the name gets sent to the chat. @{hit_dice} has a value of 9 and @{hitdietype} has a value of 10. &{template:simple} {{rname=Hardy}} ?{Spend up to half your hit dice. Max @{hit_dice}/2|@{hit_dice}/2,}} {{r1=[[@{hit_dice}/2-1d@{hitdietype}]]|@{hit_dice}/2-1,}} {{r1=[[@{hit_dice}/2-1d@{hitdietype}]] }}