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

Difference between revisions of "Default Sheet Settings"

From Roll20 Wiki

Jump to: navigation, search
m (Requirements include:)
(More info on some options and clarify that all are not mandatory)
Line 3: Line 3:
 
Character Sheets can store settings for all characters in the '''useroptions''' section of the sheet.json file. These settings can be updated easily in the [[Game Settings Page|Game Settings]]. An simple example of what can be done with these settings can be found in the [https://github.com/Roll20/roll20-character-sheets/blob/master/Star%20Trek%20Adventures%20by%20Roll20/sheet.json Star Trek sheet.json file]. More complex examples can be found in the [https://github.com/Roll20/roll20-character-sheets/blob/master/5th%20Edition%20OGL%20by%20Roll20/sheet.json D&D 5e by Roll20 sheet.json file], or the [https://github.com/Roll20/roll20-character-sheets/blob/master/Pathfinder%20by%20Roll20/sheet.json Pathfinder Official sheet.json].
 
Character Sheets can store settings for all characters in the '''useroptions''' section of the sheet.json file. These settings can be updated easily in the [[Game Settings Page|Game Settings]]. An simple example of what can be done with these settings can be found in the [https://github.com/Roll20/roll20-character-sheets/blob/master/Star%20Trek%20Adventures%20by%20Roll20/sheet.json Star Trek sheet.json file]. More complex examples can be found in the [https://github.com/Roll20/roll20-character-sheets/blob/master/5th%20Edition%20OGL%20by%20Roll20/sheet.json D&D 5e by Roll20 sheet.json file], or the [https://github.com/Roll20/roll20-character-sheets/blob/master/Pathfinder%20by%20Roll20/sheet.json Pathfinder Official sheet.json].
  
=== Requirements include: ===
+
=== Data fields options: ===
  
* '''attribute''' - the name of the sheet variable set with this option
+
* '''attribute''' - the name of the sheet variable set with this option. Don't include the <code>attr_</code> prefix in the name.
 
* '''displayname''' - Title element of the selection
 
* '''displayname''' - Title element of the selection
* '''displaytranslationkey''' - i18n [[Character Sheet i18n|translation key]] for translation into other languages
+
* '''displaytranslationkey''' - i18n [[Character Sheet i18n|translation key]] for translation into other languages(not mandatory if sheet doesn't use translations)
* '''type''' - HTML form element to be used in [[Game Settings Page]]. Options include select, radio, checkbox, text, number
+
* '''type''' - the HTML input element to be used in [[Game Settings Page]]. Options include: <code>select</code>, <code>radio</code>, <code>checkbox</code>, <code>text</code>, <code>number</code>
* '''options''' - If your form element has predefined options, the key/value pairs are listed here
+
* '''options''' - If your input element has predefined options, the key/value pairs are listed here
* '''optiontranslationkeys''' - i18n translation keys for the options
+
* '''optiontranslationkeys''' - i18n translation keys for the options (not mandatory if sheet doesn't use translations)
* '''default/value''' - the default value of the attribute
+
* '''default/value''' - the default value of the attribute. If used for a select input with multiple options, set this to the value of the wanted default selection, not incuding the key. Use either ''default'' or ''value''.
 
* '''description''' - a text string use to give further detail about the option and the changes it controls
 
* '''description''' - a text string use to give further detail about the option and the changes it controls
* '''descriptiontranslationkey''' - i18n translation keys used for the description
+
* '''descriptiontranslationkey''' - i18n translation key used for the description (not mandatory if sheet doesn't use translations)
  
 
<br />
 
<br />
 
[[Category:Character Sheet Creation]]
 
[[Category:Character Sheet Creation]]

Revision as of 14:53, 11 July 2019


Character Sheets can store settings for all characters in the useroptions section of the sheet.json file. These settings can be updated easily in the Game Settings. An simple example of what can be done with these settings can be found in the Star Trek sheet.json file. More complex examples can be found in the D&D 5e by Roll20 sheet.json file, or the Pathfinder Official sheet.json.

Data fields options:

  • attribute - the name of the sheet variable set with this option. Don't include the attr_ prefix in the name.
  • displayname - Title element of the selection
  • displaytranslationkey - i18n translation key for translation into other languages(not mandatory if sheet doesn't use translations)
  • type - the HTML input element to be used in Game Settings Page. Options include: select, radio, checkbox, text, number
  • options - If your input element has predefined options, the key/value pairs are listed here
  • optiontranslationkeys - i18n translation keys for the options (not mandatory if sheet doesn't use translations)
  • default/value - the default value of the attribute. If used for a select input with multiple options, set this to the value of the wanted default selection, not incuding the key. Use either default or value.
  • description - a text string use to give further detail about the option and the changes it controls
  • descriptiontranslationkey - i18n translation key used for the description (not mandatory if sheet doesn't use translations)