Campaign Settings for the Carrington Sheet

After many of the earlier posts, this is pretty straightforward. But there is a complication – we’ll also be setting up the sheet’s JSON file.

You can see what the campaign settings sidebar looks like. The makeup of this sidebar might change a bit, but the contacts look pretty complete (at this point) to me.

In HTML, each button looks something like this.

<input type="hidden" name="attr_die_system" value="1">
<button type="action" name="act_dice" class="title Terrible">
   <span name="attr_dice_label">Roll D6-D6</span>
</button>Code language: HTML, XML (xml)

There is a hidden input, a button to be clicked, and a span for the label which itself has a name.

Thie hidden input has two possible values, and those values set the contents of the label.

Some items have more than two values – their value is set by a Custom Roll Parsing query, but they work otherwise the same. The code for those looks like this:

const sidebar_mods = {
   aspect_start: '2|3|4|5',
   aspect_max: '2|3|4|5|6|7|8|9|10'
   modifier_size: '1|2|3|4',
   power_size: '1|2|3|4'
}
Object.keys(sidebar_mods).forEach(w => {
   on(`clicked:${w}`, () => {
      const report_string = 
`!{{template:default}}{{ask=![[?{Pick an option|Cancel,0|${sidebar_mods[w]}}]]}}`;
      startRoll(report_string, question => {
         const query = question.results.ask.result;
         if(query) {
            setAttrs({
               [w]: ((query == 10 && w != 'aspect_max') ? '1d6' : query)
            });
         }
      });
   });
});Code language: JavaScript (javascript)

The sidebars_mods object at the start holds the size of the possible down and and that is presented later, based on whichever button you have pressed.

Let’s say you start with a button like this. This asks how many aspects you start with in this game.

<input type="hidden" name="attr_aspect_start" value="2">
<button type="action" name="act_aspect_start" class="title Terrible" 
          title="What is the base number of aspects in this game?">
   <span>Base Aspects: <span name="attr_aspect_start">2</span></span>
</button>Code language: HTML, XML (xml)

The default is 2 but the dropdown shows 2, 3, 4, or 5. When you pick a number, the label changes to Base Aspects: 3 (or whatever number you selected).

The labels all work this way – you can see what the current setting is, and easily change it.

Power and Aspect Bonus

The Power Bonus is used by Ability rolls when the power is active. You set that using the front of the sidebar.

The Aspect bonus might be used in the future, but for now its just for display.

Starting Rank

These two settings allow you change what rank players start at. The default is Poor. When you change one of these, the current rank is changed to match it, and in the case of Character rank that changes how many advances you have already bought.

This worker responds to changes in the starting rank of either Eldritch or Abilities (character), and then updates the current value of that rating.

['eldritch', 'character'].forEach(rank => {
   on(`change:${rank}_starting`, (event_info) => {
      setAttrs({
         [rank]: event_info.newValue
      });
   });
});Code language: JavaScript (javascript)

There are already workers that respond to changes in the raw attributes, and they detect the change caused by this worker and update any dependent stats. So when you change Eldritch, for example, you get the number of powers that rank gives you.

You might set this if starting with your second or later character, who can start out with more experience.

Pacing

These buttons have title tags to explain what they affect.

<input type="hidden" name="attr_timing" value="0">
<button type="action" name="act_timing" class="title Terrible" 
        title="Sacrifices and Concessions Recover">
   <span name="attr_timing_label">Per Chapter</span>
</button>
<input type="hidden" name="attr_xp_variable" value="0">
<button type="action" name="act_xp_variable" class="title Terrible" 
        title="Does XP Cost change with advancement?">
   <span name="attr_xp_variable_label">Fixed Cost (5)</span>
</button>Code language: HTML, XML (xml)

Setting the Campaign Settings

When you submit a sheet to the Roll20 repository, you need to include a sheet.json file containing important information like the name of your html and css files, the author’s name and roll20 id, and some descriptive text.

You can also include some default attribute scores, with tables allowing a player to pick different defaults. This is handy for sheets which support different game settings.

Here’s the JSON file for this sheet. You can see it sets up some default sheet settings.

{
  "html": "carrington.html",
  "css": "carrington.css",
  "authors": "GiGs",
  "roll20userid": "157788",
  "preview": "carrington.jpg",
  "instructions": "In The Carrington Event, Steampunk is mixed with quaint Victorian Horror, and you are superhuman hunters fighting something supernatural attempting to claim the world.",
  "useroptions": [
     {
	"attribute": "dice",
	"displayname": "Die Roll Type: ",
	"type": "select",
	"options": [
		"1|D6-D6",
		"0|4dF"
	],
	"default": "1",
	"description": "Choose which die roll to be used"
   },
   {
		"attribute": "power_size",
		"displayname": "Power Bonus: ",
		"type": "select",
		"options": [
			"1|+1",
			"2|+2",
			"3|+3",
			"4|+4"
		],
		"default": "2",
		"description": "What is the bonus for ongoing Powers over time?"
	},
	{
		"attribute": "modifier_size",
		"displayname": "Aspect Bonus: ",
		"type": "select",
		"options": [
			"1|+1",
			"2|+2",
			"3|+3",
			"4|+4"
		],
		"default": "4",
		"description": "What is bonus gained for an Aspect?"
	},
	{
		"attribute": "aspect_start",
		"displayname": "Starting Aspects: ",
		"type": "select",
		"options": [
			"2",
			"3",
			"4",
			"5",
		],
		"default": "3",
		"description": "How many aspects do characters start with?"
	},
	{
		"attribute": "aspect_advances",
		"displayname": "Fixed or Variable Aspects: ",
		"type": "select",
		"options": [
			"1|Aspects Advance With Rank",
			"0|Fixed Number of Aspects"
		],
		"default": "1",
		"description": "Does the number of Aspects change with experience?"
	},
	{
		"attribute": "aspect_max",
		"displayname": "Maximum Aspects: ",
		"type": "select",
		"options": [
			"2",
			"3",
			"4",
			"5",
			"6",
			"7",
			"8",
			"9",
			"10"
		],
		"default": "5",
		"description": "How high can the number of aspects go?"
	},
	{
		"attribute": "character_starting",
		"displayname": "Starting Rank: ",
		"type": "select",
		"options": [
			"Poor",
			"Fair",
			"Good",
			"Great",
			"Superb"
		],
		"default": "Poor",
		"description": "Choose your starting Character Rank."
	},
	{
		"attribute": "eldritch_starting",
		"displayname": "Starting Eldritch: ",
		"type": "select",
		"options": [
			"Poor",
			"Fair",
			"Good",
			"Great",
			"Superb"
		],
		"default": "Poor",
		"description": "Choose your starting Eldritch Rank"
	},
	{
		"attribute": "timing",
		"displayname": "Chapter or Advance: ",
		"type": "select",
		"options": [
			"0|Per Chapter",
			"1|Per Advance"
		],
		"default": "0",
		"description": "When do Sacrifice and Concessions recover?"
	},
	{
		"attribute": "xp_variable",
		"displayname": "Advance Cost: ",
		"type": "select",
		"options": [
			"0|Fixed (5 XP)",
			"1|Advances With Experience"
		],
		"default": "0",
		"description": "Does the cost of an Advance increase with experience?"
	}
    ]
}Code language: JSON / JSON with Comments (json)
Series Navigation<< The Sidebar Back of the Carrington Sheet

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.