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 .
×
Stuck in a login loop? Try manually signing out and back in before launching your game. Otherwise, contact the Help Center!
Create a free account

[help required] Pathfinder Community Sheet modified

Hello, i try to personnalize the Community sheet and adapt it to my rules. but                             <span class="sheet-table-data sheet-center"><input style="width:100%;" type="text" title="@{PM-formula}" name="attr_PM-formula" value="( ( ( [[ @{Carac-0-pm} ]] + [[ @{Carac-1-pm} ]] + [[ @{Carac-2-pm} ]] ) * [[ @{level} ]] ) ) + ( [[ @{PM-classe-0} ]] + [[ @{PM-classe-1} ]] + [[ @{PM-classe-2} ]] ) )"> </span>                            Don't work, how fix it? Thanks for the help :)
1575899938

Edited 1575919399
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Well, the community sheet is an extremely complex affair. What are you trying to achieve and what isn't working? From that line of code I can't tell either. If you are trying to get that attribute to be equal to the result of the formula, you need to make it readonly  disabled and I believe adjust it so it isn't using inline roll syntax. EDIT: had mistakenly written readonly instead of disabled
I try to add magic points. For that, i have this code for each possible classes (0; 1 and 2), like the HP code:                         <span class="sheet-table-name">Points de magie</span>                         <div class="sheet-table-row">                             <span class="sheet-table-header">PM Actuels</span>                             <span class="sheet-table-header">/</span>                             <span class="sheet-table-header">PM Max</span>                             <span class="sheet-table-header">PM de classe</span>                             <span class="sheet-table-header">Caractéristique</span>                             <span class="sheet-table-header">Formule PM Max</span>                         </div>                         <div class="sheet-table-row" style="line-height:.1em;">                             <span class="sheet-table-data sheet-center"><input style="width:100%;" type="number" title="@{PM}" name="attr_PM" value="0"> </span>                             <span class="sheet-table-data sheet-center">/</span>                             <span class="sheet-table-data sheet-center"><input style="width:100%;" type="number" title="@{PM|max}" name="attr_PM_max" value="@{PM-formula}" disabled> </span>                             <span class="sheet-table-data sheet-center"><input style="width:100%;" type="number" title="@{PM-classe-0}" name="attr_PM-classe-0" value="0" min="0"> </span>                             <span class="sheet-table-data sheet-center">                                 <select title="@{Carac-0-pm}" name="attr_Carac-0-pm" style="width:50%;">                                     <option value="0" selected>Aucune</option>                                     <option value="(@{INT-mod})">INT</option>                                     <option value="(@{WIS-mod})">SAG</option>                                     <option value="(@{CHA-mod})">CHA</option>                                 </select>                             </span>                         <span class="sheet-table-data sheet-center"><input style="width:100%;" type="text" title="@{PM-formula}" name="attr_PM-formula" value="((@{Carac-0-pm} * @{level}) + (@{Carac-1-pm} * @{level}) + (@{Carac-2-pm} * @{level}) + (@{PM-classe-0} + @{PM-classe-1} + @{PM-classe-2} )" readonly> </span>                         </div> for help, the HP code i have copied and modified:             <span class="sheet-table-name">Santé et Blessures</span>             <div class="sheet-table-row">                 <span class="sheet-table-header">PV Actuels</span>                 <span class="sheet-table-header">/</span>                 <span class="sheet-table-header">PV Max</span>                 <span class="sheet-table-header">PV Temp</span>                 <span class="sheet-table-header">Dégâts Non-Létaux</span>                 <span class="sheet-table-header">Formule PV Max</span>             </div>             <div class="sheet-table-row" style="line-height:.1em;">                 <span class="sheet-table-data sheet-center"><input style="width:100%;" type="number" title="@{HP}" name="attr_HP" value="0"> </span>                 <span class="sheet-table-data sheet-center">/</span>                 <span class="sheet-table-data sheet-center"><input style="width:100%;" type="number" title="@{HP|max}" name="attr_HP_max" value="@{HP-formula}" disabled> </span>                 <span class="sheet-table-data sheet-center"><input style="width:100%;" type="number" title="@{HP-temp}" name="attr_HP-temp" value="0" min="0"> </span>                 <span class="sheet-table-data sheet-center"><input style="width:100%;" type="number" title="@{non-lethal-damage}" name="attr_non-lethal-damage" value="0" min="0"> </span>                 <span class="sheet-table-data sheet-center"><input style="width:100%;" type="text" title="@{HP-formula}" name="attr_HP-formula" value="((@{CON-mod} * @{level}) + @{total-hp} + (5 * @{condition-Drained}))"> </span>             </div> And my formula do this nota: my english is pretty bad, i'm a french guy so excuse me for that.
1575919155

