From 97cd1070a410ad4e6c4206ad7508b2223aa2fdb8 Mon Sep 17 00:00:00 2001 From: Nic Bradley Date: Tue, 27 Oct 2020 10:25:26 -0700 Subject: [PATCH 1/8] WFRP4e - Adding new version number. --- Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug index b11916587e..bbe2dbd7f9 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug @@ -3,7 +3,7 @@ include rolls.pug include components/_component-index.pug -input(name="attr_sheet_version", type="hidden", value="1.0.1") +input(name="attr_sheet_version", type="hidden", value="1.0.2") input(name="attr_npc", type="hidden", value="0") input(name="attr_nav", type="hidden", value="main") input(name="attr_difficulty_query", type="hidden", value="?{Difficulty|Average (+20), 20|Very Easy (+60), 60|Easy (+40), 40|Average (+20), 20|Challenging (0), 0|Difficult (-10), -10|Hard (-20), -20|Very Hard (-30), -30}") From 3b31bcf31cfa5a1d9cde600690e42ef67e25562e Mon Sep 17 00:00:00 2001 From: Nic Bradley Date: Tue, 27 Oct 2020 11:15:06 -0700 Subject: [PATCH 2/8] WFRP4e - Fixing XP spend across careers. --- .../src/js/sheetworkers.js | 111 ++++++++++++++---- 1 file changed, 90 insertions(+), 21 deletions(-) diff --git a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js index 2883da6f57..e6825a0ae7 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js +++ b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js @@ -733,7 +733,7 @@ const wfrpModule = ( () => { const attrs = []; - wfrp.characteristics.forEach(characteristic => attrs.push(`${repeating_id}_career_${characteristic}_advances`)) + wfrp.characteristics.forEach(characteristic => attrs.push(`${repeating_id}_career_${characteristic}_advances`)); for (let i = 1; i <= 4; i++) { for (let j = 1; j <= 10; j++) { @@ -757,22 +757,11 @@ const wfrpModule = ( () => { let total_skills_advances = skills_values.reduce((a,b) => a+b); let total_talents_advances = talents_values.reduce((a,b) => a+b); - const xp = []; - - wfrp.characteristics.forEach(characteristic => xp.push(calculateCharacteristicXP(values[`${repeating_id}_career_${characteristic}_advances`]))); - - skills_values.forEach(skill => xp.push(calculateSkillXP(skill))); - - talents_values.forEach(talent => xp.push(calculateTalentXP(talent))); - - const total_xp = (xp.length > 0) ? xp.reduce((a,b) => a+b) : "" || ""; - const abs_total = total_skills_advances + total_talents_advances || ""; const updateAttrs = {}; updateAttrs[`${repeating_id}_career_advances`] = (abs_total > 0) ? abs_total : ""; - updateAttrs[`${repeating_id}_career_xp`] = total_xp; setAttrs(updateAttrs, recalculateSpentXP()); }); @@ -846,21 +835,99 @@ const wfrpModule = ( () => { } const recalculateSpentXP = () => { - const attrs = []; - getSectionIDs("careers", id_array => { + getSectionIDs(`repeating_careers`, ids => { - id_array.forEach(id => { - attrs.push(`repeating_careers_${id}_career_xp`); - }); + const attrs = []; + for (const id of ids) { + + for (const characteristic of wfrp.characteristics) { + attrs.push(`repeating_careers_${id}_career_${characteristic}_advances`); + } + + for (let i = 1; i <= 4; i++) { + for (let j = 1; j <= 10; j++) { + attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_name`); + attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_advances`); + } + + for (let k = 1; k <= 5; k++) { + attrs.push(`repeating_careers_${id}_career_talent_${i}_${k}_name`); + attrs.push(`repeating_careers_${id}_career_talent_${i}_${k}_advances`); + } + } + } + getAttrs(attrs, values => { - const int_values = Object.values(values).map(item => parseInt(item) || 0); - const total_xp = (int_values.length > 0) ? int_values.reduce((a,b) => a+b) : "" || ""; - setAttrs({spent_xp: total_xp}) + const characteristic_advances = new Map(); + const skill_advances = new Map(); + const talent_advances = new Map(); + + for (const id of ids) { + + for (const characteristic of wfrp.characteristics) { + const value = parseInt(values[`repeating_careers_${id}_career_${characteristic}_advances`]); + + if (value) { + if (characteristic_advances.has(characteristic)) { + const current = characteristic_advances.get(characteristic); + const total = current + value; + characteristic_advances.set(characteristic, total); + } else { + characteristic_advances.set(characteristic, value); + } + } + } + + for (let i = 1; i <= 4; i++) { + for (let j = 1; j <= 10; j++) { + const skill = values[`repeating_careers_${id}_career_skill_${i}_${j}_name`]; + const value = parseInt(values[`repeating_careers_${id}_career_skill_${i}_${j}_advances`]); + if (value) { + if (skill_advances.has(skill)) { + const current = skill_advances.get(skill); + const total = current + value; + skill_advances.set(skill, total); + } else { + skill_advances.set(skill, value); + } + } + } + + for (let k = 1; k <= 5; k++) { + const talent = values[`repeating_careers_${id}_talent_skill_${i}_${k}_name`]; + const value = parseInt(values[`repeating_careers_${id}_career_talent_${i}_${k}_advances`]); + if (value) { + if (talent_advances.has(talent)) { + const current = talent_advances.get(skill); + const total = current + value; + talent_advances.set(skill, total); + } else { + talent_advances.set(skill, value); + } + } + } + } + } + + let xp = 0; + + characteristic_advances.forEach((value) => xp += calculateCharacteristicXP(value)); + skill_advances.forEach((value) => xp += calculateSkillXP(value)); + talent_advances.forEach((value) => xp += calculateTalentXP(value)); + + const updateAttrs = {}; + + updateAttrs[`spent_xp`] = xp; + + setAttrs(updateAttrs, recalculateCurrentXP()); + }); + }); + } const recalculateEarnedXP = () => { @@ -1062,12 +1129,14 @@ const wfrpModule = ( () => { for (let j = 1; j <= 5; j++) { attrs.push(`repeating_careers_${id}_career_talent_${i}_${j}_name`); attrs.push(`repeating_careers_${id}_career_talent_${i}_${j}_advances`); - if (index === 1) attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_init`); + if (index === 0) attrs.push(`repeating_careers_${id}_career_talent_${i}_${j}_init`); } } }); getAttrs(attrs, values => { + console.log(values) + const talent_list = Object.entries(values); const names = talent_list.filter(([key, value]) => key.match(/name/g) && value !== ""); From 602d73a98b51067b056b3bb6aa49edda1675e052 Mon Sep 17 00:00:00 2001 From: Nic Bradley Date: Tue, 27 Oct 2020 12:12:02 -0700 Subject: [PATCH 3/8] WFRP4e - Changing XP calculations --- .../src/js/sheetworkers.js | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js index e6825a0ae7..43ab8aaeb3 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js +++ b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js @@ -836,11 +836,13 @@ const wfrpModule = ( () => { const recalculateSpentXP = () => { - getSectionIDs(`repeating_careers`, ids => { + helperFunctions.aggregateRepeatingIDs([`careers`, `experience`], ids => { const attrs = []; - for (const id of ids) { + console.log(ids); + + for (const id of ids.careers) { for (const characteristic of wfrp.characteristics) { attrs.push(`repeating_careers_${id}_career_${characteristic}_advances`); @@ -858,6 +860,10 @@ const wfrpModule = ( () => { } } } + + for (const id of ids.experience) { + attrs.push(`repeating_experience_${id}_experience_amount`); + } getAttrs(attrs, values => { @@ -865,7 +871,7 @@ const wfrpModule = ( () => { const skill_advances = new Map(); const talent_advances = new Map(); - for (const id of ids) { + for (const id of ids.careers) { for (const characteristic of wfrp.characteristics) { const value = parseInt(values[`repeating_careers_${id}_career_${characteristic}_advances`]); @@ -918,6 +924,12 @@ const wfrpModule = ( () => { skill_advances.forEach((value) => xp += calculateSkillXP(value)); talent_advances.forEach((value) => xp += calculateTalentXP(value)); + for (const id of ids.experience) { + const value = parseInt(values[`repeating_experience_${id}_experience_amount`]); + + if (value < 0) xp -= value; + } + const updateAttrs = {}; updateAttrs[`spent_xp`] = xp; @@ -939,8 +951,10 @@ const wfrpModule = ( () => { attrs.push(`repeating_experience_${id}_experience_amount`); }); + attrs.push(`experience_mod`); + getAttrs(attrs, values => { - const int_values = Object.values(values).map(item => parseInt(item) || 0); + const int_values = Object.values(values).map(item => parseInt(item) || 0).filter(item => item > 0); const total_xp = int_values.reduce((a,b) => a+b, 0); setAttrs({total_xp: total_xp}, recalculateCurrentXP()); @@ -1825,7 +1839,7 @@ on(`change:repeating_careers:career_level_current`, eventInfo => wfrpModule.upda // EXPERIENCE CHANGES -on(`change:repeating_experience`, eventInfo => wfrpModule.recalculateEarnedXP()); +on(`change:repeating_experience change:experience_mod`, eventInfo => wfrpModule.recalculateEarnedXP()); on(`change:current_xp change:spent_xp change:total_xp`, eventInfo => wfrpModule.recalculateCurrentXP()); @@ -1873,7 +1887,7 @@ on(`change:strength_bonus change:toughness_bonus change:encumbrance_bonus change on(`change:strength_bonus change:toughness_bonus change:willpower_bonus change:wound_mod change:size`, eventInfo => wfrpModule.calculateMaxWounds()); -on(`change:strength_bonus change:toughness_bonus change:encumbrance_bonus`, eventInfo => wfrpModule.calculateMaxEncumbrance()); +on(`change:strength_bonus change:toughness_bonus change:encumbrance_mod`, eventInfo => wfrpModule.calculateMaxEncumbrance()); on(`clicked:increment_advantage`, eventInfo => wfrpModule.incrementAdvantage()); From 8f06e8b20eb610b4fbf3a04a036c8d1819a8f755 Mon Sep 17 00:00:00 2001 From: Nic Bradley Date: Tue, 27 Oct 2020 12:34:32 -0700 Subject: [PATCH 4/8] WFRP4e - Adding GM Whisper Toggle --- .../src/js/sheetworkers.js | 15 +++++++++------ .../src/pug/layout/settings.pug | 6 ++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js index 43ab8aaeb3..6ee195cc12 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js +++ b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js @@ -208,6 +208,13 @@ const wfrpModule = ( () => { setAttrs({roll_init:init}); } + const toggleWhisper = (new_value) => { + const whisper = (new_value === "2") ? `/w gm` : + ``; + + setAttrs({roll_whisper:whisper}); + } + const parseModField = (new_value="", previous_value) => { const mods = new_value.toLowerCase().split(",").map(item=>item.trim()); const prev_mods = (previous_value) ? previous_value.toLowerCase().split(",").map(item=>item.trim()) : []; @@ -840,8 +847,6 @@ const wfrpModule = ( () => { const attrs = []; - console.log(ids); - for (const id of ids.careers) { for (const characteristic of wfrp.characteristics) { @@ -1149,8 +1154,6 @@ const wfrpModule = ( () => { }); getAttrs(attrs, values => { - console.log(values) - const talent_list = Object.entries(values); const names = talent_list.filter(([key, value]) => key.match(/name/g) && value !== ""); @@ -1616,8 +1619,6 @@ const wfrpModule = ( () => { update[`${repeating_id}_attack_target`] = value; - console.log(update) - setAttrs(update); } }); @@ -1686,6 +1687,7 @@ const wfrpModule = ( () => { toggleRollBonus:toggleRollBonus, toggleRollCrits:toggleRollCrits, toggleInitOption:toggleInitOption, + toggleWhisper:toggleWhisper, parseModField:parseModField, // Class and Species Controls @@ -1755,6 +1757,7 @@ on(`change:setting_diff_option`, eventInfo => wfrpModule.toggleRollDifficulty(ev on(`change:setting_bonus_option`, eventInfo => wfrpModule.toggleRollBonus(eventInfo.newValue)); on(`change:setting_crit_option`, eventInfo => wfrpModule.toggleRollCrits(eventInfo.newValue)); on(`change:setting_init_option`, eventInfo => wfrpModule.toggleInitOption(eventInfo.newValue)); +on(`change:setting_whisper`, eventInfo => wfrpModule.toggleWhisper(eventInfo.newValue)); [ "repeating_talent:talent_mods", diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/settings.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/settings.pug index b2a0b463f6..41a9753b61 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/settings.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/settings.pug @@ -68,6 +68,12 @@ option(value="2") 1d10+I option(value="3") 1d10+IB+AgB + .wfrp-settingstable__row + .wfrp-settingstable__label(data-i18n="Whisper to GM") + select.wfrp-settingstable__select(name="attr_setting_whisper") + option(data-i18n="Off", value="1", selected) + option(data-i18n="On", value="2") + .wfrp-settingspanel.wfrp-panel.page__settings h1.wfrp-panel__header(data-i18n="Combat Options") From a56242b45bd8b6fc595dc3e33e608fc405955549 Mon Sep 17 00:00:00 2001 From: Nic Bradley Date: Tue, 27 Oct 2020 12:49:29 -0700 Subject: [PATCH 5/8] WFRP4e - Fixing NPC buttons --- .../src/js/sheetworkers.js | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js index 6ee195cc12..3179e9ae19 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js +++ b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js @@ -1612,7 +1612,7 @@ const wfrpModule = ( () => { .replace(/\)/g, "") .replace(/ /, "_") .toLowerCase(); - + const value = values[type_parsed]; const update = {}; @@ -1675,6 +1675,34 @@ const wfrpModule = ( () => { }) } + const updateNPCButtons = () => { + + const attrs = [ + "npc", + "dodge", + "endurance", + "intuition", + "perception", + "cool", + ...wfrp.characteristics + ]; + + getAttrs(attrs, values => { + if (values[`NPC`] === "0") return; + const update = {}; + + if (!values[`dodge`]) update[`dodge`] = values[`agility`]; + if (!values[`endurance`]) update[`endurance`] = values[`toughness`]; + if (!values[`intuition`]) update[`intuition`] = values[`initiative`]; + if (!values[`perception`]) update[`perception`] = values[`initiative`]; + if (!values[`cool`]) update[`cool`] = values[`willpower`]; + + setAttrs(update); + + }); + + } + // MODULE INTERFACE return { @@ -1741,6 +1769,7 @@ const wfrpModule = ( () => { // NPC Functions getAttackValue:getAttackValue, cascadeNPCAttacks:cascadeNPCAttacks, + updateNPCButtons:updateNPCButtons, }; })(); @@ -1908,5 +1937,11 @@ on(`change:repeating_attacks:attack_name change:repeating_attacks:attack_type`, on(`change:weapon_skill change:ballistic_skill`, eventInfo => wfrpModule.cascadeNPCAttacks()); +wfrpModule.wfrp.characteristics.forEach(characteristic => { + on(`change:${characteristic} change:${characteristic}_bonus`, eventInfo => wfrpModule.updateNPCButtons()) +}); + +on(`change:npc sheet:opened`, eventInfo => wfrpModule.updateNPCButtons()) + //# sourceURL=sheetworkers.js From 1001a991d35f480eec02d8fd3d3730bc5a512248 Mon Sep 17 00:00:00 2001 From: Nic Bradley Date: Tue, 27 Oct 2020 15:02:20 -0700 Subject: [PATCH 6/8] WFRP4e - Adding initial characteristics --- .../src/js/sheetworkers.js | 13 ++++-- .../pug/components/repeating/careers-row.pug | 10 ++++- .../src/scss/components/_settings.scss | 44 ++++++++++++++++--- .../src/scss/layout/pc/_pc.scss | 12 +++++ .../src/scss/styling/_settings.scss | 1 - 5 files changed, 67 insertions(+), 13 deletions(-) diff --git a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js index 3179e9ae19..4f69925119 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js +++ b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js @@ -1004,12 +1004,14 @@ const wfrpModule = ( () => { const attrs = []; id_array.forEach(id => { - attrs.push(`repeating_careers_${id}_career_${characteristic}_advances`); + attrs.push(`repeating_careers_${id}_career_${characteristic}_advances`); + attrs.push(`repeating_careers_${id}_career_${characteristic}_init`); }); attrs.push(`${characteristic}_noncareer`); getAttrs(attrs, values => { + console.log(values) const int_values = Object.values(values).map(item => parseInt(item) || 0); const total_advances = int_values.reduce((a,b) => a+b); @@ -1744,6 +1746,7 @@ const wfrpModule = ( () => { calculateTotalAdvances:calculateTotalAdvances, recalculateEarnedXP:recalculateEarnedXP, recalculateCurrentXP:recalculateCurrentXP, + recalculateSpentXP:recalculateSpentXP, calculateCharacteristicAdvances:calculateCharacteristicAdvances, calculateSkillAdvances:calculateSkillAdvances, calculateTalentAdvances:calculateTalentAdvances, @@ -1871,12 +1874,14 @@ on(`change:repeating_careers:career_level_current`, eventInfo => wfrpModule.upda // EXPERIENCE CHANGES -on(`change:repeating_experience change:experience_mod`, eventInfo => wfrpModule.recalculateEarnedXP()); +on(`change:repeating_experience change:experience_mod remove:repeating_experience`, eventInfo => wfrpModule.recalculateEarnedXP()); -on(`change:current_xp change:spent_xp change:total_xp`, eventInfo => wfrpModule.recalculateCurrentXP()); +on(`change:current_xp change:spent_xp change:total_xp remove:repeating_experience`, eventInfo => wfrpModule.recalculateCurrentXP()); + +on(`change:repeating_experience change:spent_xp change:total_xp remove:repeating_experience`, eventInfo => wfrpModule.recalculateSpentXP()); wfrpModule.wfrp.characteristics.forEach(characteristic => { - on(`change:repeating_careers:career_${characteristic}_advances`, eventInfo => wfrpModule.calculateCharacteristicAdvances(characteristic)) + on(`change:repeating_careers:career_${characteristic}_advances change:repeating_careers:career_${characteristic}_init`, eventInfo => wfrpModule.calculateCharacteristicAdvances(characteristic)) }); [1,2,3,4].forEach(level => { diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/careers-row.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/careers-row.pug index 4cd9889bae..28379ab609 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/careers-row.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/careers-row.pug @@ -109,6 +109,11 @@ mixin careers-row h2(data-i18n="Characteristic Advances") .wfrp-settings__row--characteristics + + .wfrp-settings__item + .wfrp_settings__title + .wfrp_settings__title.wfrp-career__characteristic--first(data-i18n="Initial") + .wfrp_settings__title(data-i18n="Advances") each characteristic in characteristics - @@ -119,7 +124,10 @@ mixin careers-row label.wfrp-settings__label input.wfrp-settings__checkbox(name=`attr_career_${attr}`, type="checkbox") span(data-i18n=characteristic.abbreviation) - input.wfrp-settings__input(name=`attr_career_${attr}_advances`, type="number") + div.wfrp-career__characteristic--first + input.wfrp-settings__input(name=`attr_career_${attr}_init`, type="number") + div.wfrp-career__characteristic + input.wfrp-settings__input(name=`attr_career_${attr}_advances`, type="number") .wfrp-settings__row--span(class=`wfrp-career__row--first`) diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/components/_settings.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/components/_settings.scss index 3ddc2d77e1..c040fd318c 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/components/_settings.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/components/_settings.scss @@ -40,8 +40,38 @@ @extend .sheet-wfrp-settings__row; grid-column: 1 / -1; - grid-template-columns: repeat(10, 1fr); - gap: $margin-general; + grid-template-columns: 1.5fr repeat(10, 1fr); + + > * { + display: grid; + grid-auto-rows: 2rem; + border-right: 1px solid #000; + + &:last-child { + border: none; + } + + > div { + border-bottom: 1px solid #000; + + &:last-child { + border: none; + } + } + } + + input[type="number"], + input[type="text"] { + border-radius: 0 !important; + + &:last-child { + border: none; + } + } + + label { + border-bottom: 1px solid #000; + } } @@ -108,7 +138,7 @@ input[type="hidden"][value="on"] { - & ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { + & ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { pointer-events: auto; background: $form-input-background; @@ -119,7 +149,7 @@ input[type="hidden"][value="1"] { - & ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { + & ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { pointer-events: auto; background: $form-input-background; @@ -130,7 +160,7 @@ input[type="hidden"][value="2"] { - & ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { + & ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { pointer-events: auto; background: rgba(darkgoldenrod, 0.25); @@ -141,7 +171,7 @@ input[type="hidden"][value="3"] { - & ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { + & ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { pointer-events: auto; background: rgba(silver, 0.25); @@ -152,7 +182,7 @@ input[type="hidden"][value="4"] { - & ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { + & ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type="number"] { pointer-events: auto; background: rgba(gold, 0.25); diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_pc.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_pc.scss index 2af30ad105..f2700a40b0 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_pc.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_pc.scss @@ -98,6 +98,10 @@ } &-career { + &__characteristic--first { + display: none; + } + &__row { display: grid; grid-template-columns: 1fr 1fr; @@ -137,6 +141,14 @@ display: grid; } + & .sheet-wfrp-career__characteristic--first { + display: grid; + } + + & .sheet-wfrp-career__row--1 { + display: none; + } + & .sheet-wfrp-career__row--1 { display: none; } diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_settings.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_settings.scss index 352eb1a8be..1d839bf1ee 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_settings.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_settings.scss @@ -30,7 +30,6 @@ &__label { span { display: block; - border-bottom: $grid-border; } } } From 170fd77583224c1400868d709558b3a02192d511 Mon Sep 17 00:00:00 2001 From: Nic Bradley Date: Sat, 31 Oct 2020 09:01:32 -0700 Subject: [PATCH 7/8] Update preview.png --- Cyberpunk 2020/{Cyberpunk2020.png => preview.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename Cyberpunk 2020/{Cyberpunk2020.png => preview.png} (100%) diff --git a/Cyberpunk 2020/Cyberpunk2020.png b/Cyberpunk 2020/preview.png similarity index 100% rename from Cyberpunk 2020/Cyberpunk2020.png rename to Cyberpunk 2020/preview.png From 875e71f96d968b518d63a5a3a7d0e4a26f807a60 Mon Sep 17 00:00:00 2001 From: Nic Bradley Date: Sat, 14 Nov 2020 15:41:39 -0800 Subject: [PATCH 8/8] WFRP4e - v1.0.3 --- .../sheet.json | 189 +- .../src/js/dragndrop.js | 25 +- .../src/js/sheetworkers.js | 447 +++- .../src/pug/abstracts.pug | 6 +- .../src/pug/components/_component-index.pug | 2 + .../pug/components/repeating/careers-row.pug | 140 +- .../components/repeating/npc-talent-row.pug | 37 + .../pug/components/repeating/weapon-row.pug | 2 +- .../src/pug/components/species.pug | 60 + .../src/pug/layout/npc.pug | 4 + .../src/pug/layout/pc.pug | 98 +- .../src/pug/rolls.pug | 11 + .../src/pug/wfrp4.pug | 8 +- .../src/scss/components/_settings.scss | 13 + .../src/scss/control/_hide.scss | 30 +- .../src/scss/control/_tabs.scss | 8 +- .../src/scss/layout/_npc.scss | 27 +- .../src/scss/layout/pc/_grids.scss | 8 +- .../src/scss/layout/pc/_navigation.scss | 40 +- .../src/scss/layout/pc/_pc.scss | 8 +- .../src/scss/styling/_grids.scss | 2 +- .../src/scss/styling/_navigation.scss | 1 + .../src/scss/styling/_settings.scss | 6 + .../translation.json | 49 +- .../wfrp4.css | 248 +- .../wfrp4.html | 2202 +++++++++++------ 26 files changed, 2522 insertions(+), 1149 deletions(-) create mode 100644 Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/npc-talent-row.pug create mode 100644 Warhammer Fantasy Roleplay 4e Official/src/pug/components/species.pug diff --git a/Warhammer Fantasy Roleplay 4e Official/sheet.json b/Warhammer Fantasy Roleplay 4e Official/sheet.json index f81d21b98d..346642baf5 100644 --- a/Warhammer Fantasy Roleplay 4e Official/sheet.json +++ b/Warhammer Fantasy Roleplay 4e Official/sheet.json @@ -5,5 +5,192 @@ "roll20userid": "45398", "preview": "preview.png", "compendium": "WFRP", - "instructions": "" + "instructions": "", + "useroptions": [ + { + "attribute": "npc", + "displayname": "NPC", + "displaytranslationkey": "settings_npc", + "type": "checkbox", + "value": "on", + "description": "The NPC option sets new characters to default to the NPC card style sheet. Useful if the player characters have already been created and all new character sheets added to the game will likely represent non player characters.", + "descriptiontranslationkey": "settings_npc_desc" + }, + { + "attribute": "setting_whisper", + "displayname": "Whisper Rolls to GM", + "displaytranslationkey": "settings_whisper", + "type": "select", + "options": [ + "Off|1", + "On|0" + ], + "optiontranslationkeys": [ + "On", + "Off" + ], + "default": "Off|1", + "description": "All sheet rolls are sent to all players in chat by default. If enabled, rolls from this sheet will be visible only to the GM.", + "descriptiontranslationkey": "settings_whisper_desc" + }, + { + "attribute": "setting_diff_option", + "displayname": "Query Difficulty", + "displaytranslationkey": "settings_difficulty", + "type": "select", + "options": [ + "On|0", + "Off|1" + ], + "optiontranslationkeys": [ + "On", + "Off" + ], + "default": "On", + "description": "This will enable or disable the difficulty query window when rolls are made. When off, all rolls are made at the base target number.", + "descriptiontranslationkey": "settings_difficulty_desc" + }, + { + "attribute": "setting_bonus_option", + "displayname": "Query Bonuses", + "displaytranslationkey": "settings_bonuses", + "type": "select", + "options": [ + "On|0", + "Off|1" + ], + "optiontranslationkeys": [ + "On", + "Off" + ], + "default": "On", + "description": "This will enable or disable the additional bonus and SL bonus windows when rolls are made.", + "descriptiontranslationkey": "settings_bonuses_desc" + }, + { + "attribute": "setting_crit_option", + "displayname": "Automatic Success & Failure", + "displaytranslationkey": "settings_auto", + "type": "select", + "options": [ + "Default|1", + "01/96-100|2", + "01/100|3" + ], + "optiontranslationkeys": [ + "Default" + ], + "default": "Default", + "description": "This will change the boundaries for automatic success and failure on a roll. The default boundaries set the automatic success point at 01-05 and 96-100.", + "descriptiontranslationkey": "settings_auto_desc" + }, + { + "attribute": "setting_init_option", + "displayname": "Initiative Roll", + "displaytranslationkey": "settings_initiative", + "type": "select", + "options": [ + "Default|1", + "1d10+I|2", + "1d10+IB+AgB|3" + ], + "optiontranslationkeys": [ + "Default" + ], + "default": "Default", + "description": "This changes the way initiative will be sent to the turn tracker. In the default setting, a character's whole initiative characteristic will be sent to the turntracker. When using the other options, a d10 will be rolled and different configurations of characteristic bonuses will be added to it.", + "descriptiontranslationkey": "settings_initiative_desc" + }, + { + "attribute": "setting_max_advantage", + "displayname": "Max Advantage", + "displaytranslationkey": "settings_maxadvantage", + "type": "text", + "default": "", + "description": "Sets the maximum advantage possible.", + "descriptiontranslationkey": "settings_bar1_value_desc" + }, + { + "attribute": "bar1_v", + "displayname": "BAR 1 VALUE", + "displaytranslationkey": "settings_bar1_value", + "type": "text", + "default": "wounds", + "description": "On Default Tokens created by doing a drop onto the virtual table top, set the Bar 1's value to this attribute.", + "descriptiontranslationkey": "settings_bar1_value_desc" + }, + { + "attribute": "bar1_m", + "displayname": "BAR 1 MAX", + "displaytranslationkey": "settings_bar1_max", + "type": "text", + "default": "wounds", + "description": "On Default Tokens created by doing a drop onto the virtual table top, set the Bar 1's max to this attribute.", + "descriptiontranslationkey": "settings_bar1_max_desc" + }, + { + "attribute": "bar1_l", + "displayname": "BAR 1 LINK", + "displaytranslationkey": "settings_bar1_link", + "type": "text", + "default": "", + "description": "On Default Tokens created by doing a drop onto the virtual table top, link the Bar 1's value to this attribute. If set this will override all other bar settings.", + "descriptiontranslationkey": "settings_bar1_link_desc" + }, + { + "attribute": "bar2_v", + "displayname": "BAR 2 VALUE", + "displaytranslationkey": "settings_bar2_value", + "type": "text", + "default": "toughness_bonus", + "description": "On Default Tokens created by doing a drop onto the virtual table top, set the Bar 2's value to this attribute.", + "descriptiontranslationkey": "settings_bar2_value_desc" + }, + { + "attribute": "bar2_m", + "displayname": "BAR 2 MAX", + "displaytranslationkey": "settings_bar2_max", + "type": "text", + "default": "", + "description": "On Default Tokens created by doing a drop onto the virtual table top, set the Bar 2's max to this attribute.", + "descriptiontranslationkey": "settings_bar2_max_desc" + }, + { + "attribute": "bar2_l", + "displayname": "BAR 2 LINK", + "displaytranslationkey": "settings_bar2_link", + "type": "text", + "default": "", + "description": "On Default Tokens created by doing a drop onto the virtual table top, link the Bar 2's value to this attribute. If set this will override all other bar settings.", + "descriptiontranslationkey": "settings_bar2_link_desc" + }, + { + "attribute": "bar3_v", + "displayname": "BAR 3 VALUE", + "displaytranslationkey": "settings_bar3_value", + "type": "text", + "default": "", + "description": "On Default Tokens created by doing a drop onto the virtual table top, set the Bar 3's value to this attribute.", + "descriptiontranslationkey": "settings_bar3_value_desc" + }, + { + "attribute": "bar3_m", + "displayname": "BAR 3 MAX", + "displaytranslationkey": "settings_bar3_max", + "type": "text", + "default": "", + "description": "On Default Tokens created by doing a drop onto the virtual table top, set the Bar 3's max to this attribute.", + "descriptiontranslationkey": "settings_bar3_max_desc" + }, + { + "attribute": "bar3_l", + "displayname": "BAR 3 LINK", + "displaytranslationkey": "settings_bar3_link", + "type": "text", + "default": "", + "description": "On Default Tokens created by doing a drop onto the virtual table top, link the Bar 3's value to this attribute. If set this will override all other bar settings.", + "descriptiontranslationkey": "settings_bar3_link_desc" + } + ] + } diff --git a/Warhammer Fantasy Roleplay 4e Official/src/js/dragndrop.js b/Warhammer Fantasy Roleplay 4e Official/src/js/dragndrop.js index bebc7fac03..4c6411807d 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/js/dragndrop.js +++ b/Warhammer Fantasy Roleplay 4e Official/src/js/dragndrop.js @@ -1,21 +1,23 @@ const wfrpDragAndDrop = ( () => { - const handleDrop = (values, overwrite = false) => { + const handleDrop = (values, name) => { const {drop_name, drop_content, drop_data} = values; + const page_name = (name) ? name : drop_name; + if (drop_name === ""|| typeof drop_data === "") return; let parsed_data = helperFunctions.parseJSON(drop_data); - if (parsed_data.Category === "Careers") handleCareer(drop_name, parsed_data); - else if (parsed_data.Category === "Blessings" || parsed_data.Category === "Spells" || parsed_data.Category === "Miracles" ) handleSpell(drop_name, parsed_data, drop_content); - else if (parsed_data.Category === "Items") handleItem(drop_name, parsed_data); - else if (parsed_data.Category === "Monsters") handleMonster(drop_name, parsed_data, drop_content); - else if (parsed_data.Category === "Talents") handleTalent(drop_name, parsed_data); - else if (parsed_data.Category === "Conditions") handleCondition(drop_name, parsed_data); - else if (parsed_data.Category === "Creature Traits") handleCreatureTrait(drop_name, parsed_data); + if (parsed_data.Category === "Careers") handleCareer(dpage_name, parsed_data); + else if (parsed_data.Category === "Blessings" || parsed_data.Category === "Spells" || parsed_data.Category === "Miracles" ) handleSpell(page_name, parsed_data, drop_content); + else if (parsed_data.Category === "Items") handleItem(page_name, parsed_data); + else if (parsed_data.Category === "Monsters") handleMonster(page_name, parsed_data, drop_content); + else if (parsed_data.Category === "Talents") handleTalent(page_name, parsed_data); + else if (parsed_data.Category === "Conditions") handleCondition(page_name, parsed_data); + else if (parsed_data.Category === "Creature Traits") handleCreatureTrait(page_name, parsed_data); else console.warn(`${parsed_data.Category} drop is not supported by the sheet`); setAttrs({drop_name: "", drop_content: "", drop_data: ""}); @@ -177,8 +179,11 @@ const wfrpDragAndDrop = ( () => { for (const characteristic in characteristics) { updateAttrs[characteristic.replace(/ /g,"_")] = characteristics[characteristic]; + updateAttrs[`${characteristic.replace(/ /g,"_")}_bonus`] = Math.floor(characteristics[characteristic]/10); } + console.log(updateAttrs); + const trait_map = new Map(); for (const trait of traits) { @@ -490,6 +495,8 @@ const wfrpDragAndDrop = ( () => { } getAttrs(token_values, settings => { + + console.log(settings) const default_attr = { width: 70, @@ -504,6 +511,8 @@ const wfrpDragAndDrop = ( () => { getAttrs(attrs, values => { + console.log(values) + for (const item in settings) { if (settings[item] !== "") { default_attr[item] = settings[item]; diff --git a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js index 4f69925119..e5f0586694 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js +++ b/Warhammer Fantasy Roleplay 4e Official/src/js/sheetworkers.js @@ -3,7 +3,7 @@ const wfrpModule = ( () => { // Global Variables const wfrp = { - sheet_version: "1.0.0", + sheet_version: "1.0.3", characteristics: [ "weapon_skill", @@ -148,6 +148,18 @@ const wfrpModule = ( () => { recalculateEarnedXP(); calculateArmour(); + + getAttrs(["setting_init_option","setting_whisper","setting_bonus_option","setting_crit_option"], values => { + + toggleInitOption(values["setting_init_option"]); + + toggleWhisper(values["setting_whisper"]); + + toggleRollBonus(values["setting_bonus_option"]); + + toggleRollCrits(values["setting_crit_option"]); + + }) } const updateSheet = (version) => { @@ -166,14 +178,16 @@ const wfrpModule = ( () => { const difficulty = (new_value === "1") ? `?{Difficulty|Average (+20), 20|Very Easy (+60), 60|Easy (+40), 40|Average (+20), 20|Challenging (0), 0|Difficult (-10), -10|Hard (-20), -20|Very Hard (-30), -30}` : 0; - setAttrs({difficulty_query:difficulty}); + setAttrs({ + difficulty_query:difficulty + }); } const toggleRollBonus = (new_value) => { let query = 0; let slbonus = ""; - if (new_value === 1) { + if (new_value === "1") { query = "?{Bonus|0}"; slbonus = "{{sl_bonus=?{SL Bonus|0}}}" } @@ -196,7 +210,10 @@ const wfrpModule = ( () => { (new_value === "3") ? 1 : 5; - setAttrs({roll_cs:cs, roll_cf:cf}); + setAttrs({ + roll_cs:cs, + roll_cf:cf + }); } const toggleInitOption = (new_value) => { @@ -343,46 +360,121 @@ const wfrpModule = ( () => { new_value = new_value.toLowerCase(); + const update = { + fate: 0, + resilience: 0, + movement: 0, + size: 0 + } + if (new_value === "human") { - setAttrs({ - fate: 2, - resilience: 1, - movement: 4, - size: "average" - }); + update["fate"] = 2; + update["resilience"] = 1; + update["movement"] = 4; + update["size"] = "average"; } if (new_value === "dwarf") { - setAttrs({ - fate: 0, - resilience: 2, - movement: 3, - size: "average" - }); + update["fate"] = 0; + update["resilience"] = 2; + update["movement"] = 3; + update["size"] = "average"; } if (new_value === "halfling") { - setAttrs({ - fate: 0, - resilience: 2, - movement: 3, - size: "average" - }); + update["fate"] = 0; + update["resilience"] = 2; + update["movement"] = 3; + update["size"] = "small"; } - if (new_value === "elf") { - setAttrs({ - fate: 0, - resilience: 0, - movement: 5, - size: "average" - }); + if (new_value === "wood elf") { + update["fate"] = 0; + update["resilience"] = 0; + update["movement"] = 4; + update["size"] = "average"; } if (new_value === "high elf") { - setAttrs({ - fate: 0, - resilience: 0, - movement: 5, - size: "average" - }); + update["fate"] = 0; + update["resilience"] = 0; + update["movement"] = 5; + update["size"] = "average"; } + + if (new_value !== "custom") { + + getCompendiumPage(`Species:${new_value}`, page => { + const skills = helperFunctions.parseJSON(page.data.Skills); + const talents = helperFunctions.parseJSON(page.data.Talents); + + const skills_fixed = skills.Fixed.split(",").map(item=>item.trim()) || []; + const talents_fixed = talents.Fixed.split(",").map(item=>item.trim()) || []; + + let talents_choices = []; + + let skill_index = 1; + let talent_index = 1; + + if (talents.Choices) talents.Choices.forEach(choice => talents_choices = [...talents_choices, ...choice]); + + for (let index = 1; index <= 12; index++) { + update[`species_skill_${index}_name`] = ""; + update[`species_skill_${index}_advances`] = "0"; + } + + for (let index = 1; index <= 10; index++) { + update[`species_talent_${index}_name`] = ""; + update[`species_talent_${index}_advances`] = "0"; + } + + for (const skill of skills_fixed) { + update[`species_skill_${skill_index}_name`] = skill; + update[`species_talent_${skill_index}_advances`] = "0"; + skill_index++; + } + + for (const talent of talents_fixed) { + update[`species_talent_${talent_index}_name`] = talent; + update[`species_talent_${talent_index}_advances`] = "1"; + talent_index++; + } + + for (const talent of talents_choices) { + update[`species_talent_${talent_index}_name`] = talent; + update[`species_talent_${talent_index}_advances`] = "0"; + talent_index++; + } + + setAttrs(update, {silent:true}, callback => calculateTalentAdvances()); + }); + + } else { + setAttrs(update); + } + } + + const checkSpeciesAdvances = () => { + const attrs = []; + + for (let i = 1; i <= 12; i++) { + attrs.push(`species_skill_${i}_advances`); + } + + getAttrs(attrs, values => { + let threes = 0; + let fives = 0; + + Object.values(values).forEach(value => { + if (value === "3") threes++; + if (value === "5") fives++; + }); + + const update = {}; + + update["species_disable3"] = (threes >= 3) ? 1 : 0; + update["species_disable5"] = (fives >= 3) ? 1 : 0; + + setAttrs(update); + + }); + } // Characteristic Functions @@ -745,10 +837,12 @@ const wfrpModule = ( () => { for (let i = 1; i <= 4; i++) { for (let j = 1; j <= 10; j++) { attrs.push(`${repeating_id}_career_skill_${i}_${j}_advances`); + attrs.push(`${repeating_id}_career_skill_${i}_${j}_init`); } for (let k = 1; k <= 5; k++) { attrs.push(`${repeating_id}_career_talent_${i}_${k}_advances`); + attrs.push(`${repeating_id}_career_talent_${i}_${j}_init`); } } @@ -774,67 +868,77 @@ const wfrpModule = ( () => { }); } - const calculateCharacteristicXP = (value) => { - - let int = parseInt(value); + const calculateCharacteristicXP = (value, free) => { + let int = parseInt(value) + parseInt(free); + let countdown = parseInt(free); let accumulator = 0; while (int > 0) { - accumulator += - (int <= 5) ? 25 : - (int <= 10) ? 30 : - (int <= 15) ? 40 : - (int <= 20) ? 50 : - (int <= 25) ? 70 : - (int <= 30) ? 90 : - (int <= 35) ? 120 : - (int <= 40) ? 150 : - (int <= 45) ? 190 : - (int <= 50) ? 230 : - (int <= 55) ? 280 : - (int <= 60) ? 330 : - (int <= 65) ? 390 : - (int <= 70) ? 450 : - 520; + if (int > countdown) { + accumulator += + (int <= 5) ? 25 : + (int <= 10) ? 30 : + (int <= 15) ? 40 : + (int <= 20) ? 50 : + (int <= 25) ? 70 : + (int <= 30) ? 90 : + (int <= 35) ? 120 : + (int <= 40) ? 150 : + (int <= 45) ? 190 : + (int <= 50) ? 230 : + (int <= 55) ? 280 : + (int <= 60) ? 330 : + (int <= 65) ? 390 : + (int <= 70) ? 450 : + 520; + } + int--; } return accumulator; } - const calculateSkillXP = (value) => { - let int = parseInt(value); + const calculateSkillXP = (value, free) => { + let int = parseInt(value) + parseInt(free); + let countdown = parseInt(free); let accumulator = 0; while (int > 0) { - accumulator += - (int <= 5) ? 10 : - (int <= 10) ? 15 : - (int <= 15) ? 20 : - (int <= 20) ? 30 : - (int <= 25) ? 40 : - (int <= 30) ? 60 : - (int <= 35) ? 80 : - (int <= 40) ? 110 : - (int <= 45) ? 140 : - (int <= 50) ? 180 : - (int <= 55) ? 220 : - (int <= 60) ? 270 : - (int <= 65) ? 320 : - (int <= 70) ? 380 : - 440; + if (int > countdown) { + accumulator += + (int <= 5) ? 10 : + (int <= 10) ? 15 : + (int <= 15) ? 20 : + (int <= 20) ? 30 : + (int <= 25) ? 40 : + (int <= 30) ? 60 : + (int <= 35) ? 80 : + (int <= 40) ? 110 : + (int <= 45) ? 140 : + (int <= 50) ? 180 : + (int <= 55) ? 220 : + (int <= 60) ? 270 : + (int <= 65) ? 320 : + (int <= 70) ? 380 : + 440; + } + int--; } return accumulator; } - const calculateTalentXP = (value) => { - let int = parseInt(value); + const calculateTalentXP = (value, free) => { + let int = parseInt(value) + parseInt(free); + let countdown = parseInt(free); let accumulator = 0; while (int > 0) { - accumulator += int * 100 + + if (int > countdown) accumulator += int * 100 + int--; } @@ -843,7 +947,7 @@ const wfrpModule = ( () => { const recalculateSpentXP = () => { - helperFunctions.aggregateRepeatingIDs([`careers`, `experience`], ids => { + helperFunctions.aggregateRepeatingIDs([`careers`, `experience`, `experiencespent`], ids => { const attrs = []; @@ -851,88 +955,137 @@ const wfrpModule = ( () => { for (const characteristic of wfrp.characteristics) { attrs.push(`repeating_careers_${id}_career_${characteristic}_advances`); + attrs.push(`repeating_careers_${id}_career_${characteristic}_init`); } for (let i = 1; i <= 4; i++) { for (let j = 1; j <= 10; j++) { attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_name`); attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_advances`); + attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_init`); } for (let k = 1; k <= 5; k++) { attrs.push(`repeating_careers_${id}_career_talent_${i}_${k}_name`); attrs.push(`repeating_careers_${id}_career_talent_${i}_${k}_advances`); + attrs.push(`repeating_careers_${id}_career_talent_${i}_${k}_init`); } } } + for (let i = 1; i <= 10; i++) { + attrs.push(`species_talent_${i}_name`); + attrs.push(`species_talent_${i}_advances`); + } + + for (let i = 1; i <= 12; i++) { + attrs.push(`species_skill_${i}_name`); + attrs.push(`species_skill_${i}_advances`); + } + for (const id of ids.experience) { attrs.push(`repeating_experience_${id}_experience_amount`); } + + console.log(ids.experiencespent) + + for (const id of ids.experiencespent) { + attrs.push(`repeating_experiencespent_${id}_experience_amount`); + + } getAttrs(attrs, values => { + const entries = Object.entries(values).filter(([key, value]) => value !== ""); const characteristic_advances = new Map(); + const characteristic_advances_free = new Map(); + const skill_advances = new Map(); + const skill_advances_free = new Map(); + const talent_advances = new Map(); + const talent_advances_free = new Map(); for (const id of ids.careers) { - - for (const characteristic of wfrp.characteristics) { - const value = parseInt(values[`repeating_careers_${id}_career_${characteristic}_advances`]); - if (value) { - if (characteristic_advances.has(characteristic)) { - const current = characteristic_advances.get(characteristic); - const total = current + value; - characteristic_advances.set(characteristic, total); - } else { - characteristic_advances.set(characteristic, value); - } - } - } + wfrp.characteristics.forEach(characteristic => { + const value = parseInt(values[`repeating_careers_${id}_career_${characteristic}_advances`]) || 0; + const current = characteristic_advances.get(characteristic) || 0; + const total = value + current; + + const value_free = parseInt(values[`repeating_careers_${id}_career_${characteristic}_init`]) || 0; + const current_free = characteristic_advances_free.get(characteristic) || 0; + const total_free = value_free + current_free; + + characteristic_advances.set(characteristic, total); + characteristic_advances_free.set(characteristic, total_free); + }); for (let i = 1; i <= 4; i++) { for (let j = 1; j <= 10; j++) { const skill = values[`repeating_careers_${id}_career_skill_${i}_${j}_name`]; - const value = parseInt(values[`repeating_careers_${id}_career_skill_${i}_${j}_advances`]); - if (value) { - if (skill_advances.has(skill)) { - const current = skill_advances.get(skill); - const total = current + value; - skill_advances.set(skill, total); - } else { - skill_advances.set(skill, value); - } - } + + const value = parseInt(values[`repeating_careers_${id}_career_skill_${i}_${j}_advances`]) || 0; + const current = skill_advances.get(skill) || 0; + const total = current + value; + + const value_free = parseInt(values[`repeating_careers_${id}_career_skill_${i}_${j}_init`]) || 0; + const current_free = skill_advances_free.get(skill) || 0; + const total_free = current_free + value_free; + + skill_advances.set(skill, total); + skill_advances_free.set(skill, total_free); } for (let k = 1; k <= 5; k++) { - const talent = values[`repeating_careers_${id}_talent_skill_${i}_${k}_name`]; - const value = parseInt(values[`repeating_careers_${id}_career_talent_${i}_${k}_advances`]); - if (value) { - if (talent_advances.has(talent)) { - const current = talent_advances.get(skill); - const total = current + value; - talent_advances.set(skill, total); - } else { - talent_advances.set(skill, value); - } - } + const talent = values[`repeating_careers_${id}_career_talent_${i}_${k}_name`]; + + const value = parseInt(values[`repeating_careers_${id}_career_talent_${i}_${k}_advances`]) || 0; + const current = talent_advances.get(talent) || 0; + const total = current + value; + + const value_free = parseInt(values[`repeating_careers_${id}_career_talent_${i}_${k}_init`]) || 0; + const current_free = talent_advances_free.get(talent) || 0; + const total_free = current_free + value_free; + + talent_advances.set(talent, total); + talent_advances_free.set(talent, total_free); } } } + for (let i = 1; i <= 12; i++) { + const skill = values[`species_skill_${i}_name`]; + + const value_free = parseInt(values[`species_skill_${i}_advances`]) || 0; + const current_free = skill_advances_free.get(skill) || 0; + const total_free = current_free + value_free; + + skill_advances_free.set(skill, total_free); + } + + for (let i = 1; i <= 10; i++) { + const talent = values[`species_talent_${i}_name`]; + + const value_free = parseInt(values[`species_talent_${i}_advances`]) || 0; + const current_free = talent_advances_free.get(talent) || 0; + const total_free = current_free + value_free; + } + let xp = 0; - characteristic_advances.forEach((value) => xp += calculateCharacteristicXP(value)); - skill_advances.forEach((value) => xp += calculateSkillXP(value)); - talent_advances.forEach((value) => xp += calculateTalentXP(value)); + characteristic_advances.forEach((value, key) => xp += calculateCharacteristicXP(value, characteristic_advances_free.get(key))); + skill_advances.forEach((value, key) => xp += calculateSkillXP(value, skill_advances_free.get(key))); + talent_advances.forEach((value, key) => xp += calculateTalentXP(value, talent_advances_free.get(key))); - for (const id of ids.experience) { - const value = parseInt(values[`repeating_experience_${id}_experience_amount`]); - - if (value < 0) xp -= value; + console.log(ids.experiencespent) + + for (const id of ids.experiencespent) { + const value = parseInt(values[`repeating_experiencespent_${id}_experience_amount`]); + + console.log(value) + + xp += value; } const updateAttrs = {}; @@ -1011,7 +1164,6 @@ const wfrpModule = ( () => { attrs.push(`${characteristic}_noncareer`); getAttrs(attrs, values => { - console.log(values) const int_values = Object.values(values).map(item => parseInt(item) || 0); const total_advances = int_values.reduce((a,b) => a+b); @@ -1042,6 +1194,11 @@ const wfrpModule = ( () => { attrs.push(`repeating_noncareer-skills_${id}_advance_name`) attrs.push(`repeating_noncareer-skills_${id}_advance_advances`) }); + + for (let i = 1; i <= 12; i++) { + attrs.push(`species_skill_${i}_name`); + attrs.push(`species_skill_${i}_advances`); + } getAttrs(attrs, values => { const skill_list = Object.entries(values); @@ -1063,7 +1220,6 @@ const wfrpModule = ( () => { const updateAttrs = {}; skills.forEach((value, key) => { - let parsed_key = key.replace(/ /g,"-").toLowerCase(); if (wfrp.skills.includes(parsed_key)) { @@ -1154,6 +1310,11 @@ const wfrpModule = ( () => { } } }); + + for (let i = 1; i <= 10; i++) { + attrs.push(`species_talent_${i}_name`); + attrs.push(`species_talent_${i}_advances`); + } getAttrs(attrs, values => { const talent_list = Object.entries(values); @@ -1173,7 +1334,6 @@ const wfrpModule = ( () => { }); talents.forEach((value, key) => { - if (value !== 0) { getSectionIDs("talent", id_array => { @@ -1191,29 +1351,33 @@ const wfrpModule = ( () => { const key_array = Object.keys(values).filter(item => item !== ""); - if (value_array_test.includes(key.toLowerCase())) { - const index = value_array_test.indexOf(key.toLowerCase()); + let page_name = key.split("(")[0].trim() || key; + + if (value_array_test.includes(page_name.toLowerCase())) { + const index = value_array_test.indexOf(page_name.toLowerCase()); const array_key = key_array[index]; const new_key = `${array_key.substring(0, array_key.length-5)}_ranks`; updateAttrs[new_key] = value; } else if (value > 0) { - getCompendiumPage(key, page => { + getCompendiumPage(`Talents:${page_name}`, page => { + + if (page.expansion !== 0 && page.expansion) { + + wfrpDragAndDrop.handleDrop({drop_name:page.name, drop_content:page.content, drop_data:page.data}, key); - if (page.expansion !== 0) { - wfrpDragAndDrop.handleDrop({drop_name:page.name, drop_content:page.content, drop_data:page.data}); } else { const new_id = generateRowID(); updateAttrs[`repeating_talent_${new_id}_talent_name`] = key; updateAttrs[`repeating_talent_${new_id}_talent_ranks`] = value; + + setAttrs(updateAttrs); } }); } - - setAttrs(updateAttrs); }); }); @@ -1251,7 +1415,7 @@ const wfrpModule = ( () => { getAttrs(attrs, values => { const spent = Object.values(values).filter(item => item !== "").map(item => parseInt(item)); - const total = spent.reduce((a,b) => a+b); + const total = spent.reduce((a,b) => a+b) || 0; const maximum_allowed = (source_type === "skill") ? 40 : 1; if (total > maximum_allowed) { @@ -1722,6 +1886,7 @@ const wfrpModule = ( () => { // Class and Species Controls changeSpecies:changeSpecies, + checkSpeciesAdvances:checkSpeciesAdvances, // Characteristic Functions calculateCharacteristic: calculateCharacteristic, @@ -1811,6 +1976,10 @@ on(`clicked:remove_custom_species`, eventInfo => setAttrs({"species":""})); on(`change:species`, eventInfo => wfrpModule.changeSpecies(eventInfo.newValue)); +for (let index = 1; index <= 12; index++) { + on(`change:species_skill_${index}_advances`, eventInfo => wfrpModule.checkSpeciesAdvances()); +} + // CHARACTERISTIC CALCULATIONS wfrpModule.wfrp.characteristics.forEach(characteristic => { @@ -1874,11 +2043,11 @@ on(`change:repeating_careers:career_level_current`, eventInfo => wfrpModule.upda // EXPERIENCE CHANGES -on(`change:repeating_experience change:experience_mod remove:repeating_experience`, eventInfo => wfrpModule.recalculateEarnedXP()); +on(`change:repeating_experience change:repeating_experiencespent change:experience_mod remove:repeating_experiencespent remove:repeating_experience`, eventInfo => wfrpModule.recalculateEarnedXP()); on(`change:current_xp change:spent_xp change:total_xp remove:repeating_experience`, eventInfo => wfrpModule.recalculateCurrentXP()); -on(`change:repeating_experience change:spent_xp change:total_xp remove:repeating_experience`, eventInfo => wfrpModule.recalculateSpentXP()); +on(`change:repeating_experience change:repeating_experiencespent change:experience_mod remove:repeating_experiencespent remove:repeating_experience`, eventInfo => wfrpModule.recalculateSpentXP()); wfrpModule.wfrp.characteristics.forEach(characteristic => { on(`change:repeating_careers:career_${characteristic}_advances change:repeating_careers:career_${characteristic}_init`, eventInfo => wfrpModule.calculateCharacteristicAdvances(characteristic)) @@ -1900,8 +2069,24 @@ wfrpModule.wfrp.characteristics.forEach(characteristic => { }); }); +for (let index = 1; index <= 12; index++) { + on(`clicked:remove_skill_${index}`, eventInfo => setAttrs({[`species_skill_${index}_advances`]:"0"})); + + on(`change:species_skill_${index}_advances`, eventInfo => wfrpModule.calculateSkillAdvances()); +} + +for (let index = 1; index <= 10; index++) { + on(`change:species_talent_${index}_advances`, eventInfo => wfrpModule.calculateTalentAdvances()) +}; + on(`clicked:combinexp`, eventInfo => wfrpModule.consolidateXP()); +on(`clicked:advance`, eventInfo => wfrpModule.advanceXP()); + +on(`clicked:career_incomplete`, eventInfo => wfrpModule.incompleteCareerXP()); + +on(`clicked:career_complete`, eventInfo => wfrpModule.completeCareerXP()); + on(`change:repeating_noncareer-skills delete:repeating_noncareer-skills`, eventInfo => wfrpModule.calculateSkillAdvances()); on(`change:repeating_careers`, eventInfo => wfrpModule.calculateInitColumns(eventInfo.sourceAttribute, eventInfo.newValue)); @@ -1946,7 +2131,7 @@ wfrpModule.wfrp.characteristics.forEach(characteristic => { on(`change:${characteristic} change:${characteristic}_bonus`, eventInfo => wfrpModule.updateNPCButtons()) }); -on(`change:npc sheet:opened`, eventInfo => wfrpModule.updateNPCButtons()) +on(`change:npc sheet:opened`, eventInfo => wfrpModule.updateNPCButtons()); //# sourceURL=sheetworkers.js diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/abstracts.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/abstracts.pug index 83083fa94e..c8ec02ea5f 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/abstracts.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/abstracts.pug @@ -66,10 +66,10 @@ const navigation = [ "main", - "careers", "combat", - "spells", - "settings" + "magic", + "advances", + "settings", ] const characteristics = [ diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/_component-index.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/_component-index.pug index e188495da2..7b4aef3d76 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/_component-index.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/_component-index.pug @@ -4,6 +4,7 @@ include character-field.pug include characteristic-col.pug include skill.pug include skill-grouped.pug +include species.pug include generic/generic-display.pug include generic/generic-field.pug @@ -28,5 +29,6 @@ include repeating/weapon-row.pug include npc-characteristic-col.pug include npc-skill.pug include repeating/npc-attack-row.pug +include repeating/npc-talent-row.pug include repeating/npc-trait-row.pug include repeating/npc-opttrait-row.pug \ No newline at end of file diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/careers-row.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/careers-row.pug index 28379ab609..f051f5765b 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/careers-row.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/careers-row.pug @@ -1,77 +1,77 @@ mixin career-level(level, first) - .wfrp-settings__titlewrap - .wfrp-settings__controlwrap - input(name=`attr_career_level_current`, type="hidden", value="1") - button(data-i18n="Switch", name=`act_newcareerlevel-${level}`, type="action") - span(data-i18n="Current" class=`wfrp-current_level--${level}`) - h2(data-i18n=`Tier ${level}`) + .wfrp-settings__titlewrap + .wfrp-settings__controlwrap + input(name=`attr_career_level_current`, type="hidden", value="1") + button(data-i18n="Switch", name=`act_newcareerlevel-${level}`, type="action") + span(data-i18n="Current" class=`wfrp-current_level--${level}`) + h2(data-i18n=`Level ${level}`) - .wfrp-settings__row--invert - .wfrp-settings__label(data-i18n=`Name`) - input.wfrp-settings__input(name=`attr_career_level${level}_name`, type="text") + .wfrp-settings__row--invert + .wfrp-settings__label(data-i18n=`Name`) + input.wfrp-settings__input(name=`attr_career_level${level}_name`, type="text") - .wfrp-settings__row--invert - .wfrp-settings__label(data-i18n=`Status`) - input.wfrp-settings__input(name=`attr_career_level${level}_status`, type="text") + .wfrp-settings__row--invert + .wfrp-settings__label(data-i18n=`Status`) + input.wfrp-settings__input(name=`attr_career_level${level}_status`, type="text") - .wfrp-settings__col - if (level === 1 && first === true) - .wfrp-settings__row--skillinit - .wfrp-settings__header(data-i18n="Skill Name") - .wfrp-settings__header(data-i18n="Initial") - .wfrp-settings__header(data-i18n="Advances") - else - .wfrp-settings__row--skill - .wfrp-settings__header(data-i18n="Skill Name") - .wfrp-settings__header(data-i18n="Advances") - - each skill in [1,2,3,4,5,6,7,8,9,10] - - if (level === 1 && first === true) - - .wfrp-settings__row--skillinit - input.wfrp-settings__input(data-i18n-placeholder=`Skill ${skill}`, name=`attr_career_skill_${level}_${skill}_name`, type="text") - input.wfrp-settings__input--init(name=`attr_career_skill_${level}_${skill}_init`, type="number") - input.wfrp-settings__input(name=`attr_career_skill_${level}_${skill}_advances`, type="number") - - else - - .wfrp-settings__row--skill - input.wfrp-settings__input(data-i18n-placeholder=`Skill ${skill}`, name=`attr_career_skill_${level}_${skill}_name`, type="text") - input.wfrp-settings__input(name=`attr_career_skill_${level}_${skill}_advances`, type="number") - - .wfrp-settings__col - - if (level === 1 && first === true) - .wfrp-settings__row--talentinit - .wfrp-settings__header(data-i18n="Talent Name") - .wfrp-settings__header(data-i18n="Initial") - .wfrp-settings__header(data-i18n="Advances") - else - .wfrp-settings__row--talent - .wfrp-settings__header(data-i18n="Talent Name") - .wfrp-settings__header(data-i18n="Advances") - - each talent in [1,2,3,4,5] - - if (level === 1 && first === true) - - .wfrp-settings__row--talentinit - - input.wfrp-settings__input(data-i18n-placeholder=`Talent ${talent}`, name=`attr_career_talent_${level}_${talent}_name`, type="text") - input.wfrp-settings__input(name=`attr_career_talent_${level}_${talent}_init`, type="number") - input.wfrp-settings__input(name=`attr_career_talent_${level}_${talent}_advances`, type="number") - - else - - .wfrp-settings__row--talent - - input.wfrp-settings__input(data-i18n-placeholder=`Talent ${talent}`, name=`attr_career_talent_${level}_${talent}_name`, type="text") - input.wfrp-settings__input(name=`attr_career_talent_${level}_${talent}_advances`, type="number") + .wfrp-settings__col + if (level === 1 && first === true) + .wfrp-settings__row--skillinit + .wfrp-settings__header(data-i18n="Skill Name") + .wfrp-settings__header(data-i18n="Initial") + .wfrp-settings__header(data-i18n="Advances") + else + .wfrp-settings__row--skill + .wfrp-settings__header(data-i18n="Skill Name") + .wfrp-settings__header(data-i18n="Advances") - .wfrp-settings__row - .wfrp-settings__label--full(data-i18n=`Trappings`) - textarea.wfrp-settings__textarea(name=`attr_career_${level}_trappings`) + each skill in [1,2,3,4,5,6,7,8,9,10] + + if (level === 1 && first === true) + + .wfrp-settings__row--skillinit + input.wfrp-settings__input(data-i18n-placeholder=`Skill ${skill}`, name=`attr_career_skill_${level}_${skill}_name`, type="text") + input.wfrp-settings__input--init(name=`attr_career_skill_${level}_${skill}_init`, type="number") + input.wfrp-settings__input(name=`attr_career_skill_${level}_${skill}_advances`, type="number") + + else + + .wfrp-settings__row--skill + input.wfrp-settings__input(data-i18n-placeholder=`Skill ${skill}`, name=`attr_career_skill_${level}_${skill}_name`, type="text") + input.wfrp-settings__input(name=`attr_career_skill_${level}_${skill}_advances`, type="number") + + .wfrp-settings__col + + if (level === 1 && first === true) + .wfrp-settings__row--talentinit + .wfrp-settings__header(data-i18n="Talent Name") + .wfrp-settings__header(data-i18n="Initial") + .wfrp-settings__header(data-i18n="Advances") + else + .wfrp-settings__row--talent + .wfrp-settings__header(data-i18n="Talent Name") + .wfrp-settings__header(data-i18n="Advances") + + each talent in [1,2,3,4,5] + + if (level === 1 && first === true) + + .wfrp-settings__row--talentinit + + input.wfrp-settings__input(data-i18n-placeholder=`Talent ${talent}`, name=`attr_career_talent_${level}_${talent}_name`, type="text") + input.wfrp-settings__input(name=`attr_career_talent_${level}_${talent}_init`, type="number") + input.wfrp-settings__input(name=`attr_career_talent_${level}_${talent}_advances`, type="number") + + else + + .wfrp-settings__row--talent + + input.wfrp-settings__input(data-i18n-placeholder=`Talent ${talent}`, name=`attr_career_talent_${level}_${talent}_name`, type="text") + input.wfrp-settings__input(name=`attr_career_talent_${level}_${talent}_advances`, type="number") + + .wfrp-settings__row + .wfrp-settings__label--full(data-i18n=`Trappings`) + textarea.wfrp-settings__textarea(name=`attr_career_${level}_trappings`) mixin careers-row input(name=`attr_career_settings`, type="hidden", value=1) @@ -95,7 +95,7 @@ mixin careers-row .wfrp-careertable__cell--last span(name=`attr_career_advances`) - .wfrp-conditiontable__row.wfrp-settings.control__hide--condition_settings + .wfrp-careertable__row.wfrp-settings.control__hide--career_settings .wfrp-settings__row--career_name input.wfrp-settings__checkbox(name=`attr_career_current`, type="hidden") diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/npc-talent-row.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/npc-talent-row.pug new file mode 100644 index 0000000000..1c91c00ea4 --- /dev/null +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/npc-talent-row.pug @@ -0,0 +1,37 @@ +mixin npc-talent-row + input(name=`attr_talent_settings`, type="hidden", value=1) + .wfrp-npctalent__row + + .wfrp-npctalent__cell--settingstoggle + +display-toggle(`talent_settings`, true) + + .wfrp-npctalent__cell--title + button(type="roll", value=rolls.npctalent) + span(name=`attr_talent_name`) + span(name=`attr_talent_enabled_display`) + span.wfrp-npctalent__ranks(name=`attr_talent_ranks`) + + .wfrp-npctalent__cell--description + span(name=`attr_talent_description`) + + .wfrp-settings.control__hide--npctalent_settings + + .wfrp-settings__row--span + .wfrp-settings__label(data-i18n=`Name`) + input.wfrp-settings__input(name=`attr_talent_name`, type="text") + + .wfrp-settings__row + .wfrp-settings__label(data-i18n=`Ranks`) + input.wfrp-settings__input(name=`attr_talent_ranks`, type="number") + + .wfrp-settings__row + .wfrp-settings__label(data-i18n=`Max`) + input.wfrp-settings__input(name=`attr_talent_ranks_max`, type="number") + + .wfrp-settings__row--span + .wfrp-settings__label(data-i18n=`Modifiers`) + input.wfrp-settings__input(name=`attr_talent_mods`, type="text") + + .wfrp-settings__row--span + .wfrp-settings__label--full(data-i18n=`Description`) + textarea.wfrp-settings__textarea(name=`attr_talent_description`) \ No newline at end of file diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/weapon-row.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/weapon-row.pug index 3f9b8c6331..28deb95d34 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/weapon-row.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/repeating/weapon-row.pug @@ -40,7 +40,7 @@ mixin weapon-row - const all_specs = [...skills.basic[18].specialisations, ...skills.advanced[11].specialisations] each specialisation in all_specs - option(data-i18n=specialisation) + option(value=specialisation, data-i18n=specialisation) .wfrp-settings__row .wfrp-settings__label(data-i18n=`Range`) diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/components/species.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/species.pug new file mode 100644 index 0000000000..ff065ba962 --- /dev/null +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/components/species.pug @@ -0,0 +1,60 @@ +mixin species + input(name=`attr_species_settings`, type="hidden", value=1) + + .wfrp-speciestable__row + + .wfrp-speciestable__cell--settingstoggle + +display-toggle(`species_settings`, true) + + .wfrp-speciestable__cell--title + span(name=`attr_species`) + + .wfrp-speciestable__row.wfrp-settings.control__hide--species_settings + + .wfrp-settings__row--span + + .wfrp-settings__label(data-i18n=`Name`) + + .wfrp-settings__wrapper + input.sheet-control__custom(name=`attr_species`, type="hidden") + + select.wfrp-settings__select.sheet-control__custom(name=`attr_species`) + each option in character[1].options + option(data-i18n=option) + option(data-i18n="Custom", value="Custom") + + .wfrp-header__customwrapper.sheet-control__custom + input.wfrp-header__input(name=`attr_species_custom`, type="text") + + button.wfrp-header__hidecustom(name=`act_remove_custom_species`, type="action") ╳ + + .wfrp-settings__col + input(name="attr_species_disable3", type="hidden", value="0") + input(name="attr_species_disable5", type="hidden", value="0") + + .wfrp-settings__row--speciesskill + .wfrp-settings__header(data-i18n="Skill Name") + .wfrp-settings__header +3 + .wfrp-settings__header +5 + .wfrp-settings__header x + + each skill in [1,2,3,4,5,6,7,8,9,10,11,12] + + .wfrp-settings__row--speciesskill + input.wfrp-settings__input(data-i18n-placeholder=`Skill ${skill}`, name=`attr_species_skill_${skill}_name`, type="text") + input(name=`attr_species_skill_${skill}_advances`, type="radio", value=3) + input(name=`attr_species_skill_${skill}_advances`, type="radio", value=5) + button.wfrp-header__hidecustom(name=`act_remove_skill_${skill}`, type="action") ╳ + + .wfrp-settings__col + + .wfrp-settings__row--talent + .wfrp-settings__header(data-i18n="Talent Name") + .wfrp-settings__header(data-i18n="Taken") + + each talent in [1,2,3,4,5,6,7,8,9,10] + + .wfrp-settings__row--talent + + input.wfrp-settings__input(data-i18n-placeholder=`Talent ${talent}`, name=`attr_species_talent_${talent}_name`, type="text") + input.wfrp-settings__input(name=`attr_species_talent_${talent}_advances`, type="checkbox", value="1") \ No newline at end of file diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/npc.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/npc.pug index bf4a3e6070..d6aad0df2c 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/npc.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/npc.pug @@ -185,6 +185,10 @@ h2.wfrp-npc__subtitle(data-i18n="Traits") +repeating-section("traits","npc-trait-row") + .wfrp-npctrait + h2.wfrp-npc__subtitle(data-i18n="Talents") + +repeating-section("talent","npc-talent-row") + .wfrp-npctrait h2.wfrp-npc__subtitle(data-i18n="Optional Traits") +repeating-section("optional-traits","npc-opttrait-row") \ No newline at end of file diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/pc.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/pc.pug index 21791ce47d..4616448fdd 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/pc.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/layout/pc.pug @@ -7,16 +7,21 @@ input(name="attr_setting_button_hide", type="hidden") +character-field(field) .wfrp-navigation.wfrp-panel - each item in navigation - - - const settings = (item === "settings") ? "wfrp-navigation__item--settings" : "wfrp-navigation__item"; + .wfrp-navigation__roll + label.wfrp-navigation__item + input(name="attr_setting_whisper", type="checkbox", value="2") + span(data-i18n="Whisper to GM") + .wfrp-navigation__items + each item in navigation + - + const settings = (item === "settings") ? "wfrp-navigation__item--settings" : "wfrp-navigation__item"; - label(class=settings) - input(name="attr_nav", type="radio", value=item) - if (item === "settings") - span y - else - span=item + label(class=settings) + input(name="attr_nav", type="radio", value=item) + if (item === "settings") + span y + else + span(data-i18n=item) .wfrp-characteristics.wfrp-panel.page__main input(name="attr_control_hide--characteristics", type="hidden") @@ -117,12 +122,12 @@ input(name="attr_setting_button_hide", type="hidden") .wfrp-corruptiontable__cell--last +repeating-section("corruption","corruption-row") -.wfrp-ambitions.wfrp-panel.page__main +.wfrp-ambitions.wfrp-panel.page__main--grid h1.wfrp-panel__header(data-i18n="Ambitions") each ambition in ambitions +generic-textarea(ambition.name, "1-25", ambition.attr) -.wfrp-party.wfrp-panel.page__main +.wfrp-party.wfrp-panel.page__main--grid h1.wfrp-panel__header(data-i18n="Party") each ambition in party if (ambition.field === "text") @@ -130,32 +135,6 @@ input(name="attr_setting_button_hide", type="hidden") else +generic-textarea(ambition.name, "1-25", ambition.attr) -.wfrp-careers.wfrp-panel.page__careers - input(name="attr_control_hide--characteristics", type="hidden") - h1.wfrp-panel__header(data-i18n="Careers") - .wfrp-careertable__row--head - .wfrp-careertable__cell(data-i18n="Career") - .wfrp-careertable__cell(data-i18n="Level") - .wfrp-careertable__cell(data-i18n="Status") - .wfrp-careertable__cell--last(data-i18n="Advances") - +repeating-section("careers","careers-row") - -.wfrp-experience--alt.page__careers--flex - .wfrp-panel - h1.wfrp-panel__header(data-i18n="Experience") - each field in experience - +generic-display(field, "text", "2-1") - - .wfrp-panel.wfrp-panel--awards.page__careers - h1.wfrp-panel__header(data-i18n="Experience Awards") - .wfrp-experiencetable__row--head - .wfrp-experiencetable__cell(data-i18n="Source") - .wfrp-experiencetable__cell--last(data-i18n="XP") - +repeating-section("experience","experience-row") - .wfrp-panel__footer.wfrp-controls - .wfrp-controls__button - button(data-i18n="Consolidate Rewards", name="act_combinexp", type="action") - .wfrp-trappings.page__combat--flex .wfrp-panel.wfrp-panel--trappings h1.wfrp-panel__header(data-i18n="Trappings") @@ -268,11 +247,9 @@ input(name="attr_setting_button_hide", type="hidden") .wfrp-wounds.wfrp-panel.page__combat h1.wfrp-panel__header(data-i18n="Wounds") - .wfrp-wounds__current - +generic-field({name:"Current Wounds", attr:"wounds"},"number","2-1") - .wfrp-wounds__max - +generic-display({name:"Max Wounds", attr:"wounds_max"}, "number", "2-1") input(name="attr_wounds_mod", type="hidden") + +generic-field({name:"Current Wounds", attr:"wounds"},"number","2-1") + +generic-display({name:"Max Wounds", attr:"wounds_max"}, "number", "2-1") .wfrp-wounds.wfrp-panel.page__combat h1.wfrp-panel__header(data-i18n="Critical Wounds") @@ -306,7 +283,7 @@ input(name="attr_setting_button_hide", type="hidden") .wfrp-weapontable +repeating-section("weapons","weapon-row") -.wfrp-spells.wfrp-panel.page__spells +.wfrp-spells.wfrp-panel.page__magic h1.wfrp-panel__header(data-i18n="Spells & Prayers") .wfrp-spelltable .wfrp-spelltable__row--head @@ -322,4 +299,41 @@ input(name="attr_setting_button_hide", type="hidden") .wfrp-spell__sin +generic-field({name:"Sin", attr:"sin"}, "number", "1-1") +.wfrp-careers.page__advances--grid + .wfrp-panel + input(name="attr_control_hide--characteristics", type="hidden") + h1.wfrp-panel__header(data-i18n="Careers") + .wfrp-careertable__row--head + .wfrp-careertable__cell(data-i18n="Career") + .wfrp-careertable__cell(data-i18n="Level") + .wfrp-careertable__cell(data-i18n="Status") + .wfrp-careertable__cell--last(data-i18n="Advances") + +repeating-section("careers","careers-row") + + .wfrp-panel + input(name="attr_control_hide--characteristics", type="hidden") + h1.wfrp-panel__header(data-i18n="Species") + +species("spells","spell-row") + +.wfrp-experience--alt.page__advances--flex + .wfrp-panel + h1.wfrp-panel__header(data-i18n="Experience") + each field in experience + +generic-display(field, "text", "2-1") + + .wfrp-panel.wfrp-panel--awards.page__advances + h1.wfrp-panel__header(data-i18n="Experience Awards") + .wfrp-experiencetable__row--head + .wfrp-experiencetable__cell(data-i18n="Source") + .wfrp-experiencetable__cell--last(data-i18n="XP") + +repeating-section("experience","experience-row") + .wfrp-panel__footer.wfrp-controls + .wfrp-controls__button + button(data-i18n="Consolidate Rewards", name="act_combinexp", type="action") + h1.wfrp-panel__header(data-i18n="Experience Spends") + .wfrp-experiencetable__row--head + .wfrp-experiencetable__cell(data-i18n="Use") + .wfrp-experiencetable__cell--last(data-i18n="XP") + +repeating-section("experiencespent","experience-row") + include settings.pug \ No newline at end of file diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/rolls.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/rolls.pug index 9cfa13a9ff..c7344653af 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/rolls.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/rolls.pug @@ -195,6 +195,17 @@ rolls.npctrait = makeRoll(roll_values) } + { + + const roll_values = { + roll_name: `@{talent_name}`, + roll_type: `Talent`, + roll_text: `@{talent_description}`, + } + + rolls.npctalent = makeRoll(roll_values) + } + rolls.combat = {}; ["Dodge","Endurance","Intuition","Perception","Cool"].forEach(button => { diff --git a/Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug b/Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug index bbe2dbd7f9..32899480df 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug +++ b/Warhammer Fantasy Roleplay 4e Official/src/pug/wfrp4.pug @@ -3,7 +3,7 @@ include rolls.pug include components/_component-index.pug -input(name="attr_sheet_version", type="hidden", value="1.0.2") +input(name="attr_sheet_version", type="hidden", value="1.0.3") input(name="attr_npc", type="hidden", value="0") input(name="attr_nav", type="hidden", value="main") input(name="attr_difficulty_query", type="hidden", value="?{Difficulty|Average (+20), 20|Very Easy (+60), 60|Easy (+40), 40|Average (+20), 20|Challenging (0), 0|Difficult (-10), -10|Hard (-20), -20|Very Hard (-30), -30}") @@ -16,14 +16,14 @@ input(name="attr_roll_init", type="hidden", value="{{init=[[@{initiative} &{trac input(name="attr_roll_cs", type="hidden", value="5") input(name="attr_roll_whisper", type="hidden", value="") -input(name="attr_bar1_v", type="hidden", value="wounds") -input(name="attr_bar1_m", type="hidden", value="wounds") +input(name="attr_bar1_v", type="hidden") +input(name="attr_bar1_m", type="hidden") input(name="attr_bar1_l", type="hidden") input(name="attr_bar2_v", type="hidden") input(name="attr_bar2_m", type="hidden") input(name="attr_bar2_l", type="hidden") input(name="attr_bar3_v", type="hidden") -input(name="attr_bar3_m", type="hidden", value="toughness_bonus") +input(name="attr_bar3_m", type="hidden") input(name="attr_bar3_l", type="hidden") .wfrp-wrapper.compendium-drop-target.monsters diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/components/_settings.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/components/_settings.scss index c040fd318c..d1b11f7e21 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/components/_settings.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/components/_settings.scss @@ -89,6 +89,19 @@ margin-bottom: 3px; } + &--speciesskill { + @extend .sheet-wfrp-settings__row; + + grid-template-columns: 1fr .15fr .15fr .15fr; + gap: 3px; + margin-bottom: 3px; + + > button { + justify-self: center; + text-align: center; + } + } + &--skillinit, &--talentinit { @extend .sheet-wfrp-settings__row; diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/control/_hide.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/control/_hide.scss index db2964873e..cf93ea381c 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/control/_hide.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/control/_hide.scss @@ -104,7 +104,7 @@ input.sheet-control__custom[value*=Custom] { // Talent Setting Control -@each $block in "talent", "condition", "psychology", "corruption", "critical" { +@each $block in "talent", "condition", "psychology", "corruption", "critical", "career", "species" { .sheet-control__hide--#{$block}_settings { @extend %hide; } @@ -114,7 +114,7 @@ input.sheet-control__custom[value*=Custom] { } input[name*="settings"] { - @each $block in "talent", "condition", "psychology", "corruption", "critical" { + @each $block in "talent", "condition", "psychology", "corruption", "critical", "career", "species" { &[value="1"] + div > .sheet-control__hide--#{$block}_settings { @extend %show-grid; } @@ -241,7 +241,7 @@ input[name*=setting_button_hide] { // NPC Settings Control -@each $block in "npcattack", "npctrait" { +@each $block in "npcattack", "npctrait", "npctalent" { .sheet-control__hide--#{$block}_settings { @extend %hide; } @@ -251,7 +251,7 @@ input[name*=setting_button_hide] { } input[name*="settings"] { - @each $block in "npcattack", "npctrait" { + @each $block in "npcattack", "npctrait", "npctalent" { &[value="1"] + div > .sheet-control__hide--#{$block}_settings { @extend %show-grid; } @@ -328,4 +328,26 @@ input[name*="trapping_flag"][value="on"] + .sheet-wfrp-npctrappings { .sheet-wfrp-wrapper.active-drop-target.dropping .sheet-wfrp-compendium_warning { display: block; +} + +input[type="hidden"][name*="species_disable3"]{ + + &[value="1"] { + + & ~ * input[type="radio"][value="3"]:not(:checked) { + pointer-events: none; + opacity: .5; + } + } +} + +input[type="hidden"][name*="species_disable5"]{ + + &[value="1"] { + + & ~ * input[type="radio"][value="5"]:not(:checked) { + pointer-events: none; + opacity: .5; + } + } } \ No newline at end of file diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/control/_tabs.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/control/_tabs.scss index 76a0ab0f68..7393d3b435 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/control/_tabs.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/control/_tabs.scss @@ -1,9 +1,9 @@ .sheet-wfrp-wrapper { .sheet-page__main, - .sheet-page__careers, + .sheet-page__advances, .sheet-page__combat, - .sheet-page__spells, + .sheet-page__magic, .sheet-page__settings { display: none; @@ -18,9 +18,9 @@ input[type="hidden"][name="attr_nav"] { &[value="main"] ~ * .sheet-page__main, - &[value="careers"] ~ * .sheet-page__careers, + &[value="advances"] ~ * .sheet-page__advances, &[value="combat"] ~ * .sheet-page__combat, - &[value="spells"] ~ * .sheet-page__spells, + &[value="magic"] ~ * .sheet-page__magic, &[value="settings"] ~ * .sheet-page__settings { display: block; diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/_npc.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/_npc.scss index f7db0f53ef..9266d91f8e 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/_npc.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/_npc.scss @@ -299,11 +299,13 @@ } } - + + &talent, &trait, &attack { font-family: $font-family-alt; + .repitem:first-child .sheet-wfrp-npctalent__row, .repitem:first-child .sheet-wfrp-npctrait__row, .repitem:first-child .sheet-wfrp-npcattack__row { padding-top: 0; @@ -352,6 +354,29 @@ } } + &__ranks { + display: inline-flex; + flex-direction: row; + + margin-left: .35em; + + &:not(:empty) { + + &:before, + &:after { + display: block; + } + + &:before { + content: "("; + } + + &:after { + content: ")"; + } + } + } + &__label { margin-right: .33rem; diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_grids.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_grids.scss index a74d81f305..efb0450fc4 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_grids.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_grids.scss @@ -229,7 +229,8 @@ // CAREERS &-experiencetable, - &-careertable { + &-careertable, + &-speciestable { &__row { @extend %row; @@ -258,6 +259,11 @@ @extend %cell; } + &--ltitle { + @extend %cell; + text-align: left; + } + &--span2 { grid-column: span 2; } diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_navigation.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_navigation.scss index 0e8524cb6c..8f725ca919 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_navigation.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_navigation.scss @@ -1,18 +1,40 @@ .sheet-wfrp { &-navigation { - display: flex; - align-items: center; - justify-content: end; + display: grid; + grid-template-columns: 1fr 1fr; - label { - width: auto; - margin: $margin-general; + &__roll { + display: flex; + align-items: center; + justify-content: start; - cursor: pointer; + label { + width: auto; + margin: $margin-general; - input { - display: none; + cursor: pointer; + + input[type="checkbox"] { + display: none; + } + } + } + + &__items { + display: flex; + align-items: center; + justify-content: end; + + label { + width: auto; + margin: $margin-general; + + cursor: pointer; + + input { + display: none; + } } } } diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_pc.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_pc.scss index f2700a40b0..530525042a 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_pc.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/layout/pc/_pc.scss @@ -45,7 +45,10 @@ } &-ambitions { - grid-column: span 3; + grid-column: span 3; + + display: grid; + grid-template-rows: 2.5rem auto; } &-party { @@ -98,6 +101,7 @@ } &-career { + &__characteristic--first { display: none; } @@ -130,6 +134,8 @@ &-careers { grid-column: 1 / span 4; + display: grid; + grid-template-rows: 1fr minmax(5rem, auto); + .sheet-wfrp-experience { grid-column: span 2; diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_grids.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_grids.scss index e5f91cf3a4..4cd1c255b9 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_grids.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_grids.scss @@ -75,7 +75,7 @@ } } -@each $table in "skill", "talent", "condition", "psychology", "corruption", "trapping", "armour", "critical", "weapon", "spell", "career", "experience" { +@each $table in "skill", "talent", "condition", "psychology", "corruption", "trapping", "armour", "critical", "weapon", "spell", "career", "experience", "wounds" { .sheet-wfrp-#{$table}table__row--head { @extend %grid-row-head; diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_navigation.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_navigation.scss index f5faafc3a7..1dc4f63a19 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_navigation.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_navigation.scss @@ -2,6 +2,7 @@ &__item { + input[type="checkbox"], input[type="radio"] { &:checked + span { diff --git a/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_settings.scss b/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_settings.scss index 1d839bf1ee..3a63997524 100644 --- a/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_settings.scss +++ b/Warhammer Fantasy Roleplay 4e Official/src/scss/styling/_settings.scss @@ -16,6 +16,12 @@ border-radius: 3px; } + &--noborder { + @extend .sheet-wfrp-settings; + + border: 0; + } + &__header { margin-top: $margin-general; border-bottom: $grid-border; diff --git a/Warhammer Fantasy Roleplay 4e Official/translation.json b/Warhammer Fantasy Roleplay 4e Official/translation.json index 18e34760c9..cedab16ff5 100644 --- a/Warhammer Fantasy Roleplay 4e Official/translation.json +++ b/Warhammer Fantasy Roleplay 4e Official/translation.json @@ -254,10 +254,10 @@ "Notes":"Notes", "Characteristic Advances":"Characteristic Advances", "Current Career":"Current Career", - "Tier 1":"Tier 1", - "Tier 2":"Tier 2", - "Tier 3":"Tier 3", - "Tier 4":"Tier 4", + "Level 1":"Level 1", + "Level 2":"Level 2", + "Level 3":"Level 3", + "Level 4":"Level 4", "Skill 1":"Skill 1", "Skill 2":"Skill 2", "Skill 3":"Skill 3", @@ -268,11 +268,18 @@ "Skill 8":"Skill 8", "Skill 9":"Skill 9", "Skill 10":"Skill 10", + "Skill 11":"Skill 11", + "Skill 12":"Skill 12", "Talent 1":"Talent 1", "Talent 2":"Talent 2", "Talent 3":"Talent 3", "Talent 4":"Talent 4", "Talent 5":"Talent 5", + "Talent 6":"Talent 6", + "Talent 7":"Talent 7", + "Talent 8":"Talent 8", + "Talent 9":"Talent 9", + "Talent 10":"Talent 10", "Skill Name":"Skill Name", "Talent Name":"Talent Name", "Experience Awards":"Experience Awards", @@ -366,5 +373,37 @@ "Ranged (Entangling)":"Ranged (Entangling)", "Ranged (Explosives)":"Ranged (Explosives)", "Ranged (Sling)":"Ranged (Sling)", - "Ranged (Throwing)":"Ranged (Throwing)" + "Ranged (Throwing)":"Ranged (Throwing)", + "Taken":"Taken", + "main":"main", + "combat":"combat", + "magic":"magic", + "advances":"advances", + "Experience Spends":"Experience Spends", + "Use":"Use", + "Advance Career Tier":"Advance Career Tier", + "Change Career (Incomplete)":"Change Career (Incomplete)", + "Change Career (Complete)":"Change Career (Complete)", + "settings_npc":"NPC", + "settings_npc_desc":"The NPC option sets new characters to default to the NPC card style sheet. Useful if the player characters have already been created and all new character sheets added to the game will likely represent non player characters.", + "setting_whisper":"Whisper Rolls to GM", + "settings_whisper_desc":"All sheet rolls are sent to all players in chat by default. If enabled, rolls from this sheet will be visible only to the GM.", + "setting_diff_option":"Query Difficulty", + "settings_difficulty_desc":"This will enable or disable the difficulty query window when rolls are made. When off, all rolls are made at the base target number.", + "settings_bonuses":"Query Bonuses", + "settings_bonuses_desc":"This will enable or disable the additional bonus and SL bonus windows when rolls are made.", + "settings_auto":"Automatic Success & Failure", + "settings_auto_desc":"This will change the boundaries for automatic success and failure on a roll. The default boundaries set the automatic success point at 01-05 and 96-100.", + "settings_initiative":"Initiative Roll", + "settings_initiative_desc":"This changes the way initiative will be sent to the turn tracker. In the default setting, a character's whole initiative characteristic will be sent to the turntracker. When using the other options, a d10 will be rolled and different configurations of characteristic bonuses will be added to it.", + "settings_maxadvantage":"Max Advantage", + "settings_bar1_value":"BAR 1 VALUE", + "settings_bar1_max":"BAR 1 MAX", + "settings_bar1_link":"BAR 1 LINK", + "settings_bar2_value":"BAR 2 VALUE", + "settings_bar2_max":"BAR 2 MAX", + "settings_bar2_link":"BAR 2 LINK", + "settings_bar3_value":"BAR 3 VALUE", + "settings_bar3_max":"BAR 3 MAX", + "settings_bar3_link":"BAR 3 LINK" } \ No newline at end of file diff --git a/Warhammer Fantasy Roleplay 4e Official/wfrp4.css b/Warhammer Fantasy Roleplay 4e Official/wfrp4.css index a77eb43306..01024530a8 100644 --- a/Warhammer Fantasy Roleplay 4e Official/wfrp4.css +++ b/Warhammer Fantasy Roleplay 4e Official/wfrp4.css @@ -153,6 +153,8 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner } .sheet-wfrp-pc .sheet-wfrp-ambitions { grid-column: span 3; + display: grid; + grid-template-rows: 2.5rem auto; } .sheet-wfrp-pc .sheet-wfrp-party { grid-column: span 3; @@ -189,6 +191,9 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner .sheet-wfrp-pc .sheet-wfrp-experience--alt .sheet-wfrp-panel--awards { flex-grow: 1; } +.sheet-wfrp-pc .sheet-wfrp-career__characteristic--first { + display: none; +} .sheet-wfrp-pc .sheet-wfrp-career__row, .sheet-wfrp-pc .sheet-wfrp-career__row--first, .sheet-wfrp-pc .sheet-wfrp-career__row--1, .sheet-wfrp-pc .sheet-wfrp-career__row--2, .sheet-wfrp-pc .sheet-wfrp-career__row--3, .sheet-wfrp-pc .sheet-wfrp-career__row--4 { display: grid; grid-template-columns: 1fr 1fr; @@ -204,6 +209,8 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner } .sheet-wfrp-pc .sheet-wfrp-careers { grid-column: 1/span 4; + display: grid; + grid-template-rows: 1fr minmax(5rem, auto); } .sheet-wfrp-pc .sheet-wfrp-careers + .sheet-wfrp-experience { grid-column: span 2; @@ -211,6 +218,12 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner .sheet-wfrp-pc .sheet-wfrp-careers input[name*=first][value=on] + * .sheet-wfrp-career__row--first { display: grid; } +.sheet-wfrp-pc .sheet-wfrp-careers input[name*=first][value=on] + * .sheet-wfrp-career__characteristic--first { + display: grid; +} +.sheet-wfrp-pc .sheet-wfrp-careers input[name*=first][value=on] + * .sheet-wfrp-career__row--1 { + display: none; +} .sheet-wfrp-pc .sheet-wfrp-careers input[name*=first][value=on] + * .sheet-wfrp-career__row--1 { display: none; } @@ -293,41 +306,58 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner } .sheet-wfrp-navigation { + display: grid; + grid-template-columns: 1fr 1fr; +} +.sheet-wfrp-navigation__roll { display: flex; align-items: center; - justify-content: end; + justify-content: start; } -.sheet-wfrp-navigation label { +.sheet-wfrp-navigation__roll label { width: auto; margin: 0.5rem; cursor: pointer; } -.sheet-wfrp-navigation label input { +.sheet-wfrp-navigation__roll label input[type=checkbox] { + display: none; +} +.sheet-wfrp-navigation__items { + display: flex; + align-items: center; + justify-content: end; +} +.sheet-wfrp-navigation__items label { + width: auto; + margin: 0.5rem; + cursor: pointer; +} +.sheet-wfrp-navigation__items label input { display: none; } -.sheet-wfrp-advancetable__row--head, .sheet-wfrp-advancetable__row, .sheet-wfrp-spelltable__row--head, .sheet-wfrp-trappingtable__row--head, .sheet-wfrp-armourtable__row--head, .sheet-wfrp-criticaltable__row--head, .sheet-wfrp-weapontable__row--head, .sheet-wfrp-spelltable__row, .sheet-wfrp-trappingtable__row, .sheet-wfrp-armourtable__row, .sheet-wfrp-criticaltable__row, .sheet-wfrp-weapontable__row, .sheet-wfrp-experiencetable__row--head, .sheet-wfrp-careertable__row--head, .sheet-wfrp-experiencetable__row, .sheet-wfrp-careertable__row, .sheet-wfrp-talenttable__row--head, .sheet-wfrp-conditiontable__row--head, .sheet-wfrp-psychologytable__row--head, .sheet-wfrp-corruptiontable__row--head, .sheet-wfrp-talenttable__row, .sheet-wfrp-conditiontable__row, .sheet-wfrp-psychologytable__row, .sheet-wfrp-corruptiontable__row { +.sheet-wfrp-advancetable__row--head, .sheet-wfrp-advancetable__row, .sheet-wfrp-spelltable__row--head, .sheet-wfrp-trappingtable__row--head, .sheet-wfrp-armourtable__row--head, .sheet-wfrp-criticaltable__row--head, .sheet-wfrp-weapontable__row--head, .sheet-wfrp-spelltable__row, .sheet-wfrp-trappingtable__row, .sheet-wfrp-armourtable__row, .sheet-wfrp-criticaltable__row, .sheet-wfrp-weapontable__row, .sheet-wfrp-experiencetable__row--head, .sheet-wfrp-careertable__row--head, .sheet-wfrp-speciestable__row--head, .sheet-wfrp-experiencetable__row, .sheet-wfrp-careertable__row, .sheet-wfrp-speciestable__row, .sheet-wfrp-talenttable__row--head, .sheet-wfrp-conditiontable__row--head, .sheet-wfrp-psychologytable__row--head, .sheet-wfrp-corruptiontable__row--head, .sheet-wfrp-talenttable__row, .sheet-wfrp-conditiontable__row, .sheet-wfrp-psychologytable__row, .sheet-wfrp-corruptiontable__row { display: grid; grid-template-columns: 1.5rem 1fr 5rem 3rem; grid-column: 1/-1; } -.sheet-wfrp-spelltable__cell--last, .sheet-wfrp-trappingtable__cell--last, .sheet-wfrp-armourtable__cell--last, .sheet-wfrp-criticaltable__cell--last, .sheet-wfrp-weapontable__cell--last, .sheet-wfrp-spelltable__cell--settingstoggle, .sheet-wfrp-trappingtable__cell--settingstoggle, .sheet-wfrp-armourtable__cell--settingstoggle, .sheet-wfrp-criticaltable__cell--settingstoggle, .sheet-wfrp-weapontable__cell--settingstoggle, .sheet-wfrp-spelltable__cell, .sheet-wfrp-trappingtable__cell, .sheet-wfrp-armourtable__cell, .sheet-wfrp-criticaltable__cell, .sheet-wfrp-weapontable__cell, .sheet-wfrp-experiencetable__cell--last, .sheet-wfrp-careertable__cell--last, .sheet-wfrp-experiencetable__cell, .sheet-wfrp-careertable__cell, .sheet-wfrp-talenttable__cell--last, .sheet-wfrp-conditiontable__cell--last, .sheet-wfrp-psychologytable__cell--last, .sheet-wfrp-corruptiontable__cell--last, .sheet-wfrp-talenttable__cell, .sheet-wfrp-conditiontable__cell, .sheet-wfrp-psychologytable__cell, .sheet-wfrp-corruptiontable__cell, .sheet-wfrp-spelltable__cell--description, .sheet-wfrp-trappingtable__cell--description, .sheet-wfrp-armourtable__cell--description, .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-weapontable__cell--description, .sheet-wfrp-experiencetable__cell--description, .sheet-wfrp-careertable__cell--description, .sheet-wfrp-talenttable__cell--description, .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-corruptiontable__cell--description { +.sheet-wfrp-spelltable__cell--last, .sheet-wfrp-trappingtable__cell--last, .sheet-wfrp-armourtable__cell--last, .sheet-wfrp-criticaltable__cell--last, .sheet-wfrp-weapontable__cell--last, .sheet-wfrp-spelltable__cell--settingstoggle, .sheet-wfrp-trappingtable__cell--settingstoggle, .sheet-wfrp-armourtable__cell--settingstoggle, .sheet-wfrp-criticaltable__cell--settingstoggle, .sheet-wfrp-weapontable__cell--settingstoggle, .sheet-wfrp-spelltable__cell, .sheet-wfrp-trappingtable__cell, .sheet-wfrp-armourtable__cell, .sheet-wfrp-criticaltable__cell, .sheet-wfrp-weapontable__cell, .sheet-wfrp-experiencetable__cell--ltitle, .sheet-wfrp-careertable__cell--ltitle, .sheet-wfrp-speciestable__cell--ltitle, .sheet-wfrp-experiencetable__cell--last, .sheet-wfrp-careertable__cell--last, .sheet-wfrp-speciestable__cell--last, .sheet-wfrp-experiencetable__cell, .sheet-wfrp-careertable__cell, .sheet-wfrp-speciestable__cell, .sheet-wfrp-talenttable__cell--last, .sheet-wfrp-conditiontable__cell--last, .sheet-wfrp-psychologytable__cell--last, .sheet-wfrp-corruptiontable__cell--last, .sheet-wfrp-talenttable__cell, .sheet-wfrp-conditiontable__cell, .sheet-wfrp-psychologytable__cell, .sheet-wfrp-corruptiontable__cell, .sheet-wfrp-spelltable__cell--description, .sheet-wfrp-trappingtable__cell--description, .sheet-wfrp-armourtable__cell--description, .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-weapontable__cell--description, .sheet-wfrp-experiencetable__cell--description, .sheet-wfrp-careertable__cell--description, .sheet-wfrp-speciestable__cell--description, .sheet-wfrp-talenttable__cell--description, .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-corruptiontable__cell--description { display: flex; justify-content: space-around; align-items: center; text-align: center; } -.sheet-wfrp-spelltable__cell--last:nth-child(2), .sheet-wfrp-trappingtable__cell--last:nth-child(2), .sheet-wfrp-armourtable__cell--last:nth-child(2), .sheet-wfrp-criticaltable__cell--last:nth-child(2), .sheet-wfrp-weapontable__cell--last:nth-child(2), .sheet-wfrp-spelltable__cell--settingstoggle:nth-child(2), .sheet-wfrp-trappingtable__cell--settingstoggle:nth-child(2), .sheet-wfrp-armourtable__cell--settingstoggle:nth-child(2), .sheet-wfrp-criticaltable__cell--settingstoggle:nth-child(2), .sheet-wfrp-weapontable__cell--settingstoggle:nth-child(2), .sheet-wfrp-spelltable__cell:nth-child(2), .sheet-wfrp-trappingtable__cell:nth-child(2), .sheet-wfrp-armourtable__cell:nth-child(2), .sheet-wfrp-criticaltable__cell:nth-child(2), .sheet-wfrp-weapontable__cell:nth-child(2), .sheet-wfrp-experiencetable__cell--last:nth-child(2), .sheet-wfrp-careertable__cell--last:nth-child(2), .sheet-wfrp-experiencetable__cell:nth-child(2), .sheet-wfrp-careertable__cell:nth-child(2), .sheet-wfrp-talenttable__cell--last:nth-child(2), .sheet-wfrp-conditiontable__cell--last:nth-child(2), .sheet-wfrp-psychologytable__cell--last:nth-child(2), .sheet-wfrp-corruptiontable__cell--last:nth-child(2), .sheet-wfrp-talenttable__cell:nth-child(2), .sheet-wfrp-conditiontable__cell:nth-child(2), .sheet-wfrp-psychologytable__cell:nth-child(2), .sheet-wfrp-corruptiontable__cell:nth-child(2), .sheet-wfrp-spelltable__cell--description:nth-child(2), .sheet-wfrp-trappingtable__cell--description:nth-child(2), .sheet-wfrp-armourtable__cell--description:nth-child(2), .sheet-wfrp-criticaltable__cell--description:nth-child(2), .sheet-wfrp-weapontable__cell--description:nth-child(2), .sheet-wfrp-experiencetable__cell--description:nth-child(2), .sheet-wfrp-careertable__cell--description:nth-child(2), .sheet-wfrp-talenttable__cell--description:nth-child(2), .sheet-wfrp-conditiontable__cell--description:nth-child(2), .sheet-wfrp-psychologytable__cell--description:nth-child(2), .sheet-wfrp-corruptiontable__cell--description:nth-child(2) { +.sheet-wfrp-spelltable__cell--last:nth-child(2), .sheet-wfrp-trappingtable__cell--last:nth-child(2), .sheet-wfrp-armourtable__cell--last:nth-child(2), .sheet-wfrp-criticaltable__cell--last:nth-child(2), .sheet-wfrp-weapontable__cell--last:nth-child(2), .sheet-wfrp-spelltable__cell--settingstoggle:nth-child(2), .sheet-wfrp-trappingtable__cell--settingstoggle:nth-child(2), .sheet-wfrp-armourtable__cell--settingstoggle:nth-child(2), .sheet-wfrp-criticaltable__cell--settingstoggle:nth-child(2), .sheet-wfrp-weapontable__cell--settingstoggle:nth-child(2), .sheet-wfrp-spelltable__cell:nth-child(2), .sheet-wfrp-trappingtable__cell:nth-child(2), .sheet-wfrp-armourtable__cell:nth-child(2), .sheet-wfrp-criticaltable__cell:nth-child(2), .sheet-wfrp-weapontable__cell:nth-child(2), .sheet-wfrp-experiencetable__cell--ltitle:nth-child(2), .sheet-wfrp-careertable__cell--ltitle:nth-child(2), .sheet-wfrp-speciestable__cell--ltitle:nth-child(2), .sheet-wfrp-experiencetable__cell--last:nth-child(2), .sheet-wfrp-careertable__cell--last:nth-child(2), .sheet-wfrp-speciestable__cell--last:nth-child(2), .sheet-wfrp-experiencetable__cell:nth-child(2), .sheet-wfrp-careertable__cell:nth-child(2), .sheet-wfrp-speciestable__cell:nth-child(2), .sheet-wfrp-talenttable__cell--last:nth-child(2), .sheet-wfrp-conditiontable__cell--last:nth-child(2), .sheet-wfrp-psychologytable__cell--last:nth-child(2), .sheet-wfrp-corruptiontable__cell--last:nth-child(2), .sheet-wfrp-talenttable__cell:nth-child(2), .sheet-wfrp-conditiontable__cell:nth-child(2), .sheet-wfrp-psychologytable__cell:nth-child(2), .sheet-wfrp-corruptiontable__cell:nth-child(2), .sheet-wfrp-spelltable__cell--description:nth-child(2), .sheet-wfrp-trappingtable__cell--description:nth-child(2), .sheet-wfrp-armourtable__cell--description:nth-child(2), .sheet-wfrp-criticaltable__cell--description:nth-child(2), .sheet-wfrp-weapontable__cell--description:nth-child(2), .sheet-wfrp-experiencetable__cell--description:nth-child(2), .sheet-wfrp-careertable__cell--description:nth-child(2), .sheet-wfrp-speciestable__cell--description:nth-child(2), .sheet-wfrp-talenttable__cell--description:nth-child(2), .sheet-wfrp-conditiontable__cell--description:nth-child(2), .sheet-wfrp-psychologytable__cell--description:nth-child(2), .sheet-wfrp-corruptiontable__cell--description:nth-child(2) { text-align: left; } -.sheet-wfrp-spelltable__cell--last span, .sheet-wfrp-trappingtable__cell--last span, .sheet-wfrp-armourtable__cell--last span, .sheet-wfrp-criticaltable__cell--last span, .sheet-wfrp-weapontable__cell--last span, .sheet-wfrp-spelltable__cell--settingstoggle span, .sheet-wfrp-trappingtable__cell--settingstoggle span, .sheet-wfrp-armourtable__cell--settingstoggle span, .sheet-wfrp-criticaltable__cell--settingstoggle span, .sheet-wfrp-weapontable__cell--settingstoggle span, .sheet-wfrp-spelltable__cell span, .sheet-wfrp-trappingtable__cell span, .sheet-wfrp-armourtable__cell span, .sheet-wfrp-criticaltable__cell span, .sheet-wfrp-weapontable__cell span, .sheet-wfrp-experiencetable__cell--last span, .sheet-wfrp-careertable__cell--last span, .sheet-wfrp-experiencetable__cell span, .sheet-wfrp-careertable__cell span, .sheet-wfrp-talenttable__cell--last span, .sheet-wfrp-conditiontable__cell--last span, .sheet-wfrp-psychologytable__cell--last span, .sheet-wfrp-corruptiontable__cell--last span, .sheet-wfrp-talenttable__cell span, .sheet-wfrp-conditiontable__cell span, .sheet-wfrp-psychologytable__cell span, .sheet-wfrp-corruptiontable__cell span, .sheet-wfrp-spelltable__cell--description span, .sheet-wfrp-trappingtable__cell--description span, .sheet-wfrp-armourtable__cell--description span, .sheet-wfrp-criticaltable__cell--description span, .sheet-wfrp-weapontable__cell--description span, .sheet-wfrp-experiencetable__cell--description span, .sheet-wfrp-careertable__cell--description span, .sheet-wfrp-talenttable__cell--description span, .sheet-wfrp-conditiontable__cell--description span, .sheet-wfrp-psychologytable__cell--description span, .sheet-wfrp-corruptiontable__cell--description span { +.sheet-wfrp-spelltable__cell--last span, .sheet-wfrp-trappingtable__cell--last span, .sheet-wfrp-armourtable__cell--last span, .sheet-wfrp-criticaltable__cell--last span, .sheet-wfrp-weapontable__cell--last span, .sheet-wfrp-spelltable__cell--settingstoggle span, .sheet-wfrp-trappingtable__cell--settingstoggle span, .sheet-wfrp-armourtable__cell--settingstoggle span, .sheet-wfrp-criticaltable__cell--settingstoggle span, .sheet-wfrp-weapontable__cell--settingstoggle span, .sheet-wfrp-spelltable__cell span, .sheet-wfrp-trappingtable__cell span, .sheet-wfrp-armourtable__cell span, .sheet-wfrp-criticaltable__cell span, .sheet-wfrp-weapontable__cell span, .sheet-wfrp-experiencetable__cell--ltitle span, .sheet-wfrp-careertable__cell--ltitle span, .sheet-wfrp-speciestable__cell--ltitle span, .sheet-wfrp-experiencetable__cell--last span, .sheet-wfrp-careertable__cell--last span, .sheet-wfrp-speciestable__cell--last span, .sheet-wfrp-experiencetable__cell span, .sheet-wfrp-careertable__cell span, .sheet-wfrp-speciestable__cell span, .sheet-wfrp-talenttable__cell--last span, .sheet-wfrp-conditiontable__cell--last span, .sheet-wfrp-psychologytable__cell--last span, .sheet-wfrp-corruptiontable__cell--last span, .sheet-wfrp-talenttable__cell span, .sheet-wfrp-conditiontable__cell span, .sheet-wfrp-psychologytable__cell span, .sheet-wfrp-corruptiontable__cell span, .sheet-wfrp-spelltable__cell--description span, .sheet-wfrp-trappingtable__cell--description span, .sheet-wfrp-armourtable__cell--description span, .sheet-wfrp-criticaltable__cell--description span, .sheet-wfrp-weapontable__cell--description span, .sheet-wfrp-experiencetable__cell--description span, .sheet-wfrp-careertable__cell--description span, .sheet-wfrp-speciestable__cell--description span, .sheet-wfrp-talenttable__cell--description span, .sheet-wfrp-conditiontable__cell--description span, .sheet-wfrp-psychologytable__cell--description span, .sheet-wfrp-corruptiontable__cell--description span { padding: 1px; } -.sheet-wfrp-spelltable__cell--last span:empty, .sheet-wfrp-trappingtable__cell--last span:empty, .sheet-wfrp-armourtable__cell--last span:empty, .sheet-wfrp-criticaltable__cell--last span:empty, .sheet-wfrp-weapontable__cell--last span:empty, .sheet-wfrp-spelltable__cell--settingstoggle span:empty, .sheet-wfrp-trappingtable__cell--settingstoggle span:empty, .sheet-wfrp-armourtable__cell--settingstoggle span:empty, .sheet-wfrp-criticaltable__cell--settingstoggle span:empty, .sheet-wfrp-weapontable__cell--settingstoggle span:empty, .sheet-wfrp-spelltable__cell span:empty, .sheet-wfrp-trappingtable__cell span:empty, .sheet-wfrp-armourtable__cell span:empty, .sheet-wfrp-criticaltable__cell span:empty, .sheet-wfrp-weapontable__cell span:empty, .sheet-wfrp-experiencetable__cell--last span:empty, .sheet-wfrp-careertable__cell--last span:empty, .sheet-wfrp-experiencetable__cell span:empty, .sheet-wfrp-careertable__cell span:empty, .sheet-wfrp-talenttable__cell--last span:empty, .sheet-wfrp-conditiontable__cell--last span:empty, .sheet-wfrp-psychologytable__cell--last span:empty, .sheet-wfrp-corruptiontable__cell--last span:empty, .sheet-wfrp-talenttable__cell span:empty, .sheet-wfrp-conditiontable__cell span:empty, .sheet-wfrp-psychologytable__cell span:empty, .sheet-wfrp-corruptiontable__cell span:empty, .sheet-wfrp-spelltable__cell--description span:empty, .sheet-wfrp-trappingtable__cell--description span:empty, .sheet-wfrp-armourtable__cell--description span:empty, .sheet-wfrp-criticaltable__cell--description span:empty, .sheet-wfrp-weapontable__cell--description span:empty, .sheet-wfrp-experiencetable__cell--description span:empty, .sheet-wfrp-careertable__cell--description span:empty, .sheet-wfrp-talenttable__cell--description span:empty, .sheet-wfrp-conditiontable__cell--description span:empty, .sheet-wfrp-psychologytable__cell--description span:empty, .sheet-wfrp-corruptiontable__cell--description span:empty { +.sheet-wfrp-spelltable__cell--last span:empty, .sheet-wfrp-trappingtable__cell--last span:empty, .sheet-wfrp-armourtable__cell--last span:empty, .sheet-wfrp-criticaltable__cell--last span:empty, .sheet-wfrp-weapontable__cell--last span:empty, .sheet-wfrp-spelltable__cell--settingstoggle span:empty, .sheet-wfrp-trappingtable__cell--settingstoggle span:empty, .sheet-wfrp-armourtable__cell--settingstoggle span:empty, .sheet-wfrp-criticaltable__cell--settingstoggle span:empty, .sheet-wfrp-weapontable__cell--settingstoggle span:empty, .sheet-wfrp-spelltable__cell span:empty, .sheet-wfrp-trappingtable__cell span:empty, .sheet-wfrp-armourtable__cell span:empty, .sheet-wfrp-criticaltable__cell span:empty, .sheet-wfrp-weapontable__cell span:empty, .sheet-wfrp-experiencetable__cell--ltitle span:empty, .sheet-wfrp-careertable__cell--ltitle span:empty, .sheet-wfrp-speciestable__cell--ltitle span:empty, .sheet-wfrp-experiencetable__cell--last span:empty, .sheet-wfrp-careertable__cell--last span:empty, .sheet-wfrp-speciestable__cell--last span:empty, .sheet-wfrp-experiencetable__cell span:empty, .sheet-wfrp-careertable__cell span:empty, .sheet-wfrp-speciestable__cell span:empty, .sheet-wfrp-talenttable__cell--last span:empty, .sheet-wfrp-conditiontable__cell--last span:empty, .sheet-wfrp-psychologytable__cell--last span:empty, .sheet-wfrp-corruptiontable__cell--last span:empty, .sheet-wfrp-talenttable__cell span:empty, .sheet-wfrp-conditiontable__cell span:empty, .sheet-wfrp-psychologytable__cell span:empty, .sheet-wfrp-corruptiontable__cell span:empty, .sheet-wfrp-spelltable__cell--description span:empty, .sheet-wfrp-trappingtable__cell--description span:empty, .sheet-wfrp-armourtable__cell--description span:empty, .sheet-wfrp-criticaltable__cell--description span:empty, .sheet-wfrp-weapontable__cell--description span:empty, .sheet-wfrp-experiencetable__cell--description span:empty, .sheet-wfrp-careertable__cell--description span:empty, .sheet-wfrp-speciestable__cell--description span:empty, .sheet-wfrp-talenttable__cell--description span:empty, .sheet-wfrp-conditiontable__cell--description span:empty, .sheet-wfrp-psychologytable__cell--description span:empty, .sheet-wfrp-corruptiontable__cell--description span:empty { display: none; } -.sheet-wfrp-spelltable__cell--last select, .sheet-wfrp-trappingtable__cell--last select, .sheet-wfrp-armourtable__cell--last select, .sheet-wfrp-criticaltable__cell--last select, .sheet-wfrp-weapontable__cell--last select, .sheet-wfrp-spelltable__cell--settingstoggle select, .sheet-wfrp-trappingtable__cell--settingstoggle select, .sheet-wfrp-armourtable__cell--settingstoggle select, .sheet-wfrp-criticaltable__cell--settingstoggle select, .sheet-wfrp-weapontable__cell--settingstoggle select, .sheet-wfrp-spelltable__cell select, .sheet-wfrp-trappingtable__cell select, .sheet-wfrp-armourtable__cell select, .sheet-wfrp-criticaltable__cell select, .sheet-wfrp-weapontable__cell select, .sheet-wfrp-experiencetable__cell--last select, .sheet-wfrp-careertable__cell--last select, .sheet-wfrp-experiencetable__cell select, .sheet-wfrp-careertable__cell select, .sheet-wfrp-talenttable__cell--last select, .sheet-wfrp-conditiontable__cell--last select, .sheet-wfrp-psychologytable__cell--last select, .sheet-wfrp-corruptiontable__cell--last select, .sheet-wfrp-talenttable__cell select, .sheet-wfrp-conditiontable__cell select, .sheet-wfrp-psychologytable__cell select, .sheet-wfrp-corruptiontable__cell select, .sheet-wfrp-spelltable__cell--description select, .sheet-wfrp-trappingtable__cell--description select, .sheet-wfrp-armourtable__cell--description select, .sheet-wfrp-criticaltable__cell--description select, .sheet-wfrp-weapontable__cell--description select, .sheet-wfrp-experiencetable__cell--description select, .sheet-wfrp-careertable__cell--description select, .sheet-wfrp-talenttable__cell--description select, .sheet-wfrp-conditiontable__cell--description select, .sheet-wfrp-psychologytable__cell--description select, .sheet-wfrp-corruptiontable__cell--description select, +.sheet-wfrp-spelltable__cell--last select, .sheet-wfrp-trappingtable__cell--last select, .sheet-wfrp-armourtable__cell--last select, .sheet-wfrp-criticaltable__cell--last select, .sheet-wfrp-weapontable__cell--last select, .sheet-wfrp-spelltable__cell--settingstoggle select, .sheet-wfrp-trappingtable__cell--settingstoggle select, .sheet-wfrp-armourtable__cell--settingstoggle select, .sheet-wfrp-criticaltable__cell--settingstoggle select, .sheet-wfrp-weapontable__cell--settingstoggle select, .sheet-wfrp-spelltable__cell select, .sheet-wfrp-trappingtable__cell select, .sheet-wfrp-armourtable__cell select, .sheet-wfrp-criticaltable__cell select, .sheet-wfrp-weapontable__cell select, .sheet-wfrp-experiencetable__cell--ltitle select, .sheet-wfrp-careertable__cell--ltitle select, .sheet-wfrp-speciestable__cell--ltitle select, .sheet-wfrp-experiencetable__cell--last select, .sheet-wfrp-careertable__cell--last select, .sheet-wfrp-speciestable__cell--last select, .sheet-wfrp-experiencetable__cell select, .sheet-wfrp-careertable__cell select, .sheet-wfrp-speciestable__cell select, .sheet-wfrp-talenttable__cell--last select, .sheet-wfrp-conditiontable__cell--last select, .sheet-wfrp-psychologytable__cell--last select, .sheet-wfrp-corruptiontable__cell--last select, .sheet-wfrp-talenttable__cell select, .sheet-wfrp-conditiontable__cell select, .sheet-wfrp-psychologytable__cell select, .sheet-wfrp-corruptiontable__cell select, .sheet-wfrp-spelltable__cell--description select, .sheet-wfrp-trappingtable__cell--description select, .sheet-wfrp-armourtable__cell--description select, .sheet-wfrp-criticaltable__cell--description select, .sheet-wfrp-weapontable__cell--description select, .sheet-wfrp-experiencetable__cell--description select, .sheet-wfrp-careertable__cell--description select, .sheet-wfrp-speciestable__cell--description select, .sheet-wfrp-talenttable__cell--description select, .sheet-wfrp-conditiontable__cell--description select, .sheet-wfrp-psychologytable__cell--description select, .sheet-wfrp-corruptiontable__cell--description select, .sheet-wfrp-spelltable__cell--last input[type=text], .sheet-wfrp-trappingtable__cell--last input[type=text], .sheet-wfrp-armourtable__cell--last input[type=text], @@ -343,10 +373,15 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner .sheet-wfrp-armourtable__cell input[type=text], .sheet-wfrp-criticaltable__cell input[type=text], .sheet-wfrp-weapontable__cell input[type=text], +.sheet-wfrp-experiencetable__cell--ltitle input[type=text], +.sheet-wfrp-careertable__cell--ltitle input[type=text], +.sheet-wfrp-speciestable__cell--ltitle input[type=text], .sheet-wfrp-experiencetable__cell--last input[type=text], .sheet-wfrp-careertable__cell--last input[type=text], +.sheet-wfrp-speciestable__cell--last input[type=text], .sheet-wfrp-experiencetable__cell input[type=text], .sheet-wfrp-careertable__cell input[type=text], +.sheet-wfrp-speciestable__cell input[type=text], .sheet-wfrp-talenttable__cell--last input[type=text], .sheet-wfrp-conditiontable__cell--last input[type=text], .sheet-wfrp-psychologytable__cell--last input[type=text], @@ -362,6 +397,7 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner .sheet-wfrp-weapontable__cell--description input[type=text], .sheet-wfrp-experiencetable__cell--description input[type=text], .sheet-wfrp-careertable__cell--description input[type=text], +.sheet-wfrp-speciestable__cell--description input[type=text], .sheet-wfrp-talenttable__cell--description input[type=text], .sheet-wfrp-conditiontable__cell--description input[type=text], .sheet-wfrp-psychologytable__cell--description input[type=text], @@ -381,10 +417,15 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner .sheet-wfrp-armourtable__cell input[type=number], .sheet-wfrp-criticaltable__cell input[type=number], .sheet-wfrp-weapontable__cell input[type=number], +.sheet-wfrp-experiencetable__cell--ltitle input[type=number], +.sheet-wfrp-careertable__cell--ltitle input[type=number], +.sheet-wfrp-speciestable__cell--ltitle input[type=number], .sheet-wfrp-experiencetable__cell--last input[type=number], .sheet-wfrp-careertable__cell--last input[type=number], +.sheet-wfrp-speciestable__cell--last input[type=number], .sheet-wfrp-experiencetable__cell input[type=number], .sheet-wfrp-careertable__cell input[type=number], +.sheet-wfrp-speciestable__cell input[type=number], .sheet-wfrp-talenttable__cell--last input[type=number], .sheet-wfrp-conditiontable__cell--last input[type=number], .sheet-wfrp-psychologytable__cell--last input[type=number], @@ -400,6 +441,7 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner .sheet-wfrp-weapontable__cell--description input[type=number], .sheet-wfrp-experiencetable__cell--description input[type=number], .sheet-wfrp-careertable__cell--description input[type=number], +.sheet-wfrp-speciestable__cell--description input[type=number], .sheet-wfrp-talenttable__cell--description input[type=number], .sheet-wfrp-conditiontable__cell--description input[type=number], .sheet-wfrp-psychologytable__cell--description input[type=number], @@ -407,15 +449,15 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner height: 100%; } -.sheet-wfrp-spelltable__row--head div[class*=cell]:first-child, .sheet-wfrp-trappingtable__row--head div[class*=cell]:first-child, .sheet-wfrp-armourtable__row--head div[class*=cell]:first-child, .sheet-wfrp-criticaltable__row--head div[class*=cell]:first-child, .sheet-wfrp-weapontable__row--head div[class*=cell]:first-child, .sheet-wfrp-experiencetable__row--head div[class*=cell]:first-child, .sheet-wfrp-careertable__row--head div[class*=cell]:first-child, .sheet-wfrp-talenttable__row--head div[class*=cell]:first-child, .sheet-wfrp-conditiontable__row--head div[class*=cell]:first-child, .sheet-wfrp-psychologytable__row--head div[class*=cell]:first-child, .sheet-wfrp-corruptiontable__row--head div[class*=cell]:first-child { +.sheet-wfrp-spelltable__row--head div[class*=cell]:first-child, .sheet-wfrp-trappingtable__row--head div[class*=cell]:first-child, .sheet-wfrp-armourtable__row--head div[class*=cell]:first-child, .sheet-wfrp-criticaltable__row--head div[class*=cell]:first-child, .sheet-wfrp-weapontable__row--head div[class*=cell]:first-child, .sheet-wfrp-experiencetable__row--head div[class*=cell]:first-child, .sheet-wfrp-careertable__row--head div[class*=cell]:first-child, .sheet-wfrp-speciestable__row--head div[class*=cell]:first-child, .sheet-wfrp-talenttable__row--head div[class*=cell]:first-child, .sheet-wfrp-conditiontable__row--head div[class*=cell]:first-child, .sheet-wfrp-psychologytable__row--head div[class*=cell]:first-child, .sheet-wfrp-corruptiontable__row--head div[class*=cell]:first-child { grid-column: span 2; text-align: left; } -.sheet-wfrp-spelltable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-trappingtable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-armourtable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-criticaltable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-weapontable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-experiencetable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-careertable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-talenttable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-conditiontable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-psychologytable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-corruptiontable__row--head div[class*=cell]:not(:first-child) { +.sheet-wfrp-spelltable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-trappingtable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-armourtable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-criticaltable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-weapontable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-experiencetable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-careertable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-speciestable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-talenttable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-conditiontable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-psychologytable__row--head div[class*=cell]:not(:first-child), .sheet-wfrp-corruptiontable__row--head div[class*=cell]:not(:first-child) { text-align: center; } -.sheet-wfrp-spelltable__cell--description, .sheet-wfrp-trappingtable__cell--description, .sheet-wfrp-armourtable__cell--description, .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-weapontable__cell--description, .sheet-wfrp-experiencetable__cell--description, .sheet-wfrp-careertable__cell--description, .sheet-wfrp-talenttable__cell--description, .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-corruptiontable__cell--description { +.sheet-wfrp-spelltable__cell--description, .sheet-wfrp-trappingtable__cell--description, .sheet-wfrp-armourtable__cell--description, .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-weapontable__cell--description, .sheet-wfrp-experiencetable__cell--description, .sheet-wfrp-careertable__cell--description, .sheet-wfrp-speciestable__cell--description, .sheet-wfrp-talenttable__cell--description, .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-corruptiontable__cell--description { grid-column: 1/-1; } @@ -518,13 +560,16 @@ input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner .sheet-wfrp-corruptiontable__row--head, .sheet-wfrp-corruptiontable__row { grid-template-columns: 1.5rem 1fr 3rem; } -.sheet-wfrp-experiencetable__cell--description span, .sheet-wfrp-careertable__cell--description span { +.sheet-wfrp-experiencetable__cell--description span, .sheet-wfrp-careertable__cell--description span, .sheet-wfrp-speciestable__cell--description span { text-align: left; } -.sheet-wfrp-experiencetable__cell--span2, .sheet-wfrp-careertable__cell--span2 { +.sheet-wfrp-experiencetable__cell--ltitle, .sheet-wfrp-careertable__cell--ltitle, .sheet-wfrp-speciestable__cell--ltitle { + text-align: left; +} +.sheet-wfrp-experiencetable__cell--span2, .sheet-wfrp-careertable__cell--span2, .sheet-wfrp-speciestable__cell--span2 { grid-column: span 2; } -.sheet-wfrp-experiencetable__cell--span3, .sheet-wfrp-careertable__cell--span3 { +.sheet-wfrp-experiencetable__cell--span3, .sheet-wfrp-careertable__cell--span3, .sheet-wfrp-speciestable__cell--span3 { grid-column: span 3; } .sheet-wfrp-experiencetable__row--head div[class*=cell]:first-child { @@ -768,13 +813,13 @@ button.sheet-pictos[type=action]:hover { width: 1.5rem; } -.sheet-wfrp-settings, .sheet-wfrp-settings--large { +.sheet-wfrp-settings, .sheet-wfrp-settings--noborder, .sheet-wfrp-settings--large { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; } -.sheet-wfrp-settings h2, .sheet-wfrp-settings--large h2 { +.sheet-wfrp-settings h2, .sheet-wfrp-settings--noborder h2, .sheet-wfrp-settings--large h2 { grid-column: 1/-1; text-align: center; text-transform: uppercase; @@ -783,7 +828,7 @@ button.sheet-pictos[type=action]:hover { .sheet-wfrp-settings--large { grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; } -.sheet-wfrp-settings__row, .sheet-wfrp-settings__row--career_name, .sheet-wfrp-settings__row--talent, .sheet-wfrp-settings__row--skillinit, .sheet-wfrp-settings__row--talentinit, .sheet-wfrp-settings__row--skill, .sheet-wfrp-settings__row--invert, .sheet-wfrp-settings__row--characteristics, .sheet-wfrp-settings__row--span { +.sheet-wfrp-settings__row, .sheet-wfrp-settings__row--career_name, .sheet-wfrp-settings__row--talent, .sheet-wfrp-settings__row--skillinit, .sheet-wfrp-settings__row--talentinit, .sheet-wfrp-settings__row--speciesskill, .sheet-wfrp-settings__row--skill, .sheet-wfrp-settings__row--invert, .sheet-wfrp-settings__row--characteristics, .sheet-wfrp-settings__row--span { display: grid; grid-template-columns: 9rem 1fr; text-align: left; @@ -794,8 +839,32 @@ button.sheet-pictos[type=action]:hover { } .sheet-wfrp-settings__row--characteristics { grid-column: 1/-1; - grid-template-columns: repeat(10, 1fr); - gap: 0.5rem; + grid-template-columns: 1.5fr repeat(10, 1fr); +} +.sheet-wfrp-settings__row--characteristics > * { + display: grid; + grid-auto-rows: 2rem; + border-right: 1px solid #000; +} +.sheet-wfrp-settings__row--characteristics > *:last-child { + border: none; +} +.sheet-wfrp-settings__row--characteristics > * > div { + border-bottom: 1px solid #000; +} +.sheet-wfrp-settings__row--characteristics > * > div:last-child { + border: none; +} +.sheet-wfrp-settings__row--characteristics input[type=number], +.sheet-wfrp-settings__row--characteristics input[type=text] { + border-radius: 0 !important; +} +.sheet-wfrp-settings__row--characteristics input[type=number]:last-child, +.sheet-wfrp-settings__row--characteristics input[type=text]:last-child { + border: none; +} +.sheet-wfrp-settings__row--characteristics label { + border-bottom: 1px solid #000; } .sheet-wfrp-settings__row--invert { grid-template-columns: 0.5fr 2fr; @@ -805,6 +874,15 @@ button.sheet-pictos[type=action]:hover { gap: 3px; margin-bottom: 3px; } +.sheet-wfrp-settings__row--speciesskill { + grid-template-columns: 1fr 0.15fr 0.15fr 0.15fr; + gap: 3px; + margin-bottom: 3px; +} +.sheet-wfrp-settings__row--speciesskill > button { + justify-self: center; + text-align: center; +} .sheet-wfrp-settings__row--skillinit, .sheet-wfrp-settings__row--talentinit { grid-template-columns: 1fr 0.45fr 0.45fr; gap: 3px; @@ -834,27 +912,27 @@ button.sheet-pictos[type=action]:hover { background: transparent; color: #000; } -.sheet-wfrp-settings__item input[type=hidden][value=on] ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { +.sheet-wfrp-settings__item input[type=hidden][value=on] ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { pointer-events: auto; background: rgba(36, 107, 131, 0.125); color: #000; } -.sheet-wfrp-settings__item input[type=hidden][value="1"] ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { +.sheet-wfrp-settings__item input[type=hidden][value="1"] ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { pointer-events: auto; background: rgba(36, 107, 131, 0.125); color: #000; } -.sheet-wfrp-settings__item input[type=hidden][value="2"] ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { +.sheet-wfrp-settings__item input[type=hidden][value="2"] ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { pointer-events: auto; background: rgba(184, 134, 11, 0.25); color: #000; } -.sheet-wfrp-settings__item input[type=hidden][value="3"] ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { +.sheet-wfrp-settings__item input[type=hidden][value="3"] ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { pointer-events: auto; background: rgba(192, 192, 192, 0.25); color: #000; } -.sheet-wfrp-settings__item input[type=hidden][value="4"] ~ input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { +.sheet-wfrp-settings__item input[type=hidden][value="4"] ~ * input.sheet-wfrp-settings__input.sheet-wfrp-settings__input[type=number] { pointer-events: auto; background: rgba(255, 215, 0, 0.25); color: #000; @@ -1025,44 +1103,44 @@ button.sheet-pictos[type=action]:hover { border-right: 1px solid #000; } -.sheet-wfrp-experiencetable__row, .sheet-wfrp-careertable__row, .sheet-wfrp-spelltable__row, .sheet-wfrp-weapontable__row, .sheet-wfrp-criticaltable__row, .sheet-wfrp-armourtable__row, .sheet-wfrp-trappingtable__row, .sheet-wfrp-corruptiontable__row, .sheet-wfrp-psychologytable__row, .sheet-wfrp-conditiontable__row, .sheet-wfrp-talenttable__row, .sheet-wfrp-skilltable__row, .sheet-wfrp-skilltable__row--specialisation, .sheet-wfrp-skilltable__row--grouped, .sheet-wfrp-field, -.sheet-wfrp-textarea, .sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-experiencetable__row--head, .sheet-wfrp-careertable__row--head, .sheet-wfrp-spelltable__row--head, .sheet-wfrp-weapontable__row--head, .sheet-wfrp-criticaltable__row--head, .sheet-wfrp-armourtable__row--head, .sheet-wfrp-trappingtable__row--head, .sheet-wfrp-corruptiontable__row--head, .sheet-wfrp-psychologytable__row--head, .sheet-wfrp-conditiontable__row--head, .sheet-wfrp-talenttable__row--head, .sheet-wfrp-skilltable__row--head { +.sheet-wfrp-woundstable__row, .sheet-wfrp-experiencetable__row, .sheet-wfrp-careertable__row, .sheet-wfrp-spelltable__row, .sheet-wfrp-weapontable__row, .sheet-wfrp-criticaltable__row, .sheet-wfrp-armourtable__row, .sheet-wfrp-trappingtable__row, .sheet-wfrp-corruptiontable__row, .sheet-wfrp-psychologytable__row, .sheet-wfrp-conditiontable__row, .sheet-wfrp-talenttable__row, .sheet-wfrp-skilltable__row, .sheet-wfrp-skilltable__row--specialisation, .sheet-wfrp-skilltable__row--grouped, .sheet-wfrp-field, +.sheet-wfrp-textarea, .sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-woundstable__row--head, .sheet-wfrp-experiencetable__row--head, .sheet-wfrp-careertable__row--head, .sheet-wfrp-spelltable__row--head, .sheet-wfrp-weapontable__row--head, .sheet-wfrp-criticaltable__row--head, .sheet-wfrp-armourtable__row--head, .sheet-wfrp-trappingtable__row--head, .sheet-wfrp-corruptiontable__row--head, .sheet-wfrp-psychologytable__row--head, .sheet-wfrp-conditiontable__row--head, .sheet-wfrp-talenttable__row--head, .sheet-wfrp-skilltable__row--head { border-bottom: 1px solid black; } -.sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-experiencetable__row--head, .sheet-wfrp-careertable__row--head, .sheet-wfrp-spelltable__row--head, .sheet-wfrp-weapontable__row--head, .sheet-wfrp-criticaltable__row--head, .sheet-wfrp-armourtable__row--head, .sheet-wfrp-trappingtable__row--head, .sheet-wfrp-corruptiontable__row--head, .sheet-wfrp-psychologytable__row--head, .sheet-wfrp-conditiontable__row--head, .sheet-wfrp-talenttable__row--head, .sheet-wfrp-skilltable__row--head { +.sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-woundstable__row--head, .sheet-wfrp-experiencetable__row--head, .sheet-wfrp-careertable__row--head, .sheet-wfrp-spelltable__row--head, .sheet-wfrp-weapontable__row--head, .sheet-wfrp-criticaltable__row--head, .sheet-wfrp-armourtable__row--head, .sheet-wfrp-trappingtable__row--head, .sheet-wfrp-corruptiontable__row--head, .sheet-wfrp-psychologytable__row--head, .sheet-wfrp-conditiontable__row--head, .sheet-wfrp-talenttable__row--head, .sheet-wfrp-skilltable__row--head { font-weight: bold; } -.sheet-wfrp-npccharacteristic__cell, .sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-experiencetable__cell, .sheet-wfrp-careertable__cell, .sheet-wfrp-spelltable__cell, .sheet-wfrp-weapontable__cell, .sheet-wfrp-criticaltable__cell, .sheet-wfrp-armourtable__cell, .sheet-wfrp-trappingtable__cell, .sheet-wfrp-corruptiontable__cell, .sheet-wfrp-psychologytable__cell, .sheet-wfrp-conditiontable__cell, .sheet-wfrp-talenttable__cell, .sheet-wfrp-skilltable__cell, .sheet-wfrp-skilltable__cell--last, .sheet-wfrp-skilltable__cell--nosettings, .sheet-wfrp-skilltable__cell--span2, .sheet-wfrp-skilltable__cell--grouped, .sheet-wfrp-field__header, +.sheet-wfrp-npccharacteristic__cell, .sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-woundstable__cell, .sheet-wfrp-experiencetable__cell, .sheet-wfrp-careertable__cell, .sheet-wfrp-spelltable__cell, .sheet-wfrp-weapontable__cell, .sheet-wfrp-criticaltable__cell, .sheet-wfrp-armourtable__cell, .sheet-wfrp-trappingtable__cell, .sheet-wfrp-corruptiontable__cell, .sheet-wfrp-psychologytable__cell, .sheet-wfrp-conditiontable__cell, .sheet-wfrp-talenttable__cell, .sheet-wfrp-skilltable__cell, .sheet-wfrp-skilltable__cell--last, .sheet-wfrp-skilltable__cell--nosettings, .sheet-wfrp-skilltable__cell--span2, .sheet-wfrp-skilltable__cell--grouped, .sheet-wfrp-field__header, .sheet-wfrp-field__input, .sheet-wfrp-textarea__header, -.sheet-wfrp-textarea__input, .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell, .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-experiencetable__cell--last, .sheet-wfrp-careertable__cell--last, .sheet-wfrp-spelltable__cell--last, .sheet-wfrp-weapontable__cell--last, .sheet-wfrp-criticaltable__cell--last, .sheet-wfrp-armourtable__cell--last, .sheet-wfrp-trappingtable__cell--last, .sheet-wfrp-corruptiontable__cell--last, .sheet-wfrp-psychologytable__cell--last, .sheet-wfrp-conditiontable__cell--last, .sheet-wfrp-talenttable__cell--last { +.sheet-wfrp-textarea__input, .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell, .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-woundstable__cell--last, .sheet-wfrp-experiencetable__cell--last, .sheet-wfrp-careertable__cell--last, .sheet-wfrp-spelltable__cell--last, .sheet-wfrp-weapontable__cell--last, .sheet-wfrp-criticaltable__cell--last, .sheet-wfrp-armourtable__cell--last, .sheet-wfrp-trappingtable__cell--last, .sheet-wfrp-corruptiontable__cell--last, .sheet-wfrp-psychologytable__cell--last, .sheet-wfrp-conditiontable__cell--last, .sheet-wfrp-talenttable__cell--last { border-right: 1px solid black; } -.sheet-wfrp-npccharacteristic__cell input[type=number], .sheet-wfrp-npccharacteristic__cell--head input[type=number], .sheet-wfrp-experiencetable__cell input[type=number], .sheet-wfrp-careertable__cell input[type=number], .sheet-wfrp-spelltable__cell input[type=number], .sheet-wfrp-weapontable__cell input[type=number], .sheet-wfrp-criticaltable__cell input[type=number], .sheet-wfrp-armourtable__cell input[type=number], .sheet-wfrp-trappingtable__cell input[type=number], .sheet-wfrp-corruptiontable__cell input[type=number], .sheet-wfrp-psychologytable__cell input[type=number], .sheet-wfrp-conditiontable__cell input[type=number], .sheet-wfrp-talenttable__cell input[type=number], .sheet-wfrp-skilltable__cell input[type=number], .sheet-wfrp-skilltable__cell--last input[type=number], .sheet-wfrp-skilltable__cell--nosettings input[type=number], .sheet-wfrp-skilltable__cell--span2 input[type=number], .sheet-wfrp-skilltable__cell--grouped input[type=number], .sheet-wfrp-field__header input[type=number], +.sheet-wfrp-npccharacteristic__cell input[type=number], .sheet-wfrp-npccharacteristic__cell--head input[type=number], .sheet-wfrp-woundstable__cell input[type=number], .sheet-wfrp-experiencetable__cell input[type=number], .sheet-wfrp-careertable__cell input[type=number], .sheet-wfrp-spelltable__cell input[type=number], .sheet-wfrp-weapontable__cell input[type=number], .sheet-wfrp-criticaltable__cell input[type=number], .sheet-wfrp-armourtable__cell input[type=number], .sheet-wfrp-trappingtable__cell input[type=number], .sheet-wfrp-corruptiontable__cell input[type=number], .sheet-wfrp-psychologytable__cell input[type=number], .sheet-wfrp-conditiontable__cell input[type=number], .sheet-wfrp-talenttable__cell input[type=number], .sheet-wfrp-skilltable__cell input[type=number], .sheet-wfrp-skilltable__cell--last input[type=number], .sheet-wfrp-skilltable__cell--nosettings input[type=number], .sheet-wfrp-skilltable__cell--span2 input[type=number], .sheet-wfrp-skilltable__cell--grouped input[type=number], .sheet-wfrp-field__header input[type=number], .sheet-wfrp-field__input input[type=number], .sheet-wfrp-textarea__header input[type=number], -.sheet-wfrp-textarea__input input[type=number], .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell input[type=number], .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell--head input[type=number], .sheet-wfrp-experiencetable__cell--last input[type=number], .sheet-wfrp-careertable__cell--last input[type=number], .sheet-wfrp-spelltable__cell--last input[type=number], .sheet-wfrp-weapontable__cell--last input[type=number], .sheet-wfrp-criticaltable__cell--last input[type=number], .sheet-wfrp-armourtable__cell--last input[type=number], .sheet-wfrp-trappingtable__cell--last input[type=number], .sheet-wfrp-corruptiontable__cell--last input[type=number], .sheet-wfrp-psychologytable__cell--last input[type=number], .sheet-wfrp-conditiontable__cell--last input[type=number], .sheet-wfrp-talenttable__cell--last input[type=number] { +.sheet-wfrp-textarea__input input[type=number], .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell input[type=number], .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell--head input[type=number], .sheet-wfrp-woundstable__cell--last input[type=number], .sheet-wfrp-experiencetable__cell--last input[type=number], .sheet-wfrp-careertable__cell--last input[type=number], .sheet-wfrp-spelltable__cell--last input[type=number], .sheet-wfrp-weapontable__cell--last input[type=number], .sheet-wfrp-criticaltable__cell--last input[type=number], .sheet-wfrp-armourtable__cell--last input[type=number], .sheet-wfrp-trappingtable__cell--last input[type=number], .sheet-wfrp-corruptiontable__cell--last input[type=number], .sheet-wfrp-psychologytable__cell--last input[type=number], .sheet-wfrp-conditiontable__cell--last input[type=number], .sheet-wfrp-talenttable__cell--last input[type=number] { height: 100%; } -.sheet-wfrp-npccharacteristic__cell > span[name*=attr], .sheet-wfrp-npccharacteristic__cell--head > span[name*=attr], .sheet-wfrp-experiencetable__cell > span[name*=attr], .sheet-wfrp-careertable__cell > span[name*=attr], .sheet-wfrp-spelltable__cell > span[name*=attr], .sheet-wfrp-weapontable__cell > span[name*=attr], .sheet-wfrp-criticaltable__cell > span[name*=attr], .sheet-wfrp-armourtable__cell > span[name*=attr], .sheet-wfrp-trappingtable__cell > span[name*=attr], .sheet-wfrp-corruptiontable__cell > span[name*=attr], .sheet-wfrp-psychologytable__cell > span[name*=attr], .sheet-wfrp-conditiontable__cell > span[name*=attr], .sheet-wfrp-talenttable__cell > span[name*=attr], .sheet-wfrp-skilltable__cell > span[name*=attr], .sheet-wfrp-skilltable__cell--last > span[name*=attr], .sheet-wfrp-skilltable__cell--nosettings > span[name*=attr], .sheet-wfrp-skilltable__cell--span2 > span[name*=attr], .sheet-wfrp-skilltable__cell--grouped > span[name*=attr], .sheet-wfrp-field__header > span[name*=attr], +.sheet-wfrp-npccharacteristic__cell > span[name*=attr], .sheet-wfrp-npccharacteristic__cell--head > span[name*=attr], .sheet-wfrp-woundstable__cell > span[name*=attr], .sheet-wfrp-experiencetable__cell > span[name*=attr], .sheet-wfrp-careertable__cell > span[name*=attr], .sheet-wfrp-spelltable__cell > span[name*=attr], .sheet-wfrp-weapontable__cell > span[name*=attr], .sheet-wfrp-criticaltable__cell > span[name*=attr], .sheet-wfrp-armourtable__cell > span[name*=attr], .sheet-wfrp-trappingtable__cell > span[name*=attr], .sheet-wfrp-corruptiontable__cell > span[name*=attr], .sheet-wfrp-psychologytable__cell > span[name*=attr], .sheet-wfrp-conditiontable__cell > span[name*=attr], .sheet-wfrp-talenttable__cell > span[name*=attr], .sheet-wfrp-skilltable__cell > span[name*=attr], .sheet-wfrp-skilltable__cell--last > span[name*=attr], .sheet-wfrp-skilltable__cell--nosettings > span[name*=attr], .sheet-wfrp-skilltable__cell--span2 > span[name*=attr], .sheet-wfrp-skilltable__cell--grouped > span[name*=attr], .sheet-wfrp-field__header > span[name*=attr], .sheet-wfrp-field__input > span[name*=attr], .sheet-wfrp-textarea__header > span[name*=attr], -.sheet-wfrp-textarea__input > span[name*=attr], .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell > span[name*=attr], .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell--head > span[name*=attr], .sheet-wfrp-experiencetable__cell--last > span[name*=attr], .sheet-wfrp-careertable__cell--last > span[name*=attr], .sheet-wfrp-spelltable__cell--last > span[name*=attr], .sheet-wfrp-weapontable__cell--last > span[name*=attr], .sheet-wfrp-criticaltable__cell--last > span[name*=attr], .sheet-wfrp-armourtable__cell--last > span[name*=attr], .sheet-wfrp-trappingtable__cell--last > span[name*=attr], .sheet-wfrp-corruptiontable__cell--last > span[name*=attr], .sheet-wfrp-psychologytable__cell--last > span[name*=attr], .sheet-wfrp-conditiontable__cell--last > span[name*=attr], .sheet-wfrp-talenttable__cell--last > span[name*=attr] { +.sheet-wfrp-textarea__input > span[name*=attr], .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell > span[name*=attr], .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell--head > span[name*=attr], .sheet-wfrp-woundstable__cell--last > span[name*=attr], .sheet-wfrp-experiencetable__cell--last > span[name*=attr], .sheet-wfrp-careertable__cell--last > span[name*=attr], .sheet-wfrp-spelltable__cell--last > span[name*=attr], .sheet-wfrp-weapontable__cell--last > span[name*=attr], .sheet-wfrp-criticaltable__cell--last > span[name*=attr], .sheet-wfrp-armourtable__cell--last > span[name*=attr], .sheet-wfrp-trappingtable__cell--last > span[name*=attr], .sheet-wfrp-corruptiontable__cell--last > span[name*=attr], .sheet-wfrp-psychologytable__cell--last > span[name*=attr], .sheet-wfrp-conditiontable__cell--last > span[name*=attr], .sheet-wfrp-talenttable__cell--last > span[name*=attr] { font-family: "Lusitana", serif; font-size: 1.25rem; } -.sheet-wfrp-skilltable__cell--grouped, .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell, .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-experiencetable__cell--last, .sheet-wfrp-careertable__cell--last, .sheet-wfrp-spelltable__cell--last, .sheet-wfrp-weapontable__cell--last, .sheet-wfrp-criticaltable__cell--last, .sheet-wfrp-armourtable__cell--last, .sheet-wfrp-trappingtable__cell--last, .sheet-wfrp-corruptiontable__cell--last, .sheet-wfrp-psychologytable__cell--last, .sheet-wfrp-conditiontable__cell--last, .sheet-wfrp-talenttable__cell--last, .sheet-wfrp-skilltable__cell--last { +.sheet-wfrp-skilltable__cell--grouped, .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell, .sheet-wfrp-npccharacteristic__col:last-child .sheet-wfrp-npccharacteristic__cell--head, .sheet-wfrp-woundstable__cell--last, .sheet-wfrp-experiencetable__cell--last, .sheet-wfrp-careertable__cell--last, .sheet-wfrp-spelltable__cell--last, .sheet-wfrp-weapontable__cell--last, .sheet-wfrp-criticaltable__cell--last, .sheet-wfrp-armourtable__cell--last, .sheet-wfrp-trappingtable__cell--last, .sheet-wfrp-corruptiontable__cell--last, .sheet-wfrp-psychologytable__cell--last, .sheet-wfrp-conditiontable__cell--last, .sheet-wfrp-talenttable__cell--last, .sheet-wfrp-skilltable__cell--last { border-right: 0; } -.sheet-wfrp-npccharacteristic__cell--highlight, .sheet-wfrp-experiencetable__cell--highlight, .sheet-wfrp-careertable__cell--highlight, .sheet-wfrp-spelltable__cell--highlight, .sheet-wfrp-weapontable__cell--highlight, .sheet-wfrp-criticaltable__cell--highlight, .sheet-wfrp-armourtable__cell--highlight, .sheet-wfrp-trappingtable__cell--highlight, .sheet-wfrp-corruptiontable__cell--highlight, .sheet-wfrp-psychologytable__cell--highlight, .sheet-wfrp-conditiontable__cell--highlight, .sheet-wfrp-talenttable__cell--highlight, .sheet-wfrp-skilltable__cell--highlight { +.sheet-wfrp-npccharacteristic__cell--highlight, .sheet-wfrp-woundstable__cell--highlight, .sheet-wfrp-experiencetable__cell--highlight, .sheet-wfrp-careertable__cell--highlight, .sheet-wfrp-spelltable__cell--highlight, .sheet-wfrp-weapontable__cell--highlight, .sheet-wfrp-criticaltable__cell--highlight, .sheet-wfrp-armourtable__cell--highlight, .sheet-wfrp-trappingtable__cell--highlight, .sheet-wfrp-corruptiontable__cell--highlight, .sheet-wfrp-psychologytable__cell--highlight, .sheet-wfrp-conditiontable__cell--highlight, .sheet-wfrp-talenttable__cell--highlight, .sheet-wfrp-skilltable__cell--highlight { font-weight: bold; } -.sheet-wfrp-npccharacteristic__cell--description, .sheet-wfrp-experiencetable__cell--description, .sheet-wfrp-careertable__cell--description, .sheet-wfrp-spelltable__cell--description, .sheet-wfrp-weapontable__cell--description, .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-armourtable__cell--description, .sheet-wfrp-trappingtable__cell--description, .sheet-wfrp-corruptiontable__cell--description, .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-talenttable__cell--description, .sheet-wfrp-skilltable__cell--description { +.sheet-wfrp-npccharacteristic__cell--description, .sheet-wfrp-woundstable__cell--description, .sheet-wfrp-experiencetable__cell--description, .sheet-wfrp-careertable__cell--description, .sheet-wfrp-spelltable__cell--description, .sheet-wfrp-weapontable__cell--description, .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-armourtable__cell--description, .sheet-wfrp-trappingtable__cell--description, .sheet-wfrp-corruptiontable__cell--description, .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-talenttable__cell--description, .sheet-wfrp-skilltable__cell--description { border-top: 1px dotted dimgrey; font-size: 0.95em; font-style: italic; @@ -1163,7 +1241,9 @@ button.sheet-pictos[type=action]:hover { font-size: 16pt; } -.sheet-wfrp-navigation__item input[type=radio]:checked + span, .sheet-wfrp-navigation__item--settings input[type=radio]:checked + span { +.sheet-wfrp-navigation__item input[type=checkbox]:checked + span, .sheet-wfrp-navigation__item--settings input[type=checkbox]:checked + span, +.sheet-wfrp-navigation__item input[type=radio]:checked + span, +.sheet-wfrp-navigation__item--settings input[type=radio]:checked + span { background: rgba(36, 107, 131, 0.125); border: 1px solid rgba(20, 58, 71, 0.125); } @@ -1229,22 +1309,28 @@ button.sheet-pictos[type=action]:hover { right: 5px; } -.sheet-wfrp-settings, .sheet-wfrp-settings--large { +.sheet-wfrp-settings, .sheet-wfrp-settings--noborder, .sheet-wfrp-settings--large { padding-top: 0.5rem; border-top: 2px dashed #404040; background: rgba(195, 223, 241, 0.125); } -.sheet-wfrp-settings input.sheet-wfrp-settings__input[type=text], .sheet-wfrp-settings--large input.sheet-wfrp-settings__input[type=text], +.sheet-wfrp-settings input.sheet-wfrp-settings__input[type=text], .sheet-wfrp-settings--noborder input.sheet-wfrp-settings__input[type=text], .sheet-wfrp-settings--large input.sheet-wfrp-settings__input[type=text], .sheet-wfrp-settings input.sheet-wfrp-settings__input[type=number], +.sheet-wfrp-settings--noborder input.sheet-wfrp-settings__input[type=number], .sheet-wfrp-settings--large input.sheet-wfrp-settings__input[type=number], .sheet-wfrp-settings textarea.sheet-wfrp-settings__textarea, +.sheet-wfrp-settings--noborder textarea.sheet-wfrp-settings__textarea, .sheet-wfrp-settings--large textarea.sheet-wfrp-settings__textarea, .sheet-wfrp-settings select.sheet-wfrp-settings__select, +.sheet-wfrp-settings--noborder select.sheet-wfrp-settings__select, .sheet-wfrp-settings--large select.sheet-wfrp-settings__select { background-color: rgba(36, 107, 131, 0.125); color: #000; border-radius: 3px; } +.sheet-wfrp-settings--noborder { + border: 0; +} .sheet-wfrp-settings__header { margin-top: 0.5rem; border-bottom: 1px solid black; @@ -1255,10 +1341,9 @@ button.sheet-pictos[type=action]:hover { } .sheet-wfrp-settings__label span { display: block; - border-bottom: 1px solid black; } -.sheet-wfrp-npcsettings__wrapper, .sheet-control__hide--npctrait_settings, .sheet-control__hide--npcattack_settings, .sheet-control__hide--Custom, .sheet-control__hide--Prayer, .sheet-control__hide--Spell, .sheet-control__hide--skill, .sheet-control__hide--characteristic, .sheet-wfrp-criticaltable__row .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-corruptiontable__row .sheet-wfrp-corruptiontable__cell--description, .sheet-wfrp-psychologytable__row .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-conditiontable__row .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-talenttable__row .sheet-wfrp-talenttable__cell--description, .sheet-control__hide--spell_settings, .sheet-control__hide--weapon_settings, .sheet-control__hide--armour_settings, .sheet-control__hide--trappings_settings, .sheet-control__hide--critical_settings, .sheet-control__hide--corruption_settings, .sheet-control__hide--psychology_settings, .sheet-control__hide--condition_settings, .sheet-control__hide--talent_settings, .sheet-control__hide--magick, .sheet-control__hide--ulgu, .sheet-control__hide--shyish, .sheet-control__hide--hysh, .sheet-control__hide--ghyran, .sheet-control__hide--ghur, .sheet-control__hide--dhar, .sheet-control__hide--chamon, .sheet-control__hide--aqshy, .sheet-control__hide--throwing, .sheet-control__hide--sling, .sheet-control__hide--explosives, .sheet-control__hide--entangling, .sheet-control__hide--engineering, .sheet-control__hide--crossbow, .sheet-control__hide--bow, .sheet-control__hide--blackpowder, .sheet-control__hide--two-handed, .sheet-control__hide--polearm, .sheet-control__hide--parry, .sheet-control__hide--flail, .sheet-control__hide--fencing, .sheet-control__hide--cavalry, .sheet-control__hide--brawling, .sheet-control__hide--basic, .sheet-control__hide--magick_settings, .sheet-control__hide--ulgu_settings, .sheet-control__hide--shyish_settings, .sheet-control__hide--hysh_settings, .sheet-control__hide--ghyran_settings, .sheet-control__hide--ghur_settings, .sheet-control__hide--dhar_settings, .sheet-control__hide--chamon_settings, .sheet-control__hide--aqshy_settings, .sheet-control__hide--throwing_settings, .sheet-control__hide--sling_settings, .sheet-control__hide--explosives_settings, .sheet-control__hide--entangling_settings, .sheet-control__hide--engineering_settings, .sheet-control__hide--crossbow_settings, .sheet-control__hide--bow_settings, .sheet-control__hide--blackpowder_settings, .sheet-control__hide--two-handed_settings, .sheet-control__hide--polearm_settings, .sheet-control__hide--parry_settings, .sheet-control__hide--flail_settings, .sheet-control__hide--fencing_settings, .sheet-control__hide--cavalry_settings, .sheet-control__hide--brawling_settings, .sheet-control__hide--basic_settings, .sheet-control__hide--stealth_settings, .sheet-control__hide--row_settings, .sheet-control__hide--ride_settings, .sheet-control__hide--perception_settings, .sheet-control__hide--outdoor-survival_settings, .sheet-control__hide--navigation_settings, .sheet-control__hide--melee_settings, .sheet-control__hide--leadership_settings, .sheet-control__hide--intuition_settings, .sheet-control__hide--intimidate_settings, .sheet-control__hide--haggle_settings, .sheet-control__hide--gossip_settings, .sheet-control__hide--gamble_settings, .sheet-control__hide--entertain_settings, .sheet-control__hide--endurance_settings, .sheet-control__hide--drive_settings, .sheet-control__hide--dodge_settings, .sheet-control__hide--cool_settings, .sheet-control__hide--consume-alcohol_settings, .sheet-control__hide--climb_settings, .sheet-control__hide--charm-animal_settings, .sheet-control__hide--charm_settings, .sheet-control__hide--bribery_settings, .sheet-control__hide--athletics_settings, .sheet-control__hide--art_settings, .sheet-control__hide--trade_settings, .sheet-control__hide--track_settings, .sheet-control__hide--swim_settings, .sheet-control__hide--sleight-of-hand_settings, .sheet-control__hide--set-trap_settings, .sheet-control__hide--secret-signs_settings, .sheet-control__hide--sail_settings, .sheet-control__hide--research_settings, .sheet-control__hide--ranged_settings, .sheet-control__hide--pray_settings, .sheet-control__hide--play_settings, .sheet-control__hide--pick-lock_settings, .sheet-control__hide--perform_settings, .sheet-control__hide--lore_settings, .sheet-control__hide--language_settings, .sheet-control__hide--heal_settings, .sheet-control__hide--eva1uate_settings, .sheet-control__hide--channelling_settings, .sheet-control__hide--animal-training_settings, .sheet-control__hide--settings, .sheet-control__hide--animal-care_settings, .sheet-control__hide--fellowship, .sheet-control__hide--willpower, .sheet-control__hide--intelligence, .sheet-control__hide--dexterity, .sheet-control__hide--agility, .sheet-control__hide--initiative, .sheet-control__hide--toughness, .sheet-control__hide--strength, .sheet-control__hide--ballistic_skill, .sheet-control__hide--weapon_skill { +.sheet-wfrp-npcsettings__wrapper, .sheet-control__hide--npctalent_settings, .sheet-control__hide--npctrait_settings, .sheet-control__hide--npcattack_settings, .sheet-control__hide--Custom, .sheet-control__hide--Prayer, .sheet-control__hide--Spell, .sheet-control__hide--skill, .sheet-control__hide--characteristic, .sheet-wfrp-criticaltable__row .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-corruptiontable__row .sheet-wfrp-corruptiontable__cell--description, .sheet-wfrp-psychologytable__row .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-conditiontable__row .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-talenttable__row .sheet-wfrp-talenttable__cell--description, .sheet-control__hide--spell_settings, .sheet-control__hide--weapon_settings, .sheet-control__hide--armour_settings, .sheet-control__hide--trappings_settings, .sheet-control__hide--species_settings, .sheet-control__hide--career_settings, .sheet-control__hide--critical_settings, .sheet-control__hide--corruption_settings, .sheet-control__hide--psychology_settings, .sheet-control__hide--condition_settings, .sheet-control__hide--talent_settings, .sheet-control__hide--magick, .sheet-control__hide--ulgu, .sheet-control__hide--shyish, .sheet-control__hide--hysh, .sheet-control__hide--ghyran, .sheet-control__hide--ghur, .sheet-control__hide--dhar, .sheet-control__hide--chamon, .sheet-control__hide--aqshy, .sheet-control__hide--throwing, .sheet-control__hide--sling, .sheet-control__hide--explosives, .sheet-control__hide--entangling, .sheet-control__hide--engineering, .sheet-control__hide--crossbow, .sheet-control__hide--bow, .sheet-control__hide--blackpowder, .sheet-control__hide--two-handed, .sheet-control__hide--polearm, .sheet-control__hide--parry, .sheet-control__hide--flail, .sheet-control__hide--fencing, .sheet-control__hide--cavalry, .sheet-control__hide--brawling, .sheet-control__hide--basic, .sheet-control__hide--magick_settings, .sheet-control__hide--ulgu_settings, .sheet-control__hide--shyish_settings, .sheet-control__hide--hysh_settings, .sheet-control__hide--ghyran_settings, .sheet-control__hide--ghur_settings, .sheet-control__hide--dhar_settings, .sheet-control__hide--chamon_settings, .sheet-control__hide--aqshy_settings, .sheet-control__hide--throwing_settings, .sheet-control__hide--sling_settings, .sheet-control__hide--explosives_settings, .sheet-control__hide--entangling_settings, .sheet-control__hide--engineering_settings, .sheet-control__hide--crossbow_settings, .sheet-control__hide--bow_settings, .sheet-control__hide--blackpowder_settings, .sheet-control__hide--two-handed_settings, .sheet-control__hide--polearm_settings, .sheet-control__hide--parry_settings, .sheet-control__hide--flail_settings, .sheet-control__hide--fencing_settings, .sheet-control__hide--cavalry_settings, .sheet-control__hide--brawling_settings, .sheet-control__hide--basic_settings, .sheet-control__hide--stealth_settings, .sheet-control__hide--row_settings, .sheet-control__hide--ride_settings, .sheet-control__hide--perception_settings, .sheet-control__hide--outdoor-survival_settings, .sheet-control__hide--navigation_settings, .sheet-control__hide--melee_settings, .sheet-control__hide--leadership_settings, .sheet-control__hide--intuition_settings, .sheet-control__hide--intimidate_settings, .sheet-control__hide--haggle_settings, .sheet-control__hide--gossip_settings, .sheet-control__hide--gamble_settings, .sheet-control__hide--entertain_settings, .sheet-control__hide--endurance_settings, .sheet-control__hide--drive_settings, .sheet-control__hide--dodge_settings, .sheet-control__hide--cool_settings, .sheet-control__hide--consume-alcohol_settings, .sheet-control__hide--climb_settings, .sheet-control__hide--charm-animal_settings, .sheet-control__hide--charm_settings, .sheet-control__hide--bribery_settings, .sheet-control__hide--athletics_settings, .sheet-control__hide--art_settings, .sheet-control__hide--trade_settings, .sheet-control__hide--track_settings, .sheet-control__hide--swim_settings, .sheet-control__hide--sleight-of-hand_settings, .sheet-control__hide--set-trap_settings, .sheet-control__hide--secret-signs_settings, .sheet-control__hide--sail_settings, .sheet-control__hide--research_settings, .sheet-control__hide--ranged_settings, .sheet-control__hide--pray_settings, .sheet-control__hide--play_settings, .sheet-control__hide--pick-lock_settings, .sheet-control__hide--perform_settings, .sheet-control__hide--lore_settings, .sheet-control__hide--language_settings, .sheet-control__hide--heal_settings, .sheet-control__hide--eva1uate_settings, .sheet-control__hide--channelling_settings, .sheet-control__hide--animal-training_settings, .sheet-control__hide--settings, .sheet-control__hide--animal-care_settings, .sheet-control__hide--fellowship, .sheet-control__hide--willpower, .sheet-control__hide--intelligence, .sheet-control__hide--dexterity, .sheet-control__hide--agility, .sheet-control__hide--initiative, .sheet-control__hide--toughness, .sheet-control__hide--strength, .sheet-control__hide--ballistic_skill, .sheet-control__hide--weapon_skill { display: none; } @@ -1266,7 +1351,7 @@ input[name*=characteristic][value=fellowship] ~ .sheet-control__hide--fellowship display: block; } -input[name*=npc_settings][value=on] + .sheet-wfrp-npcsettings__wrapper, input[name*=settings][value="1"] + div > .sheet-control__hide--npctrait_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--npcattack_settings, input[name*=type][value=Custom] ~ .sheet-control__hide--Custom, input[name*=type][value=Prayer] ~ .sheet-control__hide--Prayer, input[name*=type][value=Spell] ~ .sheet-control__hide--Spell, input[name=attr_talent_test_type][value=skill] ~ .sheet-control__hide--skill, input[name=attr_talent_test_type][value=characteristic] ~ .sheet-control__hide--characteristic, .sheet-wfrp-criticaltable__row input[name=attr_critical_toggle][value="1"] + .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-corruptiontable__row input[name=attr_corruption_toggle][value="1"] + .sheet-wfrp-corruptiontable__cell--description, .sheet-wfrp-psychologytable__row input[name=attr_psychology_toggle][value="1"] + .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-conditiontable__row input[name=attr_condition_toggle][value="1"] + .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-talenttable__row input[name=attr_talent_toggle][value="1"] + .sheet-wfrp-talenttable__cell--description, input[name*=settings][value="1"] + div > .sheet-control__hide--spell_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--weapon_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--armour_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--trappings_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--critical_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--corruption_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--psychology_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--condition_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--talent_settings, input[name*=control][value=on] + .sheet-control__hide--magick, input[name*=control][value=on] + .sheet-control__hide--ulgu, input[name*=control][value=on] + .sheet-control__hide--shyish, input[name*=control][value=on] + .sheet-control__hide--hysh, input[name*=control][value=on] + .sheet-control__hide--ghyran, input[name*=control][value=on] + .sheet-control__hide--ghur, input[name*=control][value=on] + .sheet-control__hide--dhar, input[name*=control][value=on] + .sheet-control__hide--chamon, input[name*=control][value=on] + .sheet-control__hide--aqshy, input[name*=control][value=on] + .sheet-control__hide--throwing, input[name*=control][value=on] + .sheet-control__hide--sling, input[name*=control][value=on] + .sheet-control__hide--explosives, input[name*=control][value=on] + .sheet-control__hide--entangling, input[name*=control][value=on] + .sheet-control__hide--engineering, input[name*=control][value=on] + .sheet-control__hide--crossbow, input[name*=control][value=on] + .sheet-control__hide--bow, input[name*=control][value=on] + .sheet-control__hide--blackpowder, input[name*=control][value=on] + .sheet-control__hide--two-handed, input[name*=control][value=on] + .sheet-control__hide--polearm, input[name*=control][value=on] + .sheet-control__hide--parry, input[name*=control][value=on] + .sheet-control__hide--flail, input[name*=control][value=on] + .sheet-control__hide--fencing, input[name*=control][value=on] + .sheet-control__hide--cavalry, input[name*=control][value=on] + .sheet-control__hide--brawling, input[name*=control][value=on] + .sheet-control__hide--basic, input[name*=settings][value="1"] ~ div > .sheet-control__hide--magick_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ulgu_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--shyish_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--hysh_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ghyran_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ghur_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--dhar_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--chamon_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--aqshy_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--throwing_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--sling_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--explosives_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--entangling_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--engineering_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--crossbow_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--bow_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--blackpowder_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--two-handed_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--polearm_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--parry_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--flail_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--fencing_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--cavalry_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--brawling_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--basic_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--stealth_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--row_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ride_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--perception_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--outdoor-survival_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--navigation_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--melee_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--leadership_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--intuition_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--intimidate_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--haggle_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--gossip_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--gamble_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--entertain_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--endurance_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--drive_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--dodge_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--cool_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--consume-alcohol_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--climb_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--charm-animal_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--charm_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--bribery_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--athletics_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--art_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--trade_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--track_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--swim_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--sleight-of-hand_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--set-trap_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--secret-signs_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--sail_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--research_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ranged_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--pray_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--play_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--pick-lock_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--perform_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--lore_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--language_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--heal_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--eva1uate_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--channelling_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--animal-training_settings, input[name*=settings][value="1"] ~ div > div[class*=settings], input[name*=settings][value="1"] ~ div > .sheet-control__hide--animal-care_settings { +input[name*=npc_settings][value=on] + .sheet-wfrp-npcsettings__wrapper, input[name*=settings][value="1"] + div > .sheet-control__hide--npctalent_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--npctrait_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--npcattack_settings, input[name*=type][value=Custom] ~ .sheet-control__hide--Custom, input[name*=type][value=Prayer] ~ .sheet-control__hide--Prayer, input[name*=type][value=Spell] ~ .sheet-control__hide--Spell, input[name=attr_talent_test_type][value=skill] ~ .sheet-control__hide--skill, input[name=attr_talent_test_type][value=characteristic] ~ .sheet-control__hide--characteristic, .sheet-wfrp-criticaltable__row input[name=attr_critical_toggle][value="1"] + .sheet-wfrp-criticaltable__cell--description, .sheet-wfrp-corruptiontable__row input[name=attr_corruption_toggle][value="1"] + .sheet-wfrp-corruptiontable__cell--description, .sheet-wfrp-psychologytable__row input[name=attr_psychology_toggle][value="1"] + .sheet-wfrp-psychologytable__cell--description, .sheet-wfrp-conditiontable__row input[name=attr_condition_toggle][value="1"] + .sheet-wfrp-conditiontable__cell--description, .sheet-wfrp-talenttable__row input[name=attr_talent_toggle][value="1"] + .sheet-wfrp-talenttable__cell--description, input[name*=settings][value="1"] + div > .sheet-control__hide--spell_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--weapon_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--armour_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--trappings_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--species_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--career_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--critical_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--corruption_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--psychology_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--condition_settings, input[name*=settings][value="1"] + div > .sheet-control__hide--talent_settings, input[name*=control][value=on] + .sheet-control__hide--magick, input[name*=control][value=on] + .sheet-control__hide--ulgu, input[name*=control][value=on] + .sheet-control__hide--shyish, input[name*=control][value=on] + .sheet-control__hide--hysh, input[name*=control][value=on] + .sheet-control__hide--ghyran, input[name*=control][value=on] + .sheet-control__hide--ghur, input[name*=control][value=on] + .sheet-control__hide--dhar, input[name*=control][value=on] + .sheet-control__hide--chamon, input[name*=control][value=on] + .sheet-control__hide--aqshy, input[name*=control][value=on] + .sheet-control__hide--throwing, input[name*=control][value=on] + .sheet-control__hide--sling, input[name*=control][value=on] + .sheet-control__hide--explosives, input[name*=control][value=on] + .sheet-control__hide--entangling, input[name*=control][value=on] + .sheet-control__hide--engineering, input[name*=control][value=on] + .sheet-control__hide--crossbow, input[name*=control][value=on] + .sheet-control__hide--bow, input[name*=control][value=on] + .sheet-control__hide--blackpowder, input[name*=control][value=on] + .sheet-control__hide--two-handed, input[name*=control][value=on] + .sheet-control__hide--polearm, input[name*=control][value=on] + .sheet-control__hide--parry, input[name*=control][value=on] + .sheet-control__hide--flail, input[name*=control][value=on] + .sheet-control__hide--fencing, input[name*=control][value=on] + .sheet-control__hide--cavalry, input[name*=control][value=on] + .sheet-control__hide--brawling, input[name*=control][value=on] + .sheet-control__hide--basic, input[name*=settings][value="1"] ~ div > .sheet-control__hide--magick_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ulgu_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--shyish_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--hysh_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ghyran_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ghur_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--dhar_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--chamon_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--aqshy_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--throwing_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--sling_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--explosives_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--entangling_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--engineering_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--crossbow_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--bow_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--blackpowder_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--two-handed_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--polearm_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--parry_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--flail_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--fencing_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--cavalry_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--brawling_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--basic_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--stealth_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--row_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ride_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--perception_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--outdoor-survival_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--navigation_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--melee_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--leadership_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--intuition_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--intimidate_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--haggle_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--gossip_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--gamble_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--entertain_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--endurance_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--drive_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--dodge_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--cool_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--consume-alcohol_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--climb_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--charm-animal_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--charm_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--bribery_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--athletics_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--art_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--trade_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--track_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--swim_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--sleight-of-hand_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--set-trap_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--secret-signs_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--sail_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--research_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--ranged_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--pray_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--play_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--pick-lock_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--perform_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--lore_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--language_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--heal_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--eva1uate_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--channelling_settings, input[name*=settings][value="1"] ~ div > .sheet-control__hide--animal-training_settings, input[name*=settings][value="1"] ~ div > div[class*=settings], input[name*=settings][value="1"] ~ div > .sheet-control__hide--animal-care_settings { display: grid; } @@ -1300,6 +1385,12 @@ input[name*=settings][value="1"] + div > .sheet-wfrp-corruptiontable__cell--desc input[name*=settings][value="1"] + div > .sheet-wfrp-criticaltable__cell--description { display: none !important; } +input[name*=settings][value="1"] + div > .sheet-wfrp-careertable__cell--description { + display: none !important; +} +input[name*=settings][value="1"] + div > .sheet-wfrp-speciestable__cell--description { + display: none !important; +} input[name*=settings][value="1"] + div > .sheet-wfrp-trappingstable__cell--description { display: none !important; @@ -1349,6 +1440,9 @@ input[name*=settings][value="1"] + div > .sheet-wfrp-npcattacktable__cell--descr input[name*=settings][value="1"] + div > .sheet-wfrp-npctraittable__cell--description { display: none !important; } +input[name*=settings][value="1"] + div > .sheet-wfrp-npctalenttable__cell--description { + display: none !important; +} .sheet-wfrp-npc__skills, .sheet-wfrp-npctrappings { @@ -1396,32 +1490,42 @@ input[name*=trapping_flag][value=on] + .sheet-wfrp-npctrappings { display: block; } +input[type=hidden][name*=species_disable3][value="1"] ~ * input[type=radio][value="3"]:not(:checked) { + pointer-events: none; + opacity: 0.5; +} + +input[type=hidden][name*=species_disable5][value="1"] ~ * input[type=radio][value="5"]:not(:checked) { + pointer-events: none; + opacity: 0.5; +} + .sheet-wfrp-wrapper .sheet-page__main, -.sheet-wfrp-wrapper .sheet-page__careers, +.sheet-wfrp-wrapper .sheet-page__advances, .sheet-wfrp-wrapper .sheet-page__combat, -.sheet-wfrp-wrapper .sheet-page__spells, +.sheet-wfrp-wrapper .sheet-page__magic, .sheet-wfrp-wrapper .sheet-page__settings { display: none; } .sheet-wfrp-wrapper .sheet-page__main--flex, .sheet-wfrp-wrapper .sheet-page__main--grid, -.sheet-wfrp-wrapper .sheet-page__careers--flex, -.sheet-wfrp-wrapper .sheet-page__careers--grid, +.sheet-wfrp-wrapper .sheet-page__advances--flex, +.sheet-wfrp-wrapper .sheet-page__advances--grid, .sheet-wfrp-wrapper .sheet-page__combat--flex, .sheet-wfrp-wrapper .sheet-page__combat--grid, -.sheet-wfrp-wrapper .sheet-page__spells--flex, -.sheet-wfrp-wrapper .sheet-page__spells--grid, +.sheet-wfrp-wrapper .sheet-page__magic--flex, +.sheet-wfrp-wrapper .sheet-page__magic--grid, .sheet-wfrp-wrapper .sheet-page__settings--flex, .sheet-wfrp-wrapper .sheet-page__settings--grid { display: none; } -input[type=hidden][name=attr_nav][value=main] ~ * .sheet-page__main, input[type=hidden][name=attr_nav][value=careers] ~ * .sheet-page__careers, input[type=hidden][name=attr_nav][value=combat] ~ * .sheet-page__combat, input[type=hidden][name=attr_nav][value=spells] ~ * .sheet-page__spells, input[type=hidden][name=attr_nav][value=settings] ~ * .sheet-page__settings { +input[type=hidden][name=attr_nav][value=main] ~ * .sheet-page__main, input[type=hidden][name=attr_nav][value=advances] ~ * .sheet-page__advances, input[type=hidden][name=attr_nav][value=combat] ~ * .sheet-page__combat, input[type=hidden][name=attr_nav][value=magic] ~ * .sheet-page__magic, input[type=hidden][name=attr_nav][value=settings] ~ * .sheet-page__settings { display: block; } -input[type=hidden][name=attr_nav][value=main] ~ * .sheet-page__main--flex, input[type=hidden][name=attr_nav][value=careers] ~ * .sheet-page__careers--flex, input[type=hidden][name=attr_nav][value=combat] ~ * .sheet-page__combat--flex, input[type=hidden][name=attr_nav][value=spells] ~ * .sheet-page__spells--flex, input[type=hidden][name=attr_nav][value=settings] ~ * .sheet-page__settings--flex { +input[type=hidden][name=attr_nav][value=main] ~ * .sheet-page__main--flex, input[type=hidden][name=attr_nav][value=advances] ~ * .sheet-page__advances--flex, input[type=hidden][name=attr_nav][value=combat] ~ * .sheet-page__combat--flex, input[type=hidden][name=attr_nav][value=magic] ~ * .sheet-page__magic--flex, input[type=hidden][name=attr_nav][value=settings] ~ * .sheet-page__settings--flex { display: flex; } -input[type=hidden][name=attr_nav][value=main] ~ * .sheet-page__main--grid, input[type=hidden][name=attr_nav][value=careers] ~ * .sheet-page__careers--grid, input[type=hidden][name=attr_nav][value=combat] ~ * .sheet-page__combat--grid, input[type=hidden][name=attr_nav][value=spells] ~ * .sheet-page__spells--grid, input[type=hidden][name=attr_nav][value=settings] ~ * .sheet-page__settings--grid { +input[type=hidden][name=attr_nav][value=main] ~ * .sheet-page__main--grid, input[type=hidden][name=attr_nav][value=advances] ~ * .sheet-page__advances--grid, input[type=hidden][name=attr_nav][value=combat] ~ * .sheet-page__combat--grid, input[type=hidden][name=attr_nav][value=magic] ~ * .sheet-page__magic--grid, input[type=hidden][name=attr_nav][value=settings] ~ * .sheet-page__settings--grid { display: grid; } @@ -1647,22 +1751,26 @@ input[type=hidden][name=attr_npc][value=on] ~ * .sheet-wfrp-npc, input[type=hidd background: rgba(44, 76, 87, 0.125); text-align: center; } -.sheet-wfrp-npctrait, .sheet-wfrp-npcattack { +.sheet-wfrp-npctalent, .sheet-wfrp-npctrait, .sheet-wfrp-npcattack { font-family: "Lusitana", serif; } +.sheet-wfrp-npctalent .repitem:first-child .sheet-wfrp-npctalent__row, +.sheet-wfrp-npctalent .repitem:first-child .sheet-wfrp-npctrait__row, +.sheet-wfrp-npctalent .repitem:first-child .sheet-wfrp-npcattack__row, .sheet-wfrp-npctrait .repitem:first-child .sheet-wfrp-npctalent__row, .sheet-wfrp-npctrait .repitem:first-child .sheet-wfrp-npctrait__row, -.sheet-wfrp-npctrait .repitem:first-child .sheet-wfrp-npcattack__row, .sheet-wfrp-npcattack .repitem:first-child .sheet-wfrp-npctrait__row, +.sheet-wfrp-npctrait .repitem:first-child .sheet-wfrp-npcattack__row, .sheet-wfrp-npcattack .repitem:first-child .sheet-wfrp-npctalent__row, +.sheet-wfrp-npcattack .repitem:first-child .sheet-wfrp-npctrait__row, .sheet-wfrp-npcattack .repitem:first-child .sheet-wfrp-npcattack__row { padding-top: 0; } -.sheet-wfrp-npctrait .repitem:nth-child(even), .sheet-wfrp-npcattack .repitem:nth-child(even) { +.sheet-wfrp-npctalent .repitem:nth-child(even), .sheet-wfrp-npctrait .repitem:nth-child(even), .sheet-wfrp-npcattack .repitem:nth-child(even) { background: rgba(36, 107, 131, 0.075); } -.sheet-wfrp-npctrait .repcontrol, .sheet-wfrp-npcattack .repcontrol { +.sheet-wfrp-npctalent .repcontrol, .sheet-wfrp-npctrait .repcontrol, .sheet-wfrp-npcattack .repcontrol { margin-top: 1rem; border: 0; } -.sheet-wfrp-npctrait__row, .sheet-wfrp-npcattack__row { +.sheet-wfrp-npctalent__row, .sheet-wfrp-npctrait__row, .sheet-wfrp-npcattack__row { display: flex; flex-wrap: wrap; align-items: center; @@ -1670,25 +1778,39 @@ input[type=hidden][name=attr_npc][value=on] ~ * .sheet-wfrp-npc, input[type=hidd padding-bottom: 1rem; border-bottom: 1px dashed black; } -.sheet-wfrp-npctrait__row .sheet-wfrp-settings, .sheet-wfrp-npctrait__row .sheet-wfrp-settings--large, .sheet-wfrp-npcattack__row .sheet-wfrp-settings, .sheet-wfrp-npcattack__row .sheet-wfrp-settings--large { +.sheet-wfrp-npctalent__row .sheet-wfrp-settings, .sheet-wfrp-npctalent__row .sheet-wfrp-settings--large, .sheet-wfrp-npctalent__row .sheet-wfrp-settings--noborder, .sheet-wfrp-npctrait__row .sheet-wfrp-settings, .sheet-wfrp-npctrait__row .sheet-wfrp-settings--large, .sheet-wfrp-npctrait__row .sheet-wfrp-settings--noborder, .sheet-wfrp-npcattack__row .sheet-wfrp-settings, .sheet-wfrp-npcattack__row .sheet-wfrp-settings--large, .sheet-wfrp-npcattack__row .sheet-wfrp-settings--noborder { width: 100%; } -.sheet-wfrp-npctrait__cell, .sheet-wfrp-npcattack__cell { +.sheet-wfrp-npctalent__cell, .sheet-wfrp-npctrait__cell, .sheet-wfrp-npcattack__cell { margin-right: 0.5rem; } -.sheet-wfrp-npctrait__cell--settingstoggle, .sheet-wfrp-npcattack__cell--settingstoggle { +.sheet-wfrp-npctalent__cell--settingstoggle, .sheet-wfrp-npctrait__cell--settingstoggle, .sheet-wfrp-npcattack__cell--settingstoggle { margin-right: 0.25rem; } -.sheet-wfrp-npctrait__cell--title, .sheet-wfrp-npcattack__cell--title { +.sheet-wfrp-npctalent__cell--title, .sheet-wfrp-npctrait__cell--title, .sheet-wfrp-npcattack__cell--title { width: 85%; font-family: "IM Fell DW Pica", serif; font-size: 1.65rem; font-weight: bold; } -.sheet-wfrp-npctrait__cell--description, .sheet-wfrp-npcattack__cell--description { +.sheet-wfrp-npctalent__cell--description, .sheet-wfrp-npctrait__cell--description, .sheet-wfrp-npcattack__cell--description { width: 100%; } -.sheet-wfrp-npctrait__label, .sheet-wfrp-npcattack__label { +.sheet-wfrp-npctalent__ranks, .sheet-wfrp-npctrait__ranks, .sheet-wfrp-npcattack__ranks { + display: inline-flex; + flex-direction: row; + margin-left: 0.35em; +} +.sheet-wfrp-npctalent__ranks:not(:empty):before, .sheet-wfrp-npctalent__ranks:not(:empty):after, .sheet-wfrp-npctrait__ranks:not(:empty):before, .sheet-wfrp-npctrait__ranks:not(:empty):after, .sheet-wfrp-npcattack__ranks:not(:empty):before, .sheet-wfrp-npcattack__ranks:not(:empty):after { + display: block; +} +.sheet-wfrp-npctalent__ranks:not(:empty):before, .sheet-wfrp-npctrait__ranks:not(:empty):before, .sheet-wfrp-npcattack__ranks:not(:empty):before { + content: "("; +} +.sheet-wfrp-npctalent__ranks:not(:empty):after, .sheet-wfrp-npctrait__ranks:not(:empty):after, .sheet-wfrp-npcattack__ranks:not(:empty):after { + content: ")"; +} +.sheet-wfrp-npctalent__label, .sheet-wfrp-npctrait__label, .sheet-wfrp-npcattack__label { margin-right: 0.33rem; font-family: "IM Fell DW Pica", serif; font-weight: bold; diff --git a/Warhammer Fantasy Roleplay 4e Official/wfrp4.html b/Warhammer Fantasy Roleplay 4e Official/wfrp4.html index 4cc486046f..1dbfa103cb 100644 --- a/Warhammer Fantasy Roleplay 4e Official/wfrp4.html +++ b/Warhammer Fantasy Roleplay 4e Official/wfrp4.html @@ -1,5 +1,5 @@ - + @@ -11,14 +11,14 @@ - - + + - +
@@ -107,21 +107,28 @@
- - - - - +
+ +
+
+ + + + + +
@@ -5169,7 +5176,7 @@
-
+

@@ -5178,7 +5185,7 @@
-
+

@@ -5193,635 +5200,6 @@
-
- -

-
-
-
-
-
-
-
- - -
-
- -
-
-
-
- -
-
-
-
- -
- -
-
-
- -
-

-
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
-
-
-
- - -
-

-
-
-
- -
-
-
- -
-
-
-
-
-
-
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
-
-
-
-
-
-
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
-
- -
-
-
-
-
-
- - -
-

-
-
-
- -
-
-
- -
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
-
-
- - -
-

-
-
-
- -
-
-
- -
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
-
-
- - -
-

-
-
-
- -
-
-
- -
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
-
-
- - -
-

-
-
-
- -
-
-
- -
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
-
-
-
-
-
-

-
- -
-
- -
-
- -
-
-
-

-
-
-
-
-
-
-
- -
-
- -
-
-
- -
-

@@ -6004,17 +5382,13 @@

-
-
- -
-
-
-
- -
-
+
+ +
+
+ +

@@ -6164,22 +5538,22 @@
@@ -6219,7 +5593,7 @@
-
+

@@ -6304,6 +5678,868 @@
+
+
+ +

+
+
+
+
+
+
+
+ + +
+
+ +
+
+
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+

+
+
+
+
+
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+ + +
+ +
+
+ +
+
+
+
+
+
+ + +
+

+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+ +
+
+
+
+
+
+ + +
+

+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+
+
+
+
+ + +
+

+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+
+
+
+
+ + +
+

+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+
+
+
+
+ + +
+

+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
+
+
+
+
+
+
+ +

+ +
+
+ +
+
+
+
+
+
+ + +
+ + +
+
+
+
+ + +
+
+
+3
+
+5
+
x
+
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
+
+

+
+ +
+
+ +
+
+ +
+
+
+

+
+
+
+
+
+
+
+ +
+
+ +
+
+
+ +

+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+

@@ -6378,6 +6614,13 @@
+
+
+ +
@@ -7259,6 +7502,45 @@
+
+

+
+ +
+
+ +
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+

@@ -8386,7 +8668,7 @@ // Global Variables const wfrp = { - sheet_version: "1.0.0", + sheet_version: "1.0.3", characteristics: [ "weapon_skill", @@ -8531,6 +8813,18 @@ recalculateEarnedXP(); calculateArmour(); + + getAttrs(["setting_init_option","setting_whisper","setting_bonus_option","setting_crit_option"], values => { + + toggleInitOption(values["setting_init_option"]); + + toggleWhisper(values["setting_whisper"]); + + toggleRollBonus(values["setting_bonus_option"]); + + toggleRollCrits(values["setting_crit_option"]); + + }) } const updateSheet = (version) => { @@ -8549,14 +8843,16 @@ const difficulty = (new_value === "1") ? `?{Difficulty|Average (+20), 20|Very Easy (+60), 60|Easy (+40), 40|Average (+20), 20|Challenging (0), 0|Difficult (-10), -10|Hard (-20), -20|Very Hard (-30), -30}` : 0; - setAttrs({difficulty_query:difficulty}); + setAttrs({ + difficulty_query:difficulty + }); } const toggleRollBonus = (new_value) => { let query = 0; let slbonus = ""; - if (new_value === 1) { + if (new_value === "1") { query = "?{Bonus|0}"; slbonus = "{{sl_bonus=?{SL Bonus|0}}}" } @@ -8579,7 +8875,10 @@ (new_value === "3") ? 1 : 5; - setAttrs({roll_cs:cs, roll_cf:cf}); + setAttrs({ + roll_cs:cs, + roll_cf:cf + }); } const toggleInitOption = (new_value) => { @@ -8591,6 +8890,13 @@ setAttrs({roll_init:init}); } + const toggleWhisper = (new_value) => { + const whisper = (new_value === "2") ? `/w gm` : + ``; + + setAttrs({roll_whisper:whisper}); + } + const parseModField = (new_value="", previous_value) => { const mods = new_value.toLowerCase().split(",").map(item=>item.trim()); const prev_mods = (previous_value) ? previous_value.toLowerCase().split(",").map(item=>item.trim()) : []; @@ -8719,46 +9025,121 @@ new_value = new_value.toLowerCase(); + const update = { + fate: 0, + resilience: 0, + movement: 0, + size: 0 + } + if (new_value === "human") { - setAttrs({ - fate: 2, - resilience: 1, - movement: 4, - size: "average" - }); + update["fate"] = 2; + update["resilience"] = 1; + update["movement"] = 4; + update["size"] = "average"; } if (new_value === "dwarf") { - setAttrs({ - fate: 0, - resilience: 2, - movement: 3, - size: "average" - }); + update["fate"] = 0; + update["resilience"] = 2; + update["movement"] = 3; + update["size"] = "average"; } if (new_value === "halfling") { - setAttrs({ - fate: 0, - resilience: 2, - movement: 3, - size: "average" - }); + update["fate"] = 0; + update["resilience"] = 2; + update["movement"] = 3; + update["size"] = "small"; } - if (new_value === "elf") { - setAttrs({ - fate: 0, - resilience: 0, - movement: 5, - size: "average" - }); + if (new_value === "wood elf") { + update["fate"] = 0; + update["resilience"] = 0; + update["movement"] = 4; + update["size"] = "average"; } if (new_value === "high elf") { - setAttrs({ - fate: 0, - resilience: 0, - movement: 5, - size: "average" - }); + update["fate"] = 0; + update["resilience"] = 0; + update["movement"] = 5; + update["size"] = "average"; } + + if (new_value !== "custom") { + + getCompendiumPage(`Species:${new_value}`, page => { + const skills = helperFunctions.parseJSON(page.data.Skills); + const talents = helperFunctions.parseJSON(page.data.Talents); + + const skills_fixed = skills.Fixed.split(",").map(item=>item.trim()) || []; + const talents_fixed = talents.Fixed.split(",").map(item=>item.trim()) || []; + + let talents_choices = []; + + let skill_index = 1; + let talent_index = 1; + + if (talents.Choices) talents.Choices.forEach(choice => talents_choices = [...talents_choices, ...choice]); + + for (let index = 1; index <= 12; index++) { + update[`species_skill_${index}_name`] = ""; + update[`species_skill_${index}_advances`] = "0"; + } + + for (let index = 1; index <= 10; index++) { + update[`species_talent_${index}_name`] = ""; + update[`species_talent_${index}_advances`] = "0"; + } + + for (const skill of skills_fixed) { + update[`species_skill_${skill_index}_name`] = skill; + update[`species_talent_${skill_index}_advances`] = "0"; + skill_index++; + } + + for (const talent of talents_fixed) { + update[`species_talent_${talent_index}_name`] = talent; + update[`species_talent_${talent_index}_advances`] = "1"; + talent_index++; + } + + for (const talent of talents_choices) { + update[`species_talent_${talent_index}_name`] = talent; + update[`species_talent_${talent_index}_advances`] = "0"; + talent_index++; + } + + setAttrs(update, {silent:true}, callback => calculateTalentAdvances()); + }); + + } else { + setAttrs(update); + } + } + + const checkSpeciesAdvances = () => { + const attrs = []; + + for (let i = 1; i <= 12; i++) { + attrs.push(`species_skill_${i}_advances`); + } + + getAttrs(attrs, values => { + let threes = 0; + let fives = 0; + + Object.values(values).forEach(value => { + if (value === "3") threes++; + if (value === "5") fives++; + }); + + const update = {}; + + update["species_disable3"] = (threes >= 3) ? 1 : 0; + update["species_disable5"] = (fives >= 3) ? 1 : 0; + + setAttrs(update); + + }); + } // Characteristic Functions @@ -9116,15 +9497,17 @@ const attrs = []; - wfrp.characteristics.forEach(characteristic => attrs.push(`${repeating_id}_career_${characteristic}_advances`)) + wfrp.characteristics.forEach(characteristic => attrs.push(`${repeating_id}_career_${characteristic}_advances`)); for (let i = 1; i <= 4; i++) { for (let j = 1; j <= 10; j++) { attrs.push(`${repeating_id}_career_skill_${i}_${j}_advances`); + attrs.push(`${repeating_id}_career_skill_${i}_${j}_init`); } for (let k = 1; k <= 5; k++) { attrs.push(`${repeating_id}_career_talent_${i}_${k}_advances`); + attrs.push(`${repeating_id}_career_talent_${i}_${j}_init`); } } @@ -9140,88 +9523,87 @@ let total_skills_advances = skills_values.reduce((a,b) => a+b); let total_talents_advances = talents_values.reduce((a,b) => a+b); - const xp = []; - - wfrp.characteristics.forEach(characteristic => xp.push(calculateCharacteristicXP(values[`${repeating_id}_career_${characteristic}_advances`]))); - - skills_values.forEach(skill => xp.push(calculateSkillXP(skill))); - - talents_values.forEach(talent => xp.push(calculateTalentXP(talent))); - - const total_xp = (xp.length > 0) ? xp.reduce((a,b) => a+b) : "" || ""; - const abs_total = total_skills_advances + total_talents_advances || ""; const updateAttrs = {}; updateAttrs[`${repeating_id}_career_advances`] = (abs_total > 0) ? abs_total : ""; - updateAttrs[`${repeating_id}_career_xp`] = total_xp; setAttrs(updateAttrs, recalculateSpentXP()); }); } - const calculateCharacteristicXP = (value) => { - - let int = parseInt(value); + const calculateCharacteristicXP = (value, free) => { + let int = parseInt(value) + parseInt(free); + let countdown = parseInt(free); let accumulator = 0; while (int > 0) { - accumulator += - (int <= 5) ? 25 : - (int <= 10) ? 30 : - (int <= 15) ? 40 : - (int <= 20) ? 50 : - (int <= 25) ? 70 : - (int <= 30) ? 90 : - (int <= 35) ? 120 : - (int <= 40) ? 150 : - (int <= 45) ? 190 : - (int <= 50) ? 230 : - (int <= 55) ? 280 : - (int <= 60) ? 330 : - (int <= 65) ? 390 : - (int <= 70) ? 450 : - 520; + if (int > countdown) { + accumulator += + (int <= 5) ? 25 : + (int <= 10) ? 30 : + (int <= 15) ? 40 : + (int <= 20) ? 50 : + (int <= 25) ? 70 : + (int <= 30) ? 90 : + (int <= 35) ? 120 : + (int <= 40) ? 150 : + (int <= 45) ? 190 : + (int <= 50) ? 230 : + (int <= 55) ? 280 : + (int <= 60) ? 330 : + (int <= 65) ? 390 : + (int <= 70) ? 450 : + 520; + } + int--; } return accumulator; } - const calculateSkillXP = (value) => { - let int = parseInt(value); + const calculateSkillXP = (value, free) => { + let int = parseInt(value) + parseInt(free); + let countdown = parseInt(free); let accumulator = 0; while (int > 0) { - accumulator += - (int <= 5) ? 10 : - (int <= 10) ? 15 : - (int <= 15) ? 20 : - (int <= 20) ? 30 : - (int <= 25) ? 40 : - (int <= 30) ? 60 : - (int <= 35) ? 80 : - (int <= 40) ? 110 : - (int <= 45) ? 140 : - (int <= 50) ? 180 : - (int <= 55) ? 220 : - (int <= 60) ? 270 : - (int <= 65) ? 320 : - (int <= 70) ? 380 : - 440; + if (int > countdown) { + accumulator += + (int <= 5) ? 10 : + (int <= 10) ? 15 : + (int <= 15) ? 20 : + (int <= 20) ? 30 : + (int <= 25) ? 40 : + (int <= 30) ? 60 : + (int <= 35) ? 80 : + (int <= 40) ? 110 : + (int <= 45) ? 140 : + (int <= 50) ? 180 : + (int <= 55) ? 220 : + (int <= 60) ? 270 : + (int <= 65) ? 320 : + (int <= 70) ? 380 : + 440; + } + int--; } return accumulator; } - const calculateTalentXP = (value) => { - let int = parseInt(value); + const calculateTalentXP = (value, free) => { + let int = parseInt(value) + parseInt(free); + let countdown = parseInt(free); let accumulator = 0; while (int > 0) { - accumulator += int * 100 + + if (int > countdown) accumulator += int * 100 + int--; } @@ -9229,21 +9611,158 @@ } const recalculateSpentXP = () => { - const attrs = []; - getSectionIDs("careers", id_array => { + helperFunctions.aggregateRepeatingIDs([`careers`, `experience`, `experiencespent`], ids => { - id_array.forEach(id => { - attrs.push(`repeating_careers_${id}_career_xp`); - }); + const attrs = []; + for (const id of ids.careers) { + + for (const characteristic of wfrp.characteristics) { + attrs.push(`repeating_careers_${id}_career_${characteristic}_advances`); + attrs.push(`repeating_careers_${id}_career_${characteristic}_init`); + } + + for (let i = 1; i <= 4; i++) { + for (let j = 1; j <= 10; j++) { + attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_name`); + attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_advances`); + attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_init`); + } + + for (let k = 1; k <= 5; k++) { + attrs.push(`repeating_careers_${id}_career_talent_${i}_${k}_name`); + attrs.push(`repeating_careers_${id}_career_talent_${i}_${k}_advances`); + attrs.push(`repeating_careers_${id}_career_talent_${i}_${k}_init`); + } + } + } + + for (let i = 1; i <= 10; i++) { + attrs.push(`species_talent_${i}_name`); + attrs.push(`species_talent_${i}_advances`); + } + + for (let i = 1; i <= 12; i++) { + attrs.push(`species_skill_${i}_name`); + attrs.push(`species_skill_${i}_advances`); + } + + for (const id of ids.experience) { + attrs.push(`repeating_experience_${id}_experience_amount`); + } + + console.log(ids.experiencespent) + + for (const id of ids.experiencespent) { + attrs.push(`repeating_experiencespent_${id}_experience_amount`); + + } + getAttrs(attrs, values => { - const int_values = Object.values(values).map(item => parseInt(item) || 0); - const total_xp = (int_values.length > 0) ? int_values.reduce((a,b) => a+b) : "" || ""; + const entries = Object.entries(values).filter(([key, value]) => value !== ""); + + const characteristic_advances = new Map(); + const characteristic_advances_free = new Map(); + + const skill_advances = new Map(); + const skill_advances_free = new Map(); + + const talent_advances = new Map(); + const talent_advances_free = new Map(); + + for (const id of ids.careers) { + + wfrp.characteristics.forEach(characteristic => { + const value = parseInt(values[`repeating_careers_${id}_career_${characteristic}_advances`]) || 0; + const current = characteristic_advances.get(characteristic) || 0; + const total = value + current; + + const value_free = parseInt(values[`repeating_careers_${id}_career_${characteristic}_init`]) || 0; + const current_free = characteristic_advances_free.get(characteristic) || 0; + const total_free = value_free + current_free; + + characteristic_advances.set(characteristic, total); + characteristic_advances_free.set(characteristic, total_free); + }); + + for (let i = 1; i <= 4; i++) { + for (let j = 1; j <= 10; j++) { + const skill = values[`repeating_careers_${id}_career_skill_${i}_${j}_name`]; + + const value = parseInt(values[`repeating_careers_${id}_career_skill_${i}_${j}_advances`]) || 0; + const current = skill_advances.get(skill) || 0; + const total = current + value; + + const value_free = parseInt(values[`repeating_careers_${id}_career_skill_${i}_${j}_init`]) || 0; + const current_free = skill_advances_free.get(skill) || 0; + const total_free = current_free + value_free; + + skill_advances.set(skill, total); + skill_advances_free.set(skill, total_free); + } + + for (let k = 1; k <= 5; k++) { + const talent = values[`repeating_careers_${id}_career_talent_${i}_${k}_name`]; + + const value = parseInt(values[`repeating_careers_${id}_career_talent_${i}_${k}_advances`]) || 0; + const current = talent_advances.get(talent) || 0; + const total = current + value; + + const value_free = parseInt(values[`repeating_careers_${id}_career_talent_${i}_${k}_init`]) || 0; + const current_free = talent_advances_free.get(talent) || 0; + const total_free = current_free + value_free; + + talent_advances.set(talent, total); + talent_advances_free.set(talent, total_free); + } + } + } + + for (let i = 1; i <= 12; i++) { + const skill = values[`species_skill_${i}_name`]; + + const value_free = parseInt(values[`species_skill_${i}_advances`]) || 0; + const current_free = skill_advances_free.get(skill) || 0; + const total_free = current_free + value_free; + + skill_advances_free.set(skill, total_free); + } + + for (let i = 1; i <= 10; i++) { + const talent = values[`species_talent_${i}_name`]; + + const value_free = parseInt(values[`species_talent_${i}_advances`]) || 0; + const current_free = talent_advances_free.get(talent) || 0; + const total_free = current_free + value_free; + } + + let xp = 0; + + characteristic_advances.forEach((value, key) => xp += calculateCharacteristicXP(value, characteristic_advances_free.get(key))); + skill_advances.forEach((value, key) => xp += calculateSkillXP(value, skill_advances_free.get(key))); + talent_advances.forEach((value, key) => xp += calculateTalentXP(value, talent_advances_free.get(key))); + + console.log(ids.experiencespent) + + for (const id of ids.experiencespent) { + const value = parseInt(values[`repeating_experiencespent_${id}_experience_amount`]); + + console.log(value) + + xp += value; + } + + const updateAttrs = {}; + + updateAttrs[`spent_xp`] = xp; + + setAttrs(updateAttrs, recalculateCurrentXP()); - setAttrs({spent_xp: total_xp}) }); + }); + } const recalculateEarnedXP = () => { @@ -9255,8 +9774,10 @@ attrs.push(`repeating_experience_${id}_experience_amount`); }); + attrs.push(`experience_mod`); + getAttrs(attrs, values => { - const int_values = Object.values(values).map(item => parseInt(item) || 0); + const int_values = Object.values(values).map(item => parseInt(item) || 0).filter(item => item > 0); const total_xp = int_values.reduce((a,b) => a+b, 0); setAttrs({total_xp: total_xp}, recalculateCurrentXP()); @@ -9301,7 +9822,8 @@ const attrs = []; id_array.forEach(id => { - attrs.push(`repeating_careers_${id}_career_${characteristic}_advances`); + attrs.push(`repeating_careers_${id}_career_${characteristic}_advances`); + attrs.push(`repeating_careers_${id}_career_${characteristic}_init`); }); attrs.push(`${characteristic}_noncareer`); @@ -9337,6 +9859,11 @@ attrs.push(`repeating_noncareer-skills_${id}_advance_name`) attrs.push(`repeating_noncareer-skills_${id}_advance_advances`) }); + + for (let i = 1; i <= 12; i++) { + attrs.push(`species_skill_${i}_name`); + attrs.push(`species_skill_${i}_advances`); + } getAttrs(attrs, values => { const skill_list = Object.entries(values); @@ -9358,7 +9885,6 @@ const updateAttrs = {}; skills.forEach((value, key) => { - let parsed_key = key.replace(/ /g,"-").toLowerCase(); if (wfrp.skills.includes(parsed_key)) { @@ -9445,10 +9971,15 @@ for (let j = 1; j <= 5; j++) { attrs.push(`repeating_careers_${id}_career_talent_${i}_${j}_name`); attrs.push(`repeating_careers_${id}_career_talent_${i}_${j}_advances`); - if (index === 1) attrs.push(`repeating_careers_${id}_career_skill_${i}_${j}_init`); + if (index === 0) attrs.push(`repeating_careers_${id}_career_talent_${i}_${j}_init`); } } }); + + for (let i = 1; i <= 10; i++) { + attrs.push(`species_talent_${i}_name`); + attrs.push(`species_talent_${i}_advances`); + } getAttrs(attrs, values => { const talent_list = Object.entries(values); @@ -9468,7 +9999,6 @@ }); talents.forEach((value, key) => { - if (value !== 0) { getSectionIDs("talent", id_array => { @@ -9486,29 +10016,33 @@ const key_array = Object.keys(values).filter(item => item !== ""); - if (value_array_test.includes(key.toLowerCase())) { - const index = value_array_test.indexOf(key.toLowerCase()); + let page_name = key.split("(")[0].trim() || key; + + if (value_array_test.includes(page_name.toLowerCase())) { + const index = value_array_test.indexOf(page_name.toLowerCase()); const array_key = key_array[index]; const new_key = `${array_key.substring(0, array_key.length-5)}_ranks`; updateAttrs[new_key] = value; } else if (value > 0) { - getCompendiumPage(key, page => { + getCompendiumPage(`Talents:${page_name}`, page => { + + if (page.expansion !== 0 && page.expansion) { + + wfrpDragAndDrop.handleDrop({drop_name:page.name, drop_content:page.content, drop_data:page.data}, key); - if (page.expansion !== 0) { - wfrpDragAndDrop.handleDrop({drop_name:page.name, drop_content:page.content, drop_data:page.data}); } else { const new_id = generateRowID(); updateAttrs[`repeating_talent_${new_id}_talent_name`] = key; updateAttrs[`repeating_talent_${new_id}_talent_ranks`] = value; + + setAttrs(updateAttrs); } }); } - - setAttrs(updateAttrs); }); }); @@ -9546,7 +10080,7 @@ getAttrs(attrs, values => { const spent = Object.values(values).filter(item => item !== "").map(item => parseInt(item)); - const total = spent.reduce((a,b) => a+b); + const total = spent.reduce((a,b) => a+b) || 0; const maximum_allowed = (source_type === "skill") ? 40 : 1; if (total > maximum_allowed) { @@ -9909,15 +10443,13 @@ .replace(/\)/g, "") .replace(/ /, "_") .toLowerCase(); - + const value = values[type_parsed]; const update = {}; update[`${repeating_id}_attack_target`] = value; - console.log(update) - setAttrs(update); } }); @@ -9974,6 +10506,34 @@ }) } + const updateNPCButtons = () => { + + const attrs = [ + "npc", + "dodge", + "endurance", + "intuition", + "perception", + "cool", + ...wfrp.characteristics + ]; + + getAttrs(attrs, values => { + if (values[`NPC`] === "0") return; + const update = {}; + + if (!values[`dodge`]) update[`dodge`] = values[`agility`]; + if (!values[`endurance`]) update[`endurance`] = values[`toughness`]; + if (!values[`intuition`]) update[`intuition`] = values[`initiative`]; + if (!values[`perception`]) update[`perception`] = values[`initiative`]; + if (!values[`cool`]) update[`cool`] = values[`willpower`]; + + setAttrs(update); + + }); + + } + // MODULE INTERFACE return { @@ -9986,10 +10546,12 @@ toggleRollBonus:toggleRollBonus, toggleRollCrits:toggleRollCrits, toggleInitOption:toggleInitOption, + toggleWhisper:toggleWhisper, parseModField:parseModField, // Class and Species Controls changeSpecies:changeSpecies, + checkSpeciesAdvances:checkSpeciesAdvances, // Characteristic Functions calculateCharacteristic: calculateCharacteristic, @@ -10014,6 +10576,7 @@ calculateTotalAdvances:calculateTotalAdvances, recalculateEarnedXP:recalculateEarnedXP, recalculateCurrentXP:recalculateCurrentXP, + recalculateSpentXP:recalculateSpentXP, calculateCharacteristicAdvances:calculateCharacteristicAdvances, calculateSkillAdvances:calculateSkillAdvances, calculateTalentAdvances:calculateTalentAdvances, @@ -10039,6 +10602,7 @@ // NPC Functions getAttackValue:getAttackValue, cascadeNPCAttacks:cascadeNPCAttacks, + updateNPCButtons:updateNPCButtons, }; })(); @@ -10055,6 +10619,7 @@ on(`change:setting_diff_option`, eventInfo => wfrpModule.toggleRollDifficulty(ev on(`change:setting_bonus_option`, eventInfo => wfrpModule.toggleRollBonus(eventInfo.newValue)); on(`change:setting_crit_option`, eventInfo => wfrpModule.toggleRollCrits(eventInfo.newValue)); on(`change:setting_init_option`, eventInfo => wfrpModule.toggleInitOption(eventInfo.newValue)); +on(`change:setting_whisper`, eventInfo => wfrpModule.toggleWhisper(eventInfo.newValue)); [ "repeating_talent:talent_mods", @@ -10076,6 +10641,10 @@ on(`clicked:remove_custom_species`, eventInfo => setAttrs({"species":""})); on(`change:species`, eventInfo => wfrpModule.changeSpecies(eventInfo.newValue)); +for (let index = 1; index <= 12; index++) { + on(`change:species_skill_${index}_advances`, eventInfo => wfrpModule.checkSpeciesAdvances()); +} + // CHARACTERISTIC CALCULATIONS wfrpModule.wfrp.characteristics.forEach(characteristic => { @@ -10139,12 +10708,14 @@ on(`change:repeating_careers:career_level_current`, eventInfo => wfrpModule.upda // EXPERIENCE CHANGES -on(`change:repeating_experience`, eventInfo => wfrpModule.recalculateEarnedXP()); +on(`change:repeating_experience change:repeating_experiencespent change:experience_mod remove:repeating_experiencespent remove:repeating_experience`, eventInfo => wfrpModule.recalculateEarnedXP()); -on(`change:current_xp change:spent_xp change:total_xp`, eventInfo => wfrpModule.recalculateCurrentXP()); +on(`change:current_xp change:spent_xp change:total_xp remove:repeating_experience`, eventInfo => wfrpModule.recalculateCurrentXP()); + +on(`change:repeating_experience change:repeating_experiencespent change:experience_mod remove:repeating_experiencespent remove:repeating_experience`, eventInfo => wfrpModule.recalculateSpentXP()); wfrpModule.wfrp.characteristics.forEach(characteristic => { - on(`change:repeating_careers:career_${characteristic}_advances`, eventInfo => wfrpModule.calculateCharacteristicAdvances(characteristic)) + on(`change:repeating_careers:career_${characteristic}_advances change:repeating_careers:career_${characteristic}_init`, eventInfo => wfrpModule.calculateCharacteristicAdvances(characteristic)) }); [1,2,3,4].forEach(level => { @@ -10163,8 +10734,24 @@ wfrpModule.wfrp.characteristics.forEach(characteristic => { }); }); +for (let index = 1; index <= 12; index++) { + on(`clicked:remove_skill_${index}`, eventInfo => setAttrs({[`species_skill_${index}_advances`]:"0"})); + + on(`change:species_skill_${index}_advances`, eventInfo => wfrpModule.calculateSkillAdvances()); +} + +for (let index = 1; index <= 10; index++) { + on(`change:species_talent_${index}_advances`, eventInfo => wfrpModule.calculateTalentAdvances()) +}; + on(`clicked:combinexp`, eventInfo => wfrpModule.consolidateXP()); +on(`clicked:advance`, eventInfo => wfrpModule.advanceXP()); + +on(`clicked:career_incomplete`, eventInfo => wfrpModule.incompleteCareerXP()); + +on(`clicked:career_complete`, eventInfo => wfrpModule.completeCareerXP()); + on(`change:repeating_noncareer-skills delete:repeating_noncareer-skills`, eventInfo => wfrpModule.calculateSkillAdvances()); on(`change:repeating_careers`, eventInfo => wfrpModule.calculateInitColumns(eventInfo.sourceAttribute, eventInfo.newValue)); @@ -10187,7 +10774,7 @@ on(`change:strength_bonus change:toughness_bonus change:encumbrance_bonus change on(`change:strength_bonus change:toughness_bonus change:willpower_bonus change:wound_mod change:size`, eventInfo => wfrpModule.calculateMaxWounds()); -on(`change:strength_bonus change:toughness_bonus change:encumbrance_bonus`, eventInfo => wfrpModule.calculateMaxEncumbrance()); +on(`change:strength_bonus change:toughness_bonus change:encumbrance_mod`, eventInfo => wfrpModule.calculateMaxEncumbrance()); on(`clicked:increment_advantage`, eventInfo => wfrpModule.incrementAdvantage()); @@ -10205,26 +10792,34 @@ on(`change:repeating_attacks:attack_name change:repeating_attacks:attack_type`, on(`change:weapon_skill change:ballistic_skill`, eventInfo => wfrpModule.cascadeNPCAttacks()); +wfrpModule.wfrp.characteristics.forEach(characteristic => { + on(`change:${characteristic} change:${characteristic}_bonus`, eventInfo => wfrpModule.updateNPCButtons()) +}); + +on(`change:npc sheet:opened`, eventInfo => wfrpModule.updateNPCButtons()); + //# sourceURL=sheetworkers.js const wfrpDragAndDrop = ( () => { - const handleDrop = (values, overwrite = false) => { + const handleDrop = (values, name) => { const {drop_name, drop_content, drop_data} = values; + const page_name = (name) ? name : drop_name; + if (drop_name === ""|| typeof drop_data === "") return; let parsed_data = helperFunctions.parseJSON(drop_data); - if (parsed_data.Category === "Careers") handleCareer(drop_name, parsed_data); - else if (parsed_data.Category === "Blessings" || parsed_data.Category === "Spells" || parsed_data.Category === "Miracles" ) handleSpell(drop_name, parsed_data, drop_content); - else if (parsed_data.Category === "Items") handleItem(drop_name, parsed_data); - else if (parsed_data.Category === "Monsters") handleMonster(drop_name, parsed_data, drop_content); - else if (parsed_data.Category === "Talents") handleTalent(drop_name, parsed_data); - else if (parsed_data.Category === "Conditions") handleCondition(drop_name, parsed_data); - else if (parsed_data.Category === "Creature Traits") handleCreatureTrait(drop_name, parsed_data); + if (parsed_data.Category === "Careers") handleCareer(dpage_name, parsed_data); + else if (parsed_data.Category === "Blessings" || parsed_data.Category === "Spells" || parsed_data.Category === "Miracles" ) handleSpell(page_name, parsed_data, drop_content); + else if (parsed_data.Category === "Items") handleItem(page_name, parsed_data); + else if (parsed_data.Category === "Monsters") handleMonster(page_name, parsed_data, drop_content); + else if (parsed_data.Category === "Talents") handleTalent(page_name, parsed_data); + else if (parsed_data.Category === "Conditions") handleCondition(page_name, parsed_data); + else if (parsed_data.Category === "Creature Traits") handleCreatureTrait(page_name, parsed_data); else console.warn(`${parsed_data.Category} drop is not supported by the sheet`); setAttrs({drop_name: "", drop_content: "", drop_data: ""}); @@ -10386,8 +10981,11 @@ const wfrpDragAndDrop = ( () => { for (const characteristic in characteristics) { updateAttrs[characteristic.replace(/ /g,"_")] = characteristics[characteristic]; + updateAttrs[`${characteristic.replace(/ /g,"_")}_bonus`] = Math.floor(characteristics[characteristic]/10); } + console.log(updateAttrs); + const trait_map = new Map(); for (const trait of traits) { @@ -10699,6 +11297,8 @@ const wfrpDragAndDrop = ( () => { } getAttrs(token_values, settings => { + + console.log(settings) const default_attr = { width: 70, @@ -10713,6 +11313,8 @@ const wfrpDragAndDrop = ( () => { getAttrs(attrs, values => { + console.log(values) + for (const item in settings) { if (settings[item] !== "") { default_attr[item] = settings[item];