Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Repeating Weapon Fieldset Error in Rolling

1487470087

Edited 1487470385
<fieldset> <table> <tr> <th rowspan="4"><button type="roll" name="weapon_roll" value="&{template:attack}{{character= @{character_name}}}{{weapon= @{Weapon-Name}}}{{attack= [[1d20cs>@{Weapon-Critical} +[[@{Weapon-Attack_Bonus}]] ]]}} {{confirm= [[1d20 +[[@{Weapon-Attack_Bonus}]] ]]}} {{damage= [[@{Weapon-Damage-Dice}d@{Weapon-Damage-Size} + @{Weapon-Damage_bonus} + @{Weapon-Damage_Misc} + @{Weapon-Damage_Mod]]}}{{dmgcrit= [[(@{Weapon-Damage} + @{Weapon-Damage_bonus} + [[@{Weapon-Damage_Misc} + @{Weapon-Damage_Mod]])*@{Weapon-Critical_multiplier}]]}} {{details= @{Weapon-Special_Properties}}}">Weapon</button></th> <th>Name</th> <th>Atk Ttl</th> <th>BAB</th> <th>Bonus</th> <th>Misc</th> <th>Mod</th> <th align="center">Critical</th> <th>Size</th> <th style="width:50px;">SizeB</th> <th>Ammo</th> <th>Max</th> <th>Prof.</th> </tr> <tr> <td><input type="text" name="attr_Weapon-Name" value="" placeholder="Weapon"/></td> <td><input type="number" name="attr_Weapon-Attack_Bonus" value="[[@{Weapon-BAB}+@{Weapon-Attribute}+@{Weapon-Attack_Misc}+@{Weapon-Attack_Mod}+(@{weapon-prof}-4)]]" disabled='true'/></td> <td><input type="number" name="attr_Weapon-BAB" value="@{BAB}" disabled='true'/></td> <td> <select name="attr_Weapon-Attribute" > <option value="@{Strength-mod}" selected>Strength</option> <option value="@{Dexterity-mod}">Dexterity</option> <option value="@{Constitution-mod}">Constitution</option> <option value="@{Intelligence-mod}">Intelligence</option> <option value="@{Wisdom-mod}">Wisdom</option> <option value="@{Charisma-mod}">Charisma</option> </select> </td> <td><input type="number" name="attr_Weapon-Attack_Misc" value="0" style="width:50px;"/></td> <td><input type="number" name="attr_Weapon-Attack_Mod" value="0" style="width:50px;"></td> <td><input type="number" name="attr_Weapon-Critical" value="20" style="width:25px" max="20"/>/×<input type="number" name="attr_Weapon-Critical_multiplier" value="2" min="2" style="width:25px"/></td> <td><input type="text" name="attr_Weapon-Category" value="" placeholder="S/M/L" style="width:50px"></td> <td><input type="number" name="attr_Weapon-Size" value="@{Size}" disabled="true"/></td> <td><input type="number" name="attr_Weapon-Ammo" value="0" style="width:50px"/></td> <td><input type="number" name="attr_Weapon-Ammo-Max" value="floor(@{Clip-Size}/@{Weapon-Use})" style="width:50px" disabled="true"></td> <td align="center"><input type="checkbox" name="attr_weapon-prof" value="4" checked="true"/><span></span></td> </tr> <tr> <td colspan="3"><input type="text" name="attr_Weapon-Special_Properties" value="" style="width:100%"/></td> <td><input type="text" name="attr_Weapon-Damage-Dice" value="1" style="width:20px;"/>d<input type="text" name="attr_Weapon-Damage-Size" value="6" style="width:20px;">+<input type="text" name="attr_Weapon-Total-Damage" value="@{Weapon-Damage_bonus}+@{Weapon-Damage_Misc}+@{Weapon-Damage_Mod}" disabled="true" style="width:20px;"></td> <td colspan="2"><input type="text" name="attr_Weapon-Damage_Type" value="" placeholder="S/B/P etc." style="width:100px"></td> <td> <select name="attr_Weapon-Damage_bonus" style="width:60px;"> <option value="0">None</option> <option value="[[floor(@{Strength-mod}/2)]]">1/2 Str</option> <option value="[[@{Strength-mod}]]" selected>Str</option> <option value="[[floor(@{Strength-mod}*1.5)]]">1 1/2 Str</option> <option value="[[@{Strength-mod}*2]]">2x Str</option> <option value="[[floor(@{Dexterity-mod}/2]]">1/2 Dex</option> <option value="[[@{Dexterity-mod}]]">Dex</option> <option value="[[floor(@{Dexterity-mod}*1.5)]]">1 1/2 Dex</option> <option value="[[@{Dexterity-mod}*2]]">2x Dex</option> </select> </td> <td><input type="text" name="attr_Weapon-Damage_Misc" value="0" style="width:50px;"/></td> <td><input type="text" name="attr_Weapon-Damage_Mod" value="0" style="width:50px;"></td> <td><input type="text" name="attr_Weapon-Range" style="width:50px;"/></td> <td> <select name="attr_Clip-Size" style="width:50px;" > <option value="0" selected>None</option> <option value="25">Sm</option> <option value="50">SmE</option> <option value="50">Md</option> <option value="100">MdE</option> <option value="100">Lg</option> <option value="200">LgE</option> </select> </td> <td> <select name="attr_Weapon-Use" style="width:50px;" > <option value="1" selected>N/A</option> <option value="1">Low</option> <option value="0.5">LHM</option> <option value="2">Med</option> <option value="1">MHM</option> <option value="5">Hi</option> <option value="2.5">HHM</option> </select> </td> </tr> <tr> <th colspan="3">Special Properties</th> <th>Dmg</th> <th colspan="2">Type</th> <th>Bonus</th> <th>Misc</th> <th>Mod</th> <th style="width:50px">Range</th> <th style="width:50px">ECell</th> <th style="width:50px">Usage</th> </tr> </table> </fieldset> Attempting to use this code to roll for a random weapon results in the following messages on Roll 20: No attribute was found for @{Character|Weapon-Damage_Mod]]} No attribute was found for @{Character|Weapon-Damage} No attribute was found for @{Character|Weapon-Damage_Mod]])*@{Weapon-Critical_multiplier} TypeError: d is undefined I'm not sure what I did wrong, nor how to fix it.
I think you're not allowed to use - dashes. You need to use all underscores.
SkyCaptainXIII said: I think you're not allowed to use - dashes. You need to use all underscores. Nope, same error. No attribute was found for @{Character|Weapon-Damage-Mod]]} No attribute was found for @{Character|Weapon-Damage} No attribute was found for @{Character|Weapon-Damage-Mod]])*@{Weapon-Critical_multiplier} TypeError: d is undefined
No dashes. Only underscores.
1487472083

