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 .
×

Cannot assign max attribute value.

1666986707

Edited 1666986788
So I have some friends who created a homebrew system loosely based on L5R. Fun system, with some annoying complications, but due to the fact it's homebrew we have no character sheets, and have been using a spit-and-glue type thing we cobbled together on google sheets.  I decided, stupidly, to take on the idea of coding a sheet for us in roll20 to make things easier. I found a seemingly dead L5R sheet and set to editing what I could so that the workload wasn't immense.  However I've ran into one (of many) brick walls. Namely I cannot for the life of me assign the maximum for the hitpoint attribute. I've searched around and found that, in theorym I should be able to just create an attribute for hitpoints, and then a hitpoints_max and it should work.  It doesn't. I have no clue why. Searching has found nothing. And I'm so tired of finding examples that work for everyone else but me. And I'm reminded why I haven't coded in a while.  Code as follows: <div class="sheet-col"> <h3 >Hit Points</h3> <table style='border-collapse: collapse; border-spacing: 0;'> <tr><td >Current HP</td><td >Lethality</td></tr> <tr> <td><input type="hidden" name="attr_HPcalc" value="(@{Stamina} + @{HPmult})"/> <input type="number" name="attr_hitpoints" value ="0"/> <input name="attr_hitpoints_max" value="@{Healthy}" disabled="true"/> </td> <td><select name="attr_Lethality" value="3"> <option value="2">High</option> <option value="3">Default</option> <option value="4">Easy</option> <option value="5">Low</option> </select></td></tr> <tr> <td style='font-weight: bold;'>HP Level</td> <td style='font-weight: bold;'>Total</td> </tr> <tr> <td style='font-weight: bold;'>Healthy (+0)</td> <td><input type="number" name="attr_Healthy" value="@{Nicked} + (@{HPcalc}*5)" disabled="true"/></td> </tr> <tr> <td style='font-weight: bold;'>Nicked (+3)</td> <td><input type="number" name="attr_Nicked" value="@{Grazed} + @{HPcalc} * @{Lethality}" disabled="true"/></td></td> </tr> <tr> <td style='font-weight: bold;'>Grazed (+5)</td> <td><input type="number" name="attr_Grazed" value="@{Hurt} + @{HPcalc} * @{Lethality}" disabled="true"/></td> </tr> <tr> <td style='font-weight: bold;'>Hurt (+10)</td> <td><input type="number" name="attr_Hurt" value="@{Injured} + @{HPcalc} * @{Lethality}" disabled="true"/></td> </tr> <tr> <td style='font-weight: bold;'>Injured (+15)</td> <td><input type="number" name="attr_Injured" value="@{Crippled} + @{HPcalc} * @{Lethality}" disabled="true"/></td> </tr> <tr> <td style='font-weight: bold;'>Crippled (+20)</td> <td><input type="number" name="attr_Crippled" value="@{Down} + @{HPcalc} * @{Lethality}" disabled="true"/></td> </tr> <tr> <td style='font-weight: bold;'>Down (+40)</td> <td><input type="number" name="attr_Down" value="@{Out} + @{HPcalc} * @{Lethality}" disabled="true"/></td> </tr> <tr> <td style='font-weight: bold;'>Out</td> <td><input type="number" name="attr_Out" value="@{HPcalc} * (@{Lethality} + 1) + @{HPflat}" disabled="true"/></td> </tr> </table> </div>
1666992747
Kraynic
Pro
Sheet Author
I haven't worked with autocalc at all, but what happens if you change the value of hitpoints_max to the calculation used for Healthy? @{Nicked} + (@{HPcalc}*5) If that doesn't work either, it might be worth ditching autocalc totally and switch over to using sheetworker scripts (there is a lot of info on them if you look at the wiki).  I don't think the javascript framework was available when some of these sheets were written, so they used what was available at the time.