Edited 1575919467
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, ok, in that case, you don't want the readonly on it. Autocalcs are finicky about how you enter attribute calls for them to resolve properly. I'd recommend putting something simple in the pm-formula field to test your basic html; something like just "4" to see if it propagates to your pm_max correctly. I think that this should work, as I don't see anything wrong with your disabled setup. If that simple test is the case, then the problem is likely with your fomula. I would do a few different troubleshooting steps to investigate the formula: output the formula to chat in a roll and out of a roll. Do this by sending a chat message of  @{test character|pm-formula} =  [[@{test character|pm-formula}]] . This lets you easily see what each value of the formula is resolving to and what the total is. If the above gives you the results you expect, try wrapping attribute calls in parentheses (e.g. @{carac-0-pm} becomes (@{carac-0-pm}) ) Unfortunately, I don't use autocalcs in my sheets, so I'm not sure where to go for troubleshooting after this. EDIT: and actually, the readonly tag on your pm-formula attribute may be what's causing the issue. autocalcs and sheetworkers don't play nicely together, and readonly is to sheetworkers what disabled is to autocalcs. You also don't want that attribute to be readonly as then there's no way for players to edit it, and therefore no reason to display the pm-formula attribute or even have it as a separate attribute. EDIT 2: And, sorry, I realized you put that readonly tag in there because of my previous post. That was a typo, and should have read disabled; although you don't want this attribute to be disabled either since it looks like you want it to be player editable
When i try this: (the character have 18 in the stat) @{test character|carac-0-pm} The answer is this: (((floor((18 + 0 + 0 + 0 )/2)-5) + floor(0/2) - (floor(abs(0)/2)) - (floor(abs(0)/2)))) All the other work, how can i fix it? Edit: i think i have the solution but i must go to work, I'm back later. If i have right, i justt need to put [[ ]] around the carac formula. I'll try it later
1575969396
GiGs
Pro
Sheet Author
API Scripter
One problem you have is this formula ((@{Carac-0-pm} * @{level}) + (@{Carac-1-pm} * @{level}) + (@{Carac-2-pm} * @{level}) + (@{PM-classe-0} + @{PM-classe-1} + @{PM-classe-2} ) has an extra bracket at the start, that isnt closed at the end. If you expand the brackets you get ( ( @{Carac-0-pm} * @{level} ) + ( @{Carac-1-pm} * @{level} ) + ( @{Carac-2-pm} * @{level} ) + ( @{PM-classe-0} + @{PM-classe-1} + @{PM-classe-2} ) Notice there's no closing bracket for that first one. I'd also slightly reorganise it         ( @{Carac-0-pm} + @{Carac-1-pm} + @{Carac-2-pm} ) * @{level} + ( @{PM-classe-0} + @{PM-classe-1} + @{PM-classe-2} ) Which reduces to (@{Carac-0-pm} + @{Carac-1-pm} + @{Carac-2-pm}) * @{level} + (@{PM-classe-0} + @{PM-classe-1} + @{PM-classe-2}) And yes, you might need to put inline roll brackets around it. That said, if those attributes contain their own autocalcs, you need to check they are all valid and self contained.
Thanks to Scott for the method to test the value, thanks to gigs to the format of the formula. My macro work thanks :)