From 00fdb4c95e9cd75024d338d30e36ceec9bef068c Mon Sep 17 00:00:00 2001 From: rgould Date: Sun, 17 Jul 2022 13:47:07 +0200 Subject: [PATCH] [DCC_Tabbed_Sheet] Release v1.6.1 * Bug fix: Fixed issue where some level0 characters' rolls weren't being shown correctly (Thanks GrapeApe!) --- DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.css | 15 +-- DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.html | 132 +++++++++++++------------ DCC_Tabbed_Sheet/ReadMe | 6 +- DCC_Tabbed_Sheet/sheet.json | 2 +- 4 files changed, 79 insertions(+), 76 deletions(-) diff --git a/DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.css b/DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.css index 3ef637525c..a909d953c8 100644 --- a/DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.css +++ b/DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.css @@ -1,5 +1,5 @@ /* Dungeon Crawl Classics: Tabbed Character Sheet CSS */ -/* Version 1.6.0 */ +/* Version 1.6.1 */ .sheet-rolltemplate-DccTabbed .sheet-RollTemp-hint-image { background:url(https://raw.githubusercontent.com/rgould/dcc_tabbed_sheet/master/assets/images/hint.png) top center no-repeat; @@ -532,7 +532,7 @@ label div transition: opacity 0.5s linear 0s; } -.charsheet input.sheet-tab { +.charsheet input.sheet-subtab { width: 87px; height: 20px; cursor: pointer; @@ -541,7 +541,7 @@ label div z-index: 9999; } -.charsheet span.sheet-tab { +.charsheet span.sheet-subtab { text-align: center; display: inline-block; font-size: 13px; @@ -557,14 +557,7 @@ label div margin-left: -91px; } -.charsheet input.sheet-tab1:checked + span.sheet-tab1, -.charsheet input.sheet-tab2:checked + span.sheet-tab2, -.charsheet input.sheet-tab3:checked + span.sheet-tab3, -.charsheet input.sheet-tab4:checked + span.sheet-tab4, -.charsheet input.sheet-tab5:checked + span.sheet-tab5, -.charsheet input.sheet-tab6:checked + span.sheet-tab6, -.charsheet input.sheet-tab7:checked + span.sheet-tab7, -.charsheet input.sheet-tab99:checked + span.sheet-tab99 { +.charsheet input.sheet-subtab:checked + span.sheet-subtab { background: #ab8b57; color: white; border-radius: 4px; diff --git a/DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.html b/DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.html index 06023ceabf..3263a4e6c5 100644 --- a/DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.html +++ b/DCC_Tabbed_Sheet/DCC_Tabbed_Sheet.html @@ -1,5 +1,5 @@ - +
@@ -55,22 +55,22 @@

The main player character sheet.

- - Core Stats - - Background - - Class - - Weapons - - Spellbook - - Armor - - Inventory - - Show All + + Core Stats + + Background + + Class + + Weapons + + Spellbook + + Armor + + Inventory + + Show All @@ -327,7 +327,7 @@
Strength
-
+
@@ -351,7 +351,7 @@
Agility
-
+
@@ -375,7 +375,7 @@
Stamina
-
+
@@ -399,7 +399,7 @@
Personality
-
+
@@ -423,7 +423,7 @@
Intelligence
-
+
@@ -447,7 +447,7 @@
Luck
-
+
@@ -629,7 +629,7 @@
Starting Luck
 
-
Lucky Roll Bonus
+
Lucky Roll Bonus
 
@@ -9096,7 +9096,7 @@
Strength
-
+
@@ -9120,7 +9120,7 @@
Agility
-
+
@@ -9144,7 +9144,7 @@
Stamina
-
+
@@ -9168,7 +9168,7 @@
Personality
-
+
@@ -9192,7 +9192,7 @@
Intelligence
-
+
@@ -9216,7 +9216,7 @@
Luck
-
+
@@ -9402,7 +9402,7 @@
Starting Luck
 
-
Lucky Roll Bonus
+
Lucky Roll Bonus
 
@@ -10384,7 +10384,7 @@
Strength
-
+
@@ -10408,7 +10408,7 @@
Agility
-
+
@@ -10432,7 +10432,7 @@
Stamina
-
+
@@ -10456,7 +10456,7 @@
Personality
-
+
@@ -10480,7 +10480,7 @@
Intelligence
-
+
@@ -10504,7 +10504,7 @@
Luck
-
+
@@ -11879,7 +11879,7 @@
Starting Luck
 
-
Lucky Roll Bonus
+
Lucky Roll Bonus
 
@@ -14793,7 +14793,7 @@ var TAS = TAS || (function(){ /* ---- END: TheAaronSheet.js ---- */ - var VERSION = '1.6.0' + var VERSION = '1.6.1' var diceChain = [3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 30] /** @@ -14897,34 +14897,40 @@ on("change:str change:repeating_level0s:level0multi_str change:agi change:repeat }); }); +calculateAbilityScore = function calculateAbilityScore(value) { + var mod; + if (value >= 24) { + mod = 6; + } else if (value >= 22 && value <= 23) { + mod = 5; + } else if (value >= 20 && value <= 21) { + mod = 4; + } else if (value >= 18 && value <= 19) { + mod = 3; + } else if (value >= 16 && value <= 17) { + mod = 2; + } else if (value >= 13 && value <= 15) { + mod = 1; + } else if (value >= 6 && value <= 8) { + mod = -1; + } else if (value >= 4 && value <= 5) { + mod = -2; + } else if (value <= 3) { + mod = -3; + } else { + mod = 0 + } + return mod; +}; + calculateMod = function(attributes) { + // TODO optimise this to make one call to getAttrs/setAttrs attributes.map(function(attr) { getAttrs([attr], function(v) { var attrModName = attr + 'Mod'; - var updatedVal = {}; - - if (v[attr] >= 24) { - updatedVal[attrModName] = 6; - } else if (v[attr] >= 22 && v[attr] <= 23) { - updatedVal[attrModName] = 5; - } else if (v[attr] >= 20 && v[attr] <= 21) { - updatedVal[attrModName] = 4; - } else if (v[attr] >= 18 && v[attr] <= 19) { - updatedVal[attrModName] = 3; - } else if (v[attr] >= 16 && v[attr] <= 17) { - updatedVal[attrModName] = 2; - } else if (v[attr] >= 13 && v[attr] <= 15) { - updatedVal[attrModName] = 1; - } else if (v[attr] >= 6 && v[attr] <= 8) { - updatedVal[attrModName] = -1; - } else if (v[attr] >= 4 && v[attr] <= 5) { - updatedVal[attrModName] = -2; - } else if (v[attr] <= 3) { - updatedVal[attrModName] = -3; - } else { - updatedVal[attrModName] = 0 - } - + var updatedVal = { + [attrModName]: calculateAbilityScore(v[attr]) + }; setAttrs(updatedVal); }); }); diff --git a/DCC_Tabbed_Sheet/ReadMe b/DCC_Tabbed_Sheet/ReadMe index d29c358936..ea87bf928a 100644 --- a/DCC_Tabbed_Sheet/ReadMe +++ b/DCC_Tabbed_Sheet/ReadMe @@ -11,10 +11,14 @@ You can follow development here: https://trello.com/b/jfLKA3e6/dcc-tabbed-sheet- 1: https://github.com/rgould/dcc_tabbed_sheet ## Current Version -1.6.0 +1.6.1 ### Changelog +#### 1.6.1 + +* Bug fix: Fixed issue where some level0 characters' rolls weren't being shown correctly (Thanks GrapeApe!) + #### 1.6.0 * Feature: Multiple level 0 characters in one sheet diff --git a/DCC_Tabbed_Sheet/sheet.json b/DCC_Tabbed_Sheet/sheet.json index 9cb7cc5932..0781410c66 100644 --- a/DCC_Tabbed_Sheet/sheet.json +++ b/DCC_Tabbed_Sheet/sheet.json @@ -4,6 +4,6 @@ "authors": "Amanda the Amazon, Richard Gould", "roll20userid": "565956, 375203", "preview": "DCC_Tabbed_Sheet.png", - "instructions": "# Dungeon Crawl Classics (DCC) Tabbed Character Sheet\rThis sheet has a pared down 0-level player sheet, a sheet for multiple Level 0s, a Level 1+ player sheet and a monster sheet for the Judge that are switchable via a tab at the top left of the sheet.\r\r* If you are currently using the original DCC sheet, it is recommended to make a copy of the campaign before switching to the new sheet. You can then press the import button on the options section to import the data from the original sheet.\r\r## Player Sheets\r\r* **NEW**: Supports multiple level 0 characters in one sheet\r* Most rolls should have Roll Templates.\r* Includes Core, Crawl and Crawling Under a Broken Moon classes.\r* For Thieves, you can use the old Beta % based rolls (per Claytonian JP's request)\r* Lucky rolls are included within rolls automatically whenever possible.\r* Roll Template Backgrounds based on the kind of rolls you are making.\r* Criticals and Fumbles are rolled automatically based on the d20 roll.\r\r## Monster Sheet\r\r* Monster Rolls have Roll Templates.\r* Certain rolls only go to GM\r* Melee and Ranged Attacks include Special attack ability\r* Criticals and Fumbles are rolled automatically based on the d20 roll.\r\r## Discord\r We have a discord server for using DCC RPG on Roll20. [Join us on Discord!](https://discord.gg/eGtnAGqGzj) Joining will help motivate us to continue working on the sheet :)\r\r## Bug Reports/Feature Requests\rBug reports and feature requests are welcome. For best results send an email to rgould@u2622.ca, or join our discord server. Contributions are always welcome!\r## Known Issues\r* Two characters with same name not supported as wrong attributes are used. (Roll20 issue, reported on 2022-01-08. Thanks GrapeApe!)\r\r## Roadmap\r\rThe following major features are planned for version 2.0.0:\r\r * Multiple level 0 characters in one sheet (**DONE!**)\r * Lankhmar support\r * Translations / i18n (into French, German, etc)\r * Importing generated characters from Purple Sorcerer\r * Upgrade character sheet from legacy to CSE (new version)\r\r## Current Version: 1.6.0", + "instructions": "# Dungeon Crawl Classics (DCC) Tabbed Character Sheet\rThis sheet has a pared down 0-level player sheet, a sheet for multiple Level 0s, a Level 1+ player sheet and a monster sheet for the Judge that are switchable via a tab at the top left of the sheet.\r\r* If you are currently using the original DCC sheet, it is recommended to make a copy of the campaign before switching to the new sheet. You can then press the import button on the options section to import the data from the original sheet.\r\r## Player Sheets\r\r* **NEW**: Supports multiple level 0 characters in one sheet\r* Most rolls should have Roll Templates.\r* Includes Core, Crawl and Crawling Under a Broken Moon classes.\r* For Thieves, you can use the old Beta % based rolls (per Claytonian JP's request)\r* Lucky rolls are included within rolls automatically whenever possible.\r* Roll Template Backgrounds based on the kind of rolls you are making.\r* Criticals and Fumbles are rolled automatically based on the d20 roll.\r\r## Monster Sheet\r\r* Monster Rolls have Roll Templates.\r* Certain rolls only go to GM\r* Melee and Ranged Attacks include Special attack ability\r* Criticals and Fumbles are rolled automatically based on the d20 roll.\r\r## Discord\r We have a discord server for using DCC RPG on Roll20. [Join us on Discord!](https://discord.gg/eGtnAGqGzj) Joining will help motivate us to continue working on the sheet :)\r\r## Bug Reports/Feature Requests\rBug reports and feature requests are welcome. For best results send an email to rgould@u2622.ca, or join our discord server. Contributions are always welcome!\r## Known Issues\r* Two characters with same name not supported as wrong attributes are used. (Roll20 issue, reported on 2022-01-08. Thanks GrapeApe!)\r\r## Roadmap\r\rThe following major features are planned for version 2.0.0:\r\r * Multiple level 0 characters in one sheet (**DONE!**)\r * Lankhmar support\r * Translations / i18n (into French, German, etc)\r * Importing generated characters from Purple Sorcerer\r * Upgrade character sheet from legacy to CSE (new version)\r\r## Current Version: 1.6.1", "legacy": true }