
So after spending probably around 6 or 7 hours working out a damage modifier system that uses the "size" attribute of a character to amplify or reduce the amount of damage dealt, I decided to stick it in my damage macros, and suddenly everything breaks.
?{Weapon Type|
H1: @{selected|msH1}, &{template:default} {{name=Weapon Attack }} {{@{selected|character_name} dealt [[ (2d5) * ( {{(@{selected|Size}-@{target|Size}) ,-1}>0}*(1) + (abs(0.@{selected|Size}-0.@{target|size})*2.5) )]] damage. }} |
H2: , Rest removed while testing
}
Naturally the actual code isn't all 1 macro like this. Normally there's the weapon select macro which is just the drop down list that allows you to select what weapon to use.
Selecting the weapon will run a macro that setsup the template and calls the damage ability for that weapon's character sheet to get the damage.
Inside the damage macro I had added this part:
* ( {{(@{selected|Size}-@{target|Size}) ,-1}>0}*(1) + (abs(0.@{selected|Size}-0.@{target|size})*2.5) )"
From what I can tell the problem seems to come from the use of the conditional statement as if I remove it, it will suddenly work.
The reason there is the HTML for } between "-1", ">" and "*(1)" is because using the normal } causes the query bug where it just turns the drop down list into text as it believes it is meant to end early, and I imagine the reason the template breaks is due to similar situation, it somehow reading the 2 html }s as the close for the template for some reason.
Either way, doubtful i'll anyone will be able to fix it, but attempts will be appreciated.
Alternatively if anyone else happens to have a suggestion on how to increase/decrease damage by a percentage based off of the unit sizaes feel free to say.