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

Auto-calculated value does not show

Okay, I am trying to create a character sheet for "Dungeonslayers" (please let me know, if you have one already!) and I want the sheet to auto-calculate a value. I have a field: input type="Number" name="attr_Koerper" / ==> which gives me a "Body" value, say 10 and I have a field: input type="number" name="attr_Lebenskraft" value="@{Koerper}*2" disabled="true" / According to the Wiki, I now shoud have a second filed displaying: "20". But I don't. In Preview and in the in-game character sheet, I see a greyed out field, with a "don't go there" warning sign when I hover over it. What am I doing wrong here ... (apart from the <>, which are in the actual code ...)?
1401568193
Alicia
Sheet Author
Could you please paste the actual pieces of code here? You may also want to use the following: < input type="number" name="attr_Koerper" value="0" /> This will ensure there's a value in place for the auto-calc input. Also, as far as I've seen auto-calc doesn't work in the Preview just in game.
Hi Alicia - Thanks for your reply. I have also tried this in game and it didn't work. In Dungeonslayers the hitpoints are determined by two values BODY (KÖRPER) +Toughness (Härte) (entered by hand) I then want to have a number field, which displayes the actual hitpoints ("Lebenskraftaktuell" - entered by hand) and the max hitpoints (which is BODY + TOUGHNESS) (calculated automatically). If "Koerper" is 10 and "Haerte" is 8, the max hitpoints should be 18. Therefore, the line that I want to generate should read: Lebenskraft MANUALLY ENTERED VALUE von 18 . (Hitpoints XY of 18) At the bottom there are two lines prompting calculation of an initiative value ("Agilitaet"+"Bewegung"). The roll is performed in-game, but the overall vallue is not displayed. [code]<div class='sheet-3colrow'> <div class='sheet-col'> <b>KÖRPER:</b><br> <input type="Number" name="attr_Koerper" /><br> Härte:<br> <input type="Number" name="attr_Haerte" /> </div> <div class='sheet-col'> <b>AGILITÄT:</b><br> <input type="Number" name="attr_Agilitaet" /><br> Bewegung:<br> <input type="Number" name="attr_Bewegung" /><br> Geschick:<br> <input type="Number" name="attr_Geschick" /> </div> <div class='sheet-col'> <b>GEIST:</b><br> <input type="Number" name="attr_Geist" /><br> Verstand:<br> <input type="Number" name="attr_Verstand" /><br> Aura:<br> <input type="Number" name="attr_Aura" /><br><br> </div> </div> <div class='sheet-3colrow'> <div class='sheet-col'> <b>Lebenskraft:</b><br> <input type="number" name="attr_Lebenskraftaktuell" /> von <input type="number" name="attr_Lebenskraft" value="@{Koerper}+@{Haerte}" disabled="true" /> </div> <div class='sheet-col'> <b>Abwehr:</b><br> </div> <div class='sheet-col'> <b>Initiative:</b><br> <button type='roll' value='/roll 1d20 + @{Initiative}' name='roll_InitiativeCheck' /> <input type="number" name="attr_Initiative" value="@{Agilitaet}+@{Bewegung}" disabled="true" /> </div> </div>[/code]
How do you display code in this forum ... ? ;-)
1401579519
Alicia
Sheet Author
CidCalypso said: How do you display code in this forum ... ? ;-) In the paragraph drop down there's a formatting option for code.. I usually type out everything and then go back and highlight the bit that's code and set it to the format. Otherwise I find it hard to get normal text formatting to resume afterwards. type="number" is case sensitive. I change it from type="Number" and they all began working as expected. BTW, it is good practice, particularly when using the values for rolls to put in a default value for each of the inputs. Rolls and calculations will not work correctly till there's a value in place.
Thanks a lot, Alicia. This was it! All working as it should now.