I am getting closer to completing the template. Granted nothing can be done (yet? ever?) about SELECT OPTION value attributes having different values than the internationalization attributes, that is a topic for another time. Here is where it stands: &{template:pc} {{type=attackdamage}} {{showchar=[[1]]}} {{charname=@{character_name}} {{name=@{repeating_attacks_$0_atkname}} {{atkvs=(^{@{repeating_attacks_$0_atktype}} vs ^{@{repeating_attacks_$0_atkvs}})}} {{attack=1}} {{damage=1}} {{dmg1flag=1}} {{roll=[[1d20cs>@{repeating_attacks_$0_atkcritrange}+@{melee_mod}[Melee]+0@{repeating_attacks_$0_atkmod}[MOD]+@{rollmod_attack}[BONUS]]]}} {{critconfirm=[[1d20cs>@{repeating_attacks_$0_atkcritrange}+@{melee_mod}[Melee]+0@{repeating_attacks_$0_atkmod}[MOD]+@{rollmod_attack}[BONUS]]]}} {{dmg1=[[@{repeating_attacks_$0_dmgbase}+@{strength_mod}[STR]+0@{repeating_attacks_$0_dmgmod}[MOD]+@{rollmod_damage}[BONUS]]]}} {{dmg1crit=[[(@{repeating_attacks_$0_dmgbase}+@{repeating_attacks_$0_dmgbase})+((@{strength_mod}[STR]+0@{repeating_attacks_$0_dmgmod}[MOD]+@{rollmod_damage}[BONUS])*2)]]}} {{dmg1type=@{repeating_attacks_$0_dmgtype}}} Or by line: &{template:pc}
{{type=attackdamage}}
{{showchar=[[1]]}}
{{charname=@{character_name}}
{{name=@{repeating_attacks_$0_atkname}}
{{atkvs=(^{@{repeating_attacks_$0_atktype}} vs ^{@{repeating_attacks_$0_atkvs}})}}
{{attack=1}}
{{damage=1}}
{{dmg1flag=1}}
{{roll=[[1d20cs>@{repeating_attacks_$0_atkcritrange}+@{melee_mod}[Melee]+0@{repeating_attacks_$0_atkmod}[MOD]+@{rollmod_attack}[BONUS]]]}}
{{critconfirm=[[1d20cs>@{repeating_attacks_$0_atkcritrange}+@{melee_mod}[Melee]+0@{repeating_attacks_$0_atkmod}[MOD]+@{rollmod_attack}[BONUS]]]}}
{{dmg1=[[@{repeating_attacks_$0_dmgbase}+@{strength_mod}[STR]+0@{repeating_attacks_$0_dmgmod}[MOD]+@{rollmod_damage}[BONUS]]]}}
{{dmg1crit=[[(@{repeating_attacks_$0_dmgbase}+@{repeating_attacks_$0_dmgbase})+((@{strength_mod}[STR]+0@{repeating_attacks_$0_dmgmod}[MOD]+@{rollmod_damage}[BONUS])*2)]]}}
{{dmg1type=@{repeating_attacks_$0_dmgtype}}}
My next stumbling block is dmg1crit . I can only guess that, for the character sheet (and by extension, %{selected|repeating_attacks_$id_damage} ,), a script takes @{repeating_attacks_$0_dmgbase} , and repeats it a number of times equal to @{repeating_attacks_$0_dmgcritmulti} and joins it on the " + " character. It then takes applicable modifiers and multiplies it by @{repeating_attacks_$0_dmgcritmulti} . This is how we arrive at: Full keys left out for brevity: ( ( dmgbase + dmgbase ) + (
(ABILITY_mod + dmgmod + query_mod)
*
dmgcritmulti
) + (
dmgbonusdice ) ) While we can automate the modifiers, we can't automate @{repeating_attacks_$id_dmgbase} ... that I know of. If dice count and dice sides were separate fields, then it would be easy with computed rolls : (
(
(@{dmgbase_COUNT} * @{dmgcritmulti})d(@{dmgbase_SIDES})
)
+
(
(ABILITY_mod + dmgmod + query_mod)
*
dmgcritmulti
)
+
(
dmgbonusdice
)
) But taking this approach would mean a change to every field in the character sheet that is used for rolls require two fields instead of one, which makes for a slightly less clean / slightly more noisy user experience. One of the main features of this character sheet is how clean and simple it is, so I wouldn't want to take away from that. [FEATURE REQUEST] My suggestion to tackle this would have to be a hidden computed field. If our base damage is 2d6, it would return either "4d6" or "(2d6+2d6)" if the critical multiplier were 2. "6d6" or "(2d6+2d6+2d6)" if the multiplier were 3, and so on. I don't think using two separate fields, one for dice count, another for dice sides, would create a better user experience. [FEATURE REQUEST] a hidden field for ability modifiers. The HTML is as follows: <select class="sheet-underlined sheet-dmg" name="attr_dmgattr" title="@{repeating_attacks_$id_dmgattr}">
<option value="strength" selected="selected" data-i18n="str-u">STR</option>
<option value="strength_oneandahalf" data-i18n="str-two-handed">STR (Two-Handed)</option>
<option value="strength_half" data-i18n="str-off-hand">STR (Off-Hand)</option>
<option value="dexterity" data-i18n="dex-u">DEX</option>
<option value="constitution" data-i18n="con-u">CON</option>
<option value="intelligence" data-i18n="int-u">INT</option>
<option value="wisdom" data-i18n="wis-u">WIS</option>
<option value="charisma" data-i18n="cha-u">CHA</option>
<option value="0">-</option>
</select>
My first thought was to try to create a computed attribute reference by appending "_mod" to an option's value attribute, but that failed. This would likely create an error with the "- (0)" option. @{(strength_oneandahalf)_mod} results in " No attribute was found for @{Valeros |(strength_oneandahalf)_mod} ". perhaps another attribute on the options could be added "data-resolved". Where value is a key that may be used by a script, a computed attribute for select boxes could return a resolved value or an attribute that could be used. @{repeating_attacks_$id_dmgattr_resolved} would be equal to the value of whatever value was selected for @{repeating_attacks_$id_dmgattr} : STR === @{strength_mod} STR (Two-Handed) === @{strength_oneandahalf_mod} STR (Off-Hand) === @{strength_half_mod} DEX === @{dexterity_mod} CON === @{constitution_mod} INT === @{intelligence_mod} WIS === @{wisdom_mod} CHA === @{charisma_mod} - === 0 But we have a different problem... what about things like two handed weapons of off hand weapons that can use DEX? There is no modifier for that. Agile enchanted weapons and Unchained Rogues are the first things that come to mind. Though I suppose that is a problem for another time. If there is an existing solution for resolving critical damage dice or ability modifiers, please let me know!