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

[Help - Char Sheet Improvement] Repeating Section Attribute Not Being Created

1508591291
Andreas J.
Forum Champion
Sheet Author
Translator
I've been looking at the d6starwars 's character sheet with the intention of improving it as it lacks in many ways, but have stumbled on a problem with the repeated sections. It seems to me identical to  #Repeating_Sections in sheet creation, but the attributes are not created. I didn't find any relevant post to this, only a  old one before this was implemented.   This post further mentions it being possible and even how the naming convention work. <td class="sheet-tdborder">                     <div class="sheet-bold">/*Perception attribute*/                         <button type='roll' class="astext" value='/roll (@{perception} - 1)d6 + 1d6! + @{perceptionpip}' >Perception</button>                         <div style="float:right;">                             <input type="number" name="attr_perception" class="sheet-smallnumber"  min="1" value="3"/>D                              +<input type="number" name="attr_perceptionpip" class="sheet-smallnumber" min="0" max="2" value="0"/>                         </div>                     </div>                     <fieldset class="repeating_percskills"> /*Perception Skills*/                         <button  type="roll" value="/r (@{percskilldice} - 1)d6 + 1d6! + @{percskillpip}"></button>                           <input class="sheet-skilltext" type="text" name="attr_percskillname"/>                             <div class="sheet-right">                           <input type="number" name="attr_percskilldice" class="sheet-smallnumber sheet-shortnumber" min="1" value="@{percskilldice}"/>D                            +<input type="number" name="attr_percskillpip" class="sheet-smallnumber sheet-shortnumber" min="0" max="2" value="@{percskillpip}"/>                            </div>                     </fieldset>                 </td> Wiki example code: <h3>Skills</h3> <fieldset class="repeating_skills"> <select name="attr_dtype" class="dtype"> <option value="d4">d4</option> <option value="d6">d6</option> <option value="d8">d8</option> <option value="d10">d10</option> <option value="d12">d12</option> </select> <input type="text" name="attr_skillname" /> </fieldset> So what is missing to for the sheet to save the skills with values in Attributes?
1508594231
Seth
Sheet Author
you can't utilize a <fieldset> inside a <table> those <td> </td> are table data elements, which means that it is inside a table. You'll need to either move the fieldset outside of the table, or border the table and put another one inside the fieldset. example: <td class="sheet-tdborder">                     <div class="sheet-bold">/*Perception attribute*/                         <button type='roll' class="astext" value='/roll (@{perception} - 1)d6 + 1d6! + @{perceptionpip}' >Perception</button>                         <div style="float:right;">                             <input type="number" name="attr_perception" class="sheet-smallnumber"  min="1" value="3"/>D                              +<input type="number" name="attr_perceptionpip" class="sheet-smallnumber" min="0" max="2" value="0"/>                         </div>                     </div> </td> </table>                     <fieldset class="repeating_percskills"> /*Perception Skills*/ <table style="border-collapse: collapse; border-spacing: 0;">                         <button  type="roll" value="/r (@{percskilldice} - 1)d6 + 1d6! + @{percskillpip}"></button>                           <input class="sheet-skilltext" type="text" name="attr_percskillname"/>                            <div class="sheet-right">                           <input type="number" name="attr_percskilldice" class="sheet-smallnumber sheet-shortnumber" min="1" value="@{percskilldice}"/>D                            +<input type="number" name="attr_percskillpip" class="sheet-smallnumber sheet-shortnumber" min="0" max="2" value="@{percskillpip}"/>                            </div> </table>                     </fieldset>
1508605691
Andreas J.
Forum Champion
Sheet Author
Translator
you can't utilize a <fieldset> inside a <table> Thanks, I had no idea! As it is now, the Character skills are in a table, grouped under their respective Attributes(Pers,Str,Dex,Know,Tech,Mech). Would that mean it's best to lose the table to get the respective 6 repeating sections to work?. I guess I can figure formating out with labels and stuff.
1508619263
Seth
Sheet Author
You can border the areas in say, a <div style=""> element, and then by using <table style="width: 100%; border-collapse: collapse; border-spacing: 0;"> in both areas, and making sure to match the number of <td> elements in each, they should line up perfectly and appear seemless.
1508620478

Edited 1508620697
vÍnce
Pro
Sheet Author
AFAIK, there shouldn't be a problem inserting a fieldset inside a table. working example; <table>     <tr>         <td>             <h1>Fieldset inside a Table</h1>         </td>         </tr>     <tr>         <td>             <fieldset class="repeating_foo">                 <span>Test:<input type="number" name="attr_test" value="10"></span>             </fieldset>             </td>     </tr> </table> What actually happens when you add a new repeating row and make an attribute change to that row?  Do the new rows disappear after your close and reopen the sheet?  
1508621074
Seth
Sheet Author
ime, the add/modify buttons are there, but upon pressing add, nothing happens, and in the event of pre-existing rows, the modify button acts as though untethered to the fieldset preventing changes.
1508622066

