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

Custom Sheet Question

I am creating a custom character sheet using the Custom Sheet Sandbox. I am just working on the HTML now and I am running into a problem that I can't seem to resolve. The Calculated Attributes are not populating in the list of Attributed & Abilities. Any help would be appreciated. Here is my HTML. (Calculated attributes are in BOLD) <p> <table width="750"> <tr> <td colspan="5"><h3>Physical Characteristics</h3></td> <td width="50px" style="text-align:Left"> </td> <td colspan="5"><h3>Mental Characteristics</h3></td></tr> <tr> <td width="150px"> </td> <td width="50px" style="text-align:Left"><b>Base</b></td> <td width="50px" style="text-align:Left"><b>XP</b></td> <td width="50px" style="text-align:Left"><b>Adjust</b></td> <td width="50px" style="text-align:Left"><b>Total</b></td> <td width="50px" style="text-align:Left"> </td> <td width="150px"> </td> <td width="50px" style="text-align:Left"><b>Base</b></td> <td width="50px" style="text-align:Left"><b>XP</b></td> <td width="50px" style="text-align:Left"><b>Adjust</b></td> <td width="50px" style="text-align:Left"><b>Total</b></td> </tr> <tr> <td> <button type="roll" value="/roll 1d100 - @{Strength_total}" name="roll_StrengthfCheck"></button> <b>Strength</b></td> <td style="text-align:Left"><input type="number" name="attr_Strength_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Strength_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Strength_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Strength_total " width="50" value="((@{Strength_base}*5)+@{Strength_xp}+@{Strength_adjust})" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Intellect</b></td> <td style="text-align:Left"><input type="number" name="attr_Intellect_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Intellect_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Intellect_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Intellect_total " width="50" value="(@{Intellect_base}+@{Intellect_xp}+@{Intellect_adjust})" disabled="true" /></td> </tr> <tr> <td><b>Agility</b></td> <td style="text-align:Left"><input type="number" name="attr_Agility_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Agility_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Agility_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Agility_total " width="50" value="(@{Agility_base}+@{Agility_xp}+@{Agility_adjust})" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Wisdom</b></td> <td style="text-align:Left"><input type="number" name="attr_Wisdom_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Wisdom_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Wisdom_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Wisdom_total " width="50" value="(@{Wisdom_base}+@{Wisdom_xp}+@{Wisdom_adjust})" disabled="true" /></td> </tr> <tr> <td><b>Appearance</b></td> <td style="text-align:Left"><input type="number" name="attr_Appearance_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Appearance_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Appearance_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Appearance_total " width="50" value="(@{Appearance_base}+@{Appearance_xp}+@{Appearance_adjust})" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Presence</b></td> <td style="text-align:Left"><input type="number" name="attr_Presence_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Presence_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Presence_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Presence_total " width="50" value="(@{Presence_base}+@{Presence_xp}+@{Presence_adjust})" disabled="true" /></td> </tr> <tr> <td><b>Constitution</b></td> <td style="text-align:Left"><input type="number" name="attr_Constitution_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Constitution_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Constitution_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Constitution_total " width="50" value="(@{Constitution_base}+@{Constitution_xp}+@{Constitution_adjust})" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Willpower</b></td> <td style="text-align:Left"><input type="number" name="attr_Willpower_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Willpower_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Willpower_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Willpower_total " width="50" value="(@{Willpower_base}+@{Willpower_xp}+@{Willpower_adjust})" disabled="true" /></td> </tr> <tr> <td width="50px" colspan="11" style="text-align:Left"> </td> </tr> <tr> <td colspan="5"><h3>Mystical Characteristics</h3></td> <td width="50px" style="text-align:Left"> </td> <td colspan="5"><h3>Sensory Characteristics</h3></td></tr> <tr> <td width="150px"> </td> <td width="50px" style="text-align:Left"><b>Base</b></td> <td width="50px" style="text-align:Left"><b>XP</b></td> <td width="50px" style="text-align:Left"><b>Adjust</b></td> <td width="50px" style="text-align:Left"><b>Total</b></td> <td width="50px" style="text-align:Left"> </td> <td width="150px"> </td> <td width="50px" style="text-align:Left"><b>Base</b></td> <td width="50px" style="text-align:Left"><b>XP</b></td> <td width="50px" style="text-align:Left"><b>Adjust</b></td> <td width="50px" style="text-align:Left"><b>Total</b></td> </tr> <tr> <td><b>Mana</b></td> <td style="text-align:Left"><input type="number" name="attr_Mana_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Mana_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Mana_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Mana_total " width="50" value="(@{Mana_base}+@{Mana_xp}+@{Mana_adjust})" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Vision</b></td> <td style="text-align:Left"><input type="number" name="attr_Vision_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Vision_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Vision_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Vision_total " width="50" value="(@{Vision_base}+@{Vision_xp}+@{Vision_adjust})" disabled="true" /></td> </tr> <tr> <td><b>Attunement</b></td> <td style="text-align:Left"><input type="number" name="attr_Attunement_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Attunement_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Attunement_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Attunement_total " width="50" value="(@{Attunement_base}+@{Attunement_xp}+@{Attunement_adjust})" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Hearing</b></td> <td style="text-align:Left"><input type="number" name="attr_Hearing_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Hearing_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Hearing_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Hearing_total " width="50" value="(@{Hearing_base}+@{Hearing_xp}+@{Hearing_adjust})" disabled="true" /></td> </tr> <tr> <td><b>Aura</b></td> <td style="text-align:Left"><input type="number" name="attr_Aura_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Aura_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Aura_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Aura_total " width="50" value="(@{Aura_base}+@{Aura_xp}+@{Aura_adjust})" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Smell/Taste</b></td> <td style="text-align:Left"><input type="number" name="attr_SmellTaste_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_SmellTaste_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_SmellTaste_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_SmellTaste_total " width="50" value="(@{SmellTaste_base}+@{SmellTaste_xp}+@{SmellTaste_adjust})" disabled="true" /></td> </tr> <tr> <td><b>Spirit</b></td> <td style="text-align:Left"><input type="number" name="attr_Spirit_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Spirit_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Spirit_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Spirit_total " width="50" value="(@{Spirit_base}+@{Spirit_xp}+@{Spirit_adjust})" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Voice</b></td> <td style="text-align:Left"><input type="number" name="attr_Voice_base" width="50" value="10" /></td> <td style="text-align:Left"><input type="number" name="attr_Voice_xp" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name="attr_Voice_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Voice_total " width="50" value="(@{Voice_base}+@{Voice_xp}+@{Voice_adjust})" disabled="true" /></td> </tr> <tr> <td width="50px" colspan="11" style="text-align:Left"> </td> </tr> <tr> <td colspan="11"><h3>Calculated Characteristics</h3></td> <tr> <td width="150px"> </td> <td width="50px" style="text-align:Left"><b>Base</b></td> <td width="50px" style="text-align:Left"><b> </b></td> <td width="50px" style="text-align:Left"><b>Adjust</b></td> <td width="50px" style="text-align:Left"><b>Total</b></td> <td width="50px" style="text-align:Left"> </td> <td width="150px"> </td> <td width="50px" style="text-align:Left"><b>Base</b></td> <td width="50px" style="text-align:Left"><b> </b></td> <td width="50px" style="text-align:Left"><b>Adjust</b></td> <td width="50px" style="text-align:Left"><b>Total</b></td> </tr> <tr> <td><b>Initiative Bonus</b></td> <td style="text-align:Left"><input type="number" name=" attr_InitiativeBonus_base " width="50" value="(@{Agility_total}+@{Intellect_total})/2" disabled="true" /></td> <td style="text-align:Left"> </td> <td style="text-align:Left"><input type="number" name="attr_InitiativeBonus_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_InitiativeBonus_total " width="50" value="@{InitiativeBonus_base}+@{InitiativeBonus_adjust}" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Move Rate</b></td> <td style="text-align:Left"><input type="number" name="attr_MoveRate_base" width="50" value="30" /></td> <td style="text-align:Left"> </td> <td style="text-align:Left"><input type="number" name="attr_MoveRate_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_MoveRate_total " width="50" value="@{MoveRate_base}+@{MoveRate_adjust}" disabled="true" /></td> </tr> <tr> <td><b>Action Points</b></td> <td style="text-align:Left"><input type="number" name=" attr_ActionPoints_base " width="50" value="floor(1+((@{Agility_total}+@{Intellect_total})/10))" disabled="true" /></td> <td style="text-align:Left"> </td> <td style="text-align:Left"><input type="number" name="attr_ActionPoints_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_ActionPoints_total " width="50" value="@{ActionPoints_base}+@{ActionPoints_adjust}" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Wound Threshold</b></td> <td style="text-align:Left"><input type="number" name=" attr_WoundThreshold_base " width="50" value="floor(2+((@{Constitution_total}+@{Willpower_total})/5))" disabled="true" /></td> <td style="text-align:Left"> </td> <td style="text-align:Left"><input type="number" name="attr_WoundThreshold_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_WoundThreshold_total " width="50" value="@{WoundThreshold_base}+@{WoundThreshold_adjust}" disabled="true" /></td> </tr> <tr> <td><b>Damage Bonus</b></td> <td style="text-align:Left"><input type="number" name=" attr_DamageBonus_base " width="50" value="floor(@{Strength_total}/5)" disabled="true" /></td> <td style="text-align:Left"> </td> <td style="text-align:Left"><input type="number" name="attr_DamageBonus_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_DamageBonus_total " width="50" value="@{DamageBonus_base}+@{DamageBonus_adjust}" disabled="true" /></td> <td width="50px" style="text-align:Left"> </td> <td><b>Luck Points</b></td> <td style="text-align:Left"><input type="number" name=" attr_Luck_base " width="50" value="floor(5+(@{Strength_base}+@{Agility_base}+@{Appearance_base}+@{Constitution_base}+@{Intellect_base}+@{Wisdom_base}+@{Presence_base}+@{Willpower_base}+@{Mana_base}+@{Attunement_base}+@{Aura_base}+@{Spirit_base}+@{Vision_base}+@{Hearing_base}+@{SmellTaste_base}+@{Voice_base}-160)/40)" disabled="true" /></td> <td style="text-align:Left"> </td> <td style="text-align:Left"><input type="number" name="attr_Luck_adjust" width="50" value="0" /></td> <td style="text-align:Left"><input type="number" name=" attr_Luck_total " width="50" value="(@{Luck_base}+@{Luck_adjust})" disabled="true" /></td> </tr> </table> </p>
1659865165
GiGs
Pro
Sheet Author
API Scripter
First thing to know: I'm guessing you aren't seeing the AutoCalc stats (those with disabled="true") and thinking there is a problem. That's not a problem - many attributes will never show up on that list, and autocalcs are among them. The attributes list on the Atributes &amp; Abilities tab should be completely ignored when making a character sheet (or using one, for that matter). It dates from a time before character sheets existed, and is intended for games where no character sheet is used. Second thing to know You are using tables for layout. Roll20 will summarily reject any sheet using tables for layout. There is no possible appeal. So if you are planning to share this sheet outrside your own campaign, ypu;ll need to remove those tables. As it happens, CSS grid is actually easier to use than tables, and takes less code. You can learn about that here: <a href="https://cybersphere.me/css-grid/" rel="nofollow">https://cybersphere.me/css-grid/</a>
Thanks, GiGs - I didn't realize that the Attributes &amp; Ability Tab should be ignored. But, how does that work with Macros? Doesn't an attribute have to be on it to be used in a Macro? About the Table - It was a quick and dirty way of displaying the date while testing. I am an old HTML guy. I will definitely use CSS, but I am not as comfortable with it currently. Thanks for replying. While we are chatting, can you direct me to some instructions on how to make a character sheet with multiple tabs (General, Combat, Skills, Spells, Equipment, etc.) Jim
1659927776
GiGs
Pro
Sheet Author
API Scripter
Attributes don't have to be on that list for macros. You can safely ignore it. (The only reason to use it is for personal attributes you are creating that dont already exist on the character sheet.) For tabs, that is covered in the CSS Wizardry page on the wiki, and also here: <a href="https://cybersphere.me/hiding-and-revealing-things-with-css/" rel="nofollow">https://cybersphere.me/hiding-and-revealing-things-with-css/</a> (I should probably rewrite that page for claristy, it was before I did the CSS series.) If you use the sheet worker method, they are really simple.
1659933967

