Difference between revisions of "Sheet Author Tips"
From Roll20 Wiki
Andreas J. (Talk | contribs) m |
Andreas J. (Talk | contribs) (→Statblock Importer: list more sheets with importers) |
||
(70 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{revdate}}{{BCS}} {{NavSheetDoc}} | |
− | {{NavSheetDoc}} | + | |
− | + | ||
− | '''Sheet Author''' is a badge people who have created & submitted [[CS|character sheets]] to Roll20 get. | + | This is a collection of more advanced [[Sheet Author]] Tips that currently doesn't fit on the [[:Category:Character_Sheet_Creation|other pages relating to character sheet creation & editing]]. Most of the suggestions & ideas are taken from the Roll20 forums, or discussions among Sheet Authors. |
+ | |||
+ | '''[[Sheet Author]]''' is a badge people who have created & submitted [[CS|character sheets]] to Roll20 get. | ||
__TOC__ | __TOC__ | ||
Line 12: | Line 12: | ||
Some Highlights: | Some Highlights: | ||
− | * [[ | + | * '''[[Character Sheet Development/Tools]]''' - community recommendations |
− | * [[Building_Character_Sheets#Best_Practices| Best Practices]] | + | * [[Character Sheet Development/Common Mistakes|Common Mistakes]] |
+ | * [[Building_Character_Sheets#Best_Practices|Best Practices]] | ||
* [[Building_Character_Sheets#Advanced_Sheet_Options|Advanced Sheet Options]] | * [[Building_Character_Sheets#Advanced_Sheet_Options|Advanced Sheet Options]] | ||
Line 19: | Line 20: | ||
Using the [[Custom Sheet Sandbox|Sheet Sandbox]] while editing/developing character sheets is much more effective and quicker than the normal [[Building_Character_Sheets#The_Sheet_Editor|Sheet Editor]]. | Using the [[Custom Sheet Sandbox|Sheet Sandbox]] while editing/developing character sheets is much more effective and quicker than the normal [[Building_Character_Sheets#The_Sheet_Editor|Sheet Editor]]. | ||
− | + | Alongside it, most authors use a text editor such as [[VS Code]]. | |
− | + | '''Recommended Plugin: [[Roll20 Autouploader]]''' -- [[Browser#Plugins|browser plugin]] that can autoupload & update your sheet code in the sheet sandbox, so you don't have to do it manually each time. Can also do same for API scripts. | |
− | + | ||
− | + | ==Tools== | |
+ | See '''[[Character Sheet Development/Tools]]''' for community recommendations on sheet dev tools. | ||
− | + | ==Code Validation== | |
+ | It's a good idea to use a validator to check your code for mistakes in your code. Many IDE & text editors can install such extensions automatically, but given that Roll20 does a few things their own way, by default a HTML validator would complain about lot of things that aren't wrong, but just isn't accepted as standard HTML, such as <code><button type="roll"></button></code>. | ||
− | * [https:// | + | * '''HTML''': [https://validator.w3.org/ W3C's HTML Validator] |
− | * [https:// | + | ** initially give many warnings and errors on roll20-specific things, but you can filter away things that aren't wrong, and the list of error is quickly reduced to a manageable amount |
+ | ** [https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Debugging_HTML Debugging HTML] | ||
+ | * '''CSS''': [https://jigsaw.w3.org/css-validator/ W3C's CSS Validator] | ||
+ | ** [https://developer.mozilla.org/en-US/docs/Lear==Roll20 Autouploader== | ||
+ | {{main|Roll20 Autouploader}} | ||
+ | {{:Roll20 Autouploader}}n/CSS/Building_blocks/Debugging_CSS Debugging CSS] | ||
+ | * '''JavaScript'''(for sheetworkers & API): [https://closure-compiler.appspot.com/home Closure Compiler for JS] | ||
+ | * '''JSON'''(for [[i18n|translation files]] & [[sheet.json]]: [https://jsonlint.com/?code= jsonlint.com] | ||
==Frameworks== | ==Frameworks== | ||
− | Beyond just using HTML/CSS directly, you could use some pre-processors that can speed up the development, instead of directly writing HTML/CSS. Here | + | Beyond just using HTML/CSS directly, you could use some pre-processors, language extensions, or frameworks that can speed up the sheet development, instead of directly writing HTML/CSS. Here are a few suggestions, used by a good number of sheet authors, including Roll20's teams working on the official sheets. |
− | + | :''Use PUG & SASS/SCSS & JavaScript to make sheets. PUG & SCSS are the two most useful things I've ever learned for sheet development. Character sheets which use to take hundred+ hours takes now 20-40 thanks to PUG which is a JavaScript based language to write HTML. You'll save yourself a lot of redundant work by just using the power of loops & variables if nothing else.'' | |
− | + | ||
− | + | :''Troubleshooting becomes much easier when you need to fix just one line in a loop rather than a dozen copy/paste html snippets.'' | |
− | + | :''PUG and SCSS can be used to simply split up the HTML & CSS files into smaller, more manageable files, which can then simply be compiled into their end results when it's time to use the sheet in a game.'' | |
− | + | :''These are compiled languages so you'll need to do that. Easily done via terminal if your tech savy, or [https://prepros.io/ prepros.io] if you're not.'' | |
− | + | ===PUG=== | |
+ | {{:PUGjs}} | ||
− | + | === SASS === | |
− | + | {{:SASS}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
=== Handlebars === | === Handlebars === | ||
Suggestion by [https://app.roll20.net/users/2322441 Primal Zed] | Suggestion by [https://app.roll20.net/users/2322441 Primal Zed] | ||
− | + | {{forum|post/8380005/sheet-templating-with-handlebars thread}} | |
'''Pros:''' | '''Pros:''' | ||
Line 75: | Line 78: | ||
* Requires Node.js installation and some command lines | * Requires Node.js installation and some command lines | ||
− | == | + | === Bootstrap=== |
− | + | There are a number of sheets in the {{repo|Roll20/roll20-character-sheets repository}} that have been built with [https://getbootstrap.com/ Bootstrap], but using it for sheet development is a bit on the heavy side, and can have a higher bar to get started with than only using pre-prosessors like PUG and SASS. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Git/GitHub== | ==Git/GitHub== | ||
Line 104: | Line 101: | ||
==Pattern Libraries & Components== | ==Pattern Libraries & Components== | ||
− | + | {{main|Character Sheet Development/Pattern Libraries}} | |
− | + | {{:Character Sheet Development/Pattern Libraries}} | |
− | == | + | ==Advanced Sheet Features== |
− | + | ===Statblock Importer=== | |
− | + | Some sheets have integrated options to import sheets to Roll20, such as for plaintext or <code>.json</code> statblocks. | |
− | + | ||
− | // | + | Existing Sheets with integrated import functions, by format: |
− | + | * '''json''' | |
− | + | ** [[Official_Savage_Worlds#JSON_Importer|Official Savage Worlds]] - json importer | |
− | + | ** [https://github.com/Roll20/roll20-character-sheets/tree/master/Fate Fate by Evil Hat] json import/export for character stats | |
− | + | ** {{sheet-gh|Mythras/src/scripts/import.js Mythras}} json importer | |
− | + | ** [https://github.com/Roll20/roll20-character-sheets/tree/master/Rolemaster-Standard-System Rolemaster Standard System] - Json importer for NPC statblocks, with example JSON import included. | |
− | + | ** [https://github.com/Roll20/roll20-character-sheets/tree/master/RolemasterUnified RolemasterUnified] json importer | |
− | + | * '''herolabs''' | |
− | } | + | ** [[Mutants & Masterminds 3E Official#Hero_Labs_Importer|Mutants & Masterminds 3E Official]] - herolab importer |
+ | ** [[Pathfinder Community Sheet#HeroLab Character import|Pathfinder Community Sheet]] - herolab importer | ||
+ | * '''plaintext/other''' | ||
+ | ** [https://github.com/Roll20/roll20-character-sheets/tree/master/ChroniquesOublieesContemporain ChroniquesOublieesContemporain] import statblocks by copying text from pdfs. More info [https://stephaned68.github.io/ChroniquesContemporaines/import-statblock here] | ||
+ | ** [https://github.com/Roll20/roll20-character-sheets/tree/master/Naheulbeuk Naheulbeuk] importer | ||
+ | ** {{sheet-gh|Shadowrun5thEdition Shadowrun5thEdition}} & {{sheet-gh|Shadowrun5th Shadowrun5th}} both have Chummer importers | ||
+ | ** [[GeneFunk2090]] statblock importer | ||
+ | ** [https://github.com/Roll20/roll20-character-sheets/tree/master/Only-War-Enhanced Only-War-Enhanced] sourcecode has unfinished importer | ||
− | |||
− | |||
− | // | + | Some sheets have instead a separate [[API]] for this purpose, such as [https://github.com/Roll20/roll20-api-scripts/tree/master/Earthdawn%20(FASA%20Official)%20character%20sheet%20companion Earthdawn by FASA character sheet companion], [[Script:HL-Import]] and |
− | + | [[Script:HeroLabImporter]]. | |
− | + | ||
− | + | ||
− | + | ||
− | / | + | See also: [[Character Sheets/Import]] |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ===GM Screen=== | |
− | + | Sometimes just an NPC sheet isn't enough, and it would be beneficial for the GM to have a GM Screen built into the sheet. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ===Changelog and Update Notification inside Sheet=== | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[File:GURPS-sheet-update-notice.png|right|thumb|350px|The GURPS sheet displaying the latest sheet update notice.]] | [[File:GURPS-sheet-update-notice.png|right|thumb|350px|The GURPS sheet displaying the latest sheet update notice.]] | ||
− | If you a lots of changes to a sheet, or want to make sure that | + | If you a lots of changes to a sheet, or want to make sure that all users of the sheet are informed of the updates, you could integrate the sheet changelog & notification into the sheet, so next time they open a sheet their sheet they seem the update notice, & can dismiss them at will. |
− | + | Alternatively, the changelog could be placed on a separate tab, such as folded it into the '''Settings'''-tab | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | The team behind the [[GURPS]] character sheet is a great example of incorporating a comprehensive changelog into the sheet, with a collapsible notice of the latest update/message from the sheet authors, and is non-obstructive even when not dismissed. | |
+ | * {{repo|Roll20/roll20-character-sheets/tree/master/GURPS GURPS 4E sourcecode}} | ||
+ | * https://app.roll20.net/forum/post/10732652/notifying-users-of-changes-to-sheet | ||
+ | <br clear="right"> | ||
==Sharing code/collaboration== | ==Sharing code/collaboration== | ||
Line 198: | Line 151: | ||
The "Revisions" tab of a gist shows clearly code changes between revisions, so tracking what have changed makes things easier for you and others. | The "Revisions" tab of a gist shows clearly code changes between revisions, so tracking what have changed makes things easier for you and others. | ||
+ | |||
+ | * [http://hilite.me/ hilite.me] can be used to convert your code to pretty html-formatted code that's very clear when copypasted to the [[forums]]. (Trick by [[Aaron|The Aaron]]) | ||
=Related Pages= | =Related Pages= | ||
* [[Custom Sheet Sandbox|Sheet Sandbox]] – the better editor to use when you code your character sheets | * [[Custom Sheet Sandbox|Sheet Sandbox]] – the better editor to use when you code your character sheets | ||
+ | * [[Javascript:Best Practices]] | ||
+ | * [[Sheet Author's Journey]] - tutorial | ||
* [[Andreas Guide to Sheet Development]] - general advice & mentions of things to consider when developing sheets | * [[Andreas Guide to Sheet Development]] - general advice & mentions of things to consider when developing sheets | ||
* [[Building Character Sheets]] - main article | * [[Building Character Sheets]] - main article | ||
Line 211: | Line 168: | ||
==See Also== | ==See Also== | ||
* Community | * Community | ||
− | ** | + | ** {{forum|category/277980 Roll20 Forums - Character Sheets & Compendiums}} - Best place for discussing Sheets with other [[Sheet Authors]], and to get clatest info |
** [https://discordapp.com/invite/sMsv5KD Unofficial Roll20 Discord] - The Discord server have two channels for discussing Character Sheet Creation, and many active Sheet Authors are present. | ** [https://discordapp.com/invite/sMsv5KD Unofficial Roll20 Discord] - The Discord server have two channels for discussing Character Sheet Creation, and many active Sheet Authors are present. | ||
* [https://google.github.io/styleguide/htmlcssguide.html Google's HTML/CSS Styleguide] | * [https://google.github.io/styleguide/htmlcssguide.html Google's HTML/CSS Styleguide] | ||
* [https://css-tricks.com/css-style-guides/ css-tricks.com Style Guides collection] | * [https://css-tricks.com/css-style-guides/ css-tricks.com Style Guides collection] | ||
− | * | + | ** [https://developer.mozilla.org/en-US/docs/Web/CSS/:is is() pseudo-class] |
− | + | * [[Character_Sheet_Development/Sheet_Templates|Sheet Templates/Examples]] | |
− | + | * {{yt.be|k6wDQJnGJCk PT1 coding a Roll20 Character Sheet}} 40min (April 2021) | |
− | * | + | |
− | + | ||
− | + | ||
<br> | <br> | ||
[[Category:Sheetworker]] | [[Category:Sheetworker]] | ||
[[Category:Character Sheet Creation]] | [[Category:Character Sheet Creation]] | ||
+ | [[Category:Character Sheet Development]] | ||
[[Category:Tips]] | [[Category:Tips]] | ||
− | [[Category: | + | [[Category:External Tools]] |
Latest revision as of 11:47, 18 June 2022
Page Updated: 2022-06-18 |
This is related to Editing(coding) Character Sheets, which require Pro info to be able to use.Main Page: Building Character Sheets |
Character Sheet Development
Getting Started
- Using Custom Sheets
- Building Sheets
(Main Page) - Glossary
- Code Restrictions
- Best Practice
- Common Mistakes
- Tutorials
- Examples, Templates
- Pattern Libraries
- HTML & storing data
- CSS & Styling
General
- Updates & Changelog
- Known Bugs
- Character Sheet Enhancement(CSE)
- Custom Roll Parsing
- Legacy Sheet(LCS)
- Beacon SDK
Reference
- Buttons
- Repeating Sections
- Sheetworkers
- Roll Templates
- sheet.json
- Translation
- Auto-Calc
- Advanced
- All SheetDev Pages
Tools & Tips
- Sheet Sandbox
- Sheet Editor
- Sheet Dev Tools
- Sheet Author Tips
Other
This is a collection of more advanced Sheet Author Tips that currently doesn't fit on the other pages relating to character sheet creation & editing. Most of the suggestions & ideas are taken from the Roll20 forums, or discussions among Sheet Authors.
Sheet Author is a badge people who have created & submitted character sheets to Roll20 get.
Contents |
[edit] Read the documentation
Give the Building Character Sheets-article a full read, as it contains lots of information on the specific quirks & pitfalls of how Roll20 character sheets works compared to default HTML/CSS/JavaScript. Even if you know how things work.
Some Highlights:
- Character Sheet Development/Tools - community recommendations
- Common Mistakes
- Best Practices
- Advanced Sheet Options
[edit] Sheet Sandbox
Using the Sheet Sandbox while editing/developing character sheets is much more effective and quicker than the normal Sheet Editor.
Alongside it, most authors use a text editor such as VS Code.
Recommended Plugin: Roll20 Autouploader -- browser plugin that can autoupload & update your sheet code in the sheet sandbox, so you don't have to do it manually each time. Can also do same for API scripts.
[edit] Tools
See Character Sheet Development/Tools for community recommendations on sheet dev tools.
[edit] Code Validation
It's a good idea to use a validator to check your code for mistakes in your code. Many IDE & text editors can install such extensions automatically, but given that Roll20 does a few things their own way, by default a HTML validator would complain about lot of things that aren't wrong, but just isn't accepted as standard HTML, such as <button type="roll"></button>
.
- HTML: W3C's HTML Validator
- initially give many warnings and errors on roll20-specific things, but you can filter away things that aren't wrong, and the list of error is quickly reduced to a manageable amount
- Debugging HTML
- CSS: W3C's CSS Validator
- [https://developer.mozilla.org/en-US/docs/Lear==Roll20 Autouploader==
Main Page: Roll20 Autouploader
Roll20 API and Sheet Autouploader is a Chromium extension that will automate the uploading of code to your Sheet Sandbox, created by Scott C..
This streamlines Character Sheet Development, removing the need to manually upload the files when you want to test changes. The extension will eventually work with API Development as well.
- Install (Chrome Web Store)
- sourcecode: https://github.com/Kurohyou-Studios/R20AutoCode
- forum thread: Automatically upload your sheet code! (May 2022)
- Video of it in action!
It should work on all chromium browsers except for Brave, which has disabled the chromium features that the extension relies on. n/CSS/Building_blocks/Debugging_CSS Debugging CSS]
- JavaScript(for sheetworkers & API): Closure Compiler for JS
- JSON(for translation files & sheet.json: jsonlint.com
[edit] Frameworks
Beyond just using HTML/CSS directly, you could use some pre-processors, language extensions, or frameworks that can speed up the sheet development, instead of directly writing HTML/CSS. Here are a few suggestions, used by a good number of sheet authors, including Roll20's teams working on the official sheets.
- Use PUG & SASS/SCSS & JavaScript to make sheets. PUG & SCSS are the two most useful things I've ever learned for sheet development. Character sheets which use to take hundred+ hours takes now 20-40 thanks to PUG which is a JavaScript based language to write HTML. You'll save yourself a lot of redundant work by just using the power of loops & variables if nothing else.
- Troubleshooting becomes much easier when you need to fix just one line in a loop rather than a dozen copy/paste html snippets.
- PUG and SCSS can be used to simply split up the HTML & CSS files into smaller, more manageable files, which can then simply be compiled into their end results when it's time to use the sheet in a game.
- These are compiled languages so you'll need to do that. Easily done via terminal if your tech savy, or prepros.io if you're not.
[edit] PUG
PUG is a template engine for generating HTML, where you can use various features & tool to write code more efficiently, such as using variables and loops, and has a simpler syntax.
//- Comment that only appears in PUG - var pages = ["character", "skills", "inventory", "magic", "familiar", "background", "campaign", "vehicle", "settings"]; div span Page selection select(name="attr_sheetTab") each tab in pages option(value=`${tab}`)= tab[0].toUpperCase() + tab.slice(1)
Result HTML:
<div> <span>Page selection</span><select name="attr_sheetTab"> <option value="character">Character</option> <option value="skills">Skills</option> <option value="inventory">Inventory</option> <option value="magic">Magic</option> <option value="familiar">Familiar</option> <option value="background">Background</option> <option value="campaign">Campaign</option> <option value="vehicle">Vehicle</option> <option value="settings">Settings</option> </select> </div>
- PUG - Getting Started
- PUG -> HTML online converter
- codingshala PUG tutorial
- A Sheet Author's Journey(Part 2) - Do the PUG!(Forum) Feb 2022
Examples, Sheets, & Sheet template made with PUG:
- Example snippets of SCSS & PUG, by Andreas J.
- K-Scaffold - by Scott C.
- SheetTemplate by Cassie
- Aureyia's Roll20 Sheet Boilerplate - Uses PUG, Stylus(CSS) & Gulp
- Stargate RPG active sheet using some PUG & SCSS, by Andreas J.
- Genefunk 2090 sheet createed with PUG, by Scott C.
- there are several sheets in the sheet repository made using either or both, you can search through it to find more examples
[edit] SASS
SASS/SCSS is a widely used CSS extension language. It's CSS Compatible, so you can start using it by writing plain CSS first, and slowly including more SASS features, while keeping it familiar & looking mostly like CSS.
One of the things you can do it to nest your code, saving you from repeating yourself with things like needing to add .charsheet
in from of every class.
/*-------------------------------------------*/ /*-----Main Settings and hide classes--------*/ // comments with two slashes won't appear in the resulting .css, which is handy for writing extra comments thaat aren't relevant to the css. // SCSS enables nesting of classes, saving time in writing, and making it easier to read/organize the CSS. There are also tother features,but this is the main one I've started to use, as it helps with reading the scss/css. One can start from pure css, and then bit by bit simplify/refactor it to use more scss features .charsheet { .main-settings { display: none; position: relative; margin-left: 0; .container { width: 850px; } .input-row { label { display: inline-block; width: auto; } input { margin-right: 30px; } select { width: 45%; margin-right: 15px; } } } input.main-options.options-flag + span,/*displays the cog icon*/ input[type=radio]:checked ~ .master-container input.options-flag + span { font-family: pictos; font-style: normal; } }
resulting CSS:
/*-------------------------------------------*/ /*-----Main Settings and hide classes--------*/ .charsheet .main-settings { display: none; position: relative; margin-left: 0; } .charsheet .main-settings .container { width: 850px; } .charsheet .main-settings .input-row label { display: inline-block; width: auto; } .charsheet .main-settings .input-row input { margin-right: 30px; } .charsheet .main-settings .input-row select { width: 45%; margin-right: 15px; } .charsheet input.main-options.options-flag + span, .charsheet input[type=radio]:checked ~ .master-container input.options-flag + span { font-family: pictos; font-style: normal; }
- Learn SCSS/SASS
- Online Compilers: sassmeister playground | cssportal.com
- Beginner's Guide to Using SCSS
- Basic SCSS Nesting
- The processor is called SASS,
- SCSS is the more common syntax used, as it's compatible with pure CSS.
- the SASS syntax doesn't use brackets(but is otherwise same as SCSS). SASS-syntax seems to be less used.
- Guides to SASS/SCSS should be interchangeable, apart from using or not using CSS's curly bracket syntax
Examples, Sheets, & Sheet template made with SASS:
- Example snippets of SCSS & PUG, by Andreas J.
- K-Scaffold - by Scott C.
- Warhammer Fantasy Roleplay 4e Official - well structured & modular scss
- SheetTemplate by Cassie
- Barbaric! sheet using only a bit of scss, by Andreas J.
- Stargate RPG active sheet using some PUG & SCSS, by Andreas J.
- there are several sheets in the sheet repository made using either or both, you can search through it to find more examples
[edit] Handlebars
Suggestion by Primal Zed
thread(Forum)
Pros:
- Looks like HTML (or whatever file type you're templating), with handlebars blocks added in
- Inject data values anywhere directly into the HTML
- Can yield benefit with little effort - sheet authors can use as much or as little as they want
- Handlebars blocks have opening and close tags similar to HTML
- Easy to add new templates for re-use and organization
Cons:
- Involves new syntax to learn and helpers to understand
- Built-In Helpers
- For advanced use: Additional Helpers
- For advanced use: Repeat Helper
- Requires Node.js installation and some command lines
[edit] Bootstrap
There are a number of sheets in the repository that have been built with Bootstrap, but using it for sheet development is a bit on the heavy side, and can have a higher bar to get started with than only using pre-prosessors like PUG and SASS.
[edit] Git/GitHub
- Beginner's Guide to GitHub(Roll20)
- Short Git Guide - A guide to using the command line version of Git to work on your computer, instead of GitHub Desktop
[edit] Install the Pull App to GitHub
Be sure to create separate branches on your fork for editing since the PULL bot might overwrite your master -branch when syncing with the Roll20 repository. Use at your own risk. |
Pull App is a GitHub bot that can automatically watch and pull in Roll20's upstream default master
-branch to your fork using hard reset every few hours. You can also manually trigger it anytime.
Failure to keep your GitHub fork in sync with the master repo can create merge conflicts causing a pull request to be rejected or delayed. The Pull App can help automate this process and keep your fork in sync with Roll20's master
-branch.
While the Pull App will sync in the background every few hours, it is recommended that you manually run the bot before creating a branch for editing to ensure your fork's master
-branch is in sync with Roll20's most current master
-branch.
[edit] Use Branches in GitHub
Do not make changes to your GitHub master
-branch. Instead make a branch from master
to do all upgrades there. Submit pull request to the Roll20 repo directly from a branch. This is a safe way to do version control and will improve the integrity of your work.
[edit] Pattern Libraries & Components
Main Page: Character Sheet Development/Pattern Libraries
- K-Scaffold - A Roll20 sheet framework - by Scott C.
- Examples & Demo(Forum)
- Sheet Author's Journey - a sheet dev tutorial using K-Scaffold
- Roll20 Snippets - Char sheet & API code snippets - maintained by Scott C.
- Roll20Async - framework to support for asynchronous code in Roll20 Sheetworkers
- The Aaron Sheet - A facade for Sheet Worker Tasks and Utility Functions, including stylized console.log messaging.
- RepeatingSum - sheetworker snippets to make it simple to sum up info on repeating sections
- Cassie's pattern library - various HTML/CSS/JS snippets & design patterns. Feb 2020, LCS
- Roll20 Sheet Dev (VS Code Extension) - contains some code snippets for common roll20 sheet components - by Andreas J.
[edit] Advanced Sheet Features
[edit] Statblock Importer
Some sheets have integrated options to import sheets to Roll20, such as for plaintext or .json
statblocks.
Existing Sheets with integrated import functions, by format:
- json
- Official Savage Worlds - json importer
- Fate by Evil Hat json import/export for character stats
- json importer
- Rolemaster Standard System - Json importer for NPC statblocks, with example JSON import included.
- RolemasterUnified json importer
- herolabs
- Mutants & Masterminds 3E Official - herolab importer
- Pathfinder Community Sheet - herolab importer
- plaintext/other
- ChroniquesOublieesContemporain import statblocks by copying text from pdfs. More info here
- Naheulbeuk importer
- & both have Chummer importers
- GeneFunk2090 statblock importer
- Only-War-Enhanced sourcecode has unfinished importer
Some sheets have instead a separate API for this purpose, such as Earthdawn by FASA character sheet companion, Script:HL-Import and
Script:HeroLabImporter.
See also: Character Sheets/Import
[edit] GM Screen
Sometimes just an NPC sheet isn't enough, and it would be beneficial for the GM to have a GM Screen built into the sheet.
[edit] Changelog and Update Notification inside Sheet
If you a lots of changes to a sheet, or want to make sure that all users of the sheet are informed of the updates, you could integrate the sheet changelog & notification into the sheet, so next time they open a sheet their sheet they seem the update notice, & can dismiss them at will.
Alternatively, the changelog could be placed on a separate tab, such as folded it into the Settings-tab
The team behind the GURPS character sheet is a great example of incorporating a comprehensive changelog into the sheet, with a collapsible notice of the latest update/message from the sheet authors, and is non-obstructive even when not dismissed.
[edit] Sharing code/collaboration
If you need to share larger parts of a sheets code with others on the Roll20 forums or somewhere else quickly, using GitHub Gist to share the full sheet is a smart alternative to Dropbox/Google Drive/Pastebin.
The "Revisions" tab of a gist shows clearly code changes between revisions, so tracking what have changed makes things easier for you and others.
- hilite.me can be used to convert your code to pretty html-formatted code that's very clear when copypasted to the forums. (Trick by The Aaron)
[edit] Related Pages
- Sheet Sandbox – the better editor to use when you code your character sheets
- Javascript:Best Practices
- Sheet Author's Journey - tutorial
- Andreas Guide to Sheet Development - general advice & mentions of things to consider when developing sheets
- Building Character Sheets - main article
- CSS Wizardry - List of Tips & Tricks on how to create a variety of effects on your character sheet
- Designing Character Sheet Layout - tips on how to best design the broad strokes of a character sheet
- Default Sheet Settings - Customize default settings and values of new character sheets added to a campaigns
- List of all pages related to "Character Sheet Creation"
- Reusing Rolls - Recent macro-related discovery that have uses for character sheet rolls
[edit] See Also
- Community
- Roll20 Forums - Character Sheets & Compendiums(Forum) - Best place for discussing Sheets with other Sheet Authors, and to get clatest info
- Unofficial Roll20 Discord - The Discord server have two channels for discussing Character Sheet Creation, and many active Sheet Authors are present.
- Google's HTML/CSS Styleguide
- css-tricks.com Style Guides collection
- Sheet Templates/Examples
- PT1 coding a Roll20 Character Sheet 40min (April 2021)