From b828b06d2d70e12bc9c0c1ab4e4ef4359f2b07f1 Mon Sep 17 00:00:00 2001 From: coyotegrey Date: Tue, 8 Jun 2021 10:27:37 -0400 Subject: [PATCH] Bug fix for 0.13 Fixed bug/typos in skill rolls to use correct stats and critical range on tag. Added option for additional tag skills on the Skills tab under SPECIAL. Fixed delete button on the perks list. Added modifier for HP on the Derived Stats tab under SPECIAL. Added modifier for SPECIAL points on the Attributes tab under SPECIAL. Added modifier for skill points on the Skills tab under SPECIAL. Disabled Confirm/copy button after first use. --- Fallout 2d20/sheet.css | 31 ++++- Fallout 2d20/sheet.html | 277 +++++++++++++++++++++++++--------------- 2 files changed, 202 insertions(+), 106 deletions(-) diff --git a/Fallout 2d20/sheet.css b/Fallout 2d20/sheet.css index 3aae8b7970..c1bda3567c 100644 --- a/Fallout 2d20/sheet.css +++ b/Fallout 2d20/sheet.css @@ -27,6 +27,8 @@ body .charactersheet * { background: url('https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Fallout%202d20/images/nuke.png') center / contain no-repeat border-box; background-color: red; + position: relative; + z-index: 99; width: 15px; height: 15px; padding: 2px 10px; @@ -459,6 +461,11 @@ body .charactersheet div .col7 .luck label, border: dotted 1px #e0b829; } +.special-finalized[value="1"] ~ p .confirm-note, +.special-finalized[value="1"] ~ div.confirm-button { + display: none; +} + .special { background: url('https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Fallout%202d20/images/special_bar.png') top center no-repeat; background-size: 100% 100%; @@ -591,7 +598,7 @@ body .charactersheet div .col2 .melee-damage[value="3"] ~ .die3 { .col2 { grid-template-columns: repeat(2, 1fr); } -.col2 .header { +.col2 > .header { grid-column: span 2; text-align: center; box-shadow: none; @@ -614,6 +621,9 @@ body .charactersheet div .col2 .melee-damage[value="3"] ~ .die3 { .col5 { grid-template-columns: repeat(5, 1fr); } +.col5-derived { + grid-template-columns: 1fr 1fr 2fr 1fr 1fr; +} .col6 { grid-template-columns: repeat(6, 1fr); } @@ -717,6 +727,7 @@ body .charactersheet div .grid input, text-align: left; vertical-align: middle; outline: none; + overflow: hidden; } .charactersheet .creation input, .charactersheet .creation select { @@ -904,9 +915,8 @@ body .charactersheet .skills-grid div input[type=number] { .skills-grid .tag, .skills-grid-mini .tag, .repitem .tag { - display: none; - background: url('https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Fallout%202d20/images/tag.png') - center / contain no-repeat content-box; + display: inline-block; + background: none; width: 16px; height: 16px; text-height: 2px; @@ -916,7 +926,8 @@ body .charactersheet .skills-grid div input[type=number] { .skills-grid .tag-skill[value="1"] ~ span.tag, .skills-grid-mini .tag-skill[value="1"] ~ span.tag, .repitem .tag { - display: inline-block; + background: url('https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Fallout%202d20/images/tag.png') + center / contain no-repeat content-box; } .origin-tag-name[value=""] + label, @@ -943,6 +954,14 @@ body .charactersheet div .col3 .col7-initiative span { line-height: 20px; box-shadow: 0 0 0 1px black; } +body .charactersheet div .col2 .col5-derived span { + padding: 0px 5px; + text-align: center; + line-height: 20px; +} +body .charactersheet div .col2 .col5-derived span:first-of-type { + text-align: left; +} body .charactersheet div .col3 .col7-meleedmg input, body .charactersheet div .col3 .col7-defense input, body .charactersheet div .col3 .col7-initiative input, @@ -1248,7 +1267,7 @@ body .charactersheet div .col1 .health input[type=number] { .repeating_perks ~ .repcontainer .repitem { gap: 0px; } -.repeating_perks ~ .repcontainer .repitem > div { +.repeating_perks ~ .repcontainer .repitem > div:not(.itemcontrol) { padding: 5px 0px 0px 5px; box-shadow: none; background: none; diff --git a/Fallout 2d20/sheet.html b/Fallout 2d20/sheet.html index c368e2d763..9cfd6b98e5 100644 --- a/Fallout 2d20/sheet.html +++ b/Fallout 2d20/sheet.html @@ -356,9 +356,16 @@
- - +
+ + + + + + = + + +
@@ -636,9 +643,16 @@
- - +
+ + + + + + = + + +
@@ -651,7 +665,8 @@
- yes
+ yes +
@@ -663,7 +678,8 @@
- yes
+ yes +
@@ -675,8 +691,9 @@
- yes
-
yes +
+
- yes
-
yes +
+
- yes
+ yes +
@@ -711,7 +730,8 @@
- yes
+ yes +
@@ -723,7 +743,8 @@
- yes
+ yes +
@@ -735,8 +756,9 @@
- yes
-
yes +
+
- yes
+ yes +
@@ -765,7 +788,8 @@
- yes
+ yes +
@@ -777,7 +801,8 @@
- yes
+ yes +
@@ -789,8 +814,9 @@
- yes
-
yes +
+
- yes
+ yes +
@@ -813,7 +840,8 @@
- yes
+ yes +
@@ -825,7 +853,8 @@
- yes
+ yes +
@@ -837,19 +866,21 @@
- yes
+ yes +
+ name="attr_throwing_total" value="" />
[STR]
- yes
+ yes +
@@ -1007,9 +1038,16 @@ value="10" /> - - +
+ + + + + + = + + +
+

You are all done!

Thank you for completing your S.P.E.C.I.A.L. profile. Feel free - to go back and edit your profile at any time. Click below to - confirm once you are satisfied.

+ to go back and edit your profile at any time. Click + below to confirm once you are satisfied.

@@ -1235,7 +1275,7 @@
Rank
[STR]
[CHA]
[END]
[PER]
[PER]
[PER]
[INT]
[STR]
[PER]
[INT]
[INT]
[AGI]
[AGI]
[CHA]
[END]
[AGI]
[STR]

Character Sheet Settings

-

Release Notes

-

Alpha 0.12

- -

Combat Dice use the symbol where possible. - Elsewhere they are abbreviated as CD.

-

2d20 rolls and Combat Dice are implemented in a simple fashion that - uses the built in dice roller in chat. Click on any skill on the - character sheet to roll a number of d20s. Critical successes and - complications must be counted manually from the chat results.

-

Clicking on combat dice under melee damage or weapons will roll - a single combat die and display the results.

-

I am exploring other options for a future release.

-
- -

Style

-
- Vault Girl - +
+

Release Notes

+

Alpha 0.13

+
    +
  • Fixed bug/typos in skill rolls to use correct stats and critical range on tag.
  • +
  • Added option for additional tag skills on the Skills tab under + SPECIAL.
  • +
  • Fixed delete button on the perks list.
  • +
  • Added modifier for HP on the Derived Stats tab under SPECIAL.
  • +
  • Added modifier for SPECIAL points on the Attributes tab under + SPECIAL.
  • +
  • Added modifier for skill points on the Skills tab under + SPECIAL.
  • +
  • Disabled Confirm/copy button after first use.
  • +
+

Alpha 0.12

+
    +
  • Combat Dice use the symbol where possible. + Elsewhere they are abbreviated as CD.
  • +
  • 2d20 rolls and Combat Dice are implemented in a simple fashion that + uses the built in dice roller in chat. Click on any skill on the + character sheet to roll a number of d20s. Critical successes and + complications must be counted manually from the chat results.
  • +
  • Clicking on combat dice under melee damage or weapons will roll + a single combat die and display the results.
  • +
  • I am exploring other options for a future release.
  • +
+
+
+ +

Style

+
+ Vault Girl + - Outline only (for hit locations) - - + Outline only (for hit locations) + + +
+
@@ -1937,6 +1996,7 @@ const skillList = ["ATHLETICS","BARTER","BIG_GUNS", "ENERGY_WEAPONS","EXPLOSIVES","LOCKPICK","MEDICINE","MELEE_WEAPONS", "PILOT","REPAIR","SCIENCE","SMALL_GUNS","SNEAK","SPEECH","SURVIVAL", "THROWING","UNARMED"]; +const skillTagModList = skillList.map(i => i + "_TAG_MOD"); const originTagList = ["ORIGIN","BROTHERHOOD_TAG","SURVIVOR_CHOICE", "SURVIVOR_TRAIT1","SURVIVOR_TRAIT2","SURVIVOR_PERK","SURVIVOR_TAG", "VAULT_TAG"]; @@ -1950,10 +2010,11 @@ const confirmList = ["ORIGIN","BROTHERHOOD_PACKAGE","MUTANT_PACKAGE", "SURVIVOR_TRAIT2","SURVIVOR_PERK"]; const triggerList = addList.concat(attributelist).concat(skillList).concat(originTagList) - .concat(survivorAttrList).concat(tagSkillList); + .concat(survivorAttrList).concat(tagSkillList).concat(skillTagModList); const valueList = addList.concat(attributelist).concat(totalAttributelist).concat(skillList) - .concat(originTagList).concat(survivorAttrList).concat(tagSkillList); + .concat(originTagList).concat(survivorAttrList).concat(tagSkillList) + .concat(skillTagModList); const originsDictionary = { "brotherhood": {"name": "Brotherhood of Steel"}, "ghoul": {"name": "Ghoul"}, @@ -2684,6 +2745,7 @@ on("clicked:copyspecial", function() { ["itemname"], [origin_tag_package]); } + update["finalized"] = 1; update["tab"] = "character"; setAttrs(update); @@ -2705,6 +2767,7 @@ attributelist.forEach(attribute => { triggerList.forEach(trigger => { on(`change:${trigger}`, function(eventInfo) { getAttrs(valueList, function(values) { + console.log(values); let update = {}; let attributes = {}; @@ -2742,9 +2805,12 @@ triggerList.forEach(trigger => { let cost = parseInt(values[skill])||0; let name = skill.toLowerCase(); let points = parseInt(values[skill])||0; - update[`${name}_tag`] = 0; - update[`${name}_cs`] = 1; - update[`${name}_total`] = Math.min(points, 6); + let tag_mod = parseInt(values[`${skill}_TAG_MOD`])||0; + update[`${name}_tag`] = tag_mod ? 1 : 0; + update[`${name}_cs`] = tag_mod ? Math.min(points + 2, 6) : 1; + update[`${name}_total`] = tag_mod ? + Math.min(points + 2, 6) : + Math.min(points, 6); skill_buy += cost; }); update["origin_tag_name"] = ""; @@ -2850,9 +2916,7 @@ triggerList.forEach(trigger => { update["defense"] = attributes["agility"] > 8 ? 2 : 1; update["initiative"] = attributes["perception"] + attributes["agility"]; - update["hp"] = attributes["endurance"] + attributes["luck"] - + (level - 1); - update["hp_max"] = attributes["endurance"] + attributes["luck"] + update["hp_derived"] = attributes["endurance"] + attributes["luck"] + (level - 1); update["hp_ratio"] = 100; update["melee_damage"] = @@ -2915,7 +2979,8 @@ on("change:carry_weight_weapons change:carry_weight_gear", function() { }); }); -const combatList = ["MELEE_DAMAGE","DEFENSE","INITIATIVE"]; +const combatList = ["ATTRIBUTE_POINTS","SKILL_POINTS","MELEE_DAMAGE", + "DEFENSE","INITIATIVE"]; combatList.forEach(stat => { let statLower = stat.toLowerCase(); on(`change:${statLower} change:${statLower}_mod`, function(eventInfo) { @@ -2930,6 +2995,18 @@ combatList.forEach(stat => { }); }); +on(`change:hp_derived change:hp_mod`, function(eventInfo) { + getAttrs(['HP_DERIVED', 'HP_MOD'], function(values) { + let update = {}; + let base = parseInt(values.HP_DERIVED)||0; + let mod = parseInt(values.HP_MOD)||0; + let total = base + mod; + update['hp'] = total; + update['hp_max'] = total; + setAttrs(update); + }); +}); + const typeList = ["PHYSICAL","ENERGY","RAD","POISON"]; typeList.forEach(type => { let typeLower = type.toLowerCase();