Edited 1659934043
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The sheetworkers should go in a script tag at the end of your character sheet. You can find more info about sheetworkers on the wiki (I believe GiGs has also started covering them on his blog). For examples of working code, the largest selection is going to be in the Roll20 character sheet repository , although the quality and complexity varies WIDELY.
1659998269

Edited 1660000733
I am creating a character sheet with sheetworkers. What would be the best way to do this and present it in Chat? Make a d100 roll and compare it to the character's skill total as in the following example: Character Bob has a Diplomacy_total of 55.&nbsp; Roll 1d100 and compare to "Diplomacy_total". Character Attributes character_name = "Bob" Diplomacy_total = 55 Variables MyRoll = [[1d100]] Result = "" Logic Conditions if MyRoll &lt;= 2,&nbsp; Result= " 5 Successes" else if MyRoll &gt;= 98,&nbsp; Result= "Fumble " else if MyRoll &lt;= floor(Diplomacy_total * 0.2), Result= "5 Successes" else if MyRoll &lt;= floor(Diplomacy_total * 0.4), Result= "4 Successes" else if MyRoll &lt;= floor(Diplomacy_total * 0.6), Result= "3 Successes" else if MyRoll &lt;= floor(Diplomacy_total * 0.8), Result= "2 Successes" else if MyRoll &lt;=&nbsp;Diplomacy_total, Result= "1 Success" else Result= "Failure" If MyRoll was a 38, the desired Chat Output could be like the following: If MyRoll was a 76, the desired Chat Output could be like the following: If MyRoll was a 99, the desired Chat Output&nbsp; could be like the following: If MyRoll was a 2, the desired Chat Output&nbsp; could be like the following:
1660006895

