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

Character Sheet Enhancements!

1620613376
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Keagan, Assuming you are talking about the D&D 5th Edition by Roll20 Sheet, you can either create a thread in the Bug reports forum, or post to the  D&D 5th Edition by Roll20  thread. If you are talking about any other D&D sheet, the new thread option would be best.
1620623736

Edited 1620623899
vÍnce
Pro
Sheet Author
CSE has parsing issues with inputs that utilize nested quotes and/or queries that require special character substitutions which can end an attribute value prematurely(ie nested quotes) and/or break macros(ie nested queries). I know the Dev's are working on a fix , but... as a temporary workaround, it looks like you can substitute the leading ampersand with `&`.  So `"` would become `"`  Seems like I recall we used to have to do something similar when posting macros with special characters on the forums.    example; Legacy Mode: <button type="roll" name="roll_abilities" class="command-button" value="/w "@{character_name}" @{ability_buttons_macro}"> CSE Mode: <button type="roll" name="roll_abilities" class="command-button" value="/w " @{character_name} " @{ability_buttons_macro}"> I've been able to fix my button roll inputs that wrap @{character_name} in double quotes with this method. I haven't tested this substitution workaround with nested queries, so your mileage my very. Hope this helps.
keithcurtis said: Nicholas said: Hey folks! Incoming updates to questions and reports that have come up: Keithcurtis - Thanks for pointing this out Keith! Myself and the other devs will review this asap. Hi Nicholas, just some updating. In the three weeks since I reported the problem, I have gathered 7 more reports of the issue. This is something that many folks are dealing with: keithcurtis  said: Bug: Newly-dropped characters now must fully resolve before closing the window Since this change went live I have been helping a lot of folks suffering from a common bug. Newly-dropped characters now must fully resolve before closing the window. If you close it too early, the process stops, including token assignment. (If you have an incomplete monster due to this, you must delete or rename it before trying to drag in a fresh one. The Compendium will not overwrite an identically named monster, to preserve local modifications.). Many users have reported broken monsters with incomplete stat blocks or missing tokens.  Here is one such thread , though there are others. Before this change, the character sheet would finish forming in the background even after the window was closed. Additional Reports: [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] Hey keithcurtis -  I've made sure to bring this up to our developers and we now have a potential fix in the pipeline for deployment this week or next. Thank you for the heads up here, it's greatly appreciated!
Hey  vÍnce , Peter B. , and others -  We definitely appreciate the heads up here in regards to the challenges the CSS is presenting right now. The team is going to be discussing some options to improve, such as adjusting the base files imported in the iFrame wrapper, but we don't have anything solid to present quite yet. We'll keep you posted once we have more to share!
1621270187
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Nicholas said: Hey keithcurtis - I've made sure to bring this up to our developers and we now have a potential fix in the pipeline for deployment this week or next. Thank you for the heads up here, it's greatly appreciated! Thanks for the update, Nicholas!
1621282281
vÍnce
Pro
Sheet Author
@Nicholas Ditto on Keith's sentiments.  Any progress on the parsing issues?  Thanks
1621824830