Edited 1487472510
vÍnce
Pro
Sheet Author
Name your fieldsets class="repeating_FOO"  Substitute FOO for a unique name related to the fieldset.  I reccomend lowercase as well.  I have found issues with drag/drop of repeating buttons if not. And I believe you need to also include the longer repeating name when trying to access a repeating attribute from outside the fieldset.  ie @{Character|repeating_FOO_ X _Weapon-Damage-Mod]]} and " X " should be either a row number starting with "$" like $0, or $1. or use the rowid ie @{Character|repeating_FOO_-ks7kzefj9vs3xnn8bwf_Weapon-Damage-Mod]]} The better option is to use the rowid because it won't matter if you rearrange your repating rows.
1487474383

Edited 1487474396
Vince said: Name your fieldsets class="repeating_FOO"  Substitute FOO for a unique name related to the fieldset.  I reccomend lowercase as well.  I have found issues with drag/drop of repeating buttons if not. And I believe you need to also include the longer repeating name when trying to access a repeating attribute from outside the fieldset.  ie @{Character|repeating_FOO_ X _Weapon-Damage-Mod]]} and " X " should be either a row number starting with "$" like $0, or $1. or use the rowid ie @{Character|repeating_FOO_-ks7kzefj9vs3xnn8bwf_Weapon-Damage-Mod]]} The better option is to use the rowid because it won't matter if you rearrange your repating rows. So... if I'm using rowid, I use "$rowid" in the code calling on the attribute?
1487475560

Edited 1487475612
vÍnce
Pro
Sheet Author
No, you would need the actual rowid as generated by roll20 when you create a repeating row.  While not convenient, you can use (right-click)inspect element from your browser to find the rowid of a repeating row. There are sheet worker methods that can get the rowid so that it can be used in sheets calcs, displayed within the repeating section, etc. If you are writing a macro that needs to work across more than just a given character, you probably need to use the more generic "$0".
1487475926