Edited 1660006921
GiGs
Pro
Sheet Author
API Scripter
It sounds like you are asking about rolltemplates, not sheet workers. Rolltemplates govern the style of output to chat. Check the wiki on that.
1660008485
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
For the X number of successes, you'd need to use a custom roll parsing sheetworker to do that calculation.
1660009723
GiGs
Pro
Sheet Author
API Scripter
It looks like the logic described could be done entirely without sheet workers, you'd only need CRP is you planned to use the number 5 somehwere in a calculation. This is fairly standard logic helper stuff: if MyRoll &lt;= 2,&nbsp; Result= " 5 Successes" else if MyRoll &gt;= 98,&nbsp; Result= "Fumble " else if MyRoll &lt;= floor(Diplomacy_total * 0.2), Result= "5 Successes" else if MyRoll &lt;= floor(Diplomacy_total * 0.4), Result= "4 Successes" else if MyRoll &lt;= floor(Diplomacy_total * 0.6), Result= "3 Successes" else if MyRoll &lt;= floor(Diplomacy_total * 0.8), Result= "2 Successes" else if MyRoll &lt;=&nbsp;Diplomacy_total, Result= "1 Success" else Result= "Failure" Have a button in the html like &lt;button type="roll" name="roll_thisroll" value="&amp;{template:my-roll-template} {{Name=Bob}} {{skill=Diplomacy}} {{Score=[[@{diplomacy}]]}} {{score80=[[1+@{diplomacy} * 0.8]]}}{{score20=[[1+@{diplomacy} * 0.2]]}} {{roll=[[1d200]]}}"&gt;roll&lt;/button&gt; (That's only partial) Then you set up the template as described in the wiki, and within it, have something like {{#rollLess{} roll 3}}5 Successes{{/rollLess{} roll 3}} {{#rollLess{} roll score20}}4 Successes{{/rollLess{} roll score20}} {{#rollLess{} roll score}}1 Success{{/rollLess{} roll score}} {{#rollGreater{} roll score}}Fail{{/rollGreater{} roll score}} The logic could get more complicated - ideally you'd calculate the .8, .6. etc in a sheet worker and place them in their own attributes, so you could easily check none of them are below the 02 target. A Custom Roll Parsing method can do this a bit more elegantly, but the code might be less familiar. Eiether way will work, I think.
Thanks, folks, but this is getting way above my head. I will finish laying out my character sheet first, then I will try to figure the rolls out.
1660012500
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, so it is GiGs! When you're ready Jim, this will mostly be HTML/CSS to drive this, unless there's more complexity to it.
1660055435

Edited 1660059931
Is something wrong with using the javascript floor() method in Roll20 sheetworkers? Line 12 below,&nbsp; " let initiative_base = floor((... " &nbsp;breaks my function. If I don't use floor() it works, but of course, I get the .5 decimal values if the sum is odd - not desired. // Set Initiative Base Value var set_initiative_base = function() { getAttrs(["Agility_base", "Agility_xp", "Agility_mod", "Intellect_base", "Intellect_xp", "Intellect_mod"], function(values) { let agility_base = parseInt(values.Agility_base, 10)||0; let agility_xp = parseInt(values.Agility_xp, 10)||0; let agility_mod = parseInt(values.Agility_mod, 10)||0; let intellect_base&nbsp;&nbsp;= parseInt(values.Intellect_base, 10)||0; let intellect_xp&nbsp;&nbsp;&nbsp;&nbsp;= parseInt(values.Intellect_xp, 10)||0; let intellect_mod&nbsp;&nbsp;&nbsp;= parseInt(values.Intellect_mod, 10)||0; //let initiative_base = ((agility_base + agility_xp + agility_mod + intellect_base + intellect_xp + intellect_mod)/2); let initiative_base&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= floor((agility_base + agility_xp + agility_mod + intellect_base + intellect_xp + intellect_mod)/2); setAttrs({Initiative_base: initiative_base}); }); }; on("sheet:opened change:Agility_base change:Agility_xp change:Agility_mod change:Intellect_base change:Intellect_xp change:Intellect_mod", function() { set_initiative_base(); });
1660055667
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Floor is a method of the J's Math global, e.g. Math.floor()
1660056036

Edited 1660057614
I know.&nbsp;I have tried using Math.floor ((agility_base + agility_xp + agility_mod + intellect_base + intellect_xp + intellect_mod)/2); It breaks the function too.
1660058111
GiGs
Pro
Sheet Author
API Scripter
Math.floor should work perfectly there. it suggests there is something wrong somewhere else - maybe in one of your attributes, but you asetting them all to default 0 with || 0. So the problem should be somewhere else. The first thing I'd try is removing the upper case letters here (just on this line): on("sheet:opened change:agility_base change:agility_xp change:agility_mod change:intellect_base change:intellect_xp change:intellect_mod", function() { set_initiative_base(); });
1660058189
GiGs
Pro
Sheet Author
API Scripter
Actually lookign again, this is probably the issue: let intellect_ba&nbsp;&nbsp;&nbsp;&nbsp;= parseInt(values.Intellect_base, 10)||0; Notice it's intellect_ba there not intellect_base. I still recommend the lower case on the event line, though.
1660060128

Edited 1660060656
GiGs said: Actually lookign again, this is probably the issue: let intellect_ba&nbsp;&nbsp;&nbsp;&nbsp;= parseInt(values.Intellect_base, 10)||0; Notice it's intellect_ba there not intellect_base. I still recommend the lower case on the event line, though. the intellect_ba was my mess up when posting it here. in the code it is Intellect_base. As for lower case on the event line, shouldn't it be case sensitive? My Attribute names have upper case in them. I will try it though --- EDIT --- Well damn, that solved the problem. I guess events are not case-sensitive.
1660061603
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Events actually are case sensitive in that they require that all event names be lowercase. This is one reason why best practice for attribute names is to use snake_case or kebab-case instead of Sentence case, camelCase, or PascalCase.
Good to know - I will change my Arrtibute names. Thank you.
1660081077

Edited 1660088820
Hopefully, all my novice questions will help someone else. I am working on Roll Buttons for Attributes and Skills. Here is the button code for the Strength Attribute: &lt;span class="AttribLabel"&gt;&lt;button type="roll" value="&amp;{template:default} {{name=@{character_name}}} {{Skill=@{strength_total} Strength}} {{Roll=[[1d100]]}} {{01-02=Critical}} {{03-[[floor(@{strength_total}*0.2)]]=5 Successes}} {{[[1+floor(@{strength_total}*0.2)]]-[[floor(@{strength_total}*0.4)]]=4 Successes}} {{[[1+floor(@{strength_total}*0.4)]]-[[floor(@{strength_total}*0.6)]]=3 Successes}} {{[[1+floor(@{strength_total}*0.6)]]-[[floor(@{strength_total}*0.8)]]=2 Successes}} {{[[1+floor(@{strength_total}*0.8)]]-[[floor(@{strength_total})]]=1 Successes}} {{[[1+floor(@{strength_total})]]-98=Failure}} {{99-100=Fumble}}"&gt;&lt;/button&gt; Strength&lt;/span&gt; Here is the output in the Chat: Questions: Only the 73 should be a "Dice Roll". The other yellow numbers should just be numbers and if it is a single digit should have a "0" in front of it. That is a lot of code in the value property of a button and it will be repeated on every attribute and skill (bloated code). What is the best way to make this more efficient and streamlined? is there anything else you would recommend?
1660139464
GiGs
Pro
Sheet Author
API Scripter
I don't have much time right now but some quick answers: When you use an inline roll ([[ these brackets ]]), it gets shown as a yellow number. You can defeat this by sending those numbers witgout the inline roll brackets. I think you'd need to pre-calculate those totals in separate attributes, or use Scott's suggestion for CRP, or use rolltemplate styling to suppress the yellow box styling. I am thinking there's another method, but I'm blanking on it right now. The two best ways to get rid of all that code in the button have already been suggested: Scott's idea of using CRP, you can produce the number sthere without the yellow styling. My suggestion is less elegant, but having a bunch of extra attributes for each skill, where you pre-calculate the ranges, and you could do this with an autocalc or sheet worker (my preference). Hope this points you in a helpful direction.