Edited 1621824875
Richard T.
Pro
Marketplace Creator
Sheet Author
Compendium Curator
Rolltemplates seem to be throwing new errors when using the conditional rolltemplate functions where the roll is missing.  Just made a quick test sheet using the following:  <button type="roll" value="&{template:test} {{testroll=[[1d4]]}}">Shoot</button> <button type="roll" value="&{template:test}">Blanks</button> <rolltemplate class="sheet-rolltemplate-test">     <h1>Roll Template Errors</h1>     {{#rollTotal() testroll 1}}         You rolled a 1     {{/rollTotal() testroll 1}}     {{#rollTotal() testroll 2}}         You rolled a 2     {{/rollTotal() testroll 2}}     {{#rollTotal() testroll 3}}         You rolled a 3     {{/rollTotal() testroll 3}}     {{#rollTotal() testroll 4}}         You rolled a 4     {{/rollTotal() testroll 4}}      </rolltemplate> Checking the console when pressing the buttons, no errors are thrown when the rolltemplate is provided a roll, but each conditional throws an error if the Blank button is pressed. My working sheet piles up a lot of console logs very quickly right now and this seems like it should be an exception to the error checks. 
Hi Richard, Just wanted to note that this has been added to some continuing work the team is doing around Roll Templates. Thanks for bringing it to our attention.
Hey folks -  Just wanted to drop another quick update here. keithcurtis, vÍnce, and others - The fix for the bug discussed in this post is live and should be good to go. If you run into this problem again or see any other reports of continued issues, please don't hesitate to let us know! vÍnce, Ayethin, and others - No direct progress to share as of yet on nested roll query and parsing improvements. That work currently sits in the top of our backlog and we intend to pull it in as soon as possible.  Thanks for all of the continued discussions and feedback everyone!
1621968176

Edited 1621969640
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Nicholas said: Hey folks -  Just wanted to drop another quick update here. keithcurtis, vÍnce, and others - The fix for the bug discussed in this post is live and should be good to go. If you run into this problem again or see any other reports of continued issues, please don't hesitate to let us know! Sweet! Thanks, I'll check it out.
I am still having these same issues on my Chromebook, that I can see the items and journal pages but when I try to open my DnD 5e Character sheet it only shows a loading symbol (Though you can barely see the Bio&Info, Character Sheet and Attributes & Abilities tabs like it wants to load). I'm new to both roll20 and this Chromebook so I'm not sure what to do, any help would be appreciated
1623114272
GiGs
Pro
Sheet Author
API Scripter
Nic B. said: Hi Richard, Just wanted to note that this has been added to some continuing work the team is doing around Roll Templates. Thanks for bringing it to our attention. While you're doing work on rolltemplates, could you fix the issue with logic functions and number below zero. In legacy mode, the number comparison functions stop working if the number you are comparing is below zero.
Hi GiGs, This is the first I have heard of this. I'll put it in as a bug, and get it looked at ASAP. Thanks for the report!
1623218317
GiGs
Pro
Sheet Author
API Scripter
I could've sworn I raised it a bug, but it will have been a couple years back.
1623234637

Edited 1623234971
GiGs
Pro
Sheet Author
API Scripter
I hadnt noticed any comments about this, but in sheet workers, does the case of attribute names matter now. In another thread, I just posted a code example, and needed to tweak what used to be working code but was now unworking. This is the code: < h4 > Agility:  </ h4 > < input   type = "number"   name = "attr_agility"   value = "0" > < h4 > Force:  </ h4 > < input   type = "number"   name = "attr_force"   value = "0" > < fieldset   class = "repeating_competence" >    < select   name = "attr_competence_name" >      < option   > Agility </ option >      < option   > Force </ option >    </ select >    < input   type = "hidden"   name = "attr_competence_value"   value = "0"   >    < button   type = "roll"   value = "Name: @{competence_value}; Value: @{competence_value}" ></ button > </ fieldset > < script   type = "text/worker" >   on('change:repeating_competence:competence_name', (event) => {     console.log(event);     getAttrs(['agility', 'force', 'repeating_competence_competence_name'], values => {       const stat = values.repeating_competence_competence_name;       const score = values[stat.toLowerCase()];       console.log(stat);       console.log(score);       setAttrs({         repeating_competences_competence_value: score       });     });   }); </ script > The important line is this one:       const score = values[stat.toLowerCase()]; In the past, the following line would have been used instead:       const score = values[stat]; Because attribute names were case-insenstitive. The only time it mattered was in the event line, where you had to use lower case, regardless of the attribute in the sheet. But now it seems attribute names are case sensitive. Looking for the attribute "Agility" fails, but "agility" works. I could see this breaking sheet workers in a lot of sheets (though admittedly, if it did there have probably been posts about it by now). Was there a notice about this that I've missed?
1623752801
Ulti
Pro
Sheet Author
API Scripter
So what is the status with the sheet enhancements? Is it stable, now? I wonder whether I could start migrating my sheet from legacy to the new sanitization system...
1623766994

Edited 1623767105
Andreas J.
Forum Champion
Sheet Author
Translator
It's been stable since around mid-April. I've refactored 2 sheets to CSE, and created 4 sheet right away to CSE since.
1623770773

Edited 1623770825
vÍnce
Pro
Sheet Author
Still some parsing issues that the Devs are working on... I've converted the PF Community sheet to CSE.
1623927258
Ulti
Pro
Sheet Author
API Scripter
Thanks for the answer. Since you've already done it, did you notice any particular pitfall, or do you have any advice on the conversion process?
1623939525

Edited 1623939640
vÍnce
Pro
Sheet Author
Laurent said: Thanks for the answer. Since you've already done it, did you notice any particular pitfall, or do you have any advice on the conversion process? This thread, as well as the CSE on the wiki has the conversion to CSE pretty much covered.  Just plan on doing a lot of testing before you go live with it to make sure everything is acceptable.  Depending on the size and complexity of the sheet, this can take some time.  Seems like I'm still fiddling with the css weeks after converting.  Granted, this could be due to the css/html that's spanned over five years, so there are definitely a few curmudgeons in there that CSE uncovers. ;-)  There's still some parsing issues where special characters used within sheet macros can be prematurely converted.  (IIRC; nested quotes, nested queries)  I think you can workaround this until the Devs rework/revisit the parser by "double-substituting" the leading ampersand. ie " Good luck.
1624703570

Edited 1624703597
Hi everybody, I am not sure whether I am here in the right thread, but I couldn't find a better. Question : is there a way to get the D&D 5E variant for critical damage working in the 5E OGL sheet? I want to have "max die + die" as crit damage instead of "2 x die". E.g. crit damage of a battleaxe would be "8 + d8" instead of "2d8". I really don't like all the crits have less damage than some normal damage rolls anymore. But I couln't find a way to change that. Only thing is to change the crit range. Thanks! Bernd
1624720500

Edited 1624720589
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Bernd, For this sort of question, your best bet is to make your own thread, although it could be asked in the  D&D 5th Edition by Roll20  feedback thread. This question comes up every now and then. Here's a recent thread , with some suggested workarounds.
1624991908

Edited 1624991987
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
While working on a sheet today I realized that I'd really like to see a new feature. It would be awesome if the repeating section html parsing would add the rowID to any IDs created in that section or referenced in that section. Preferably this would be done similar to how attribute names are done where it looks for the base id in the row, if it doesn't find it, it doesn't add the row id. This would allow us to use things like labels referencing checkboxes/buttons/radios without needing to use some of the old work arounds for pseudo-buttons. Example code of html that this would allow: <fieldset class="repeating_skills"> <input type='checkbox' id='skill-enable' value='1' class='hidden' checked> <input name="attr_name" type="text" val="" data-i18n-placeholder="skill name" title="@{repeating_skills_$0_name"/> <input class="boxed" name="attr_mod" type="number" val="" title="@{repeating_skills_$0_mod"/> <button name="roll_roll" value="@{template_start} {{title=@{name}}} {{roll=[[1d20+@{mod}]]}}" title="%{repeating_skills_$0_roll}" type="roll"> </button> <label for='skill-enable'>On/Off</label> </fieldset>
1624997942
GiGs
Pro
Sheet Author
API Scripter
Great suggestion, Scott. A feature like that would be so helpful.
Hey all! Just wanted to drop by and provide an update here! Our team has several other things that we're working through, such as custom roll parsing , but we're still keeping an eye on this thread and are excited to see more folks using this new functionality in their sheets! We love all of the different use cases and sheet work you've done with this update so far.  Good news for a few people here - we're currently working on the issues with nested queries right now! Overall, we are doing two things with nested roll queries: 1) We're fixing the old implementation that uses character codes so that older sheets aren't broken. 2) We're implementing smarter and better detection of nested roll syntax - i.e. nested usage of ?{ }  syntax. We originally thought about adding new syntax for nested roll queries specifically, but we decided against that since this feels more natural and easier to use. As always, if you have any question or concerns, please don't hesitate to let us know!
1625607065