Edited 1487476362
vÍnce
Pro
Sheet Author
My bad.  I just realized your macro is being rolled within the fieldset, so I don't think you need to worry about having the longer repeating name, unless some of those attributes are  coming from another repeating row...  I would try substituting each attribute with a number and see if your roll works.  You can also check each attribute and see if you can pull it's value in chat individually.  That should help isolate the problem attribute or math.
1487476281

Edited 1487476314
vÍnce
Pro
Sheet Author
I think these may be missing something.  ;-} @{Weapon-Damage_Mod]] @{Weapon-Damage_Mod]]
1487478063

Edited 1487478131
Vince said: No, you would need the actual rowid as generated by roll20 when you create a repeating row.  While not convenient, you can use (right-click)inspect element from your browser to find the rowid of a repeating row. There are sheet worker methods that can get the rowid so that it can be used in sheets calcs, displayed within the repeating section, etc. If you are writing a macro that needs to work across more than just a given character, you probably need to use the more generic "$0". Yeah it's for a sheet for all characters, that means I'll have to use the $0 value.  Though I remember seeing that certain repeating rows (namely, the pathfinder one) uses the value $X.  Does that do anything?
1487479354
vÍnce
Pro
Sheet Author
Did you fix the missing " } " in your macro? On the PF sheet, we just use " $X " whenever we display a repeating attribute.  The X portion is going to be dependant on the actual row number.  Repeating rows start at "0".  But, anywhere you can use a row number, you can also use a rowid.  So when creating macros tied to a particular attack for example, it will not matter if you rearrange your rows into a different order, your macro will always know which attack to pull the attributes from.  On the other hand, using $X, your macro will only pull data from that row.  That may not matter, but it might. 
Vince said: Did you fix the missing " } " in your macro? On the PF sheet, we just use " $X " whenever we display a repeating attribute.  The X portion is going to be dependant on the actual row number.  Repeating rows start at "0".  But, anywhere you can use a row number, you can also use a rowid.  So when creating macros tied to a particular attack for example, it will not matter if you rearrange your rows into a different order, your macro will always know which attack to pull the attributes from.  On the other hand, using $X, your macro will only pull data from that row.  That may not matter, but it might.  Ah, I'll fix that missing bracket. I am modifying the modern d20 base sheet to fit within the setting I am making for my players.  It's a KotoR Setting, so certain attributes have to be added to the weapons.  Is a 3rd party macro or API tweaking required to do this $X macro?
1487485842

Edited 1487485996
Okay so after fixing the broken brackets, I'm getting a different strange error.  Rather, I need to figure out how to allow players to set the number of dice and sizes of the dice rolled.  I tried to do it, but it came out wierd.  Instead of rolling it simply shows it as text "1d8" instead of a generated roll of 1d8: Character attacks with Lightsaber Attack 5 Damage 1D8 +[[2 + 0 + 0] These should both show up as singular numbers, but the damage seems to have an error I don't know how to fix.
1487486424

Edited 1487486535
vÍnce
Pro
Sheet Author
Nothing special is needed.  It's simply part of the "address" of the repeating attribute you are trying to reach.  For example, in your code above, if your fieldset was called class="repeating_weapons" and you had an attribute called "attr_name".  In order to get the value for name, I can't just use @{name} in my macro and expect the system will magically know which name I'm wanting, so  you need to get specific. @{selected|repeating_weapons_$0_name}  "repeating_weapons_$0" is what makes things very specific as to what exact name I want.  As mentioned earlier, $X row is ok for many things since it just target the row, but substituting a rowid gets even more specific, since it targets the exact repeating attribute regardless of where that row ends up. Rowid's are generated by the system when you create a row and add attribute data to it. If you know how to use javascript, you can wrestle with sheet workers to make use of rowid's.  I'm still not hi enough level to know that magic yet.  ;-)
Okay so I fixed all of the errors on display, everything is rolling correctly.  However, when I attempt to add a second weapon to the list and roll that.  I get this: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but end of input found.
1487487173

