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 (added category tag)
(add explanation, examples, some formatting)
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
[[File:Default-Settings-Example.png|400px|thumbnail|right|Some of the Default Settings of [[5th_Edition_OGL_by_Roll20|5th Edition by Roll20]]]]
 +
Default Settings for sheets are used to make changes in the default information, options, and presentation of [[Journal#Adding_Characters |new sheets added to a game]]. If a Character Sheet have Default Settings available, they can be found on the [[Game Settings Page]]. Changing any Default Settings doesn't affect existing character sheets.
  
 +
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#Character_Sheet_Default_Settings|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], [https://github.com/Roll20/roll20-character-sheets/blob/master/Pathfinder%20by%20Roll20/sheet.json Pathfinder Official sheet.json] , or [https://github.com/Roll20/roll20-character-sheets/blob/master/Fate%20Core%20v2/sheet.json |Fate Core].
  
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].
+
Changing or adding Default Settings to a sheet can't be tested in advance before submitting a PR to the character sheet repository. It's a good idea to test out default settings of existing sheets and examples given here, and then mimic those in structure.
  
=== Requirements include: ===
+
If you [https://github.com/Roll20/roll20-character-sheets/search?q=%22useroptions%22%3A&unscoped_q=%22useroptions%22%3A search the Roll20 Sheet repository] for uses of <code>"useroptions"</code> you can find further examples of Default option in usage.
  
* '''attribute''' - the name of the sheet variable set with this option
+
==Common Usage==
 +
* Toggle default mode of a sheet between PC/NPC. Example: 5th Edition OGL by Roll20
 +
* Adjusting default amount of starting gold/credit a new character sheet starts with. Example: Star Wars D6
 +
* Toggle user options, such as turning on/off roll query popups from roll buttons. Example: Star Wars D6
 +
 
 +
== Data fields options ==
 +
 
 +
* '''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
+
* '''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
+
** '''checked''' - If you want a checkbox checked by default, add <code>"checked": "checked",</code> under the attribute
* '''optiontranslationkeys''' - i18n translation keys for the options
+
** '''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''' or '''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)
 +
 
 +
== Examples ==
 +
Few examples of Default Settings currently in use.
 +
 
 +
===[https://github.com/Roll20/roll20-character-sheets/blob/master/Fate%20Core%20v2/sheet.json Fate Core] by MagooChris===
 +
Contains example of text inputs, checkboxes(some checked by default), default values, and use of  language tags for multilingual support.
 +
<pre>
 +
    "useroptions": [
 +
        {
 +
            "attribute": "show_hints_flag",
 +
            "displayname": "Show First Time Hints",
 +
            "displaytranslationkey": "ShowHints-Q",
 +
            "type": "checkbox",
 +
"value": "1",
 +
"checked": "checked",
 +
            "description": "Show hints that might be useful for first time players or those upgrading from the previous sheet design.",
 +
            "descriptiontranslationkey": "ShowHints-D"
 +
},
 +
        {
 +
            "attribute": "run_firstTime_setup",
 +
            "displayname": "Run First Time Setup",
 +
            "displaytranslationkey": "RunFirstTimeSetup-Q",
 +
            "type": "checkbox",
 +
"value": "1",
 +
"checked": "checked",
 +
            "description": "Run scripts to setup the sheet for a default character.",
 +
            "descriptiontranslationkey": "RunFirstTimeSetup-D"
 +
},
 +
        {
 +
            "attribute": "default_stressSkills",
 +
            "displayname": "Default Stresses and Skills",
 +
            "displaytranslationkey": "DefaultStressSkill-Q",
 +
            "type": "text",
 +
"default": "Physical:Physique,Mental:Will",
 +
            "description": "When setting up a default sheet, what stress tracks and their guiding skill should be set up? e.g. \"Mental:Will,Extra:3\"",
 +
            "descriptiontranslationkey": "DefaultStressSkill-D"
 +
},
 +
        {
 +
            "attribute": "attr_default_consequences",
 +
            "displayname": "Default Consequences",
 +
            "displaytranslationkey": "DefaultConsequences-Q",
 +
            "type": "text",
 +
"default": "2,4,6",
 +
            "description": "When setting up a default sheet, what consequences are the default consequences? e.g. \"2,4,6\"",
 +
            "descriptiontranslationkey": "DefaultConsequences-D"
 +
},
 +
{
 +
"attribute": "show_conditions_flag",
 +
"displayname": "Use Conditions instead of Consequences",
 +
"displaytranslationkey": "ShowConditions-Q",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "Use the Conditions from the Fate Toolkit to replace Consequences",
 +
"descriptiontranslationkey": "ShowConditions-Q"
 +
},
 +
{
 +
"attribute": "show_phase0_flag",
 +
"displayname": "Show Phase 0 Tab",
 +
"displaytranslationkey": "ShowPhase0-Q",
 +
"type": "checkbox",
 +
"value": "1",
 +
"checked": "checked",
 +
"description": "If you are starting with a Phase 0, then you can use this tab to build up your ideas.",
 +
"descriptiontranslationkey": "ShowPhase0-Q"
 +
},
 +
{
 +
"attribute": "show_notesTab_flag",
 +
"displayname": "Show Notes Tab",
 +
"displaytranslationkey": "ShowNotesTab-Q",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "Set this if you would prefer the notes to show on a Tab of their own.",
 +
"descriptiontranslationkey": "ShowNotesTab-Q"
 +
}
 +
]
 +
</pre>
 +
 
 +
===[https://github.com/Roll20/roll20-character-sheets/blob/master/D6StarWars/sheet.json Star Wars D6] by [[User:1223200 |Andreas J.]]===
 +
[[File:SWD6-Default-Settings.png|300px|thumbnail|right|Default Settings of Star Wars D6 sheet(using this section's code)]]
 +
Contains example of dropdown menu options, checkboxes, number inputs, and default values.
 +
 
 +
Sheet doesn't contain translation tags so they are also left out from the Default Settings.
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
<br>
 +
<pre>
 +
    "useroptions": [
 +
    {
 +
"attribute": "sheettype",
 +
"displayname": "Sheet Type: ",
 +
"type": "select",
 +
"options": [
 +
"PC|0",
 +
"NPC|1",
 +
"Ship|2",
 +
"Container|3"
 +
],
 +
"default": "0",
 +
"description": "PC is the normal sheet, NPC is a compact version of the same, Ship shows stat blocks for ship only, and Container shows only the Weapon/Armor/Equipment sections(simulating a Container or Shop display)."
 +
},
 +
    {
 +
"attribute": "gmrollswitch",
 +
"displayname": "Hide GM Rolls: ",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "When checked, the sheet hides the extra dice that makes hidden rolls to the GM."
 +
},
 +
    {
 +
"attribute": "rollmodswitch",
 +
"displayname": "Disable Roll Mods Query: ",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "If checked, rolls don't ask for roll modifiers and rolls right away when selected."
 +
},
 +
    {
 +
"attribute": "wilddie",
 +
"displayname": "Use Wild Die: ",
 +
"type": "select",
 +
"options": [
 +
"Yes|!cf1cs6",
 +
"No|cf0cs0"
 +
],
 +
"default": "!cf1cs6",
 +
"description": "If Wild Die isn't used, the last die wont explode or highlight critical successes/failures."
 +
},
 +
    {
 +
"attribute": "forceswitch",
 +
"displayname": "Hide Force Section: ",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "Practical for those who are not Force-sensitive."
 +
},
 +
    {
 +
"attribute": "equipmentswitch",
 +
"displayname": "Hide Equipment Section: ",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "Practical for those who are not Force-sensitive."
 +
},
 +
    {
 +
"attribute": "backgroundswitch",
 +
"displayname": "Hide Background Section: ",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "Hides Backstory & Misc. section"
 +
},
 +
    {
 +
"attribute": "cpswitch",
 +
"displayname": "Hide Character Point Summary: ",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "Hides the Character Point Summary table used for tracking gain/usage history"
 +
},
 +
    {
 +
"attribute": "creditswitch",
 +
"displayname": "Hide Credit Summary: ",
 +
"type": "checkbox",
 +
"value": "1",
 +
"description": "Hides the Credit Summary section used for tracking balance history"
 +
},
 +
    {
 +
"attribute": "credits",
 +
"displayname": "Starting Credits: ",
 +
"type": "number",
 +
"value": "1000",
 +
"description": "How many credits a character starts with."
 +
},
 +
    {
 +
"attribute": "characterPoints",
 +
"displayname": "Character Points: ",
 +
"type": "number",
 +
"value": "0",
 +
"description": "How many Character Points a character starts with."
 +
},
 +
    {
 +
"attribute": "forcePoints",
 +
"displayname": "Force Points: ",
 +
"type": "number",
 +
"value": "1",
 +
"description": "How many Force Points a character starts with."
 +
}
 +
]
 +
</pre>
 +
 
 +
==See Also==
 +
* [[Building Character Sheets]]
 +
* [[Character_Sheet_i18n| Character Sheet translation tags]]
 +
* [https://github.com/Roll20/roll20-character-sheets|Roll20 character sheet repository]
  
 
<br />
 
<br />
 
[[Category:Character Sheet Creation]]
 
[[Category:Character Sheet Creation]]

Latest revision as of 13:05, 24 August 2019

Some of the Default Settings of 5th Edition by Roll20

Default Settings for sheets are used to make changes in the default information, options, and presentation of new sheets added to a game. If a Character Sheet have Default Settings available, they can be found on the Game Settings Page. Changing any Default Settings doesn't affect existing character sheets.

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, Pathfinder Official sheet.json , or |Fate Core.

Changing or adding Default Settings to a sheet can't be tested in advance before submitting a PR to the character sheet repository. It's a good idea to test out default settings of existing sheets and examples given here, and then mimic those in structure.

If you search the Roll20 Sheet repository for uses of "useroptions" you can find further examples of Default option in usage.

Contents

[edit] Common Usage

  • Toggle default mode of a sheet between PC/NPC. Example: 5th Edition OGL by Roll20
  • Adjusting default amount of starting gold/credit a new character sheet starts with. Example: Star Wars D6
  • Toggle user options, such as turning on/off roll query popups from roll buttons. Example: Star Wars D6

[edit] 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
    • checked - If you want a checkbox checked by default, add "checked": "checked", under the attribute
    • 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 or 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)

[edit] Examples

Few examples of Default Settings currently in use.

[edit] Fate Core by MagooChris

Contains example of text inputs, checkboxes(some checked by default), default values, and use of language tags for multilingual support.

    "useroptions": [
        {
            "attribute": "show_hints_flag",
            "displayname": "Show First Time Hints",
            "displaytranslationkey": "ShowHints-Q",
            "type": "checkbox",
			"value": "1",
			"checked": "checked",
            "description": "Show hints that might be useful for first time players or those upgrading from the previous sheet design.",
            "descriptiontranslationkey": "ShowHints-D"
		},
        {
            "attribute": "run_firstTime_setup",
            "displayname": "Run First Time Setup",
            "displaytranslationkey": "RunFirstTimeSetup-Q",
            "type": "checkbox",
			"value": "1",
			"checked": "checked",
            "description": "Run scripts to setup the sheet for a default character.",
            "descriptiontranslationkey": "RunFirstTimeSetup-D"
		},
        {
            "attribute": "default_stressSkills",
            "displayname": "Default Stresses and Skills",
            "displaytranslationkey": "DefaultStressSkill-Q",
            "type": "text",
			"default": "Physical:Physique,Mental:Will",
            "description": "When setting up a default sheet, what stress tracks and their guiding skill should be set up? e.g. \"Mental:Will,Extra:3\"",
            "descriptiontranslationkey": "DefaultStressSkill-D"
		},
        {
            "attribute": "attr_default_consequences",
            "displayname": "Default Consequences",
            "displaytranslationkey": "DefaultConsequences-Q",
            "type": "text",
			"default": "2,4,6",
            "description": "When setting up a default sheet, what consequences are the default consequences? e.g. \"2,4,6\"",
            "descriptiontranslationkey": "DefaultConsequences-D"
		},
		{
			"attribute": "show_conditions_flag",
			"displayname": "Use Conditions instead of Consequences",
			"displaytranslationkey": "ShowConditions-Q",
			"type": "checkbox",
			"value": "1",
			"description": "Use the Conditions from the Fate Toolkit to replace Consequences",
			"descriptiontranslationkey": "ShowConditions-Q"
		},
		{
			"attribute": "show_phase0_flag",
			"displayname": "Show Phase 0 Tab",
			"displaytranslationkey": "ShowPhase0-Q",
			"type": "checkbox",
			"value": "1",
			"checked": "checked",
			"description": "If you are starting with a Phase 0, then you can use this tab to build up your ideas.",
			"descriptiontranslationkey": "ShowPhase0-Q"
		},
		{
			"attribute": "show_notesTab_flag",
			"displayname": "Show Notes Tab",
			"displaytranslationkey": "ShowNotesTab-Q",
			"type": "checkbox",
			"value": "1",
			"description": "Set this if you would prefer the notes to show on a Tab of their own.",
			"descriptiontranslationkey": "ShowNotesTab-Q"
		}
	]

[edit] Star Wars D6 by Andreas J.

Default Settings of Star Wars D6 sheet(using this section's code)

Contains example of dropdown menu options, checkboxes, number inputs, and default values.

Sheet doesn't contain translation tags so they are also left out from the Default Settings.




    "useroptions": [
    		{
					"attribute": "sheettype",
					"displayname": "Sheet Type: ",
					"type": "select",
					"options": [
						"PC|0",
						"NPC|1",
						"Ship|2",
						"Container|3"
					],
					"default": "0",
					"description": "PC is the normal sheet, NPC is a compact version of the same, Ship shows stat blocks for ship only, and Container shows only the Weapon/Armor/Equipment sections(simulating a Container or Shop display)."
			},
    		{
					"attribute": "gmrollswitch",
					"displayname": "Hide GM Rolls: ",
					"type": "checkbox",
					"value": "1",
					"description": "When checked, the sheet hides the extra dice that makes hidden rolls to the GM."
			},
    		{
					"attribute": "rollmodswitch",
					"displayname": "Disable Roll Mods Query: ",
					"type": "checkbox",
					"value": "1",
					"description": "If checked, rolls don't ask for roll modifiers and rolls right away when selected."
			},
    		{
					"attribute": "wilddie",
					"displayname": "Use Wild Die: ",
					"type": "select",
					"options": [
						"Yes|!cf1cs6",
						"No|cf0cs0"
					],
					"default": "!cf1cs6",
					"description": "If Wild Die isn't used, the last die wont explode or highlight critical successes/failures."
			},
    		{
					"attribute": "forceswitch",
					"displayname": "Hide Force Section: ",
					"type": "checkbox",
					"value": "1",
					"description": "Practical for those who are not Force-sensitive."
			},
    		{
					"attribute": "equipmentswitch",
					"displayname": "Hide Equipment Section: ",
					"type": "checkbox",
					"value": "1",
					"description": "Practical for those who are not Force-sensitive."
			},
    		{
					"attribute": "backgroundswitch",
					"displayname": "Hide Background Section: ",
					"type": "checkbox",
					"value": "1",
					"description": "Hides Backstory & Misc. section"
			},
    		{
					"attribute": "cpswitch",
					"displayname": "Hide Character Point Summary: ",
					"type": "checkbox",
					"value": "1",
					"description": "Hides the Character Point Summary table used for tracking gain/usage history"
			},
    		{
					"attribute": "creditswitch",
					"displayname": "Hide Credit Summary: ",
					"type": "checkbox",
					"value": "1",
					"description": "Hides the Credit Summary section used for tracking balance history"
			},
    		{
					"attribute": "credits",
					"displayname": "Starting Credits: ",
					"type": "number",
					"value": "1000",
					"description": "How many credits a character starts with."
			},
    		{
					"attribute": "characterPoints",
					"displayname": "Character Points: ",
					"type": "number",
					"value": "0",
					"description": "How many Character Points a character starts with."
			},
    		{
					"attribute": "forcePoints",
					"displayname": "Force Points: ",
					"type": "number",
					"value": "1",
					"description": "How many Force Points a character starts with."
			}		
		]

[edit] See Also