Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Character Sheet Enhancement

From Roll20 Wiki

Revision as of 23:04, 29 April 2021 by Andreas J. (Talk | contribs)

Jump to: navigation, search

Character Sheet Creation
Getting Started


Reference


Tools & Tips


Git/GitHub GitHubLogo.png


Other

Main Page: Building Character Sheets


Character Sheet Enhancement (or CSE for short) is an update to character sheets and how they are made, enabling many new features, and removing some existing restrictions sheet creators have had to deal with. See Legacy Sheet(LCS) for info on the older system.


It was available on the Dev Server for testing During February, and fully released on March 9th 2021, then partially(?) rolled back little later due to some problems.

Contents

Info

Features

A summary of what updates the sheet system will have.

  • HTML updates:
    • Accessibility enhancements: ARIA and semantic HTML support
    • No pre-pending of sheet- to classes in CSS (apart from roll-templates)
    • Enable use of #id in HTML elements
    • Allowing the usage of HTML datalists
    • Allowing the usage of HTML <details> and <summary>-elements – (part of semantic HTML support)
  • The CSS sanitizer has been removed, which now allows for:
  • Integrated macro bar for character quick attacks, including pop out windows
  • Character Sheet/Stat Block is the default for opening a PC/NPC This is being reverted until we have more research regarding implementation.

Restrictions

CSE has fewer restrictions than Legacy Sheet, but still have a number of them.

CSE Code Restrictions


Issues

See the BCS/Weird page linking/listing issues people have encountered with making CSE-sheets, or trying to convert Legacy Sheet to CSE.

How to update sheet to new



CSE Examples

Collection of examples, usercases or links to info of some of the new features. Please expand with code or links to examples/documentation.

ID

Examples of using the HTML global element #id.

An id name cannot start with a number.

id CSS selector

Use an id to select one unique element.

//html
<input type="text" id="character-name" name="attr_character_name" value="" placeholder="Character Name" />

//css
#character-name {
  text-align: center;
  color: red;
}

id Clickable Label text

Create "clickable" label text by using a linked label and input. Linked labels could replace various methods that use hidden checkboxes to simulate clickable text/buttons on a sheet.

//html
<input id="attackMod1" name="attr_attackMod1" type="checkbox" value="1" class="hidden">
<label for="attackMod1" class="link">Apply Modifier</label>
//css
.sheet-hidden {
    display:none;
}
label.link:hover {
  cursor: help;
  text-decoration: underline;
  color: red;
}
input[type="checkbox"]:checked + label.link {
  color: red;
}

id Sheet Anchors

Create links to jump to anchored elements of a sheet. Could be used as a "Navigational Menu/Table of Contents", or simply as clickable text that can quickly move to another section of a sheet.

//html
<h2>Sheet Anchor example</h2>
<h3 id="menu">Menu</h3>
<ul>
    <li><a href="#Attacks">Attacks</a></li>
    <li><a href="#Skills">Skills</a></li>
    <li><a href="#Spells">Spells</a></li>
</ul>
<h3 id="Attacks">Attacks</h3>
<p>"Lorem ipsum"</p>
<h3 id="Skills">Skills</h3>
<p>"Lorem ipsum"</p>
<h3 id="Spells">Spells</h3>
<p>"Lorem ipsum"</p>
<hr>
<p><a href="#menu">Menu</a></p>

Datalist

"Datalists are a helpful tool for sheet authors to guide players toward filling out input-fields. Datalists combines the precision of a dropdown-field with the flexibility of an input-field." -Peter B.

<input type="text" list="abilityScores" name="attr_abilityScore">
<datalist id="abilityScores">
    <option value="@{strength}">Strength</option>
    <option value="@{dexterity}">Dexterity</option>
    <option value="@{constitution}">Constitution</option>
    <option value="@{intelligence}">Intelligence</option>
    <option value="@{wisdom}">Wisdom</option>
    <option value="@{charisma}">Charisma</option>
</datalist>

<details>

A more simple way to create a collapsible section on a sheet than the old CSS tricks we have.

You have a <details> where everything is inside, and then the <summary>-element inside it determine what is shown when it's collapsed.

<details>
  <summary>Epcot Center</summary>
  <p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</details>

Accessibility

Accessibility enhancements: ARIA and semantic HTML support

Responsive Design