Edited 1487487276
Vince said: Nothing special is needed.  It's simply part of the "address" of the repeating attribute you are trying to reach.  For example, in your code above, if your fieldset was called class="repeating_weapons" and you had an attribute called "attr_name".  In order to get the value for name, I can't just use @{name} in my macro and expect the system will magically know which name I'm wanting, so  you need to get specific. @{selected|repeating_weapons_$0_name}  "repeating_weapons_$0" is what makes things very specific as to what exact name I want.  As mentioned earlier, $X row is ok for many things since it just target the row, but substituting a rowid gets even more specific, since it targets the exact repeating attribute regardless of where that row ends up. Rowid's are generated by the system when you create a row and add attribute data to it. If you know how to use javascript, you can wrestle with sheet workers to make use of rowid's.  I'm still not hi enough level to know that magic yet.  ;-) Okay... forgive me this is all a bit confusing I've never worked with repeating Fieldsets before. when I write the macro for rolling, instead of every attribute called upon in the macro, I have to replace them with @{selected|repeating_weapons_$0_name} with "name" being replaced by the attribute's name?
1487487939

Edited 1487488061
vÍnce
Pro
Sheet Author
If you are doing math(or a macro) within the confines of the <fieldset>YOU ARE HERE</fieldset> you don't need the longer repeating name.  If you are outside the fieldset, <fieldset></fieldset>YOU ARE HERE, you will need to use the longer repeating name to reference those attributes that exist within the fieldset.  Also, always include a class name when you create a fieldset.  It must begin "repeating_..."  example class="repeating_NAME OF YOUR FIELDSET"  If you are still having problems paste your updated code and make sure to use a code box when you post code.   The forums have a tendency to eat code.  ;-(
I see. Okay, then.  I am still getting the error from attempting to place additional weapons within the repeating list. Here's the full code of the Repeating Fieldset.  It works perfectly with the first weapon, but any other weapons won't work. <fieldset class="repeating_weapons">         <table class="sheet-tableII">             <tr>                 <th rowspan="4"><button type="roll" class="sheet-weapon" name="weapon_roll" value="&{template:attack}{{character= @{character_name}}}{{weapon= @{Weapon-Name}}}{{attack= [[1d20cs>@{Weapon-Critical} +[[@{Weapon-Attack_Bonus}]] ]]}} {{confirm= [[1d20 +[[@{Weapon-Attack_Bonus}]] ]]}} {{damage= [[@{Weapon-Damage-Dice}d@{Weapon-Damage-Size} + @{Weapon-Damage_bonus} + @{Weapon-Damage-Misc} + @{Weapon-Damage-Mod}]]}}{{dmgcrit= [[(@{Weapon-Damage-Dice}d@{Weapon-Damage-Size} + @{Weapon-Damage_bonus} + @{Weapon-Damage-Misc} + @{Weapon-Damage-Mod})*(@{Weapon-Critical_multiplier}-1)]]}} {{details= @{Weapon-Special_Properties}}}">Weapon</button></th>                 <th class="sheet-heading">Name</th>                 <th class="sheet-heading">Atk Ttl</th>                 <th class="sheet-heading">BAB</th>                 <th class="sheet-heading">Bonus</th>                 <th class="sheet-heading">Misc</th>                 <th class="sheet-heading">Mod</th>                 <th class="sheet-heading" align="center">Critical</th>                 <th class="sheet-heading">Size</th>                 <th class="sheet-heading" style="width:50px;">SizeB</th>                 <th class="sheet-heading">Ammo</th>                 <th class="sheet-heading">Max</th>                 <th class="sheet-heading">Prof.</th>             </tr>             <tr>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Name" value="" placeholder="Weapon"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Attack_Bonus" value="[[@{Weapon-BAB}+@{Weapon-Attribute}+@{Weapon-Attack_Misc}+@{Weapon-Attack_Mod}+(@{weapon-prof}-4)]]" disabled='true'/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-BAB" value="@{BAB}" disabled='true'/></td>                 <td>                     <select class="sheet-number" name="attr_Weapon-Attribute" >                         <option value="@{Strength-mod}" selected>Strength</option>                         <option value="@{Dexterity-mod}">Dexterity</option>                         <option value="@{Constitution-mod}">Constitution</option>                         <option value="@{Intelligence-mod}">Intelligence</option>                         <option value="@{Wisdom-mod}">Wisdom</option>                         <option value="@{Charisma-mod}">Charisma</option>                     </select>                 </td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Attack-Misc" value="0" style="width:50px;"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Attack-Mod" value="0" style="width:50px;"></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Critical" value="20" style="width:25px" max="20"/>/×<input type="number" class="sheet-number" name="attr_Weapon-Critical_multiplier" value="2" min="2" style="width:25px"/></td>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Category" value="" placeholder="S/M/L" style="width:50px"></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Size" value="@{Size}" disabled="true"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Ammo" value="0"  style="width:50px"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Ammo-Max" value="floor(@{Clip-Size}/@{Weapon-Use})" style="width:50px" disabled="true"></td>                 <td align="center"><input type="checkbox" class="sheet-bigcheck" name="attr_weapon-prof" value="4" checked="true"/><span></span></td>             </tr>             <tr>                 <td colspan="3"><input type="text" class="sheet-number" name="attr_Weapon-Special_Properties" value="" style="width:100%"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Damage-Dice" value="1" style="width:20px;"/>d<input type="number" class="sheet-number" name="attr_Weapon-Damage-Size" value="6" style="width:20px;">+<input type="text" class="sheet-number" name="attr_Weapon-Total-Damage" value="@{Weapon-Damage_bonus}+@{Weapon-Damage_Misc}+@{Weapon-Damage_Mod}" disabled="true" style="width:20px;"></td>                 <td colspan="2"><input type="text" class="sheet-number" name="attr_Weapon-Damage_Type" value="" placeholder="S/B/P etc." style="width:100px"></td>                 <td>                     <select class="sheet-number" name="attr_Weapon-Damage_bonus" style="width:60px;">                         <option value="0">None</option>                         <option value="[[floor(@{Strength-mod}/2)]]">1/2 Str</option>                         <option value="[[@{Strength-mod}]]" selected>Str</option>                         <option value="[[floor(@{Strength-mod}*1.5)]]">1 1/2 Str</option>                         <option value="[[@{Strength-mod}*2]]">2x Str</option>                         <option value="[[floor(@{Dexterity-mod}/2]]">1/2 Dex</option>                         <option value="[[@{Dexterity-mod}]]">Dex</option>                         <option value="[[floor(@{Dexterity-mod}*1.5)]]">1 1/2 Dex</option>                         <option value="[[@{Dexterity-mod}*2]]">2x Dex</option>                     </select>                 </td>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Damage-Misc" value="0" style="width:50px;"/></td>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Damage-Mod" value="0" style="width:50px;"></td>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Range" style="width:50px;"/></td>                 <td>                     <select class="sheet-number" name="attr_Clip-Size" style="width:50px;" >                         <option value="0" selected>None</option>                         <option value="25">Sm</option>                         <option value="50">SmE</option>                         <option value="50">Md</option>                         <option value="100">MdE</option>                         <option value="100">Lg</option>                         <option value="200">LgE</option>                     </select>                 </td>                 <td>                     <select class="sheet-number" name="attr_Weapon-Use" style="width:50px;" >                         <option value="1" selected>N/A</option>                         <option value="1">Low</option>                         <option value="0.5">LHM</option>                         <option value="2">Med</option>                         <option value="1">MHM</option>                         <option value="5">Hi</option>                         <option value="2.5">HHM</option>                     </select>                 </td>             </tr>             <tr>                 <th class="sheet-heading" colspan="3">Special Properties</th>                 <th class="sheet-heading">Dmg</th>                 <th colspan="2" class="sheet-heading">Type</th>                 <th class="sheet-heading">Bonus</th>                 <th class="sheet-heading">Misc</th>                 <th class="sheet-heading">Mod</th>                 <th class="sheet-heading" style="width:50px">Range</th>                 <th class="sheet-heading" style="width:50px">ECell</th>                 <th class="sheet-heading" style="width:50px">Usage</th>             </tr>         </table>     </fieldset>
1487489796
vÍnce
Pro
Sheet Author
Go through each attribute and make sure it's setup properly.  Once you verify you can bring the value up in chat, move on to your formulas.  Usually an attribute isn't setup correctly or there is a syntax error in your code or formulas.
1487493200

Edited 1487493389
vÍnce
Pro
Sheet Author
Once I added some missing attributes, the rolls started working for me.  I had to substitute roll20's default template to see the results. I manually added Strength and Dexterity as well.  Not sure if you had all of these created from other code on your sheet or not.
1487658093

Edited 1487658102
Which missing attributes are you talking about? I can't seem to identify them.
1487658419

Edited 1487658469
vÍnce
Pro
Sheet Author
The four I had to manually add to the attributes list (see image above).  They were not included in the code you provided.  I assume they are located somewhere else in your code.  Anyhow, once I had the "missing" attributes, your roll worked.
Vince said: The four I had to manually add to the attributes list (see image above).  They were not included in the code you provided.  I assume they are located somewhere else in your code.  Anyhow, once I had the "missing" attributes, your roll worked. Hmm.... so the two different weapons do work.  Perhaps there was just an error in my own conduct where I forgot to refresh the campaign page to get the updates to the sheet.  I'll see what happens.  Thanks for your help thus far :3
1487665921

Edited 1487666196
Black.k.9 said: Vince said: The four I had to manually add to the attributes list (see image above).  They were not included in the code you provided.  I assume they are located somewhere else in your code.  Anyhow, once I had the "missing" attributes, your roll worked. Hmm.... so the two different weapons do work.  Perhaps there was just an error in my own conduct where I forgot to refresh the campaign page to get the updates to the sheet.  I'll see what happens.  Thanks for your help thus far :3 Unfortunately it still doesn't work, I haven't changed anything in the code yet: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but end of input found. This is the error I get when I attempt to roll the second weapon, or any other weapons for that matter.  I have no idea what's going on :'(
1487668083
vÍnce
Pro
Sheet Author
Here's the code that works  for me (I did make some adjustment: change the Weapon-Attack_Bonus macro... some other small changes as well.  Sorry I forget what exactly was done.  It was late.  lol)  and I assume you have accounted for the attributes I mentioned previously.  Anyway, try this. <fieldset class="repeating_weapons">         <table class="sheet-tableII">             <tr>                 <th rowspan="4"><button type="roll" class="sheet-weapon" name="weapon_roll" value="&{template:attack}{{character= @{character_name}}}{{weapon= @{Weapon-Name}}}{{attack= [[1d20cs>@{Weapon-Critical} +[[@{Weapon-Attack_Bonus}]] ]]}} {{confirm= [[1d20 +[[@{Weapon-Attack_Bonus}]] ]]}} {{damage= [[@{Weapon-Damage-Dice}d@{Weapon-Damage-Size} + @{Weapon-Damage_bonus} + @{Weapon-Damage-Misc} + @{Weapon-Damage-Mod}]]}}{{dmgcrit= [[(@{Weapon-Damage-Dice}d@{Weapon-Damage-Size} + @{Weapon-Damage_bonus} + @{Weapon-Damage-Misc} + @{Weapon-Damage-Mod})*(@{Weapon-Critical_multiplier}-1)]]}} {{details= @{Weapon-Special_Properties}}}">Weapon</button></th>                 <th class="sheet-heading">Name</th>                 <th class="sheet-heading">Atk Ttl</th>                 <th class="sheet-heading">BAB</th>                 <th class="sheet-heading">Bonus</th>                 <th class="sheet-heading">Misc</th>                 <th class="sheet-heading">Mod</th>                 <th class="sheet-heading" align="center">Critical</th>                 <th class="sheet-heading">Size</th>                 <th class="sheet-heading" style="width:50px;">SizeB</th>                 <th class="sheet-heading">Ammo</th>                 <th class="sheet-heading">Max</th>                 <th class="sheet-heading">Prof.</th>             </tr>             <tr>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Name" value="" placeholder="Weapon"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Attack_Bonus" value="[[ @{Weapon-BAB} + @{Weapon-Attribute} + @{Weapon-Attack_Misc} + @{Weapon-Attack_Mod} + @{weapon-prof}-4 ]]" disabled='true'/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-BAB" value="@{BAB}" disabled='true'/></td>                 <td>                     <select class="sheet-number" name="attr_Weapon-Attribute" >                         <option value="@{Strength-mod}" selected>Strength</option>                         <option value="@{Dexterity-mod}">Dexterity</option>                         <option value="@{Constitution-mod}">Constitution</option>                         <option value="@{Intelligence-mod}">Intelligence</option>                         <option value="@{Wisdom-mod}">Wisdom</option>                         <option value="@{Charisma-mod}">Charisma</option>                     </select>                 </td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Attack-Misc" value="0" style="width:50px;"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Attack-Mod" value="0" style="width:50px;"></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Critical" value="20" style="width:25px" max="20"/>/×<input type="number" class="sheet-number" name="attr_Weapon-Critical_multiplier" value="2" min="2" style="width:25px"/></td>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Category" value="" placeholder="S/M/L" style="width:50px"></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Size" value="@{Size}" disabled="true"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Ammo" value="0"  style="width:50px"/></td>                 <td><input type="number" class="sheet-number" name="attr_Weapon-Ammo-Max" value="floor(@{Clip-Size}/@{Weapon-Use})" style="width:50px" disabled="true"></td>                 <td align="center"><input type="checkbox" class="sheet-bigcheck" name="attr_weapon-prof" value="4" checked="true"/><span></span></td>             </tr>             <tr>                 <td colspan="3"><input type="text" class="sheet-number" name="attr_Weapon-Special_Properties" value="" style="width:100%"/></td>                 <td> <input type="number" class="sheet-number" name="attr_Weapon-Damage-Dice" value="1" style="width:20px;"/>d <input type="number" class="sheet-number" name="attr_Weapon-Damage-Size" value="6" style="width:20px;">+ <input type="text" class="sheet-number" name="attr_Weapon-Total-Damage" value="( @{Weapon-Damage_bonus} + @{Weapon-Damage_Misc} + @{Weapon-Damage_Mod} )" disabled="true" style="width:20px;"></td>                 <td colspan="2"> <input type="text" class="sheet-number" name="attr_Weapon-Damage_Type" value="" placeholder="S/B/P etc." style="width:100px;"></td>                 <td>                     <select class="sheet-number" name="attr_Weapon-Damage_bonus" style="width:60px;">                         <option value="0">None</option>                         <option value="[[floor(@{Strength-mod}/2)]]">1/2 Str</option>                         <option value="[[@{Strength-mod}]]" selected>Str</option>                         <option value="[[floor(@{Strength-mod}*1.5)]]">1 1/2 Str</option>                         <option value="[[@{Strength-mod}*2]]">2x Str</option>                         <option value="[[floor(@{Dexterity-mod}/2]]">1/2 Dex</option>                         <option value="[[@{Dexterity-mod}]]">Dex</option>                         <option value="[[floor(@{Dexterity-mod}*1.5)]]">1 1/2 Dex</option>                         <option value="[[@{Dexterity-mod}*2]]">2x Dex</option>                     </select>                 </td>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Damage-Misc" value="0" style="width:50px;"/></td>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Damage-Mod" value="0" style="width:50px;"></td>                 <td><input type="text" class="sheet-number" name="attr_Weapon-Range" style="width:50px;"/></td>                 <td>                     <select class="sheet-number" name="attr_Clip-Size" style="width:50px;" >                         <option value="0" selected>None</option>                         <option value="25">Sm</option>                         <option value="50">SmE</option>                         <option value="50">Md</option>                         <option value="100">MdE</option>                         <option value="100">Lg</option>                         <option value="200">LgE</option>                     </select>                 </td>                 <td>                     <select class="sheet-number" name="attr_Weapon-Use" style="width:50px;" >                         <option value="1" selected>N/A</option>                         <option value="1">Low</option>                         <option value="0.5">LHM</option>                         <option value="2">Med</option>                         <option value="1">MHM</option>                         <option value="5">Hi</option>                         <option value="2.5">HHM</option>                     </select>                 </td>             </tr>             <tr>                 <th class="sheet-heading" colspan="3">Special Properties</th>                 <th class="sheet-heading">Dmg</th>                 <th colspan="2" class="sheet-heading">Type</th>                 <th class="sheet-heading">Bonus</th>                 <th class="sheet-heading">Misc</th>                 <th class="sheet-heading">Mod</th>                 <th class="sheet-heading" style="width:50px">Range</th>                 <th class="sheet-heading" style="width:50px">ECell</th>                 <th class="sheet-heading" style="width:50px">Usage</th>             </tr>         </table>     </fieldset>