Edited 1508622210
Andreas J.
Forum Champion
Sheet Author
Translator
What actually happens when you add a new repeating row and make an attribute change to that row? Do the new rows disappear after your close and reopen the sheet? No, the new row is saved and the value and names stay, but it doesn't generate an attribute to the A&A tab that one could call from outside the repeating section. All non-repeating things generate attributes in the sheet.
1508622161

Edited 1508622362
vÍnce
Pro
Sheet Author
The only thing I see wrong are the comments in the OP's code.  /* */ should be <!-- -->  I removed those and the repeating sections works fine for me...
1508622192

Edited 1508622216
vÍnce
Pro
Sheet Author
Repeating attributes do not show on the attributes tab.
1508623393

Edited 1508623656
Andreas J.
Forum Champion
Sheet Author
Translator
What do they talking about  here then? We've made a change to the way that repeating section attribute names are created. Previously, we would create a name such as "repeating_spells_2_SpellName". The "2" was the identifier of the row. If you deleted the "1" row, the "2" row's attributes would all be renamed to be the "1" row. While this made some sense at the time, it led to an issue which prevented us from supporting repeating section attributes and rolls as first-class citizens in macros, rolls, etc. Now when a row is created in a repeating section it is assigned a unique ID that is shared among all attributes in that row. For example, "repeating_spells_-ABC123_SpellName". The ID of the row will now stay the same until the row is deleted. Do you mean they are created, but just not show in the A&A tab? I'm extremely curious what this post is suposedly seaking about then. And the /**/ are my own additions, so they are not in the original code(that we have the problem in) for the sheet, sorry.
1508624403

Edited 1508624485
vÍnce
Pro
Sheet Author
You won't see repeating attributes nor (I think) "hidden" attributes. When repeating rows(fieldsets) were originally used for the character sheets you could not re-arrange them and you could only reference the attributes within the repeating section by including it's physical row number. Latter, an update was made that assigned a rowID to each repeating section.  This allowed for re-arranging of rows and each attribute could be called using it's rowID regardless of it's physical row/location.  Instead of "repeating_foo_0_attribute1", you could use the unique rowID generated once an attribute was saved within a newly added repeating section. ie "repeating_foo_-123456789_attribute1" which allowed your macros to work regardless of how you re-arranged your repeating rows.
1508625590
Andreas J.
Forum Champion
Sheet Author
Translator
Damnit, this was the more relevant part: Adds new support for @{repeating_spells_$1_SpellName} support. So instead of specifying a specific repeating section row ID, you can now specify the row index (so $0 is the first row, $1 is the second row, $2 is the third row, etc.). You may want to update any sheet buttons/rolls that used the old "repeating_spells_0_AttrName" syntax to this new syntax. It's supported both in auto-calc fields and in rolls/macros/etc. Okay, so calling @{charname|repeating_percskills_0$_percskillname} should call the first perception skill? And I think I get the RowID, but how do I find it for any given thing? 
1508626626

Edited 1508626662
vÍnce
Pro
Sheet Author
Andreas J. said: Damnit, this was the more relevant part: Adds new support for @{repeating_spells_$1_SpellName} support. So instead of specifying a specific repeating section row ID, you can now specify the row index (so $0 is the first row, $1 is the second row, $2 is the third row, etc.). You may want to update any sheet buttons/rolls that used the old "repeating_spells_0_AttrName" syntax to this new syntax. It's supported both in auto-calc fields and in rolls/macros/etc. Okay, so calling @{charname|repeating_percskills_0$_percskillname} should call the first perception skill? And I think I get the RowID, but how do I find it for any given thing?  Make sure use the proper syntax "$<then row number>"  Also, rows start at "0" To get the rowid, you could use the browser's right-click>inspect element on a field inside your fieldset. If you are handy with js, you could use sheetworkers to post the rowID to make it easier.  Sheetworkers can also be used to automatically use the rowID for calculations and such.  Someone else will have to help with that.  ;-( 
1508658726

Edited 1508674641
Andreas J.
Forum Champion
Sheet Author
Translator
Yeah I was trying to avoid the RowID-thing , but as I still can't get the repeating_stuff to work(I did switch around the number and $, and few other things) I'll have to try find it. Edit: Just got the repeating_stuff to work, it was issues with my chat commands not appearing in the chat anymore, had to go see all chat logs. Thanks for all the help! 
1508685549
vÍnce
Pro
Sheet Author
Glad you got it figured out.  Solving these kind of problems on the sheets can be frustrating, but also rewarding (and addicting).  Cheers