Aimed at making adjustment for mobile

Mobile

Responsive design leads way to more easily adapting/optimizing Char Sheet for eventual use with the new Mobile-app, which is in Open Beta(as of 18th March 2021).

GitHubLogo.png:
@media only screen and (max-width: 480px) {
    .sheet-wrapper {
        min-width: 320px;
    }
        
    .sheet-traits4 {
        display: grid;
        grid-template-columns: repeat(2, 1fr );
        align-items: start;
    }

    .sheet-traits3 {
        display: grid;
        grid-template-columns: repeat(1, 1fr );
        align-items: start;
    }

    .sheet-traits2 {
        display: grid;
        grid-template-columns: repeat(1, 1fr );
        align-items: start;
    }

    .sheet-traits2 .sheet-traits2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr );
        align-items: start;
    }

    .sheet-traits1 {
        display: grid;
        grid-template-columns: repeat(1, 1fr );
        align-items: start;
    }

/* halo layout */

    .sheet-editPane {
         width: 80%;
     }
    
    input[name="attr_Portrait"][value="PC0"]  {
        border: 1px solid #cccc00;
        text-align: center;
        background-color: rgba(255, 128, 0, 0.05);
    }

    h1.sheet-hide {
        visibility: visible !important;
        display: block;
    }

    input[name="attr_Portrait"]:not([value="PC0"]) ~ .sheet-physical {
        position: static;
        border: 1px dashed #ffcb2b;
        border-top: 6px solid #ffcb2b;
        padding: 5px;
    }

    input[name="attr_Portrait"]:not([value="PC0"]) ~ .sheet-mental {
        position: static;
        border: 1px dashed #ffcb2b;
        border-top: 6px solid #ffcb2b;
        padding: 5px;
    }

    input[name="attr_Portrait"]:not([value="PC0"]) ~ .sheet-social {
        position: static;
        border: 1px dashed #ffcb2b;
        border-top: 6px solid #ffcb2b;
        padding: 5px;
    }
    
    input[name="attr_Portrait"]:not([value="PC0"]) + .sheet-action {
        display: block;
        visibility: visible;
    }
    
    .charsheet button[type="roll"].sheet-blank-roll-button + span {
        display: block !important;
        visibility: visible !important;
    }
}

General Tips:

  • Make roll buttons & input fields larger
  • Uing CSS Grid or Flexbox for the normal sheet layout will make it easier to create a resposive/phone-adapted version of the layout.
    • Like have some stat sections that on the normal sheet is arranged in a 2x3 grid, have on mobile these appear in a 1x6 grid. Can also be a easier first step to adjust
  • reduce number of features that requires you to "hover" your mouse over some section. (tooltips are less accessible)

Popup

code snippet by Roll20 Dev exemplifying how popups can be implemented on sheets.

https://codepen.io/imprakash/pen/GgNMXO

Make sheet Print-Friendly

The CSS sanitation upgrade makes it now possible to use @media print media query to style character sheets for printing from the popout window- –

It can be a good idea to take a look at any existing paper versions of the char sheet for your system and maybe create a compromise layout that's somewhere between the default Roll20 sheet and the paper version, for familiarity's sake.

List of things that can make sheets printer - friendly:

  • remove all "redundant" images, except logo. (minimize ink use)
  • remove roll buttons
  • force sheet aspect ratio to fit A4
  • set background to white, change text & section borders to be thin and high contrast, with as much being white
  • collapsed info boxes/repeating sections
    • expand all collapsed info sections
    • make print option to show some repeating sections in a "condensed form", such as spellists or inventory, showing each as a one-liner and skipping their detailed description
    • make option to have spell/powers/items appear at separate pages with all their info, like in the form of spellcards.
  • multi-tab sheets
    • if contains mutually excursive sheet-types (like PC/NPC/ships), show only content of the one used
    • skip the Settings tab
  • control number of pages
  • adjust things so sheet info could fit on one or two pages(for a single-sheet printout), or make it a multiple of two.
  • spread out things evenly so there isn't any page with just a tiny bit info
  • advanced idea: create an optional "condensed" print version where all stats are shown as compactly as possible, maybe even on a single page. This "condensed print mode" could be toggled from the settings.

Sheets Using CSE

List of char sheets that have been updated to at least be CS-compliant, but likely also adopted to use some of the new features.

See Also