Edited 1625607094
GiGs
Pro
Sheet Author
API Scripter
Wow, if you do fix nested queries so they work naturally, that will be huge.
1625612682
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Nicholas said: 1) We're fixing the old implementation that uses character codes so that older sheets aren't broken. 2) We're implementing smarter and better detection of nested roll syntax - i.e. nested usage of ?{ }  syntax. We originally thought about adding new syntax for nested roll queries specifically, but we decided against that since this feels more natural and easier to use. Does that also mean that user macros will also have an easier time of coding roll queries?
Just wanted to make sure everyone knows that the new custom roll parsing feature is now live! You can read all about this feature in our help center as well as the dev forum post .
Does that also mean that user macros will also have an easier time of coding roll queries? Yes, the fix should apply to all uses of roll queries.
1627801137

Edited 1627801212
vÍnce
Pro
Sheet Author
Given that the thread  Now on Dev Server: Custom Roll Parsing for Character Sheets  was immediately closed without any further feedback once the update had been pushed to the Live server...  I decided to post this here; Since the new roll parsing was added to the live servers, macros that include a roll template with just an empty key ie {{=foo}} display the line twice with the duplicate line substituting "computed::" for the empty key.  &{template:default}{{name=test}}{{=[[1d20]]}} This obviously messes up existing macros that were purposely created with an empty key... ;-( Is this the new expected behavior, a bug, or...? Thanks BTW: I've found you can include an empty space(or multiple spaces) as a workaround. Prevents the extra "computed::" line and still has a similar expected behavior that depended on the roll templates allprops() formatting. &{template:default}{{name=test}}{{ =[[1d20]]}}
1628593821
Robert B.
Marketplace Creator
Sheet Author
I think I'm seeing a bug with the CSE and the charactermancer. The show/hide functions don't seem to work anymore. I am testing this in the custom sheet sandbox. It could also just be me, but I created a simple test below. The behavior: 1) Sections tagged with the "sheet-choice" class hide on load. 2) The showChoices function only works if the "choice" class is also added. 3) hideChoices does not appear to work at all once the choices are shown. Some HTML to reproduce: <div> <button type="action" name="act_create">Create</button> </div> <charmancer class="sheet-charmancer-intro"> <div> <label>Choice</label> <select class="choice testselect" name="comp_testselect" required> <option /> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <div class="sheet-choice choice testchoice1"> <label>Choice 1</label> <input type="text" name="comp_choice1" /> </div> <div class="sheet-choice choice testchoice2"> <label>Choice 2</label> <input type="text" name="comp_choice2" /> </div> <div class="sheet-choice choice testchoice3"> <label>Choice 3</label> <input type="text" name="comp_choice3" /> </div> <button type="finish" value="apply">Apply Changes</button> </div> </charmancer> <charmancer class="sheet-charmancer-final"> <div> <h2>Please wait...<h2> </div> </charmancer> <script type="text/worker"> on('clicked:create', function() { startCharactermancer('intro'); }); on('mancerchange:testselect', function(eventinfo) { hideChoices(); if (eventinfo.newValue) { let choice = parseInt(eventinfo.newValue)||0; switch (choice) { case 1: showChoices(['testchoice1']); break; case 2: showChoices(['testchoice2']); break; case 3: showChoices(['testchoice3']); break; } } }); on('mancerfinish:apply', function() { finishCharactermancer(); }); </script>
1628687598
Robert B.
Marketplace Creator
Sheet Author
I did some more testing and came up with a workaround (in case anyone else or the Roll20 team need it). It looks like there is a css selector that looks like: .sheet-choice {     display: none; } However, the functions (hideChoices, showChoices) have been updated for CSE. They omit the "sheet-" prefix when updating the DOM. So you see a toggle back and forth of "choice" and "choice-showing". The toggle works, but there isn't any corresponding CSS. So I added a simple workaround: .choice {     display: none; } And now it works great! The required fields are ignored when hidden, etc.
1630213910

Edited 1630213961
vÍnce
Pro
Sheet Author
Possible bug: attribute names including "_repeating" within the name, do not trigger API events. Not sure if this is related to the CSE update or one of the other recent updates...   Example; Using "delete_repeating_ability" no longer works to trigger API events on('change:delete_repeating_ability', function(eventInfo) { console.log('~~~~| DING |~~~~: '+eventInfo.sourceAttribute); }); but changing the attribute name to "delete_rep_ability" works on('change:delete_rep_ability', function(eventInfo) { console.log('~~~~| DING |~~~~: '+eventInfo.sourceAttribute); }); It appears the API is now interpreting "_repeating" in an attribute's name as a repeating section/or ignoring it all together.