I have run into an issue roll template hiding the roll for some rolls and expanding other rolls. I am using a sheet worker script to set up attack rolls because I want to eventually create multi attack scripts. I am not showing the whole code because its not relevant. The sheet worker code is: var critHit = parseInt(v[prefix+"_crit-target"])||0, critFail = parseInt(v[prefix+"_fail-target"])||0;
var rDMod = parseFloat(v["DMG_ranged-mod"],10) || 0, rDMod2 = parseFloat(v["DMG_ranged2-mod"],10) || 0;
var mDMod = parseFloat(v["DMG-mod"],10) || 0, mDMod2 = parseFloat(v["DMG2-mod"],10) || 0
if (atkType === "0") {attackType="None", buff_DMG_mod=0;}
else if (atkType === "attk-melee") {atkRoll="[[ 1d20cf<"+critFail+"cs>"+critHit+" + @{attk-melee} ]]", attackType="Melee", buff_DMG_mod=mDMod;}
else if (atkType === "attk-melee2") {atkRoll="[[ 1d20cf<"+critFail+"cs>"+critHit+" + @{attk-melee2} ]]", attackType="Melee2", buff_DMG_mod=mDMod2;}
else if (atkType === "attk-ranged") {atkRoll="[[ 1d20cf<"+critFail+"cs>"+critHit+" + @{attk-ranged} ]]", attackType="Ranged", buff_DMG_mod=rDMod;}
else if (atkType === "attk-ranged2") {atkRoll="[[ 1d20cf<"+critFail+"cs>"+critHit+" + @{attk-ranged2} ]]", attackType="Ranged2", buff_DMG_mod=rDMod2;}
else if (atkType === "CMB") {atkRoll="[[ 1d20cf<"+critFail+"cs>"+critHit+" + @{attk-CMB} ]]", attackType="CMB";}
else if (atkType === "CMB2") {atkRoll="[[ 1d20cf<"+critFail+"cs>"+critHit+" + @{attk-CMB2} ]]", attackType="CMB2";}
console.log("ABILITY: Attack Type: " +attackType+ " || Attack Roll " +atkRoll+ " Bonus Damage: " +buff_DMG_mod+ ".");
the atkRoll variable sets an attribute @{attackRoll} When I use that in a roll template sometimes the roll is displayed as text other times its an expanded roll. I wouldn't care except if it is just text then there is no point to having any of the FAIL/CRIT. Because, obviously there is no color distinction. The roll template code is: &{template:35Adv_spell} @{abilOptions} {{name=@{name}}} {{ability_type=@{ability_type}}} {{frequency=@{useDisplay}}} {{school=@{cust-category}}} {{level=@{class-name} @{spell_level}}} {{metamagic=NONE}} {{casting_time=NONE}} {{range=@{rangeDisplay}}} {{target=@{targets}}} {{duration=@{duration}}} {{sr=[[1d20+@{casterlevel}]]}} {{vsSR=@{abil-sr}}} {{saving_throw1=@{save} [[@{savedc}]]}} {{saving_throw2=@{save2} [[@{savedc}]]}} {{extra_details=@{short-description} }} {{spell_description=@{description}}} {{spell_chk=[[{1d100}>@{spell-fail}]] }} {{succeedcheck=You are able to cast!}} {{failcheck= You Fail casting spell!}} {{spl_damage=**Damage:** @{damage-macro-text}}} {{spl_attack=@{attackRoll} / @{attackRoll} / @{attackRoll} / @{attackRoll} }} {{Concentration=[[ [[1d20]]+[[@{Concentration-Mod}]] ]]}} {{conc_def=+[[@{Concentration-0-defensive}]]}} and this is what it looks like: What is causing this problem, and how can I resolve it.