
Hello there! I don't know how to program an API if it where to safe my life ... so I wondered whether there is somebody here to help me, because there is one thing and one thing only that I wanna add to the API and that is the following. I added a Spell Book to my sheet and it has a Cast button, that has the following Value (this is for the level 2 spells, which is why there is a 2 in all the attribute): "&{template:default} {{name= CASTING}} {{Spell Name= @{spell2name}}} {{Spell level= [[1]] (@{Class})}} {{Type= @{spell2type}}} {{Spec./Sign.= @{spell2spec}}} {{Success= [[d20]] vs TN[[@{spell2stat}@{spell2TNmod}]]}} {{Cost= [[@{spell2cost}@{spell2manamod}]] Mana}} {{Heals/Deals= @{spell2healdeal}}} {{Range= @{spell2range}}} {{Components= @{spell2comp} (@{spell2complist})}} {{Duration= @{spell2dur}}} {{CastingTime= [[@{spell2speed}]]}} {{AOE= @{spell2aoe}}} {{Save= @{spell2save}}} {{Effect= @{spell2eff}}} {{Limit= @{spell2limit}}}" Easy enough, right? It's a roll template ... Now I would really like this part {{Cost= [[@{spell2cost}@{spell2manamod}]] Mana}} to automatically deduct the Mana from the mana bar. The value connected to the bar is @{MP} on the sheet, but I dunno how to do it ... people are supposed to type in stuff list 2d4 into the spell cost field and stuff like -1 into the manamod field, so [[@{spell2cost}@{spell2manamod}]] would end up being [[2d4-1]] ... I tried to abuse the ammo tracker for that, but it won't work (probably because I have no idea on how to make it work, so if there is a way, please let me know). Help, please? xoxo, Shin