From ce971f6252b194c2aa4c03c7c62661b77e398913 Mon Sep 17 00:00:00 2001 From: arvoituksellinen <132077647+arvoituksellinen@users.noreply.github.com> Date: Fri, 28 Apr 2023 17:26:02 +0300 Subject: [PATCH] Updated pf1 mapping. Fixes due to breaking changes in Foundry vtt version 10 data model --- mappings/pf1.mapping | 588 +++++++++++++++++++++---------------------- 1 file changed, 286 insertions(+), 302 deletions(-) diff --git a/mappings/pf1.mapping b/mappings/pf1.mapping index 5631fe5..ce73f6a 100644 --- a/mappings/pf1.mapping +++ b/mappings/pf1.mapping @@ -1,304 +1,288 @@ -[ - /* Page #1 */ - { "pdf": "Player", "foundry": Object.entries(@permission).filter(entry => entry[1] === 3).map(entry => entry[0]).map(id => !game.users.get(id)?.isGM ? game.users.get(id)?.name : null).filter(x => x).join(", ") }, -{ "pdf": "Character Name", "foundry": @name }, -{ "pdf": "Alignment", "foundry": @data.details.alignment }, -{ "pdf": "Class", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.name)[0] }, -{ "pdf": "Level", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.level)[0] }, -{ "pdf": "Class1", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.name)[1] || "" }, -{ "pdf": "Level1", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.level)[1] || "" }, -{ "pdf": "Deity", "foundry": @data.details.deity }, -{ "pdf": "Race", "foundry": @items.filter(i => i.data.type === "race").map(i => i.data.name)[0] }, -{ "pdf": "Size", "foundry": @data.traits.size }, -{ "pdf": "Gender", "foundry": @data.details.gender }, -{ "pdf": "Age", "foundry": @data.details.age }, -{ "pdf": "Height", "foundry": @data.details.height }, -{ "pdf": "Weight", "foundry": @data.details.weight }, -{ "pdf": "Total Hp", "foundry": @data.attributes.hp.max }, -{ "pdf": "Damage Reduction", "foundry": @data.traits.dr }, -{ "pdf": "Base Speed", "foundry": @data.attributes.speed.land.base }, -{ "pdf": "With Armor", "foundry": @data.attributes.speed.land.total }, -{ "pdf": "Fly", "foundry": @data.attributes.speed.fly.base }, -{ "pdf": "Maneuverability", "foundry": @data.attributes.speed.fly.maneuverability }, -{ "pdf": "Swim", "foundry": @data.attributes.speed.swim.base }, -{ "pdf": "Climb", "foundry": @data.attributes.speed.climb.base }, -{ "pdf": "Burrow", "foundry": @data.attributes.speed.burrow.base }, -{ "pdf": "Ability Score Strength", "foundry": @data.abilities.str.total }, -{ "pdf": "Ability Score Dexterity", "foundry": @data.abilities.dex.total }, -{ "pdf": "Ability Score Constitution", "foundry": @data.abilities.con.total }, -{ "pdf": "Ability Score Intelligence", "foundry": @data.abilities.int.total }, -{ "pdf": "Ability Score Wisdom", "foundry": @data.abilities.wis.total }, -{ "pdf": "Ability Score Charisma", "foundry": @data.abilities.cha.total }, -{ "pdf": "Ability Modifier Strength", "foundry": @data.abilities.str.mod }, -{ "pdf": "Ability Modifier Dexterity", "foundry": @data.abilities.dex.mod }, -{ "pdf": "Ability Modifier Constitution", "foundry": @data.abilities.con.mod }, -{ "pdf": "Ability Modifier Intelligence", "foundry": @data.abilities.int.mod }, -{ "pdf": "Ability Modifier Wisdom", "foundry": @data.abilities.wis.mod }, -{ "pdf": "Ability Modifier Charisma", "foundry": @data.abilities.cha.mod }, -{ "pdf": "Total Initiative Modifier", "foundry": @data.attributes.init.total }, -{ "pdf": "Dex Modifier ini", "foundry": @data.abilities.dex.mod }, -{ "pdf": "Initiative Misc Modifier", "foundry": @data.attributes.init.bonus }, -{ "pdf": "Total Armor Class", "foundry": @data.attributes.ac.normal.total }, -{ "pdf": "Armor Bonus", "foundry": @data.armor.ac }, -{ "pdf": "Shield Bonus", "foundry": @data.shield.total }, -{ "pdf": "Dex Modifier1", "foundry": @data.abilities.dex.mod }, -{ "pdf": "Size Modifier1", "foundry": @data.traits.size }, -{ "pdf": "Natural Armor", "foundry": @data.attributes.naturalAC }, -{ "pdf": "AC Misc Modifier", "foundry": Math.floor(@data.attributes.ac.normal.total - @data.armor.ac - @data.shield.total - @data.abilities.dex.mod - @data.attributes.naturalAC - 10) }, -{ "pdf": "Touch Armor Class", "foundry": @data.attributes.ac.touch.total }, -{ "pdf": "Flat-Footed Armor Class", "foundry": @data.attributes.ac.flatFooted.total }, -{ "pdf": "Total Fortitude Save", "foundry": @data.attributes.savingThrows.fort.total }, -{ "pdf": "Base Save Fortitude", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.fort.value)[0] }, -{ "pdf": "Con Modifier S", "foundry": @data.abilities.con.mod }, -{ "pdf": "Total Reflex Save", "foundry": @data.attributes.savingThrows.ref.total }, -{ "pdf": "Base Save Reflex", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.ref.value)[0] }, -{ "pdf": "Dex Modifier S", "foundry": @data.abilities.dex.mod }, -{ "pdf": "Total Will save", "foundry": @data.attributes.savingThrows.will.total }, -{ "pdf": "Base Save Will", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.will.value)[0] }, -{ "pdf": "Wis Modifier S", "foundry": @data.abilities.wis.mod }, -{ "pdf": "Magic Modifier Fortitude", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.fort.value)[1] || "" }, -{ "pdf": "Magic Modifier Reflex", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.ref.value)[1] || "" }, -{ "pdf": "Magic Modifier Will", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.will.value)[1] || "" }, -{ "pdf": "Saving Throw Modifiers", "foundry": @data.attributes.saveNotes }, -{ "pdf": "Weapon Name Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.name || "" }, -{ "pdf": "Weapon Name Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.name || "" }, -{ "pdf": "Weapon Name Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.name || "" }, -{ "pdf": "Weapon Name Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.name || "" }, -{ "pdf": "Weapon Name Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.name || "" }, -{ "pdf": "Type Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data.data.weaponSubtype || "" }, -{ "pdf": "Type Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data.data.weaponSubtype || "" }, -{ "pdf": "Type Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data.data.weaponSubtype || "" }, -{ "pdf": "Type Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data.data.weaponSubtype || "" }, -{ "pdf": "Type Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data.data.weaponSubtype || "" }, -{ "pdf": "Attack Bonus Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data.data.weaponSubtype || "" }, -{ "pdf": "Attack Bonus Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data.data.weaponSubtype || "" }, -{ "pdf": "Attack Bonus Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data.data.weaponSubtype || "" }, -{ "pdf": "Attack Bonus Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data.data.weaponSubtype || "" }, -{ "pdf": "Attack Bonus Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data.data.weaponSubtype || "" }, -{ "pdf": "Critical Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data.data.ability.critRange || "" }, -{ "pdf": "Critical Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data.data.ability.critRange || "" }, -{ "pdf": "Critical Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data.data.ability.critRange || "" }, -{ "pdf": "Critical Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data.data.ability.critRange || "" }, -{ "pdf": "Critical Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data.data.ability.critRange || "" }, -{ "pdf": "Multi Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data.data.ability.critMult || "" }, -{ "pdf": "Multi Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data.data.ability.critMult || "" }, -{ "pdf": "Multi Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data.data.ability.critMult || "" }, -{ "pdf": "Multi Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data.data.ability.critMult || "" }, -{ "pdf": "Multi Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data.data.ability.critMult || "" }, -{ "pdf": "Total CMB", "foundry": @data.attributes.cmb.total }, -{ "pdf": "Total CMD", "foundry": @data.attributes.cmd.total }, -{ "pdf": "Base Attack Bonus_a", "foundry": @data.attributes.bab.total }, -{ "pdf": "Spell Resistance", "foundry": @data.attributes.sr.total }, -{ "pdf": "Base Attack Bonus1", "foundry": @data.attributes.bab.total }, -{ "pdf": "Base Attack Bonus2", "foundry": @data.attributes.bab.total }, -{ "pdf": "Str Modifiercmb", "foundry": @data.abilities.str.mod }, -{ "pdf": "Str Modifiercmd", "foundry": @data.abilities.str.mod }, -{ "pdf": "Dex Modifiercmd", "foundry": @data.abilities.dex.mod }, -{ "pdf": "Size Modifiercmb", "foundry": @data.traits.size }, -{ "pdf": "Size Modifiercmd", "foundry": @data.traits.size }, +[ + /* Page #1 */ + { "pdf": "Player", "foundry": Object.entries(@permission).filter(entry => entry[1] === 3).map(entry => entry[0]).map(id => !game.users.get(id)?.isGM ? game.users.get(id)?.name : null).filter(x => x).join(", ") }, + { "pdf": "Character Name", "foundry": @name }, + { "pdf": "Alignment", "foundry": @data.details.alignment }, + { "pdf": "Class", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.name)[0] }, + { "pdf": "Level", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.level)[0] }, + { "pdf": "Class1", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.name)[1] || "" }, + { "pdf": "Level1", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.level)[1] || "" }, + { "pdf": "Deity", "foundry": @data.details.deity }, + { "pdf": "Race", "foundry": @items.filter(i => i.data.type === "race").map(i => i.data.name)[0] }, + { "pdf": "Size", "foundry": @data.traits.size }, + { "pdf": "Gender", "foundry": @data.details.gender }, + { "pdf": "Age", "foundry": @data.details.age }, + { "pdf": "Height", "foundry": @data.details.height }, + { "pdf": "Weight", "foundry": @data.details.weight }, + { "pdf": "Total Hp", "foundry": @data.attributes.hp.max }, + { "pdf": "Damage Reduction", "foundry": @data.traits.dr }, + { "pdf": "Base Speed", "foundry": @data.attributes.speed.land.base }, + { "pdf": "With Armor", "foundry": @data.attributes.speed.land.total }, + { "pdf": "Fly", "foundry": @data.attributes.speed.fly.base }, + { "pdf": "Maneuverability", "foundry": @data.attributes.speed.fly.maneuverability }, + { "pdf": "Swim", "foundry": @data.attributes.speed.swim.base }, + { "pdf": "Climb", "foundry": @data.attributes.speed.climb.base }, + { "pdf": "Burrow", "foundry": @data.attributes.speed.burrow.base }, + { "pdf": "Ability Score Strength", "foundry": @data.abilities.str.total }, + { "pdf": "Ability Score Dexterity", "foundry": @data.abilities.dex.total }, + { "pdf": "Ability Score Constitution", "foundry": @data.abilities.con.total }, + { "pdf": "Ability Score Intelligence", "foundry": @data.abilities.int.total }, + { "pdf": "Ability Score Wisdom", "foundry": @data.abilities.wis.total }, + { "pdf": "Ability Score Charisma", "foundry": @data.abilities.cha.total }, + { "pdf": "Ability Modifier Strength", "foundry": @data.abilities.str.mod }, + { "pdf": "Ability Modifier Dexterity", "foundry": @data.abilities.dex.mod }, + { "pdf": "Ability Modifier Constitution", "foundry": @data.abilities.con.mod }, + { "pdf": "Ability Modifier Intelligence", "foundry": @data.abilities.int.mod }, + { "pdf": "Ability Modifier Wisdom", "foundry": @data.abilities.wis.mod }, + { "pdf": "Ability Modifier Charisma", "foundry": @data.abilities.cha.mod }, + { "pdf": "Total Initiative Modifier", "foundry": @data.attributes.init.total }, + { "pdf": "Dex Modifier ini", "foundry": @data.abilities.dex.mod }, + { "pdf": "Initiative Misc Modifier", "foundry": @data.attributes.init.bonus }, + { "pdf": "Total Armor Class", "foundry": @data.attributes.ac.normal.total }, + { "pdf": "Armor Bonus", "foundry": @data.ac.normal.total }, + { "pdf": "Shield Bonus", "foundry": @data.ac.shield.total }, + { "pdf": "Dex Modifier1", "foundry": @data.abilities.dex.mod }, + { "pdf": "Size Modifier1", "foundry": @data.traits.size }, + { "pdf": "Natural Armor", "foundry": @data.ac.natural.total }, + { "pdf": "AC Misc Modifier", "foundry": Math.floor(@data.attributes.ac.normal.total - @data.ac.normal.total - @data.ac.shield.total - @data.abilities.dex.mod - @data.ac.natural.total - 10) }, + { "pdf": "Touch Armor Class", "foundry": @data.attributes.ac.touch.total }, + { "pdf": "Flat-Footed Armor Class", "foundry": @data.attributes.ac.flatFooted.total }, + { "pdf": "Total Fortitude Save", "foundry": @data.attributes.savingThrows.fort.total }, + { "pdf": "Base Save Fortitude", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.fort.value)[0] }, + { "pdf": "Con Modifier S", "foundry": @data.abilities.con.mod }, + { "pdf": "Total Reflex Save", "foundry": @data.attributes.savingThrows.ref.total }, + { "pdf": "Base Save Reflex", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.ref.value)[0] }, + { "pdf": "Dex Modifier S", "foundry": @data.abilities.dex.mod }, + { "pdf": "Total Will save", "foundry": @data.attributes.savingThrows.will.total }, + { "pdf": "Base Save Will", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.will.value)[0] }, + { "pdf": "Wis Modifier S", "foundry": @data.abilities.wis.mod }, + { "pdf": "Magic Modifier Fortitude", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.fort.value)[1] || "" }, + { "pdf": "Magic Modifier Reflex", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.ref.value)[1] || "" }, + { "pdf": "Magic Modifier Will", "foundry": @items.filter(i => i.data.type === "class").map(i => i.data.data.savingThrows.will.value)[1] || "" }, + { "pdf": "Saving Throw Modifiers", "foundry": @data.attributes.saveNotes }, + { "pdf": "Weapon Name Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.name || "" }, + { "pdf": "Weapon Name Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.name || "" }, + { "pdf": "Weapon Name Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.name || "" }, + { "pdf": "Weapon Name Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.name || "" }, + { "pdf": "Weapon Name Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.name || "" }, + { "pdf": "Type Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data.data.weaponSubtype || "" }, + { "pdf": "Type Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data.data.weaponSubtype || "" }, + { "pdf": "Type Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data.data.weaponSubtype || "" }, + { "pdf": "Type Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data.data.weaponSubtype || "" }, + { "pdf": "Type Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data.data.weaponSubtype || "" }, + { "pdf": "Attack Bonus slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.attackArray.sort().join("/") || "" }, + { "pdf": "Attack Bonus slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.attackArray.sort().join("/") || "" }, + { "pdf": "Attack Bonus slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.attackArray.sort().join("/") || "" }, + { "pdf": "Attack Bonus slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.attackArray.sort().join("/") || "" }, + { "pdf": "Attack Bonus slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.attackArray.sort().join("/") || "" }, + { "pdf": "Damage Slot 1", "foundry": (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage).length > 0) ? (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData.actions[0].damage.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData.actions[0]?.ability?.damage === "str") ? "+"+(@data.abilities.str.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData.actions[0]?.ability?.damage === "dex") ? "+"+(@data.abilities.dex.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData.actions[0]?.ability?.damage === "") ? ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData?.enh)) : "") : "")) : "" }, + { "pdf": "Damage Slot 2", "foundry": (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage).length > 1) ? (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData.actions[0].damage.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData.actions[0]?.ability?.damage === "str") ? "+"+(@data.abilities.str.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData.actions[0]?.ability?.damage === "dex") ? "+"+(@data.abilities.dex.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData.actions[0]?.ability?.damage === "") ? ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData?.enh)) : "") : "")) : "" }, + { "pdf": "Damage Slot 3", "foundry": (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage).length > 2) ? (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData.actions[0].damage.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData.actions[0]?.ability?.damage === "str") ? "+"+(@data.abilities.str.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData.actions[0]?.ability?.damage === "dex") ? "+"+(@data.abilities.dex.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData.actions[0]?.ability?.damage === "") ? ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData?.enh)) : "") : "")) : "" }, + { "pdf": "Damage Slot 4", "foundry": (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage).length > 3) ? (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData.actions[0].damage.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData.actions[0]?.ability?.damage === "str") ? "+"+(@data.abilities.str.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData.actions[0]?.ability?.damage === "dex") ? "+"+(@data.abilities.dex.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData.actions[0]?.ability?.damage === "") ? ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData?.enh)) : "") : "")) : "" }, + { "pdf": "Damage Slot 5", "foundry": (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage).length > 4) ? (@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData.actions[0].damage.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData.actions[0]?.ability?.damage === "str") ? "+"+(@data.abilities.str.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData.actions[0]?.ability?.damage === "dex") ? "+"+(@data.abilities.dex.mod*@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData.actions[0]?.ability?.damageMult + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData?.enh)) : "")) : "") + ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData.actions[0]?.ability?.damage === "") ? ((@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.system?.enh !== null) ? ("+"+(@items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData?.enh)) : "") : "")) : "" }, + { "pdf": "DT Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?._rollData.actions[0].damage.parts[0][1]?.values[0] || "" }, + { "pdf": "DT Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?._rollData.actions[0].damage.parts[0][1]?.values[0] || "" }, + { "pdf": "DT Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?._rollData.actions[0].damage.parts[0][1]?.values[0] || "" }, + { "pdf": "DT Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?._rollData.actions[0].damage.parts[0][1]?.values[0] || "" }, + { "pdf": "DT Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?._rollData.actions[0].damage.parts[0][1]?.values[0] || "" }, + { "pdf": "Critical Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data.data.actions[0].ability.critRange || "" }, + { "pdf": "Critical Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data.data.actions[0].ability.critRange || "" }, + { "pdf": "Critical Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data.data.actions[0].ability.critRange || "" }, + { "pdf": "Critical Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data.data.actions[0].ability.critRange || "" }, + { "pdf": "Critical Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data.data.actions[0].ability.critRange || "" }, + { "pdf": "Multi Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data.data.actions[0].ability.critMult || "" }, + { "pdf": "Multi Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data.data.actions[0].ability.critMult || "" }, + { "pdf": "Multi Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data.data.actions[0].ability.critMult || "" }, + { "pdf": "Multi Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data.data.actions[0].ability.critMult || "" }, + { "pdf": "Multi Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data.data.actions[0].ability.critMult || "" }, + { "pdf": "Total CMB", "foundry": @data.attributes.cmb.total }, + { "pdf": "Total CMD", "foundry": @data.attributes.cmd.total }, + { "pdf": "Base Attack Bonus_a", "foundry": @data.attributes.bab.total }, + { "pdf": "Spell Resistance", "foundry": @data.attributes.sr.total }, + { "pdf": "Base Attack Bonus1", "foundry": @data.attributes.bab.total }, + { "pdf": "Base Attack Bonus2", "foundry": @data.attributes.bab.total }, + { "pdf": "Str Modifiercmb", "foundry": @data.abilities.str.mod }, + { "pdf": "Str Modifiercmd", "foundry": @data.abilities.str.mod }, + { "pdf": "Dex Modifiercmd", "foundry": @data.abilities.dex.mod }, + { "pdf": "Size Modifiercmb", "foundry": @data.traits.size }, + { "pdf": "Size Modifiercmd", "foundry": @data.traits.size }, -/* Page #2 */ -{ "pdf": "Item 1", "foundry": @items.filter(i => ["loot", "weapon", "container", "consumable", "equipment"].includes(i.type)).map(i => `${i.name} (${i.data.data.quantity})`).sort().join(",\n") }, -{ "pdf": "Spell Name Level 0", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 0).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 1", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 1).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 2", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 2).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 3", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 3).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 4", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 4).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 5", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 5).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 6", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 6).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 7", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 7).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 8", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 8).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Spell Name Level 9", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 9).map(i => `@{i.name}`).sort().join(" // ") }, -{ "pdf": "Copper", "foundry": @data.currency.cp || "" }, -{ "pdf": "Silver", "foundry": @data.currency.sp || "" }, -{ "pdf": "Gold", "foundry": @data.currency.gp || "" }, -{ "pdf": "Platinum", "foundry": @data.currency.pp || "" }, -{ "pdf": "Total WT", "foundry": @data.attributes.encumbrance.carriedWeight }, -{ "pdf": "Light Load", "foundry": @data.attributes.encumbrance.levels.light }, -{ "pdf": "Medium Load", "foundry": @data.attributes.encumbrance.levels.medium }, -{ "pdf": "Heavy Load", "foundry": @data.attributes.encumbrance.levels.heavy }, -{ "pdf": "Lift Over Head", "foundry": @data.attributes.encumbrance.levels.heavy }, -{ "pdf": "Lift Off Ground", "foundry": @data.attributes.encumbrance.levels.carry }, -{ "pdf": "Drag or Push", "foundry": @data.attributes.encumbrance.levels.drag }, -{ "pdf": "Feat 1", "foundry": @items.filter(i => i.type === "feat" && i.subType === "feat").map(i => i.name).sort().join("\n") }, -{ "pdf": "Special Abilities 1", "foundry": @items.filter(i => i.type === "feat" && i.subType === "classFeat").map(i => i.name).sort().join("\n") }, -{ "pdf": "Special Abilities 2", "foundry": @items.filter(i => i.type === "feat" && i.subType === "trait").map(i => i.name).sort().join("\n") }, -{ "pdf": "First Class Experience Points", "foundry": @data.details.xp.value }, -{ "pdf": "First Class Next Level", "foundry": @data.details.xp.max }, -{ "pdf": "First Class Experience Points1", "foundry": @data.details.xp.pct }, -{ "pdf": "Spells Per Day Level 0", "foundry": @data.spells.primary.spells.spell0.value }, -{ "pdf": "Spells Per Day Level 1", "foundry": @data.spells.primary.spells.spell1.value }, -{ "pdf": "Spells Per Day Level 2", "foundry": @data.spells.primary.spells.spell2.value }, -{ "pdf": "Spells Per Day Level 3", "foundry": @data.spells.primary.spells.spell3.value }, -{ "pdf": "Spells Per Day Level 4", "foundry": @data.spells.primary.spells.spell4.value }, -{ "pdf": "Spells Per Day Level 5", "foundry": @data.spells.primary.spells.spell5.value }, -{ "pdf": "Spells Per Day Level 6", "foundry": @data.spells.primary.spells.spell6.value }, -{ "pdf": "Spells Per Day Level 7", "foundry": @data.spells.primary.spells.spell7.value }, -{ "pdf": "Spells Per Day Level 8", "foundry": @data.spells.primary.spells.spell8.value }, -{ "pdf": "Spells Per Day Level 9", "foundry": @data.spells.primary.spells.spell9.value }, -{ "pdf": "Close", "foundry": @data.spells.primary.range.close }, -{ "pdf": "Medium", "foundry": @data.spells.primary.range.medium }, -{ "pdf": "Long", "foundry": @data.spells.primary.range.long }, -{ "pdf": "AC Items Slot 1", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "armor").map(i => i.name).sort().join(",\n") }, -{ "pdf": "AC Items Slot 2", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "shield").map(i => i.name).sort().join(",\n") }, -{ "pdf": "Bonus 1", "foundry": @data.armor.total }, -{ "pdf": "Bonus 2", "foundry": @data.shield.total }, -{ "pdf": "Type 1", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "armor").map(i => i.data.data.equipmentSubtype).sort().join(",\n") }, -{ "pdf": "Type 2", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "shield").map(i => i.data.data.equipmentSubtype).sort().join(",\n") }, -{ "pdf": "Check Penalty 1", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "armor").map(i => i.data.data.armor.acp).sort().join(",\n") }, -{ "pdf": "Check Penalty 2", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "shield").map(i => i.data.data.armor.acp).sort().join(",\n") }, -{ "pdf": "Spell Failure 1", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "armor").map(i => i.data.data.spellFailure).sort().join(",\n") }, -{ "pdf": "Spell Failure 2", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "shield").map(i => i.data.data.spellFailure).sort().join(",\n") }, -{ "pdf": "Acrobatics", "foundry": @data.skills.acr.cs }, -{ "pdf": "Appraise Check", "foundry": @data.skills.apr.cs }, -{ "pdf": "Bluff Check", "foundry": @data.skills.blf.cs }, -{ "pdf": "Climb check", "foundry": @data.skills.clm.cs }, - -{ "pdf": "Diplomacy Check", "foundry": @data.skills.dip.cs }, -{ "pdf": "Disable Device Check", "foundry": @data.skills.dev.cs }, -{ "pdf": "Disguise Check", "foundry": @data.skills.dis.cs }, -{ "pdf": "Escape Artist Check", "foundry": @data.skills.esc.cs }, -{ "pdf": "Fly Check", "foundry": @data.skills.fly.cs }, -{ "pdf": "Handle Animal Check", "foundry": @data.skills.han.cs }, - -{ "pdf": "Heal Check", "foundry": @data.skills.hea.cs }, -{ "pdf": "Intimidate Check", "foundry": @data.skills.int.cs }, -{ "pdf": "Knowledge (Arcana) Check", "foundry": @data.skills.kar.cs }, -{ "pdf": "Knowledge (Dungeoneering) Check", "foundry": @data.skills.kdu.cs }, -{ "pdf": "Knowledge (Engineering) Check", "foundry": @data.skills.ken.cs }, -{ "pdf": "Knowledge (Geography) Check", "foundry": @data.skills.kge.cs }, -{ "pdf": "Knowledge (History) Check", "foundry": @data.skills.khi.cs }, -{ "pdf": "Knowledge (Local) Check", "foundry": @data.skills.klo.cs }, -{ "pdf": "Knowledge (Nature) Check", "foundry": @data.skills.kna.cs }, -{ "pdf": "Knowledge (Nobility) Check", "foundry": @data.skills.kno.cs }, -{ "pdf": "Knowledge (Planes) Check", "foundry": @data.skills.kpl.cs }, -{ "pdf": "Knowledge (Religion) Check", "foundry": @data.skills.kre.cs }, -{ "pdf": "Linguistics Check", "foundry": @data.skills.lin.cs }, -{ "pdf": "Perception Check", "foundry": @data.skills.per.cs }, - -{ "pdf": "Ride Check", "foundry": @data.skills.rid.cs }, -{ "pdf": "Sense Motive Check", "foundry": @data.skills.sen.cs }, -{ "pdf": "Sleight Of Hand Check", "foundry": @data.skills.slt.cs }, -{ "pdf": "SpellCraft Check", "foundry": @data.skills.spl.cs }, -{ "pdf": "Stealth Check", "foundry": @data.skills.ste.cs }, -{ "pdf": "Survival", "foundry": @data.skills.sur.cs }, -{ "pdf": "Swim Check", "foundry": @data.skills.swm.cs }, -{ "pdf": "Use Magic Device Check", "foundry": @data.skills.umd.cs }, - -{ "pdf": "Ranks 1", "foundry": @data.skills.acr.rank }, -{ "pdf": "Ranks 2", "foundry": @data.skills.apr.rank }, -{ "pdf": "Ranks 3", "foundry": @data.skills.blf.rank }, -{ "pdf": "Ranks 4", "foundry": @data.skills.clm.rank }, - -{ "pdf": "Ranks 8", "foundry": @data.skills.dip.rank }, -{ "pdf": "Ranks 9", "foundry": @data.skills.dev.rank }, -{ "pdf": "Ranks 10", "foundry": @data.skills.dis.rank }, -{ "pdf": "Ranks 11", "foundry": @data.skills.esc.rank }, -{ "pdf": "Ranks 12", "foundry": @data.skills.fly.rank }, -{ "pdf": "Ranks 13", "foundry": @data.skills.han.rank }, - -{ "pdf": "Ranks 14", "foundry": @data.skills.hea.rank }, -{ "pdf": "Ranks 15", "foundry": @data.skills.int.rank }, -{ "pdf": "Ranks 16", "foundry": @data.skills.kar.rank }, -{ "pdf": "Ranks 17", "foundry": @data.skills.kdu.rank }, -{ "pdf": "Ranks 18", "foundry": @data.skills.ken.rank }, -{ "pdf": "Ranks 19", "foundry": @data.skills.kge.rank }, -{ "pdf": "Ranks 20", "foundry": @data.skills.khi.rank }, -{ "pdf": "Ranks 21", "foundry": @data.skills.klo.rank }, -{ "pdf": "Ranks 22", "foundry": @data.skills.kna.rank }, -{ "pdf": "Ranks 23", "foundry": @data.skills.kno.rank }, -{ "pdf": "Ranks 24", "foundry": @data.skills.kpl.rank }, -{ "pdf": "Ranks 25", "foundry": @data.skills.kre.rank }, -{ "pdf": "Ranks 26", "foundry": @data.skills.lin.rank }, -{ "pdf": "Ranks 27", "foundry": @data.skills.per.rank }, - -{ "pdf": "Ranks 32", "foundry": @data.skills.rid.rank }, -{ "pdf": "Ranks 33", "foundry": @data.skills.sen.rank }, -{ "pdf": "Ranks 34", "foundry": @data.skills.slt.rank }, -{ "pdf": "Ranks 35", "foundry": @data.skills.spl.rank }, -{ "pdf": "Ranks 36", "foundry": @data.skills.ste.rank }, -{ "pdf": "Ranks 37", "foundry": @data.skills.sur.rank }, -{ "pdf": "Ranks 38", "foundry": @data.skills.swm.rank }, -{ "pdf": "Ranks 39", "foundry": @data.skills.umd.rank }, -{ "pdf": "Total Bonus 1", "foundry": @data.skills.acr.mod }, -{ "pdf": "Total Bonus 2", "foundry": @data.skills.apr.mod }, -{ "pdf": "Total Bonus 3", "foundry": @data.skills.blf.mod }, -{ "pdf": "Total Bonus 4", "foundry": @data.skills.clm.mod }, - -{ "pdf": "Total Bonus 8", "foundry": @data.skills.dip.mod }, -{ "pdf": "Total Bonus 9", "foundry": @data.skills.dev.mod }, -{ "pdf": "Total Bonus 10", "foundry": @data.skills.dis.mod }, -{ "pdf": "Total Bonus 11", "foundry": @data.skills.esc.mod }, -{ "pdf": "Total Bonus 12", "foundry": @data.skills.fly.mod }, -{ "pdf": "Total Bonus 13", "foundry": @data.skills.han.mod }, - -{ "pdf": "Total Bonus 14", "foundry": @data.skills.hea.mod }, -{ "pdf": "Total Bonus 15", "foundry": @data.skills.int.mod }, -{ "pdf": "Total Bonus 16", "foundry": @data.skills.kar.mod }, -{ "pdf": "Total Bonus 17", "foundry": @data.skills.kdu.mod }, -{ "pdf": "Total Bonus 18", "foundry": @data.skills.ken.mod }, -{ "pdf": "Total Bonus 19", "foundry": @data.skills.kge.mod }, -{ "pdf": "Total Bonus 20", "foundry": @data.skills.khi.mod }, -{ "pdf": "Total Bonus 21", "foundry": @data.skills.klo.mod }, -{ "pdf": "Total Bonus 22", "foundry": @data.skills.kna.mod }, -{ "pdf": "Total Bonus 23", "foundry": @data.skills.kno.mod }, -{ "pdf": "Total Bonus 24", "foundry": @data.skills.kpl.mod }, -{ "pdf": "Total Bonus 25", "foundry": @data.skills.kre.mod }, -{ "pdf": "Total Bonus 26", "foundry": @data.skills.lin.mod }, -{ "pdf": "Total Bonus 27", "foundry": @data.skills.per.mod }, - -{ "pdf": "Total Bonus 32", "foundry": @data.skills.rid.mod }, -{ "pdf": "Total Bonus 33", "foundry": @data.skills.sen.mod }, -{ "pdf": "Total Bonus 34", "foundry": @data.skills.slt.mod }, -{ "pdf": "Total Bonus 35", "foundry": @data.skills.spl.mod }, -{ "pdf": "Total Bonus 36", "foundry": @data.skills.ste.mod }, -{ "pdf": "Total Bonus 37", "foundry": @data.skills.sur.mod }, -{ "pdf": "Total Bonus 38", "foundry": @data.skills.swm.mod }, -{ "pdf": "Total Bonus 39", "foundry": @data.skills.umd.mod }, - -{ "pdf": "Profession 1 Check", "foundry": @data.skills.pro.subSkills.pro1?.cs }, -{ "pdf": "Profession 1", "foundry": @data.skills.pro.subSkills.pro1?.name || "" }, -{ "pdf": "Total Bonus 30", "foundry": (@data.skills.pro.subSkills.pro1?.name) ?@data.skills.pro.subSkills.pro1.mod : "" }, -{ "pdf": "Ranks 30", "foundry": (@data.skills.pro.subSkills.pro1?.name) ?@data.skills.pro.subSkills.pro1.rank : "" }, -{ "pdf": "Profession 2 Check", "foundry": @data.skills.pro.subSkills.pro2?.cs || "" }, -{ "pdf": "Profession 2", "foundry": @data.skills.pro.subSkills.pro2?.name || "" }, -{ "pdf": "Total Bonus 31", "foundry": (@data.skills.pro.subSkills.pro2?.name) ?@data.skills.pro.subSkills.pro2.mod : "" }, -{ "pdf": "Ranks 31", "foundry": (@data.skills.prf.subSkills.pro2?.name) ?@data.skills.prf.subSkills.pro2.rank : "" }, -{ "pdf": "Perform 1 check", "foundry": @data.skills.prf.subSkills.prf1?.cs }, -{ "pdf": "Perform 1", "foundry": @data.skills.prf.subSkills.prf1?.name || "" }, -{ "pdf": "Total Bonus 28", "foundry": (@data.skills.prf.subSkills.prf1?.name) ?@data.skills.prf.subSkills.prf1.mod : "" }, -{ "pdf": "Ranks 28", "foundry": (@data.skills.prf.subSkills.prf1?.name) ?@data.skills.prf.subSkills.prf1.rank : "" }, -{ "pdf": "Perform 2 check", "foundry": @data.skills.prf.subSkills.prf2?.cs || "" }, -{ "pdf": "Perform 2", "foundry": @data.skills.prf.subSkills.prf2?.name || "" }, -{ "pdf": "Total Bonus 29", "foundry": (@data.skills.prf.subSkills.prf2?.name) ?@data.skills.prf.subSkills.prf2.mod : "" }, -{ "pdf": "Ranks 29", "foundry": (@data.skills.prf.subSkills.prf2?.name) ?@data.skills.prf.subSkills.prf2.rank : "" }, - -{ "pdf": "Craft Check 1", "foundry": @data.skills.crf.subSkills.crf1?.cs || "" }, -{ "pdf": "Craft 1", "foundry": @data.skills.crf.subSkills.crf1?.name || "" }, -{ "pdf": "Total Bonus 5", "foundry": (@data.skills.crf.subSkills.crf1?.name) ?@data.skills.crf.subSkills.crf1.mod : "" }, -{ "pdf": "Ranks 5", "foundry": (@data.skills.crf.subSkills.crf1?.name) ?@data.skills.crf.subSkills.crf1.rank : "" }, - -{ "pdf": "Craft Check 2", "foundry": @data.skills.crf.subSkills.crf2?.cs || "" }, -{ "pdf": "Craft 2", "foundry": @data.skills.crf.subSkills.crf2?.name || "" }, -{ "pdf": "Total Bonus 6", "foundry": (@data.skills.crf.subSkills.crf2?.name) ?@data.skills.crf.subSkills.crf2.mod : "" }, -{ "pdf": "Ranks 6", "foundry": (@data.skills.crf.subSkills.crf2?.name) ?@data.skills.crf.subSkills.crf2.rank : "" }, - -{ "pdf": "Craft Check 3", "foundry": @data.skills.crf.subSkills.crf3?.cs || "" }, -{ "pdf": "Craft 3", "foundry": @data.skills.crf.subSkills.crf3?.name || "" }, -{ "pdf": "Total Bonus 7", "foundry": (@data.skills.crf.subSkills.crf3?.name) ?@data.skills.crf.subSkills.crf3.mod : "" }, -{ "pdf": "Ranks 7", "foundry": (@data.skills.crf.subSkills.crf3?.name) ?@data.skills.crf.subSkills.crf3.rank : "" }, - -{ "pdf": "Languages Line 1", "foundry": [actor.data.data.traits.languages.value.filter(String).map(l => l.capitalize()).sort().join(", "), actor.data.data.traits.languages.custom,].filter(String).join(", ") }, -{ "pdf": "Conditional Modifiers Line 1", "foundry": [actor.data.data.traits.weaponProf.total.filter(String).map(l => l.capitalize()).join(", "), actor.data.data.traits.weaponProf.custom, actor.data.data.traits.armorProf.total.filter(String).map(l => l.capitalize()).join(", "), actor.data.data.traits.armorProf.custom,].filter(String).join(", ") }, - -{ "pdf": "Damage Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data?.data?.damage?.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") || "" }, -{ "pdf": "DT Slot 1", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[0]?.data?.data?.damage?.parts[0][1] || "" }, -{ "pdf": "Damage Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data?.data?.damage?.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") || "" }, -{ "pdf": "DT Slot 2", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[1]?.data?.data?.damage?.parts[0][1] || "" }, -{ "pdf": "Damage Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data?.data?.damage?.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") || "" }, -{ "pdf": "DT Slot 3", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[2]?.data?.data?.damage?.parts[0][1] || "" }, -{ "pdf": "Damage Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data?.data?.damage?.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") || "" }, -{ "pdf": "DT Slot 4", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[3]?.data?.data?.damage?.parts[0][1] || "" }, -{ "pdf": "Damage Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data?.data?.damage?.parts[0][0]?.replace(/sizeRoll\((?[0-9]*), ?(?[0-9]*), ?\u0040size\)/, "$d$") || "" }, -{ "pdf": "DT Slot 5", "foundry": @items.filter(i => i.type === "weapon" && i.data.data.equipped && i.hasAttack && i.hasDamage)[4]?.data?.data?.damage?.parts[0][1] || "" }, + /* Page #2 */ + { "pdf": "Item 1", "foundry": @items.filter(i => ["loot", "weapon", "container", "consumable", "equipment"].includes(i.type)).map(i => `${i.name} (${i.data.data.quantity})`).sort().join(",\n") }, + { "pdf": "Spell Name Level 0", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 0)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 1", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 1)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 2", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 2)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 3", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 3)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 4", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 4)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 5", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 5)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 6", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 6)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 7", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 7)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 8", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 8)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Spell Name Level 9", "foundry": @items.filter(i => ["spell"].includes(i.type) && i.data.data.level === 9)?.map(i => i.name).sort().join(" // ") }, + { "pdf": "Copper", "foundry": @data.currency.cp || "" }, + { "pdf": "Silver", "foundry": @data.currency.sp || "" }, + { "pdf": "Gold", "foundry": @data.currency.gp || "" }, + { "pdf": "Platinum", "foundry": @data.currency.pp || "" }, + { "pdf": "Total WT", "foundry": @data.attributes.encumbrance.carriedWeight }, + { "pdf": "Light Load", "foundry": @data.attributes.encumbrance.levels.light }, + { "pdf": "Medium Load", "foundry": @data.attributes.encumbrance.levels.medium }, + { "pdf": "Heavy Load", "foundry": @data.attributes.encumbrance.levels.heavy }, + { "pdf": "Lift Over Head", "foundry": @data.attributes.encumbrance.levels.heavy }, + { "pdf": "Lift Off Ground", "foundry": @data.attributes.encumbrance.levels.carry }, + { "pdf": "Drag or Push", "foundry": @data.attributes.encumbrance.levels.drag }, + { "pdf": "Feat 1", "foundry": @items.filter(i => i.type === "feat" && i.subType === "feat").map(i => i.name).sort().join("\n") }, + { "pdf": "Special Abilities 1", "foundry": @items.filter(i => i.type === "feat" && i.subType === "classFeat").map(i => i.name).sort().join("\n") }, + { "pdf": "Special Abilities 2", "foundry": @items.filter(i => i.type === "feat" && i.subType === "trait").map(i => i.name).sort().join("\n") }, + { "pdf": "First Class Experience Points", "foundry": @data.details.xp.value }, + { "pdf": "First Class Next Level", "foundry": @data.details.xp.max }, + { "pdf": "First Class Experience Points1", "foundry": @data.details.xp.pct }, + { "pdf": "Spells Per Day Level 0", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell0?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell0?.base || "" }, + { "pdf": "Spells Per Day Level 1", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell1?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell1?.base || "" }, + { "pdf": "Spells Per Day Level 2", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell2?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell2?.base || "" }, + { "pdf": "Spells Per Day Level 3", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell3?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell3?.base || "" }, + { "pdf": "Spells Per Day Level 4", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell4?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell4?.base || "" }, + { "pdf": "Spells Per Day Level 5", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell5?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell5?.base || "" }, + { "pdf": "Spells Per Day Level 6", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell6?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell6?.base || "" }, + { "pdf": "Spells Per Day Level 7", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell7?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell7?.base || "" }, + { "pdf": "Spells Per Day Level 8", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell8?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell8?.base || "" }, + { "pdf": "Spells Per Day Level 9", "foundry": @system.attributes.spells.spellbooks.primary.spells.spell9?.max || @system.attributes.spells.spellbooks.spelllike.spells.spell9?.base || "" }, + { "pdf": "Close", "foundry": @system.attributes.spells.spellbooks.primary?.range?.close || @system.attributes.spells.spellbooks.spelllike?.range?.close || "" }, + { "pdf": "Medium", "foundry": @system.attributes.spells.spellbooks.primary?.range?.medium || @system.attributes.spells.spellbooks.spelllike?.range?.medium || "" }, + { "pdf": "Long", "foundry": @system.attributes.spells.spellbooks.primary?.range?.long || @system.attributes.spells.spellbooks.spelllike?.range?.long || "" }, + { "pdf": "AC Items Slot 1", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "armor").map(i => i.name).sort().join(",\n") }, + { "pdf": "AC Items Slot 2", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "shield").map(i => i.name).sort().join(",\n") }, + { "pdf": "Bonus 1", "foundry": @data.ac.normal.total }, + { "pdf": "Bonus 2", "foundry": @data.ac.shield.total }, + { "pdf": "Type 1", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "armor").map(i => i.data.data.equipmentSubtype).sort().join(",\n") }, + { "pdf": "Type 2", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "shield").map(i => i.data.data.equipmentSubtype).sort().join(",\n") }, + { "pdf": "Check Penalty 1", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "armor").map(i => i.data.data.armor.acp).sort().join(",\n") }, + { "pdf": "Check Penalty 2", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "shield").map(i => i.data.data.armor.acp).sort().join(",\n") }, + { "pdf": "Spell Failure 1", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "armor").map(i => i.data.data.spellFailure).sort().join(",\n") }, + { "pdf": "Spell Failure 2", "foundry": @items.filter(i => i.type === "equipment" && i.subType === "shield").map(i => i.data.data.spellFailure).sort().join(",\n") }, + { "pdf": "Acrobatics", "foundry": @data.skills.acr.cs }, + { "pdf": "Appraise Check", "foundry": @data.skills.apr.cs }, + { "pdf": "Bluff Check", "foundry": @data.skills.blf.cs }, + { "pdf": "Climb check", "foundry": @data.skills.clm.cs }, + { "pdf": "Diplomacy Check", "foundry": @data.skills.dip.cs }, + { "pdf": "Disable Device Check", "foundry": @data.skills.dev.cs }, + { "pdf": "Disguise Check", "foundry": @data.skills.dis.cs }, + { "pdf": "Escape Artist Check", "foundry": @data.skills.esc.cs }, + { "pdf": "Fly Check", "foundry": @data.skills.fly.cs }, + { "pdf": "Handle Animal Check", "foundry": @data.skills.han.cs }, + { "pdf": "Heal Check", "foundry": @data.skills.hea.cs }, + { "pdf": "Intimidate Check", "foundry": @data.skills.int.cs }, + { "pdf": "Knowledge (Arcana) Check", "foundry": @data.skills.kar.cs }, + { "pdf": "Knowledge (Dungeoneering) Check", "foundry": @data.skills.kdu.cs }, + { "pdf": "Knowledge (Engineering) Check", "foundry": @data.skills.ken.cs }, + { "pdf": "Knowledge (Geography) Check", "foundry": @data.skills.kge.cs }, + { "pdf": "Knowledge (History) Check", "foundry": @data.skills.khi.cs }, + { "pdf": "Knowledge (Local) Check", "foundry": @data.skills.klo.cs }, + { "pdf": "Knowledge (Nature) Check", "foundry": @data.skills.kna.cs }, + { "pdf": "Knowledge (Nobility) Check", "foundry": @data.skills.kno.cs }, + { "pdf": "Knowledge (Planes) Check", "foundry": @data.skills.kpl.cs }, + { "pdf": "Knowledge (Religion) Check", "foundry": @data.skills.kre.cs }, + { "pdf": "Linguistics Check", "foundry": @data.skills.lin.cs }, + { "pdf": "Perception Check", "foundry": @data.skills.per.cs }, + { "pdf": "Ride Check", "foundry": @data.skills.rid.cs }, + { "pdf": "Sense Motive Check", "foundry": @data.skills.sen.cs }, + { "pdf": "Sleight Of Hand Check", "foundry": @data.skills.slt.cs }, + { "pdf": "SpellCraft Check", "foundry": @data.skills.spl.cs }, + { "pdf": "Stealth Check", "foundry": @data.skills.ste.cs }, + { "pdf": "Survival", "foundry": @data.skills.sur.cs }, + { "pdf": "Swim Check", "foundry": @data.skills.swm.cs }, + { "pdf": "Use Magic Device Check", "foundry": @data.skills.umd.cs }, + { "pdf": "Ranks 1", "foundry": @data.skills.acr.rank }, + { "pdf": "Ranks 2", "foundry": @data.skills.apr.rank }, + { "pdf": "Ranks 3", "foundry": @data.skills.blf.rank }, + { "pdf": "Ranks 4", "foundry": @data.skills.clm.rank }, + { "pdf": "Ranks 8", "foundry": @data.skills.dip.rank }, + { "pdf": "Ranks 9", "foundry": @data.skills.dev.rank }, + { "pdf": "Ranks 10", "foundry": @data.skills.dis.rank }, + { "pdf": "Ranks 11", "foundry": @data.skills.esc.rank }, + { "pdf": "Ranks 12", "foundry": @data.skills.fly.rank }, + { "pdf": "Ranks 13", "foundry": @data.skills.han.rank }, + { "pdf": "Ranks 14", "foundry": @data.skills.hea.rank }, + { "pdf": "Ranks 15", "foundry": @data.skills.int.rank }, + { "pdf": "Ranks 16", "foundry": @data.skills.kar.rank }, + { "pdf": "Ranks 17", "foundry": @data.skills.kdu.rank }, + { "pdf": "Ranks 18", "foundry": @data.skills.ken.rank }, + { "pdf": "Ranks 19", "foundry": @data.skills.kge.rank }, + { "pdf": "Ranks 20", "foundry": @data.skills.khi.rank }, + { "pdf": "Ranks 21", "foundry": @data.skills.klo.rank }, + { "pdf": "Ranks 22", "foundry": @data.skills.kna.rank }, + { "pdf": "Ranks 23", "foundry": @data.skills.kno.rank }, + { "pdf": "Ranks 24", "foundry": @data.skills.kpl.rank }, + { "pdf": "Ranks 25", "foundry": @data.skills.kre.rank }, + { "pdf": "Ranks 26", "foundry": @data.skills.lin.rank }, + { "pdf": "Ranks 27", "foundry": @data.skills.per.rank }, + { "pdf": "Ranks 32", "foundry": @data.skills.rid.rank }, + { "pdf": "Ranks 33", "foundry": @data.skills.sen.rank }, + { "pdf": "Ranks 34", "foundry": @data.skills.slt.rank }, + { "pdf": "Ranks 35", "foundry": @data.skills.spl.rank }, + { "pdf": "Ranks 36", "foundry": @data.skills.ste.rank }, + { "pdf": "Ranks 37", "foundry": @data.skills.sur.rank }, + { "pdf": "Ranks 38", "foundry": @data.skills.swm.rank }, + { "pdf": "Ranks 39", "foundry": @data.skills.umd.rank }, + { "pdf": "Total Bonus 1", "foundry": @data.skills.acr.mod }, + { "pdf": "Total Bonus 2", "foundry": @data.skills.apr.mod }, + { "pdf": "Total Bonus 3", "foundry": @data.skills.blf.mod }, + { "pdf": "Total Bonus 4", "foundry": @data.skills.clm.mod }, + { "pdf": "Total Bonus 8", "foundry": @data.skills.dip.mod }, + { "pdf": "Total Bonus 9", "foundry": @data.skills.dev.mod }, + { "pdf": "Total Bonus 10", "foundry": @data.skills.dis.mod }, + { "pdf": "Total Bonus 11", "foundry": @data.skills.esc.mod }, + { "pdf": "Total Bonus 12", "foundry": @data.skills.fly.mod }, + { "pdf": "Total Bonus 13", "foundry": @data.skills.han.mod }, + { "pdf": "Total Bonus 14", "foundry": @data.skills.hea.mod }, + { "pdf": "Total Bonus 15", "foundry": @data.skills.int.mod }, + { "pdf": "Total Bonus 16", "foundry": @data.skills.kar.mod }, + { "pdf": "Total Bonus 17", "foundry": @data.skills.kdu.mod }, + { "pdf": "Total Bonus 18", "foundry": @data.skills.ken.mod }, + { "pdf": "Total Bonus 19", "foundry": @data.skills.kge.mod }, + { "pdf": "Total Bonus 20", "foundry": @data.skills.khi.mod }, + { "pdf": "Total Bonus 21", "foundry": @data.skills.klo.mod }, + { "pdf": "Total Bonus 22", "foundry": @data.skills.kna.mod }, + { "pdf": "Total Bonus 23", "foundry": @data.skills.kno.mod }, + { "pdf": "Total Bonus 24", "foundry": @data.skills.kpl.mod }, + { "pdf": "Total Bonus 25", "foundry": @data.skills.kre.mod }, + { "pdf": "Total Bonus 26", "foundry": @data.skills.lin.mod }, + { "pdf": "Total Bonus 27", "foundry": @data.skills.per.mod }, + { "pdf": "Total Bonus 32", "foundry": @data.skills.rid.mod }, + { "pdf": "Total Bonus 33", "foundry": @data.skills.sen.mod }, + { "pdf": "Total Bonus 34", "foundry": @data.skills.slt.mod }, + { "pdf": "Total Bonus 35", "foundry": @data.skills.spl.mod }, + { "pdf": "Total Bonus 36", "foundry": @data.skills.ste.mod }, + { "pdf": "Total Bonus 37", "foundry": @data.skills.sur.mod }, + { "pdf": "Total Bonus 38", "foundry": @data.skills.swm.mod }, + { "pdf": "Total Bonus 39", "foundry": @data.skills.umd.mod }, + { "pdf": "Profession 1 Check", "foundry": @data.skills.pro.subSkills.pro1?.cs }, + { "pdf": "Profession 1", "foundry": @data.skills.pro.subSkills.pro1?.name || "" }, + { "pdf": "Total Bonus 30", "foundry": (@data.skills.pro.subSkills.pro1?.name) ?@data.skills.pro.subSkills.pro1.mod : "" }, + { "pdf": "Ranks 30", "foundry": (@data.skills.pro.subSkills.pro1?.name) ?@data.skills.pro.subSkills.pro1.rank : "" }, + { "pdf": "Profession 2 Check", "foundry": @data.skills.pro.subSkills.pro2?.cs || "" }, + { "pdf": "Profession 2", "foundry": @data.skills.pro.subSkills.pro2?.name || "" }, + { "pdf": "Total Bonus 31", "foundry": (@data.skills.pro.subSkills.pro2?.name) ?@data.skills.pro.subSkills.pro2.mod : "" }, + { "pdf": "Ranks 31", "foundry": (@data.skills.prf.subSkills.pro2?.name) ?@data.skills.prf.subSkills.pro2.rank : "" }, + { "pdf": "Perform 1 check", "foundry": @data.skills.prf.subSkills.prf1?.cs }, + { "pdf": "Perform 1", "foundry": @data.skills.prf.subSkills.prf1?.name || "" }, + { "pdf": "Total Bonus 28", "foundry": (@data.skills.prf.subSkills.prf1?.name) ?@data.skills.prf.subSkills.prf1.mod : "" }, + { "pdf": "Ranks 28", "foundry": (@data.skills.prf.subSkills.prf1?.name) ?@data.skills.prf.subSkills.prf1.rank : "" }, + { "pdf": "Perform 2 check", "foundry": @data.skills.prf.subSkills.prf2?.cs || "" }, + { "pdf": "Perform 2", "foundry": @data.skills.prf.subSkills.prf2?.name || "" }, + { "pdf": "Total Bonus 29", "foundry": (@data.skills.prf.subSkills.prf2?.name) ?@data.skills.prf.subSkills.prf2.mod : "" }, + { "pdf": "Ranks 29", "foundry": (@data.skills.prf.subSkills.prf2?.name) ?@data.skills.prf.subSkills.prf2.rank : "" }, + { "pdf": "Craft Check 1", "foundry": @data.skills.crf.subSkills.crf1?.cs || "" }, + { "pdf": "Craft 1", "foundry": @data.skills.crf.subSkills.crf1?.name || "" }, + { "pdf": "Total Bonus 5", "foundry": (@data.skills.crf.subSkills.crf1?.name) ?@data.skills.crf.subSkills.crf1.mod : "" }, + { "pdf": "Ranks 5", "foundry": (@data.skills.crf.subSkills.crf1?.name) ?@data.skills.crf.subSkills.crf1.rank : "" }, + { "pdf": "Craft Check 2", "foundry": @data.skills.crf.subSkills.crf2?.cs || "" }, + { "pdf": "Craft 2", "foundry": @data.skills.crf.subSkills.crf2?.name || "" }, + { "pdf": "Total Bonus 6", "foundry": (@data.skills.crf.subSkills.crf2?.name) ?@data.skills.crf.subSkills.crf2.mod : "" }, + { "pdf": "Ranks 6", "foundry": (@data.skills.crf.subSkills.crf2?.name) ?@data.skills.crf.subSkills.crf2.rank : "" }, + { "pdf": "Craft Check 3", "foundry": @data.skills.crf.subSkills.crf3?.cs || "" }, + { "pdf": "Craft 3", "foundry": @data.skills.crf.subSkills.crf3?.name || "" }, + { "pdf": "Total Bonus 7", "foundry": (@data.skills.crf.subSkills.crf3?.name) ?@data.skills.crf.subSkills.crf3.mod : "" }, + { "pdf": "Ranks 7", "foundry": (@data.skills.crf.subSkills.crf3?.name) ?@data.skills.crf.subSkills.crf3.rank : "" }, + { "pdf": "Languages Line 1", "foundry": [actor.data.data.traits.languages.value.filter(String).map(l => l.capitalize()).sort().join(", "), actor.data.data.traits.languages.custom,].filter(String).join(", ") }, + { "pdf": "Conditional Modifiers Line 1", "foundry": [actor.data.data.traits.weaponProf.total.filter(String).map(l => l.capitalize()).join(", "), actor.data.data.traits.weaponProf.custom, actor.data.data.traits.armorProf.total.filter(String).map(l => l.capitalize()).join(", "), actor.data.data.traits.armorProf.custom,].filter(String).join(", ") }, ] \ No newline at end of file