Ok, So I'm making custom sheets for my game. Got some good feedback previously. Got most things working, however, having an issue with ^ notation not working for some reason. Here's what I'm trying to do : Attack has 2 components : Roll 1d100 vs target based on range. If the roll is more than 10 below the target number, then it's a full hit. If it's below the target, but by 10 or less, then it's a graze, and does graze damage. I've built the following button... <button type="roll" value="&{template:attack} {{title=ATTACK!}} {{subtitle=@{weapon}}} {{color=red}} {{Point Blank=@{pbrange}}} {{Short=@{shortrange}}} {{Medium=@{medrange}}} {{Long=@{longrange}}} {{Extreme=@{extrange}}} {{Graze Damage=@{Graze}}} {{Roll=[[1d100]]}} {{Damage=[[@{damagedice}d10+@{damagepip}]]}} {{target=[[@{weapontohit}]]}} {{isattack=true}} {{pbtarget=[[@{weapontohit}+15]]}} {{mtarget=[[@{weapontohit}-15]]}} {{ltarget=[[@{weapontohit}-30]]}} {{etarget=[[@{weapontohit}-45]]}} {{pbgtarget=[[@{weapontohit}+5]]}} {{gtarget=[[@{weapontohit}-10]]}} {{mgtarget=[[@{weapontohit}-25]]}} {{lgtarget=[[@{weapontohit}-40]]}} {{egtarget=[[@{weapontohit}-55]]}}" name="roll_ATT" class="d10-dice-att rollmod-no" style="padding: 0px 0px;"> </button> To clarify what each of these things are : {{title=ATTACK!}} --> Title in chat window
{{subtitle=@{weapon}}} --> Name of weapon from char sheet
{{color=red}} --> Color of chat window header
{{Point Blank=@{pbrange}}} --> Point Blank range from sheet (Always 1, only populated for ranged weapons)
{{Short=@{shortrange}}} --> Short range from sheet (Always populated for ranged attacks)
{{Medium=@{medrange}}} --> Medium Range (not populated for scatter weapons)
{{Long=@{longrange}}} --> Long Range (Not populated for scatter weapons)
{{Extreme=@{extrange}}} --> Extreme Range (not populated for scatter weapons)
{{Graze Damage=@{Graze}}} --> Amount of damage to apply if attack grazed target (fixed, only for certain weapons)
{{Roll=[[1d100]]}} --> Attack Roll
{{Damage=[[@{damagedice}d10+@{damagepip}]]}} --Damage of weapon, for grazing weapons, it's 0d10+###, with Graze some fraction of ###
{{target=[[@{weapontohit}]]}} --> Base target number to hit with weapon (Short range target #)
{{isattack=true}} --> Indicates this is an attack (may not be needed)
{{pbtarget=[[@{weapontohit}+15]]}} -->Target # for point blank shots (15 point bonus to hit)
{{mtarget=[[@{weapontohit}-15]]}} -->Target # for Medium Range (-15 pt penalty)
{{ltarget=[[@{weapontohit}-30]]}} --> Target # for Long Range (-30 pt penalty)
{{etarget=[[@{weapontohit}-45]]}} --> Target # for Extreme Range (-45 pt penalty)
{{pbgtarget=[[@{weapontohit}+5]]}} --> Graze Target # for Point Blank Range (10 less than pb target)
{{gtarget=[[@{weapontohit}-10]]}} --> Graze Target # for Short Range (10 less than target)
{{mgtarget=[[@{weapontohit}-25]]}} --> Graze Target # for medium Range (10 less than m target)
{{lgtarget=[[@{weapontohit}-40]]}} --> Graze Target # for long Range (10 less than l target)
{{egtarget=[[@{weapontohit}-55]]}}" --> Graze Target # for extreme Range (10 less than e target)
Now that that is out of the way, I built a custom rolltemplate for attacks based off of Jakob's <rolltemplate class="sheet-rolltemplate-attack">
<div class="sheet-container sheet-color-{{color}}">
<div class="sheet-header">
{{#title}}<div class="sheet-title">{{title}}</div>{{/title}}
{{#subtitle}}<div class="sheet-subtitle">{{subtitle}}</div>{{/subtitle}}
</div>
<!--
<div class="sheet-content">
{{#allprops() title subtitle desc color}}
<div class="sheet-key">{{key}}</div>
<div class="sheet-value">{{value}}</div>
{{/allprops() title subtitle desc color}}
</div>
-->
<div class="sheet-content">
{{#^Point Blank}}
<!--If no Point Blank is passed, we assume it's a melee, straight check-->
<!--No Graze Check as there's no grazing with melee-->
<div class="sheet-content">
{{#allprops() title subtitle desc color}}
<div class="sheet-key">{{key}}</div>
<div class="sheet-value">{{value}}</div>
{{/allprops() title subtitle desc color}}
</div>
{{#^rollGreater() Roll target}}
<div class="sheet-key-succ">Attack Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^rollGreater() Roll target}}
{{#rollGreater() Roll target}}
<div class="sheet-key-fail">FAILURE!</div>
<div class="sheet-value">No Damage</div>
{{/rollGreater() Roll target}}
{{/#^Point Blank}}
{{#Point Blank}}
<!--If Point Blank is Passed, we assume it's a ranged attack-->
{{#^rollGreater() Roll pbtarget}}
{{#Graze Damage}}
{{#^rollGreater() Roll pbgtarget}}
<div class="sheet-key-succ">Point Blank Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^rollGreater() Roll pbgtarget}}
{{#rollGreater() Roll pbgtarget}}
<div class="sheet-key-succ">Point Blank Graze!</div>
<div class="sheet-value">{{Graze Damage}} Damage</div>
{{/rollGreater() Roll pbgtarget}}
{{/Graze Damage}}
{{#^Graze Damage}}
<div class="sheet-key-succ">Point Blank Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^Graze Damage}}
{{/^rollGreater() Roll pbtarget}}
{{#rollGreater() Roll pbtarget}}
<div class="sheet-key-fail">Point Blank FAILURE!</div>
<div class="sheet-value">No Damage</div>
{{/rollGreater() Roll pbtarget}}
{{/Point Blank}}
{{#Short}}
<!--If Short is Passed, we assume it's a ranged attack, short is always straight target #-->
{{#^rollGreater() Roll target}}
{{#Graze Damage}}
{{#^rollGreater() Roll gtarget}}
<div class="sheet-key-succ">Short Range {{Short}} squares Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^rollGreater() Roll gtarget}}
{{#rollGreater() Roll gtarget}}
<div class="sheet-key-succ">Short Range {{Short}} Graze!</div>
<div class="sheet-value">{{Graze Damage}} Damage</div>
{{/rollGreater() Roll gtarget}}
{{/Graze Damage}}
{{#^Graze Damage}}
<div class="sheet-key-succ">Short Range {{Short}} squares Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^Graze Damage}}
{{/^rollGreater() Roll target}}
{{#rollGreater() Roll target}}
<div class="sheet-key-fail">Short Range {{Short}} squares FAILURE!</div>
<div class="sheet-value">No Damage</div>
{{/rollGreater() Roll target}}
{{/Short}}
{{#Medium}}
<!--If Short is Passed, we assume it's a ranged attack, short is always straight target #-->
{{#^rollGreater() Roll mtarget}}
{{#Graze Damage}}
{{#^rollGreater() Roll mgtarget}}
<div class="sheet-key-succ">Medium Range {{Medium}} squares Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^rollGreater() Roll mgtarget}}
{{#rollGreater() Roll mgtarget}}
<div class="sheet-key-succ">Medium Range {{Medium}} Graze!</div>
<div class="sheet-value">{{Graze Damage}} Damage</div>
{{/rollGreater() Roll mgtarget}}
{{/Graze Damage}}
{{#^Graze Damage}}
<div class="sheet-key-succ">Medium Range {{Medium}} squares Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^Graze Damage}}
{{/^rollGreater() Roll mtarget}}
{{#rollGreater() Roll mtarget}}
<div class="sheet-key-fail">Medium Range {{Medium}} squares FAILURE!</div>
<div class="sheet-value">No Damage</div>
{{/rollGreater() Roll mtarget}}
{{/Medium}}
{{#Long}}
<!--If Short is Passed, we assume it's a ranged attack, short is always straight target #-->
{{#^rollGreater() Roll ltarget}}
{{#Graze Damage}}
{{#^rollGreater() Roll lgtarget}}
<div class="sheet-key-succ">Long Range {{Long}} squares Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^rollGreater() Roll lgtarget}}
{{#rollGreater() Roll lgtarget}}
<div class="sheet-key-succ">Long Range {{Long}} Graze!</div>
<div class="sheet-value">{{Graze Damage}} Damage</div>
{{/rollGreater() Roll lgtarget}}
{{/Graze Damage}}
{{#^Graze Damage}}
<div class="sheet-key-succ">Long Range {{Long}} squares Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^Graze Damage}}
{{/^rollGreater() Roll ltarget}}
{{#rollGreater() Roll ltarget}}
<div class="sheet-key-fail">Long Range {{Long}} squares FAILURE!</div>
<div class="sheet-value">No Damage</div>
{{/rollGreater() Roll ltarget}}
{{/Long}}
{{#Extreme}}
<!--If Short is Passed, we assume it's a ranged attack, short is always straight target #-->
{{#^rollGreater() Roll etarget}}
{{#Graze Damage}}
{{#^rollGreater() Roll egtarget}}
<div class="sheet-key-succ">Extreme Range {{Extreme}} squares Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^rollGreater() Roll egtarget}}
{{#rollGreater() Roll egtarget}}
<div class="sheet-key-succ">Extreme Range {{Extreme}} Graze!</div>
<div class="sheet-value">{{Graze Damage}} Damage</div>
{{/rollGreater() Roll egtarget}}
{{/Graze Damage}}
{{#^Graze Damage}}
<div class="sheet-key-succ">Extreme Range {{Extreme}} squares Successful!</div>
<div class="sheet-value">{{Damage}} Damage</div>
{{/^Graze Damage}}
{{/^rollGreater() Roll etarget}}
{{#rollGreater() Roll etarget}}
<div class="sheet-key-fail">Extreme Range {{Extreme}} squares FAILURE!</div>
<div class="sheet-value">No Damage</div>
{{/rollGreater() Roll etarget}}
{{/Extreme}}
</div>
</div>
</rolltemplate>
So, the logic here is this : If Point Blank is not populated, then this is a melee attack. Don't bother with the ranges or even looking at them, and just do an attack/damage check, simple hit or not hit, no grazing, etc. If Point Blank is populated, then this is a ranged attack. Compare the roll to the target number for each range, and determine if the attack hit at each range, and if so, what damage was done. If Graze Damage is populated, then we have to check to see if it hit or just grazed. If there's no graze damage, then it's just a standard ranged attack, compare at each range. Output should look something like this : (Melee Attack) Attack! Claws! Attack Successful! Damage 18 (Ranged Attack, no Grazing) Attack! Laser Pistol! Point Blank Successful! Damage 18 Short Range 5 squares Successful! Damage 18 Medium Range 20 squares Successful! Damage 18 Long Range 40 squares FAILURE! NO DAMAGE Extreme Range 80 squares FAILURE! NO DAMAGE (Ranged Attack, with Grazing) Attack! Plasma Pistol! Point Blank Successful! Damage 100 Short Range 5 squares Successful! Damage 100 Medium Range 20 squares GRAZED! Damage 40 Long Range 40 squares FAILURE! NO DAMAGE Extreme Range 80 squares FAILURE! NO DAMAGE The above code works just fine for Grazing, that is, if everything is populated, it works exactly like what I expect, if I have a target # for Medium of 50, and a graze # for Medium of 40, and I roll a 45, I get the above message (Success at PB and S, Graze at M, fail at L and E). However, the melee and non-graze don't work. The code in the <#^Graze Damage> and <#^Point Blank> blocks never gets called, even when those fields are not populated because the sheet doesn't have the values. So it doesn't work. As near as I can tell, I've done the ^'s correct (The #^RollGreater() roll target) blocks work just fine. So... what am I missing? Matt