Files
roll20-character-sheets/D&Z-Apocalypse/DZ-Apocalypse.html
T
2026-01-13 16:15:05 +01:00

2558 lines
122 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- Custom Character Sheet ordered by Jayg3031 for D&Z Apocalypse Community -->
<!-- Made by Spirito, www.spirito.fr, Spirito#6973, spirito35220@gmail.com -->
<rolltemplate class="sheet-rolltemplate-dzapocalypse">
<div class="sheet-template-header sheet-bloc-header">
<div class="sheet-header-bloc">
<span class="sheet-headerstyle1">{{name}}</span>
<span class="sheet-headerstyle2">{{charactername}} ♦ {{category}}</span>
</div>
{{#range}}
<div id="DETAILS" class="sheet-template-rolls sheet-template-rolls4">
<span class="sheet-headerstyle3">range :</span>
<span class="sheet-headerstyle4">{{range}}</span>
</div>
{{/range}}
<!-- -->
<!-- -->
<!-- -->
<!-- -->
<!-- -->
{{#rollGreater() roll 0}}
<!-- -->
{{#standard}}
<!-- -->
<div id="STANDARD" class="sheet-template-rolls">
<div class="sheet-description2">STD</div>
<div class="sheet-roll">{{roll}}</div>
</div>
<!-- -->
{{/standard}}
<!-- -->
{{#advantage}}
<!-- -->
<div id="ADVANTAGE" class="sheet-template-rolls sheet-template-rolls2">
<div class="sheet-description2">ADV</div>
{{#rollGreater() roll1 roll2}}
<div class="sheet-roll">{{roll1}}</div>
<div class="sheet-roll sheet-allgrey">{{roll2}}</div>
{{/rollGreater() roll1 roll2}} {{#rollGreater() roll2 roll1}}
<div class="sheet-roll sheet-allgrey">{{roll1}}</div>
<div class="sheet-roll">{{roll2}}</div>
{{/rollGreater() roll2 roll1}} {{#rollTotal() roll1 roll2}}
<div class="sheet-roll">{{roll1}}</div>
<div class="sheet-roll">{{roll2}}</div>
{{/rollTotal() roll1 roll2}}
</div>
<!-- -->
{{/advantage}}
<!-- -->
{{#disadvantage}}
<!-- -->
<div id="Disadvantage" class="sheet-template-rolls sheet-template-rolls2">
<div class="sheet-description2">DIS</div>
{{#rollGreater() roll1 roll2}}
<div class="sheet-roll sheet-allgrey">{{roll1}}</div>
<div class="sheet-roll">{{roll2}}</div>
{{/rollGreater() roll1 roll2}} {{#rollGreater() roll2 roll1}}
<div class="sheet-roll">{{roll1}}</div>
<div class="sheet-roll sheet-allgrey">{{roll2}}</div>
{{/rollGreater() roll2 roll1}} {{#rollTotal() roll1 roll2}}
<div class="sheet-roll">{{roll1}}</div>
<div class="sheet-roll">{{roll2}}</div>
{{/rollTotal() roll1 roll2}}
</div>
<!-- -->
{{/disadvantage}}
<!-- -->
{{/rollGreater() roll 0}}
<!-- -->
<!-- -->
<!-- -->
<!-- -->
<!-- -->
{{#rollGreater() dmg1 0}}
<!-- -->
<div id="ONE DAMAGE" class="sheet-template-rolls">
<div class="sheet-description2">DMG</div>
<div class="sheet-roll sheet-dmg">{{dmg1}}</div>
{{#dmg1type}}
<div class="sheet-effect">{{dmg1type}}</div>
{{/dmg1type}}
</div>
<!-- -->
{{/rollGreater() dmg1 0}}
<!-- -->
{{#rollGreater() save 0}}
<!-- -->
<div id="SAVE" class="sheet-template-rolls">
<div class="sheet-description3">DD :{{save}} {{savemod}}</div>
<div class="sheet-description"><b>Description</b> : {{description}}</div>
</div>
<!-- -->
{{/rollGreater() save 0}}
<!-- -->
{{#desc}}
<div class="sheet-extra-button">{{button}}</div>
{{/desc}}
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-dzapocalypse-description">
<div class="sheet-template-header sheet-bloc-header">
{{#name}}<span class="sheet-headerstyle1">{{name}}</span>{{/name}}
<!-- -->
{{#source}}<span class="sheet-headerstyle2">{{source}}</span>{{/source}}
<!-- -->
<div id="DESCRIPTION" class="sheet-template-rolls sheet-template-rolls3">
{{#description}}<div class="sheet-description"><b>Description</b> : {{description}}</div>{{/description}}
{{#properties}}<div class="sheet-description"><b>Properties</b> : {{properties}}</div>{{/properties}}
{{#barrel}}<div class="sheet-description"><b>>Barrel</b> : {{barrel}}</div>{{/barrel}}
{{#tactical1}}<div class="sheet-description"><b>Tactical</b> : {{tactical1}}</div>{{/tactical1}}
{{#tactical2}}<div class="sheet-description"><b>Tactical</b> : {{tactical2}}</div>{{/tactical2}}
{{#scope}}<div class="sheet-description"><b>Scope</b> : {{scope}}</div>{{/scope}}
{{#magazine}}<div class="sheet-description"><b>Magazine</b> : {{magazine}}</div>{{/magazine}}
</div>
{{#charactername}}
<span class="sheet-headerstyle2 sheet-headerstyle123" style="color: var(--blackandwhite2);">{{charactername}}</span>
{{/charactername}}
</div>
</rolltemplate>
<div class="sheet-charsheet">
<div class="sheet-maingrid-area-header1">
<!-- ----- HEADER ----- -->
<div class="sheet-main-header">
<div class="sheet-standardbox sheet-standardbox33">
<div class="sheet-oneline">
<div class="sheet-header">
<div class="sheet-main-header-charactername">
<h4>Character Name</h4>
<input type="text" placeholder="-" name="attr_character_name" />
</div>
<div class="sheet-main-header-background">
<h4>Background</h4>
<select name="attr_background">
<option value="0" selected>None</option>
<option value="burglar">Burglar</option>
<option value="mechanic">Mechanic</option>
<option value="chef">Chef</option>
<option value="geek">Computer Geek</option>
<option value="worker">Construction Worker</option>
<option value="service">Customer Service</option>
<option value="doctor">Doctor</option>
<option value="Farmer">Farmer</option>
<option value="firefighter">Firefighter / EMT</option>
<option value="military">Military</option>
<option value="musician">Musician</option>
<option value="office">Office Worker</option>
<option value="police">Police Officer</option>
<option value="scientist">Scientist</option>
<option value="student">Student</option>
<option value="teacher">Teacher</option>
</select>
</div>
<div class="sheet-main-header-bodytype">
<h4>Body Type</h4>
<select name="attr_body">
<option value="0" selected>-</option>
<option value="skinny">Skinny</option>
<option value="fit">Fit</option>
<option value="average">Average</option>
<option value="heavy">Heavy</option>
</select>
</div>
<div class="sheet-main-header-blood">
<h4>Blood</h4>
<select name="attr_character_bloodtype" title="Blood type compatibility depends on your blood letter (A, B, AB, or O) and whether it's positive or negative. O negative is the universal donor — their blood can go to anyone. AB positive is the universal receiver — they can get blood from anyone. A can give to A and AB, B to B and AB, AB only to AB, and O to everyone. People with negative blood can give to both negative and positive types, but they can only receive from other negative types. The key rule is: you cant receive blood that has parts your body doesnt recognize.">
<option value="0" selected>-</option>
<option value="o-">O-</option>
<option value="o+">O+</option>
<option value="a-">A-</option>
<option value="a+">A+</option>
<option value="b-">B--</option>
<option value="b+">B+</option>
<option value="ab-">AB-</option>
<option value="ab+">AB+</option>
</select>
</div>
</div>
<div class="sheet-header2">
<div class="sheet-main-header-playername">
<h4>Player Name</h4>
<input type="text" placeholder="-" name="attr_character_playername" />
</div>
<div class="sheet-main-header-level">
<h4>Level</h4>
<input type="text" placeholder="-" name="attr_level" />
</div>
<div class="sheet-main-header-experience">
<h4>XP</h4>
<input type="text" placeholder="-" name="attr_character_experience" />
</div>
<div class="sheet-main-header-alignment">
<h4>Alignment</h4>
<input type="text" placeholder="-" name="attr_character_alignment" />
</div>
</div>
</div>
</div>
</div>
<!-- ----- IMAGE ----- -->
<div class="sheet-main-image"></div>
</div>
<div class="sheet-maingrid-area-header2">
<!-- ----- MENU ----- -->
<div class="sheet-main-menu">
<div class="sheet-standardbox sheet-standardbox14">
<div class="sheet-oneline">
<div class="sheet-online">
<input type="radio" value="sheet-base" name="attr_changepage" checked />
<label class="radio-button">Base</label>
</div>
<div class="sheet-online">
<input type="radio" value="sheet-vehicle" name="attr_changepage" />
<label class="radio-button">Vehicle</label>
</div>
<div class="sheet-online">
<input type="radio" value="sheet-notes" name="attr_changepage" />
<label class="radio-button">Notes</label>
</div>
</div>
</div>
</div>
<script id="✓ CALC : Display Page" type="text/worker">
on("sheet:opened change:changepage", function () {
getAttrs(["changepage"], function (values) {
const selectedPage = values.changepage || "sheet-base";
const pageMap = {
"sheet-base": "sheet-base-display",
"sheet-vehicle": "sheet-vehicle-display",
"sheet-notes": "sheet-notes-display"
};
Object.keys(pageMap).forEach(pageKey => {
const element = $20(`.${pageMap[pageKey]}`);
if (selectedPage === pageKey) {
element.removeClass("sheet-hidden");
} else {
element.addClass("sheet-hidden");
}
});
});
});
</script>
<!-- ----- ROLL STATUS ----- -->
<div class="sheet-main-header-blank">
<div class="sheet-standardbox sheet-standardbox11">
<div class="sheet-oneline">
<!-- -->
<div class="sheet-button-holder">
<!-- -->
<input id="public" class="sheet-globalprivacy" type="radio" value="&nbsp;" name="attr_global-privacy-status" checked />
<label for="public">PC</label>
<!-- -->
</div>
<!-- -->
<div class="sheet-button-holder">
<!-- -->
<input id="to-gm" class="sheet-globalprivacy" type="radio" value="/w gm" name="attr_global-privacy-status" />
<label for="to-gm">GM</label>
<!-- -->
</div>
<!-- -->
<div class="sheet-button-holder">
<!-- -->
<input id="private" class="sheet-globalprivacy" type="radio" value="/me" name="attr_global-privacy-status" />
<label for="private">PV</label>
<!-- -->
</div>
<h4>-</h4>
<!-- -->
<div class="sheet-button-holder">
<!-- -->
<input id="advantage" class="input-colored2" type="radio" value="advantage" name="attr_global-advantage-status" />
<label for="advantage">ADV</label>
<!-- -->
</div>
<!-- -->
<div class="sheet-button-holder">
<!-- -->
<input id="standard" class="input-colored1" type="radio" value="standard" name="attr_global-advantage-status" checked />
<label for="standard">STD</label>
<!-- -->
</div>
<!-- -->
<div class="sheet-button-holder">
<!-- -->
<input id="disadvantage" class="input-colored2" type="radio" value="disadvantage" name="attr_global-advantage-status" />
<label for="disadvantage">DIS</label>
<!-- -->
</div>
</div>
</div>
</div>
<!-- ----- GENERAL CONFIGURATION ----- -->
<div class="sheet-cogs-container sheet-main-general-container">
<input class="sheet-cogs-input sheet-general-hideshow" type="checkbox" name="attr_sheet-general-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
</div>
<div class="sheet-maingrid-area sheet-base-display sheet-hidden">
<div class="sheet-maingrid-area-left">
<!-- ----- STATISTIQUES ----- -->
<div class="sheet-main-statistiques">
<!-- STR -->
<div class="sheet-standardbox sheet-standardbox51">
<div class="sheet-oneline">
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_str" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Strength}} {{roll=[[1d20+@{str}]]}} {{roll1=[[1d20+@{str}]]}} {{roll2=[[1d20+@{str}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Statistics}}"></button>
<h3>STR</h3>
</div>
<input class="sheet-inputchar" type="number" value="0" name="attr_str" readonly />
<div class="sheet-doublecolumn sheet-4">
<input class="sheet-inputchar2" type="number" value="10" name="attr_str_base" />
<input class="sheet-inputchar3" type="text" value="10" name="attr_str_body" readonly />
</div>
</div>
</div>
<!-- DEX -->
<div class="sheet-standardbox sheet-standardbox32">
<div class="sheet-oneline">
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_str" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Dexterity}} {{roll=[[1d20+@{dex}]]}} {{roll1=[[1d20+@{dex}]]}} {{roll2=[[1d20+@{dex}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Statistics}}"></button>
<h3>DEX</h3>
</div>
<input class="sheet-inputchar" type="number" value="0" name="attr_dex" readonly />
<div class="sheet-doublecolumn sheet-4">
<input class="sheet-inputchar2" type="number" value="10" name="attr_dex_base" />
<input class="sheet-inputchar3" type="text" value="10" name="attr_dex_body" readonly />
</div>
</div>
</div>
<!-- CON -->
<div class="sheet-standardbox sheet-standardbox31">
<div class="sheet-oneline">
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_str" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Constitution}} {{roll=[[1d20+@{con}]]}} {{roll1=[[1d20+@{con}]]}} {{roll2=[[1d20+@{con}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Statistics}}"></button>
<h3>CON</h3>
</div>
<input class="sheet-inputchar" type="number" value="0" name="attr_con" readonly />
<div class="sheet-doublecolumn sheet-4">
<input class="sheet-inputchar2" type="number" value="10" name="attr_con_base" />
<input class="sheet-inputchar3" type="text" value="10" name="attr_con_body" readonly />
</div>
</div>
</div>
<!-- INT -->
<div class="sheet-standardbox sheet-standardbox34">
<div class="sheet-oneline">
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_str" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Intelligence}} {{roll=[[1d20+@{int}]]}} {{roll1=[[1d20+@{int}]]}} {{roll2=[[1d20+@{int}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Statistics}}"></button>
<h3>INT</h3>
</div>
<input class="sheet-inputchar" type="number" value="0" name="attr_int" readonly />
<input class="sheet-inputchar2" type="number" value="10" name="attr_int_base" />
</div>
</div>
<!-- WIS -->
<div class="sheet-standardbox sheet-standardbox42">
<div class="sheet-oneline">
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_str" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Wisdom}} {{roll=[[1d20+@{wis}]]}} {{roll1=[[1d20+@{wis}]]}} {{roll2=[[1d20+@{wis}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Statistics}}"></button>
<h3>WIS</h3>
</div>
<input class="sheet-inputchar" type="number" value="0" name="attr_wis" readonly />
<input class="sheet-inputchar2" type="number" value="10" name="attr_wis_base" />
</div>
</div>
<!-- CHA -->
<div class="sheet-standardbox sheet-standardbox14">
<div class="sheet-oneline">
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_str" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Charisma}} {{roll=[[1d20+@{cha}]]}} {{roll1=[[1d20+@{cha}]]}} {{roll2=[[1d20+@{cha}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Statistics}}"></button>
<h3>CHA</h3>
</div>
<input class="sheet-inputchar" type="number" value="0" name="attr_cha" readonly />
<input class="sheet-inputchar2" type="number" value="10" name="attr_cha_base" />
</div>
</div>
</div>
<script id="✓ - CALC : Caractéristiques selon Body (avec valeurs signées)" type="text/worker">
on("sheet:opened change:body", function () {
getAttrs(["body"], function(values) {
const body = (values["body"] || "").toLowerCase();
const presets = {
skinny: [-2, 4, 0, 0, 0, 0],
fit: [3, 2, 0, 0, 0, 0],
average:[1, 1, 1, 0, 0, 0],
heavy: [2, -2, 4, 0, 0, 0]
};
const [str, dex, con, int_, wis, cha] = presets[body] || [0, 0, 0, 0, 0, 0];
const formatSigned = n => (n > 0 ? `+${n}` : `${n}`);
setAttrs({
str_body: formatSigned(str),
dex_body: formatSigned(dex),
con_body: formatSigned(con),
int_body: formatSigned(int_),
wis_body: formatSigned(wis),
cha_body: formatSigned(cha)
});
});
});
</script>
<script id="✓ - CALC : Ability Modifiers from Base + Body" type="text/worker">
on("sheet:opened change:str_base change:dex_base change:con_base change:int_base change:wis_base change:cha_base change:str_body change:dex_body change:con_body change:int_body change:wis_body change:cha_body", function () {
getAttrs([
"str_base", "dex_base", "con_base",
"int_base", "wis_base", "cha_base",
"str_body", "dex_body", "con_body",
"int_body", "wis_body", "cha_body"
], function(values) {
const setObj = {};
const calculateMod = function(base, body) {
const b = parseInt(base, 10) || 0;
const bo = parseInt(body, 10) || 0;
return Math.floor((b + bo - 10) / 2);
};
setObj["str"] = calculateMod(values["str_base"], values["str_body"]);
setObj["dex"] = calculateMod(values["dex_base"], values["dex_body"]);
setObj["con"] = calculateMod(values["con_base"], values["con_body"]);
setObj["int"] = calculateMod(values["int_base"], values["int_body"]);
setObj["wis"] = calculateMod(values["wis_base"], values["wis_body"]);
setObj["cha"] = calculateMod(values["cha_base"], values["cha_body"]);
setAttrs(setObj);
});
});
</script>
<!-- ----- INSPIRATION ----- -->
<div class="sheet-main-inspiration">
<div class="sheet-standardbox sheet-standardbox11">
<div class="sheet-oneline">
<input type="checkbox" value="1" name="attr_inspiration" />
<h3>Inspiration</h3>
</div>
</div>
</div>
<!-- ----- SAVING THROWS ----- -->
<div class="sheet-main-savingthrows">
<div class="sheet-standardbox sheet-standardbox42">
<h4 class="sheet-minititles2">Saving Throws</h4>
<div class="sheet-oneline">
<!-- STR -->
<div class="sheet-main-savingthrows-str">
<input type="checkbox" value="1" name="attr_saving_str_active" />
<input type="number" step="0.01" value="0" name="attr_saving_str_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_saving_str" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Strength Save}} {{roll=[[1d20+@{saving_str_value}]]}} {{roll1=[[1d20+@{saving_str_value}]]}} {{roll2=[[1d20+@{saving_str_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Save}}"></button>
<h4>Save&nbsp;Strength</h4>
</div>
</div>
<!-- DEX -->
<div class="sheet-main-savingthrows-dex">
<input type="checkbox" value="1" name="attr_saving_dex_active" />
<input type="number" step="0.01" value="0" name="attr_saving_dex_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_saving_dex" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Dexterity Save}} {{roll=[[1d20+@{saving_dex_value}]]}} {{roll1=[[1d20+@{saving_dex_value}]]}} {{roll2=[[1d20+@{saving_dex_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Save}}"></button>
<h4>Save&nbsp;Dexterity</h4>
</div>
</div>
<!-- CON -->
<div class="sheet-main-savingthrows-con">
<input type="checkbox" value="1" name="attr_saving_con_active" />
<input type="number" step="0.01" value="0" name="attr_saving_con_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_saving_con" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Constitution Save}} {{roll=[[1d20+@{saving_con_value}]]}} {{roll1=[[1d20+@{saving_con_value}]]}} {{roll2=[[1d20+@{saving_con_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Save}}"></button>
<h4>Save&nbsp;Constitution</h4>
</div>
</div>
<!-- INT -->
<div class="sheet-main-savingthrows-int">
<input type="checkbox" value="1" name="attr_saving_int_active" />
<input type="number" step="0.01" value="0" name="attr_saving_int_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_saving_int" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Intelligence Save}} {{roll=[[1d20+@{saving_int_value}]]}} {{roll1=[[1d20+@{saving_int_value}]]}} {{roll2=[[1d20+@{saving_int_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Save}}"></button>
<h4>Save&nbsp;Intelligence</h4>
</div>
</div>
<!-- WIS -->
<div class="sheet-main-savingthrows-wis">
<input type="checkbox" value="1" name="attr_saving_wis_active" />
<input type="number" step="0.01" value="0" name="attr_saving_wis_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_saving_wis" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Wisdom Save}} {{roll=[[1d20+@{saving_wis_value}]]}} {{roll1=[[1d20+@{saving_wis_value}]]}} {{roll2=[[1d20+@{saving_wis_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Save}}"></button>
<h4>Save&nbsp;Wisdom</h4>
</div>
</div>
<!-- CHA -->
<div class="sheet-main-savingthrows-cha">
<input type="checkbox" value="1" name="attr_saving_cha_active" />
<input type="number" step="0.01" value="0" name="attr_saving_cha_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_saving_cha" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Charisma Save}} {{roll=[[1d20+@{saving_cha_value}]]}} {{roll1=[[1d20+@{saving_cha_value}]]}} {{roll2=[[1d20+@{saving_cha_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Save}}"></button>
<h4>Save&nbsp;Charisma</h4>
</div>
</div>
</div>
</div>
</div>
<script id="✓ - CALC : Saving Throws selon Background" type="text/worker">
on("change:background", function () {
getAttrs(["background"], function (values) {
const bg = (values["background"] || "").toLowerCase();
const backgrounds = {
burglar: ["dex", "int"],
mechanic: ["int", "cha"],
chef: ["int", "wis"],
geek: ["int", "wis"],
worker: ["int", "str"],
service: ["cha", "con"],
doctor: ["wis", "con"],
farmer: ["int", "str"],
firefighter: ["str", "con"],
military: ["str", "dex"],
musician: ["cha", "dex"],
office: ["int", "cha"],
police: ["str", "dex"],
scientist: ["int", "wis"],
student: ["int", "wis"],
teacher: ["int", "wis"]
};
const allStats = ["str", "dex", "con", "int", "wis", "cha"];
const selected = backgrounds[bg] || [];
const setObj = {};
allStats.forEach(stat => {
setObj[`saving_${stat}_active`] = selected.includes(stat) ? "1" : "0";
});
setAttrs(setObj);
});
});
</script>
<script id="✓ - CALC : Saving Throws" type="text/worker">
const saves = ["str", "dex", "con", "int", "wis", "cha"];
const updateSavingThrows = () => {
const attrs = ["pb", ...saves.map(stat => `saving_${stat}_active`), ...saves];
getAttrs(attrs, function(values) {
const setObj = {};
const pb = parseInt(values.pb, 10) || 0;
saves.forEach(stat => {
const baseMod = parseInt(values[stat], 10) || 0;
const hasProf = parseInt(values[`saving_${stat}_active`], 10) === 1;
setObj[`saving_${stat}_value`] = baseMod + (hasProf ? pb : 0);
});
setAttrs(setObj);
});
};
on("sheet:opened change:pb change:str change:dex change:con change:int change:wis change:cha " +
saves.map(stat => `change:saving_${stat}_active`).join(" "), updateSavingThrows);
</script>
<!-- ----- SKILLS ----- -->
<div class="sheet-main-skills">
<div class="sheet-standardbox sheet-standardbox43">
<h4 class="sheet-minititles2">Skills</h4>
<div class="sheet-oneline">
<!-- Acrobatics (DEX) -->
<div class="sheet-main-skills-acrobatics">
<input type="checkbox" value="1" name="attr_acrobatics_active" />
<select name="attr_acrobatics_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX" selected>DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_acrobatics_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_acrobatics" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Acrobatics}} {{roll=[[1d20+@{acrobatics_value}]]}} {{roll1=[[1d20+@{acrobatics_value}]]}} {{roll2=[[1d20+@{acrobatics_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Acrobatics</h4>
</div>
</div>
<!-- Animal Handling (WIS) -->
<div class="sheet-main-skills-animalhandling">
<input type="checkbox" value="1" name="attr_animalhandling_active" />
<select name="attr_animalhandling_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS" selected>WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_animalhandling_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_animalhandling" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Animal Handling}} {{roll=[[1d20+@{animalhandling_value}]]}} {{roll1=[[1d20+@{animalhandling_value}]]}} {{roll2=[[1d20+@{animalhandling_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Animal Handling</h4>
</div>
</div>
<!-- Athletics (STR) -->
<div class="sheet-main-skills-athletics">
<input type="checkbox" value="1" name="attr_athletics_active" />
<select name="attr_athletics_proficiency_selector">
<option value="0">-</option>
<option value="STR" selected>STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_athletics_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_athletics" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Athletics}} {{roll=[[1d20+@{athletics_value}]]}} {{roll1=[[1d20+@{athletics_value}]]}} {{roll2=[[1d20+@{athletics_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Athletics</h4>
</div>
</div>
<!-- Cooking (WIS) -->
<div class="sheet-main-skills-cooking">
<input type="checkbox" value="1" name="attr_cooking_active" />
<select name="attr_cooking_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS" selected>WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_cooking_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_cooking" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Cooking}} {{roll=[[1d20+@{cooking_value}]]}} {{roll1=[[1d20+@{cooking_value}]]}} {{roll2=[[1d20+@{cooking_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Cooking</h4>
</div>
</div>
<!-- Crafting (INT) -->
<div class="sheet-main-skills-crafting">
<input type="checkbox" value="1" name="attr_crafting_active" />
<select name="attr_crafting_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT" selected>INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_crafting_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_crafting" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Crafting}} {{roll=[[1d20+@{crafting_value}]]}} {{roll1=[[1d20+@{crafting_value}]]}} {{roll2=[[1d20+@{crafting_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Crafting</h4>
</div>
</div>
<!-- Deception (CHA) -->
<div class="sheet-main-skills-deception">
<input type="checkbox" value="1" name="attr_deception_active" />
<select name="attr_deception_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA" selected>CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_deception_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_deception" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Deception}} {{roll=[[1d20+@{deception_value}]]}} {{roll1=[[1d20+@{deception_value}]]}} {{roll2=[[1d20+@{deception_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Deception</h4>
</div>
</div>
<!-- Firearms (DEX) -->
<div class="sheet-main-skills-firearms">
<input type="checkbox" value="1" name="attr_firearms_active" />
<select name="attr_firearms_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX" selected>DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_firearms_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_firearms" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Firearms}} {{roll=[[1d20+@{firearms_value}]]}} {{roll1=[[1d20+@{firearms_value}]]}} {{roll2=[[1d20+@{firearms_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Firearms</h4>
</div>
</div>
<!-- History (INT) -->
<div class="sheet-main-skills-history">
<input type="checkbox" value="1" name="attr_history_active" />
<select name="attr_history_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT" selected>INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_history_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_history" value="@{global-privacy-status} &{template:dzapocalypse} {{name=History}} {{roll=[[1d20+@{history_value}]]}} {{roll1=[[1d20+@{history_value}]]}} {{roll2=[[1d20+@{history_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>History</h4>
</div>
</div>
<!-- Insight (WIS) -->
<div class="sheet-main-skills-insight">
<input type="checkbox" value="1" name="attr_insight_active" />
<select name="attr_insight_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS" selected>WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_insight_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_insight" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Insight}} {{roll=[[1d20+@{insight_value}]]}} {{roll1=[[1d20+@{insight_value}]]}} {{roll2=[[1d20+@{insight_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Insight</h4>
</div>
</div>
<!-- Intimidation (CHA) -->
<div class="sheet-main-skills-intimidation">
<input type="checkbox" value="1" name="attr_intimidation_active" />
<select name="attr_intimidation_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA" selected>CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_intimidation_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_intimidation" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Intimidation}} {{roll=[[1d20+@{intimidation_value}]]}} {{roll1=[[1d20+@{intimidation_value}]]}} {{roll2=[[1d20+@{intimidation_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Intimidation</h4>
</div>
</div>
<!-- Investigation (INT) -->
<div class="sheet-main-skills-investigation">
<input type="checkbox" value="1" name="attr_investigation_active" />
<select name="attr_investigation_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT" selected>INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_investigation_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_investigation" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Investigation}} {{roll=[[1d20+@{investigation_value}]]}} {{roll1=[[1d20+@{investigation_value}]]}} {{roll2=[[1d20+@{investigation_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Investigation</h4>
</div>
</div>
<!-- Medicine (WIS) -->
<div class="sheet-main-skills-medicine">
<input type="checkbox" value="1" name="attr_medicine_active" />
<select name="attr_medicine_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS" selected>WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_medicine_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_medicine" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Medicine}} {{roll=[[1d20+@{medicine_value}]]}} {{roll1=[[1d20+@{medicine_value}]]}} {{roll2=[[1d20+@{medicine_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Medicine</h4>
</div>
</div>
<!-- Melee (STR) -->
<div class="sheet-main-skills-melee">
<input type="checkbox" value="1" name="attr_melee_active" />
<select name="attr_melee_proficiency_selector">
<option value="0">-</option>
<option value="STR" selected>STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_melee_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_melee" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Melee}} {{roll=[[1d20+@{melee_value}]]}} {{roll1=[[1d20+@{melee_value}]]}} {{roll2=[[1d20+@{melee_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Melee</h4>
</div>
</div>
<!-- Nature (INT) -->
<div class="sheet-main-skills-nature">
<input type="checkbox" value="1" name="attr_nature_active" />
<select name="attr_nature_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT" selected>INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_nature_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_nature" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Nature}} {{roll=[[1d20+@{nature_value}]]}} {{roll1=[[1d20+@{nature_value}]]}} {{roll2=[[1d20+@{nature_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Nature</h4>
</div>
</div>
<!-- Perception (WIS) -->
<div class="sheet-main-skills-perception">
<input type="checkbox" value="1" name="attr_perception_active" />
<select name="attr_perception_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS" selected>WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_perception_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_perception" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Perception}} {{roll=[[1d20+@{perception_value}]]}} {{roll1=[[1d20+@{perception_value}]]}} {{roll2=[[1d20+@{perception_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Perception</h4>
</div>
</div>
<!-- Performance (CHA) -->
<div class="sheet-main-skills-performance">
<input type="checkbox" value="1" name="attr_performance_active" />
<select name="attr_performance_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA" selected>CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_performance_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_performance" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Performance}} {{roll=[[1d20+@{performance_value}]]}} {{roll1=[[1d20+@{performance_value}]]}} {{roll2=[[1d20+@{performance_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Performance</h4>
</div>
</div>
<!-- Persuasion (CHA) -->
<div class="sheet-main-skills-persuasion">
<input type="checkbox" value="1" name="attr_persuasion_active" />
<select name="attr_persuasion_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA" selected>CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_persuasion_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_persuasion" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Persuasion}} {{roll=[[1d20+@{persuasion_value}]]}} {{roll1=[[1d20+@{persuasion_value}]]}} {{roll2=[[1d20+@{persuasion_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Persuasion</h4>
</div>
</div>
<!-- Sleight of Hand (DEX) -->
<div class="sheet-main-skills-sleightofhand">
<input type="checkbox" value="1" name="attr_sleightofhand_active" />
<select name="attr_sleightofhand_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX" selected>DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_sleightofhand_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_sleightofhand" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Sleight of Hand}} {{roll=[[1d20+@{sleightofhand_value}]]}} {{roll1=[[1d20+@{sleightofhand_value}]]}} {{roll2=[[1d20+@{sleightofhand_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Sleight of Hand</h4>
</div>
</div>
<!-- Stealth (DEX) -->
<div class="sheet-main-skills-stealth">
<input type="checkbox" value="1" name="attr_stealth_active" />
<select name="attr_stealth_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX" selected>DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_stealth_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_stealth" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Stealth}} {{roll=[[1d20+@{stealth_value}]]}} {{roll1=[[1d20+@{stealth_value}]]}} {{roll2=[[1d20+@{stealth_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Stealth</h4>
</div>
</div>
<!-- Survival (WIS) -->
<div class="sheet-main-skills-survival">
<input type="checkbox" value="1" name="attr_survival_active" />
<select name="attr_survival_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT">INT</option>
<option value="WIS" selected>WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_survival_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_survival" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Survival}} {{roll=[[1d20+@{survival_value}]]}} {{roll1=[[1d20+@{survival_value}]]}} {{roll2=[[1d20+@{survival_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Survival</h4>
</div>
</div>
<!-- Technology (INT) -->
<div class="sheet-main-skills-technology">
<input type="checkbox" value="1" name="attr_technology_active" />
<select name="attr_technology_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT" selected>INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_technology_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_technology" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Technology}} {{roll=[[1d20+@{technology_value}]]}} {{roll1=[[1d20+@{technology_value}]]}} {{roll2=[[1d20+@{technology_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Technology</h4>
</div>
</div>
<!-- Tinkering (INT) -->
<div class="sheet-main-skills-tinkering">
<input type="checkbox" value="1" name="attr_tinkering_active" />
<select name="attr_tinkering_proficiency_selector">
<option value="0">-</option>
<option value="STR">STR</option>
<option value="DEX">DEX</option>
<option value="CON">CON</option>
<option value="INT" selected>INT</option>
<option value="WIS">WIS</option>
<option value="CHA">CHA</option>
</select>
<input type="number" step="0.01" value="1" name="attr_tinkering_value" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_tinkering" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Tinkering}} {{roll=[[1d20+@{tinkering_value}]]}} {{roll1=[[1d20+@{tinkering_value}]]}} {{roll2=[[1d20+@{tinkering_value}]]}} {{charactername=@{character_name}}} {{@{global-advantage-status}=1}} {{category=Skill}}"></button>
<h4>Tinkering</h4>
</div>
</div>
</div>
</div>
</div>
<script id="✓ - CALC : Skills Total Value" type="text/worker">
const skills = [
"acrobatics", "animalhandling", "athletics", "cooking", "crafting",
"deception", "firearms", "history", "insight", "intimidation",
"investigation", "medicine", "melee", "nature", "perception",
"performance", "persuasion", "sleightofhand", "stealth", "survival",
"technology", "tinkering", "computeruse", "repair"
];
const abilities = {
STR: "str",
DEX: "dex",
CON: "con",
INT: "int",
WIS: "wis",
CHA: "cha"
};
const attrs = ["pb"];
skills.forEach(skill => {
attrs.push(
`${skill}_active`,
`${skill}_proficiency_selector`,
`${skill}_value`
);
});
Object.values(abilities).forEach(stat => attrs.push(stat));
on(`sheet:opened change:${attrs.join(" change:")}`, function () {
getAttrs(attrs, function (values) {
const setObj = {};
skills.forEach(skill => {
const statKey = (values[`${skill}_proficiency_selector`] || "0").toUpperCase();
const statAttr = abilities[statKey] || "str"; // fallback
const statMod = parseInt(values[statAttr], 10) || 0;
const hasProf = parseInt(values[`${skill}_active`], 10) === 1;
const pb = parseInt(values["pb"], 10) || 0;
setObj[`${skill}_value`] = statMod + (hasProf ? pb : 0);
});
setAttrs(setObj);
});
});
</script>
<!-- ----- PASSIVE PERCEPTION ----- -->
<div class="sheet-main-passiveperception">
<div class="sheet-standardbox sheet-standardbox52">
<div class="sheet-oneline">
<input type="number" value="0" name="attr_passiveperception" />
<h3>Passive Perception</h3>
</div>
</div>
</div>
<script id="✓ - CALC : Passive Perception" type="text/worker">
on("sheet:opened change:perception_value", function () {
getAttrs(["perception_value"], function(values) {
const perception = parseInt(values.perception_value, 10) || 0;
const passive = 10 + perception;
setAttrs({ passiveperception: passive });
});
});
</script>
<!-- ----- FEATURES & TRAITS ----- -->
<div class="sheet-main-features-traits">
<div class="sheet-standardbox sheet-standardbox42">
<h4 class="sheet-minititles2">Features & Traits</h4>
<div class="sheet-oneline">
<fieldset class="repeating_features-traits">
<input class="sheet-hidden sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" checked />
<div class="sheet-features-traits sheet-cogs-hideshow-div1">
<input class="sheet-left" type="text" placeholder="Name" name="attr_features-names" />
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input style="grid-column: 1/-1" class="sheet-left" type="text" placeholder="Source" name="attr_features-source" />
<textarea style="grid-column: 1/-1" type="text" placeholder="Description" 0 name="attr_features-description"></textarea>
</div>
<div class="sheet-features-traits2 sheet-cogs-hideshow-div2">
<div class="sheet-button-div-holder">
<input class="sheet-cogs-input sheet-description-hideshow" type="checkbox" name="attr_sheet-description-hideshow" />
<span class="sheet-left" type="text" placeholder="Name" name="attr_features-names"></span>
</div>
<div class="sheet-cogs-container sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_str" value="@{global-privacy-status} &{template:dzapocalypse-description} {{name=@{features-names}}} {{charactername=@{character_name}}} {{category=Description}} {{source=@{features-source}}} {{description=@{features-description}}}"></button>
<span class="sheet-cogs-icon">w</span>
</div>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-description-hideshow" type="checkbox" name="attr_sheet-description-hideshow" />
<span style="grid-column: 1/-1" class="sheet-left" type="text" name="attr_features-source"></span>
<textarea class="sheet-description-hideshow-div" style="grid-column: 1/-1" type="text" name="attr_features-description" readonly></textarea>
</div>
</fieldset>
</div>
</div>
</div>
<!-- ----- PROFICIENCIES ----- -->
<div class="sheet-main-proficiencies">
<div class="sheet-standardbox sheet-standardbox43">
<h4 class="sheet-minititles2">Proficiencies</h4>
<div class="sheet-oneline">
<fieldset class="repeating_proficiencies">
<input class="sheet-hidden sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" checked />
<div class="sheet-proficiencies1 sheet-cogs-hideshow-div1">
<input class="sheet-left" type="text" placeholder="Source" name="attr_proficiency-source" />
<input class="sheet-left" type="text" placeholder="Name" name="attr_proficiency-name" />
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" checked />
<span class="sheet-cogs-icon">y</span>
</div>
</div>
<div class="sheet-proficiencies2 sheet-cogs-hideshow-div2">
<input class="sheet-hidden sheet-description-hideshow" type="checkbox" name="attr_sheet-description-hideshow" checked />
<span type="text" name="attr_proficiency-source"></span>
<span type="text" name="attr_proficiency-name"></span>
<div class="sheet-cogs-container sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_str" value="@{global-privacy-status} &{template:dzapocalypse-description} {{name=@{proficiency-source}}} {{charactername=@{character_name}}} {{category=Proficiencies}} {{source=@{proficiency-name}}}"></button>
<span class="sheet-cogs-icon">w</span>
</div>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" checked />
<span class="sheet-cogs-icon">y</span>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<!-- ----- ACTIVE EFFECT ----- -->
<div class="sheet-main-effects">
<div class="sheet-standardbox sheet-standardbox44">
<h4 class="sheet-minititles2">Active Effects</h4>
<div class="sheet-oneline">
<div class="sheet-effects">
<h4>&nbsp;</h4>
<h4 class="sheet-left">Name</h4>
<h4>Cycle</h4>
<h4>DC</h4>
<h4>Mod</h4>
</div>
<fieldset class="repeating_effects">
<div class="sheet-effects">
<button type="roll" class="sheet-button-description" name="roll_effect" value="@{global-privacy-status} &{template:dzapocalypse} {{name=@{effect-name}}} {{cycle=@{effect-time}}} {{save=[[@{effect-dc}]]}} {{savemod=@{effect-selector-display}}} {{charactername=@{character_name}}} {{category=Active Effects}} {{@{global-advantage-status}=1}} {{roll=[[1d20+@{effect-selector}]]}} {{roll1=[[1d20+@{effect-selector}]]}} {{roll2=[[1d20+@{effect-selector}]]}} {{description=@{effect-description}}}"></button>
<input class="sheet-left" type="text" placeholder="Effect Name" name="attr_effect-name" />
<input type="text" placeholder="-" name="attr_effect-time" />
<input type="text" value="0" name="attr_effect-dc" />
<input class="sheet-hidden" type="text" value="0" name="attr_effect-selector" />
<select name="attr_effect-selector-display">
<option value="0">-</option>
<option value="Strength">STR</option>
<option value="Dexterity">DEX</option>
<option value="Constitution" selected>CON</option>
<option value="Intelligence">INT</option>
<option value="Wisdom">WIS</option>
<option value="Charisma">CHA</option>
</select>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" />
<textarea class="sheet-left sheet-cogs-hideshow-div1" style="grid-column: 1/-1" type="text" name="attr_effect-description"></textarea>
</div>
</fieldset>
</div>
</div>
<script id="✓ - CALC : Effect Selector from Display (labelled)" type="text/worker">
const statMap = {
strength: "str",
dexterity: "dex",
constitution: "con",
intelligence: "int",
wisdom: "wis",
charisma: "cha"
};
on("sheet:opened change:repeating_effects:effect-selector-display", function(eventInfo) {
const match = eventInfo.sourceAttribute.match(/repeating_effects_([-a-zA-Z0-9]+)_/);
if (!match) return;
const rowId = match[1];
const prefix = `repeating_effects_${rowId}_`;
getAttrs([`${prefix}effect-selector-display`, "saving_str_value", "saving_dex_value", "saving_con_value", "saving_int_value", "saving_wis_value", "saving_cha_value"], function(values) {
const label = (values[`${prefix}effect-selector-display`] || "0").toLowerCase();
const key = statMap[label];
let updatedValue = "0";
if (key) {
updatedValue = values[`saving_${key}_value`] || "0";
}
const setObj = {};
setObj[`${prefix}effect-selector`] = updatedValue;
setAttrs(setObj);
});
});
</script>
</div>
</div>
<div class="sheet-maingrid-area-right">
<!-- ----- CHARACTERISTICS ----- -->
<div class="sheet-main-characteristics">
<!-- AC -->
<div class="sheet-standardbox sheet-standardbox44">
<div class="sheet-oneline">
<div class="sheet-main-skills-armorclass">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_armorclass" readonly />
</div>
<h4>AC</h4>
</div>
</div>
<script id="✓ - CALC : Armor Class Totale" type="text/worker">
on(
"sheet:opened change:dex change:armorclass-mod " +
"change:clothing-head-armorclass change:clothing-face-armorclass " +
"change:clothing-chest-armorclass change:clothing-back-armorclass " +
"change:clothing-hands-armorclass change:clothing-feets-armorclass " +
"change:clothing-belt-armorclass change:clothing-legs-armorclass",
function () {
getAttrs([
"dex",
"armorclass-mod",
"clothing-head-armorclass",
"clothing-face-armorclass",
"clothing-chest-armorclass",
"clothing-back-armorclass",
"clothing-hands-armorclass",
"clothing-feets-armorclass",
"clothing-belt-armorclass",
"clothing-legs-armorclass"
], function(values) {
const base = 5;
const dex = parseInt(values.dex, 10) || 0;
const armorMod = parseInt(values["armorclass-mod"], 10) || 0;
const armorPieces = [
"clothing-head-armorclass",
"clothing-face-armorclass",
"clothing-chest-armorclass",
"clothing-back-armorclass",
"clothing-hands-armorclass",
"clothing-feets-armorclass",
"clothing-belt-armorclass",
"clothing-legs-armorclass"
];
const armorTotal = armorPieces.reduce(
(total, attr) => total + (parseInt(values[attr], 10) || 0),
0
);
setAttrs({
armorclass: base + dex + armorMod + armorTotal
});
});
}
);
</script>
<!-- HIT POINT -->
<div class="sheet-standardbox sheet-standardbox51" style="grid-column: 2/4">
<div class="sheet-oneline">
<div class="sheet-main-skills-bloodpoints">
<input class="sheet-hidden sheet-general-hideshow" type="checkbox" name="attr_sheet-general-hideshow" />
<div class="sheet-doublecolumn sheet-3 sheet-general-hideshow-div1">
<input class="sheet-hpcustom-hideshow sheet-hidden" type="checkbox" name="attr_sheet-hpcustom-hideshow" />
<input class="sheet-inputchar sheet-hpcustom-hideshow-div1" type="number" step="0.01" value="0" name="attr_hp_act" />
<input class="sheet-inputchar sheet-hpcustom-hideshow-div2" type="number" step="0.01" value="0" name="attr_hp_act-custom" />
<h4>/</h4>
<input class="sheet-inputchar sheet-hpcustom-hideshow-div1" type="number" step="0.01" value="0" name="attr_hp_max" readonly />
<input class="sheet-inputchar sheet-hpcustom-hideshow-div2" type="number" step="0.01" value="0" name="attr_hp_max-custom" />
</div>
<div class="sheet-doublecolumn sheet-general-hideshow-div2">
<div class="sheet-online">
<h4>Use Custom HP_MAX</h4>
<input class="sheet-hpcustom-hideshow" type="checkbox" name="attr_sheet-hpcustom-hideshow" />
</div>
<div class="sheet-online">
<h4>Mod<br>HP_Max</h4>
<input type="number" step="0.01" value="0" name="attr_hp_mod" />
</div>
</div>
<h4 class="sheet-general-hideshow-div1">HP Act. / Max</h4>
</div>
</div>
</div>
<script id="✓ - CALC : HP Max basé sur Body/CON/Level + Mod" type="text/worker">
on("sheet:opened change:body change:con change:level change:hp_mod", function () {
getAttrs(["body", "con", "level", "hp_mod"], function(values) {
const body = (values["body"] || "").toLowerCase();
const con = parseInt(values["con"], 10) || 0;
const level = parseInt(values["level"], 10) || 1;
const hp_mod = parseInt(values["hp_mod"], 10) || 0;
let base = 0;
let progression = 0;
switch (body) {
case "skinny":
case "fit":
base = 8;
progression = 4;
break;
case "average":
base = 10;
progression = 5;
break;
case "heavy":
base = 12;
progression = 6;
break;
default:
base = 8;
progression = 4;
}
const hp_max = base + con + ((level - 1) * (progression + con)) + hp_mod;
setAttrs({ hp_max });
});
});
</script>
<!-- BLOOD POINTS -->
<div class="sheet-standardbox sheet-standardbox42" style="grid-column: 4/6">
<div class="sheet-oneline">
<div class="sheet-main-skills-bloodpoints">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_bp_act" />
<h4>/</h4>
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_bp_max" readonly />
</div>
<h4>Blood Points</h4>
</div>
</div>
</div>
<script id="✓ - CALC : Blood Points Max" type="text/worker">
on("sheet:opened change:body change:con", function () {
getAttrs(["body", "con"], function(values) {
const body = (values["body"] || "").toLowerCase();
const con = parseInt(values["con"], 10) || 0;
let base = 8;
switch (body) {
case "skinny":
case "average":
base = 8;
break;
case "fit":
base = 10;
break;
case "heavy":
base = 12;
break;
}
const bp_max = base + con;
setAttrs({ bp_max });
});
});
</script>
<!-- INITIATIVE -->
<div class="sheet-standardbox sheet-standardbox53">
<div class="sheet-oneline">
<div class="sheet-main-skills-initiative">
<input class="sheet-inputchar" type="number" step="0.01" value="1" name="attr_initiative" readonly />
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_initiative" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Initiative}} {{roll=[[1d20+@{initiative}&{tracker}]]}} {{charactername=@{character_name}}} {{standard=1}} {{category=Turn Order}}"></button>
<h4>Initiative</h4>
</div>
</div>
</div>
</div>
<script id="✓ - CALC : Initiative = 1 + dex" type="text/worker">
on("sheet:opened change:dex", function () {
getAttrs(["dex"], function(values) {
const dex = parseInt(values.dex) || 0;
const initiative = 1 + dex;
setAttrs({ initiative });
});
});
</script>
<!-- HIT DIE -->
<div class="sheet-standardbox sheet-standardbox12">
<div class="sheet-oneline">
<div class="sheet-main-skills-hitdice">
<input class="sheet-inputchar" type="text" step="0.01" value="0" name="attr_hitdie" readonly />
</div>
<div class="sheet-button-div-holder">
<button type="roll" class="sheet-button-description" name="roll_hitdie" value="@{global-privacy-status} &{template:dzapocalypse} {{name=Hit Die}} {{roll=[[@{hitdie}]]}} {{charactername=@{character_name}}} {{standard=1}} {{category=Side Roll}}"></button>
<h4>Hit Die</h4>
</div>
</div>
</div>
<script id="✓ - CALC : Hit Die selon body" type="text/worker">
on("sheet:opened change:body", function () {
getAttrs(["body"], function(values) {
const body = (values["body"] || "").toLowerCase();
let hitdie = "1d10";
switch (body) {
case "skinny":
case "fit":
hitdie = "1d8";
break;
case "average":
hitdie = "1d10";
break;
case "heavy":
hitdie = "1d12";
break;
}
setAttrs({ hitdie });
});
});
</script>
<!-- SPEED -->
<div class="sheet-standardbox sheet-standardbox11">
<div class="sheet-oneline">
<div class="sheet-main-skills-speed">
<input class="sheet-inputchar" type="text" step="0.01" value="10" name="attr_speed" readonly />
<h4>Speed</h4>
</div>
</div>
</div>
<script id="✓ - CALC : Speed selon morphologie + sac" type="text/worker">
on("sheet:opened change:body change:backpack-slot-max", function () {
getAttrs(["body", "backpack-slot-max"], function(values) {
const body = (values["body"] || "").toLowerCase();
const backpackMax = parseInt(values["backpack-slot-max"], 10) || 0;
let rawSpeed = 25;
switch (body) {
case "skinny":
rawSpeed = 20;
break;
case "fit":
rawSpeed = 30;
break;
case "average":
rawSpeed = 25;
break;
case "heavy":
rawSpeed = 15;
break;
}
// Apply penalty if wearing a large backpack
if (backpackMax === 30) {
rawSpeed -= 5;
}
setAttrs({
speed: `${rawSpeed}ft.`
});
});
});
</script>
<!-- PROFICIENCY BONUS -->
<div class="sheet-standardbox sheet-standardbox51">
<div class="sheet-oneline">
<div class="sheet-main-skills-hitdice">
<input class="sheet-inputchar" type="text" step="0.01" value="0" name="attr_pb" readonly />
</div>
<h4>Prof. Bonus</h4>
<select name="attr_nopb" style="position: absolute;width: 20px!important;top: -9px;left: -9px;">
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</div>
<script id="✓ - CALC : Proficiency Bonus" type="text/worker">
on("sheet:opened change:level change:nopb", function () {
getAttrs(["level","nopb"], function (values) {
const enabled = (String(values.nopb ?? "").toLowerCase() === "1") ||
(String(values.nopb ?? "").toLowerCase() === "on");
if (!enabled) { setAttrs({ pb: 0 }); return; }
const level = parseInt(values.level, 10) || 1;
let pb = 2;
if (level >= 17) pb = 6;
else if (level >= 13) pb = 5;
else if (level >= 9) pb = 4;
else if (level >= 5) pb = 3;
setAttrs({ pb });
});
});
</script>
<!-- EXHAUSTION -->
<div class="sheet-standardbox sheet-standardbox42">
<div class="sheet-oneline">
<div class="sheet-main-skills-exhaustion">
<input class="sheet-with-arrows sheet-inputchar" type="text" step="0.01" value="0" name="attr_exhaustion" />
</div>
<h4>Exhaustion</h4>
</div>
</div>
<!-- RATIONS -->
<div class="sheet-standardbox sheet-standardbox43" style="grid-column: 1/3">
<div class="sheet-oneline">
<div class="sheet-main-skills-rations">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_rations_act" />
<h4>/</h4>
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_rations_max" />
</div>
<h4>Rations Act./Max</h4>
</div>
</div>
</div>
<!-- WATER -->
<div class="sheet-standardbox sheet-standardbox54" style="grid-column: 3/5">
<div class="sheet-oneline">
<div class="sheet-main-skills-water">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_water_act" />
<h4>/</h4>
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_water_max" />
</div>
<h4>Water Act./Max</h4>
</div>
</div>
</div>
<!-- INSANITY -->
<div class="sheet-standardbox sheet-standardbox41">
<div class="sheet-oneline">
<div class="sheet-main-skills-insanity">
<input class="sheet-with-arrows sheet-inputchar" type="text" step="0.01" value="0" name="attr_insanity" />
</div>
<h4>Insanity</h4>
</div>
</div>
</div>
<!-- ----- CLOTHING ----- -->
<div class="sheet-main-clothing">
<div class="sheet-standardbox sheet-standardbox13">
<h4 class="sheet-minititles2">Clothing</h4>
<div class="sheet-oneline">
<div class="sheet-clothing">
<h4>&nbsp;</h4>
<h4>&nbsp;</h4>
<h4 class="sheet-left">Name</h4>
<h4>AC</h4>
<h4 style="grid-column:5/7">VAL</h4>
</div>
<!-- --->
<div class="sheet-clothing">
<div class="sheet-imgfixed sheet-imgfixed-helmet"></div>
<h4 class="sheet-left">Head</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-head" />
<input type="number" value="0" name="attr_clothing-head-armorclass" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-head-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-head-hideshow" type="checkbox" name="attr_sheet-head-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-head-hideshow" type="checkbox" name="attr_sheet-head-hideshow" />
<textarea class="sheet-head-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-head-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing">
<div class="sheet-imgfixed sheet-imgfixed-face"></div>
<h4 class="sheet-left">Face</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-face" />
<input type="number" value="0" name="attr_clothing-face-armorclass" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-face-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-face-hideshow" type="checkbox" name="attr_sheet-face-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-face-hideshow" type="checkbox" name="attr_sheet-face-hideshow" />
<textarea class="sheet-face-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-face-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing">
<div class="sheet-imgfixed sheet-imgfixed-chest"></div>
<h4 class="sheet-left">Chest</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-chest" />
<input type="number" value="0" name="attr_clothing-chest-armorclass" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-chest-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-chest-hideshow" type="checkbox" name="attr_sheet-chest-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-chest-hideshow" type="checkbox" name="attr_sheet-chest-hideshow" />
<textarea class="sheet-chest-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-chest-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing sheet-backpack">
<div class="sheet-imgfixed sheet-imgfixed-back"></div>
<h4 class="sheet-left">Back</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-back" />
<select name="attr_clothing-backpack-type">
<option value="none">-</option>
<option value="small">Small Pack (S)</option>
<option value="medium">Medium Pack (M)</option>
<option value="large">Large Pack (L)</option>
</select>
<input type="number" value="0" name="attr_clothing-back-armorclass" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-back-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-back-hideshow" type="checkbox" name="attr_sheet-back-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-back-hideshow" type="checkbox" name="attr_sheet-back-hideshow" />
<textarea class="sheet-back-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-back-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing">
<div class="sheet-imgfixed sheet-imgfixed-hands"></div>
<h4 class="sheet-left">Hands</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-hands" />
<input type="number" value="0" name="attr_clothing-hands-armorclass" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-hands-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-hands-hideshow" type="checkbox" name="attr_sheet-hands-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-hands-hideshow" type="checkbox" name="attr_sheet-hands-hideshow" />
<textarea class="sheet-hands-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-hands-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing sheet-holster">
<div class="sheet-imgfixed sheet-imgfixed-belt"></div>
<h4 class="sheet-left">Belt</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-belt" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-belt-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-belt-hideshow" type="checkbox" name="attr_sheet-belt-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-belt-hideshow" type="checkbox" name="attr_sheet-belt-hideshow" />
<textarea class="sheet-belt-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-belt-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing">
<div class="sheet-imgfixed sheet-imgfixed-legs"></div>
<h4 class="sheet-left">Legs</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-legs" />
<input type="number" value="0" name="attr_clothing-legs-armorclass" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-legs-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-legs-hideshow" type="checkbox" name="attr_sheet-legs-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-legs-hideshow" type="checkbox" name="attr_sheet-legs-hideshow" />
<textarea class="sheet-legs-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-legs-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing">
<div class="sheet-imgfixed sheet-imgfixed-feets"></div>
<h4 class="sheet-left">Feets</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-feets" />
<input type="number" value="0" name="attr_clothing-feets-armorclass" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-feets-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-feets-hideshow" type="checkbox" name="attr_sheet-feets-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-feets-hideshow" type="checkbox" name="attr_sheet-feets-hideshow" />
<textarea class="sheet-feets-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-feets-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing sheet-holster">
<div class="sheet-imgfixed sheet-imgfixed-holster"></div>
<h4 class="sheet-left">Holster</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-holster1" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-holster1-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-holster1-hideshow" type="checkbox" name="attr_sheet-holster1-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-holster1-hideshow" type="checkbox" name="attr_sheet-holster1-hideshow" />
<textarea class="sheet-holster1-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-holster1-description"></textarea>
</div>
<!-- --->
<div class="sheet-clothing sheet-holster">
<div class="sheet-imgfixed sheet-imgfixed-holster"></div>
<h4 class="sheet-left" class="sheet-left">Holster</h4>
<input class="sheet-left" type="text" value="" name="attr_clothing-holster2" />
<input class="sheet-minimalist" type="number" value="0" name="attr_clothing-holster2-price" />
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-holster2-hideshow" type="checkbox" name="attr_sheet-holster2-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
<input class="sheet-hidden sheet-holster2-hideshow" type="checkbox" name="attr_sheet-holster2-hideshow" />
<textarea class="sheet-holster2-hideshow-div1 sheet-left" type="text" placeholder="Description/Effects" name="attr_clothing-holster2-description"></textarea>
</div>
<!-- --->
</div>
</div>
</div>
<!-- ----- EQUIPMENT ----- -->
<div class="sheet-main-equipment">
<div class="sheet-standardbox sheet-standardbox12">
<h4 class="sheet-minititles2">Pocket & Backpack Slots</h4>
<div class="sheet-oneline">
<div class="sheet-doublecolumn">
<div class="sheet-equipment1">
<h4>&nbsp;</h4>
<h4>&nbsp;</h4>
<h4 class="sheet-left">Name</h4>
<h4>QTY</h4>
</div>
<div class="sheet-equipment2">
<h4>&nbsp;</h4>
<h4>QTY</h4>
<h4 class="sheet-right">Name</h4>
</div>
</div>
<fieldset class="repeating_equipment">
<div class="sheet-doublecolumn">
<div class="sheet-equipment1">
<input class="sheet-minimalist" type="number" value="0" name="attr_equipment_price1" />
<h4></h4>
<input class="sheet-left" type="text" placeholder="-" name="attr_equipment_name1" />
<input type="number" step="0.01" value="0" name="attr_equipment_quantity1" />
<select name="attr_backpack-slot1">
<option value="0">.</option>
<option value="supplement" selected>-</option>
<option value="pocket">P</option>
<option value="backpack">BP</option>
</select>
</div>
<div class="sheet-equipment2">
<select name="attr_backpack-slot2">
<option value="0">.</option>
<option value="supplement" selected>-</option>
<option value="pocket">P</option>
<option value="backpack">BP</option>
</select>
<input type="number" step="0.01" value="0" name="attr_equipment_quantity2" />
<input class="sheet-right" type="text" placeholder="-" name="attr_equipment_name2" />
<input class="sheet-minimalist" type="number" value="0" name="attr_equipment_price2" />
<h4></h4>
</div>
</div>
</fieldset>
<!-- --->
<div class="sheet-equipment3">
<h4>&nbsp;</h4>
<div class="sheet-doublecolumn sheet-2">
<h4 style="grid-column: 1/-1">Inv. Value</h4>
<input class="sheet-vanilla" type="number" step="0.01" value="0" name="attr_currency-inventory" readonly />
<h4></h4>
</div>
<div class="sheet-doublecolumn sheet-2">
<h4 style="grid-column: 1/-1">Money</h4>
<input class="sheet-vanilla" type="number" step="0.01" value="0" name="attr_currency" />
<h4></h4>
</div>
<div class="sheet-doublecolumn sheet-3">
<h4 style="grid-column: 1/-1">Pocket</h4>
<input class="sheet-vanilla sheet-maxpocket" type="number" step="0.01" value="0" name="attr_pocket-slot" readonly />
<h4>/</h4>
<input class="sheet-vanilla" type="number" step="0.01" value="6" name="attr_pocket-slot-max" readonly />
</div>
<div class="sheet-doublecolumn sheet-3">
<h4 style="grid-column: 1/-1">Backpack</h4>
<input class="sheet-vanilla sheet-maxbackpack" type="number" step="0.01" value="0" name="attr_backpack-slot" readonly />
<h4>/</h4>
<input class="sheet-vanilla" type="number" step="0.01" value="0" name="attr_backpack-slot-max" readonly />
</div>
<div class="sheet-online">
<h4 style="grid-column: 1/-1">N/A</h4>
<input class="sheet-vanilla" type="number" step="0.01" value="0" name="attr_sup-slot" readonly />
</div>
<h4>&nbsp;</h4>
</div>
</div>
</div>
<script id="✓ SCRIPTCALC : Total Equipment Value × Quantity" type="text/worker">
function updateCurrencyInventory() {
getSectionIDs("repeating_equipment", function(ids) {
const fields = [];
ids.forEach(id => {
fields.push(`repeating_equipment_${id}_equipment_price1`);
fields.push(`repeating_equipment_${id}_equipment_quantity1`);
fields.push(`repeating_equipment_${id}_equipment_price2`);
fields.push(`repeating_equipment_${id}_equipment_quantity2`);
});
getAttrs(fields, function(values) {
let total = 0;
ids.forEach(id => {
const price1 = parseFloat(values[`repeating_equipment_${id}_equipment_price1`]) || 0;
const qty1 = parseFloat(values[`repeating_equipment_${id}_equipment_quantity1`]) || 0;
const price2 = parseFloat(values[`repeating_equipment_${id}_equipment_price2`]) || 0;
const qty2 = parseFloat(values[`repeating_equipment_${id}_equipment_quantity2`]) || 0;
total += price1 * qty1 + price2 * qty2;
});
setAttrs({ "currency-inventory": total });
});
});
}
on("sheet:opened change:repeating_equipment:equipment_price1 change:repeating_equipment:equipment_quantity1 change:repeating_equipment:equipment_price2 change:repeating_equipment:equipment_quantity2", updateCurrencyInventory);
</script>
<script id="✓ - DISPLAY : Couleur des Slots (pocket/backpack)" type="text/worker">
function updateSlotColors() {
getAttrs([
"pocket-slot", "pocket-slot-max",
"backpack-slot", "backpack-slot-max"
], function(values) {
const pocket = parseInt(values["pocket-slot"], 10) || 0;
const pocketMax = parseInt(values["pocket-slot-max"], 10) || 0;
const backpack = parseInt(values["backpack-slot"], 10) || 0;
const backpackMax = parseInt(values["backpack-slot-max"], 10) || 0;
// POCKET
const pocketDiv = $20(".sheet-maxpocket");
pocketDiv.removeClass("sheet-black sheet-red");
pocketDiv.addClass(pocket <= pocketMax ? "sheet-black" : "sheet-red");
// BACKPACK
const backpackDiv = $20(".sheet-maxbackpack");
backpackDiv.removeClass("sheet-black sheet-red");
backpackDiv.addClass(backpack <= backpackMax ? "sheet-black" : "sheet-red");
});
}
on("sheet:opened change:pocket-slot change:backpack-slot change:pocket-slot-max change:backpack-slot-max", updateSlotColors);
</script>
<script id="✓ - CALC : Slot counting dans le sac" type="text/worker">
on("change:repeating_equipment:backpack-slot1 change:repeating_equipment:backpack-slot2", function () {
getSectionIDs("repeating_equipment", function(ids) {
const attrs = [];
ids.forEach(id => {
attrs.push(
`repeating_equipment_${id}_backpack-slot1`,
`repeating_equipment_${id}_backpack-slot2`
);
});
getAttrs(attrs, function(values) {
let pocket = 0;
let backpack = 0;
let supplement = 0;
ids.forEach(id => {
const slot1 = values[`repeating_equipment_${id}_backpack-slot1`] || "";
const slot2 = values[`repeating_equipment_${id}_backpack-slot2`] || "";
[slot1, slot2].forEach(slot => {
switch (slot.toLowerCase()) {
case "pocket":
pocket++;
break;
case "backpack":
backpack++;
break;
case "supplement":
supplement++;
break;
}
});
});
setAttrs({
"pocket-slot": pocket,
"backpack-slot": backpack,
"sup-slot": supplement
});
});
});
});
</script>
<script id="✓ - CALC : Max Backpack Slots (0/10/20/30)" type="text/worker">
on("change:clothing-backpack-type", function () {
getAttrs(["clothing-backpack-type"], function(values) {
const type = (values["clothing-backpack-type"] || "").toLowerCase();
let max = 0;
switch (type) {
case "small":
max = 10;
break;
case "medium":
max = 20;
break;
case "large":
max = 30;
break;
case "none":
default:
max = 0;
break;
}
setAttrs({
"backpack-slot-max": max
});
});
});
</script>
</div>
<!-- ----- MAGS ----- -->
<div class="sheet-main-mags">
<div class="sheet-standardbox sheet-standardbox14">
<h4 class="sheet-minititles2">Magazines Storage</h4>
<div class="sheet-oneline">
<div class="sheet-mags">
<h4 class="sheet-left">Magazine Name</h4>
<div class="sheet-doublecolumn sheet-3">
<h4>Act.</h4>
<h4>/</h4>
<h4>Max</h4>
</div>
</div>
<fieldset class="repeating_mags">
<div class="sheet-mags">
<input class="sheet-left" type="text" step="0.01" placeholder="-" name="attr_mag-name" />
<div class="sheet-doublecolumn sheet-3">
<input type="number" step="0.01" value="0" name="attr_mag-current" />
<h4>/</h4>
<input type="number" step="0.01" value="6" name="attr_mag-max" />
</div>
</div>
</fieldset>
</div>
</div>
</div>
<!-- ----- WEAPONS ----- -->
<div class="sheet-main-weapons">
<div class="sheet-standardbox sheet-standardbox11">
<h4 class="sheet-minititles2">Weapons Cabinet</h4>
<div class="sheet-oneline">
<div class="sheet-weapons-row1">
<h4>Roll</h4>
<h4>&nbsp;</h4>
<h4 class="sheet-left">Name</h4>
<h4 class="sheet-left">Hit.M</h4>
<h4>DMG</h4>
<h4>Stat</h4>
<h4>T</h4>
<h4 style="grid-column:8/10">VAL</h4>
</div>
<script id="✓ CALC : Weapon Button Links" type="text/worker">
on("sheet:opened change:repeating_weapons remove:repeating_weapons", () => {
getSectionIDs("repeating_weapons", ids => {
const updates = {};
ids.forEach(id => {
updates[`repeating_weapons_${id}_weapon-button`] = `[Weapon Details](~${id}__show-description)`;
});
setAttrs(updates, { silent: true });
});
});
</script>
<fieldset class="repeating_weapons">
<div class="sheet-weapons-row1">
<button type="roll" class="sheet-button-attack" name="roll_talent" value="@{global-privacy-status} &{template:dzapocalypse} {{name=@{weapon_name}}} {{charactername=@{character_name}}} {{category=Weapon}} {{@{global-advantage-status}=1}} {{roll=[[1d20+@{weapon_hitmod}+@{pb}]]}} {{roll1=[[1d20+@{weapon_hitmod}+@{pb}]]}} {{roll2=[[1d20+@{weapon_hitmod}+@{pb}]]}} {{range=@{weapon_range}}} {{dmg1=[[@{weapon_dmg}+@{weapon_type_selector}]]}} {{dmg1type=@{weapon_dmgtype_selector}}} {{description=@{weapons-description}}} {{button=@{weapon-button}}} {{desc=[[1]]}}"></button>
<input style="grid-column: 1/-1" class="sheet-hidden" type="text" value="" name="attr_weapon-button" />
<button type="roll" class="sheet-hidden" name="roll_show-description" value="@{global-privacy-status} &{template:dzapocalypse-description} {{name=Details}} {{description=@{weapons-description}}} {{properties=@{weapons_properties}}} {{barrel=@{barrel_name}}} {{tactical1=@{tactical1_name}}} {{tactical2=@{tactical2_name}}} {{scope=@{scope_name}}} {{magazine=@{magazine_name}}}"></button>
<input type="checkbox" value="1" name="attr_weapon_active" />
<input class="sheet-left" type="text" placeholder="Weapon Name" name="attr_weapon_name" />
<input type="number" value="0" name="attr_weapon_hitmod" />
<input type="text" step="0.01" value="0" name="attr_weapon_dmg" />
<select name="attr_weapon_type_selector_display">
<option value="0" selected>-</option>
<option value="melee">Melee</option>
<option value="firearms">Firearms</option>
</select>
<input class="sheet-hidden" type="number" step="0.01" value="0" name="attr_weapon_type_selector" />
<select name="attr_weapon_dmgtype_selector">
<option value="0" selected>-</option>
<option value="Blunt">B</option>
<option value="Slash">S</option>
<option value="Pierce">P</option>
</select>
<input class="sheet-minimalist" type="number" value="0" name="attr_weapon_price">
<h4></h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-weapons-hideshow" type="checkbox" name="attr_sheet-weapons-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
</div>
<div class="sheet-weapons-row2">
<input class="sheet-left" type="text" placeholder="Properties" name="attr_weapons_properties" />
<div class="sheet-placeholdercenter">
<input type="text" placeholder="0 / 0 / 0" name="attr_weapon_range" />
</div>
<input type="number" value="0" name="attr_weapon_capacity_act" />
<h4>/</h4>
<input type="number" value="0" name="attr_weapon_capacity_max" />
</div>
<hr class="sheet-separator-text sheet-separator-text sheet-weapons-hideshow-div1">
<input class="sheet-hidden sheet-weapons-hideshow" type="checkbox" name="attr_sheet-weapons-hideshow" />
<textarea class="sheet-left sheet-weapons-hideshow-div1" type="text" placeholder="Description" name="attr_weapons-description"></textarea>
<h4 class="sheet-minititles2 sheet-weapons-hideshow-div1">Mod. Section</h4>
<div class="sheet-weapons-row3 sheet-weapons-hideshow-div1">
<div class="sheet-online">
<div class="sheet-imgfixed-cadreblanc"></div>
<div class="sheet-imgfixed-weapons"></div>
<img class="sheet-imgfixed-custom" name="attr_weapon_image" />
</div>
<div class="sheet-weapons-row4">
<h4 class="sheet-left">Barrel</h4>
<input class="sheet-left" type="text" placeholder="Barrel Name" name="attr_barrel_name" />
<input class="sheet-minimalist" type="number" value="0" name="attr_weapon_barrel_price">
<h4></h4>
<h4 class="sheet-left">Tactical 1</h4>
<input class="sheet-left" type="text" placeholder="Tactial 1 Name" name="attr_tactical1_name" />
<input class="sheet-minimalist" type="number" value="0" name="attr_weapon_tactical1_price">
<h4></h4>
<h4 class="sheet-left">Tactical 2</h4>
<input class="sheet-left" type="text" placeholder="Tactial 2 Name" name="attr_tactical2_name" />
<input class="sheet-minimalist" type="number" value="0" name="attr_weapon_tactical2_price">
<h4></h4>
<h4 class="sheet-left">Scope</h4>
<input class="sheet-left" type="text" placeholder="Scope Name" name="attr_scope_name" />
<input class="sheet-minimalist" type="number" value="0" name="attr_weapon_scope_price">
<h4></h4>
<h4 class="sheet-left">Magazine</h4>
<input class="sheet-left" type="text" placeholder="Magazine Name" name="attr_magazine_name" />
<input class="sheet-minimalist" type="number" value="0" name="attr_weapon_magazine_price">
<h4></h4>
</div>
</div>
<hr class="sheet-separator-text sheet-separator-text sheet-weapons-hideshow-div1" />
<input class="sheet-left sheet-weapons-hideshow-div1" type="text" placeholder="Link to Image" name="attr_weapon_image" />
<hr class="sheet-separator-text sheet-separator-text2 sheet-weapons-hideshow-div1" />
</fieldset>
<script id="✓ - CALC : Weapon Type Selector" type="text/worker">
on("sheet:opened change:repeating_weapons:weapon_type_selector_display change:melee_value change:firearms_value", function(eventInfo) {
const match = eventInfo.sourceAttribute.match(/repeating_weapons_([-a-zA-Z0-9]+)_/);
if (!match) return;
const rowId = match[1];
const prefix = `repeating_weapons_${rowId}_`;
getAttrs([
`${prefix}weapon_type_selector_display`,
"melee_value",
"firearms_value"
], function(values) {
const display = values[`${prefix}weapon_type_selector_display`] || "0";
let result = "0";
if (display === "melee") {
result = values["melee_value"] || "0";
} else if (display === "firearms") {
result = values["firearms_value"] || "0";
}
console.log(`Display: ${display} → Type Selector = ${result}`);
setAttrs({
[`${prefix}weapon_type_selector`]: result
});
});
});
</script>
</div>
</div>
</div>
</div>
</div>
<div class="sheet-vehicle-display sheet-hidden">
<div class="sheet-maingrid-area-vehicle">
<!-- VEHICLE ARMOR CLASS -->
<div class="sheet-standardbox sheet-standardbox42 sheet-vehicle-main-armorclass">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-armorclass">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-armorclass" />
</div>
<h4>Armor Class</h4>
</div>
</div>
<!-- VEHICLE BODY -->
<div class="sheet-standardbox sheet-standardbox34 sheet-vehicle-main-hp">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-hp">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-hp_act" />
<h4>/</h4>
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-hp_max" readonly />
</div>
</div>
<h4>Main / Body HP</h4>
</div>
</div>
<!-- VEHICLE ARMOR PASSENGER -->
<div class="sheet-standardbox sheet-standardbox41 sheet-vehicle-main-passenger">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-passenger">
<input class="sheet-inputchar" type="text" value="0" name="attr_vehicle-passenger" />
</div>
<h4>Passengers</h4>
</div>
</div>
<!-- VEHICLE IMG -->
<div class="sheet-standardbox sheet-standardbox41 sheet-vehicle-main-img">
<div class="sheet-oneline">
<input class="sheet-hidden sheet-vehicle-hideshow" type="checkbox" name="attr_sheet-vehicle-hideshow" />
<div class="sheet-main-vehicle-passenger sheet-vehicle-hideshow-div2">
<img type="text" value="0" name="attr_vehicle-img" />
</div>
<div class="sheet-main-vehicle-instruction sheet-vehicle-hideshow-div1">
<textarea class="sheet-left" type="text" value="0" name="attr_vehicle-desc"></textarea>
</div>
</div>
</div>
<!-- VEHICLE SPEED -->
<div class="sheet-standardbox sheet-standardbox33 sheet-vehicle-main-speed">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-speed">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="text" step="0.01" value="0ft." name="attr_vehicle-roundspeed" />
<h4>-</h4>
<input class="sheet-inputchar" type="text" step="0.01" value="0ft." name="attr_vehicle-topspeed" />
</div>
<h4>Round / Top Speed</h4>
</div>
</div>
</div>
<!-- VEHICLE TANK SIZE -->
<div class="sheet-standardbox sheet-standardbox34 sheet-vehicle-main-tank">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-tank">
<div class="sheet-doublecolumn sheet-32">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-milespergallon" />
<h4>-</h4>
<input class="sheet-inputchar" type="text" value="0gal" name="attr_vehicle-tanksize" />
</div>
</div>
<h4>MPG & Tank Size</h4>
</div>
</div>
<!-- VEHICLE NAME -->
<div class="sheet-standardbox sheet-standardbox31 sheet-vehicle-main-name">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-name1">
<input class="sheet-inputchar" type="text" placeholder="Vehicle Name" name="attr_vehicle-name" />
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-vehicle-hideshow" type="checkbox" name="attr_sheet-vehicle-hideshow" />
<span class="sheet-cogs-icon">y</span>
</div>
</div>
<input class="sheet-hidden sheet-vehicle-hideshow" type="checkbox" name="attr_sheet-vehicle-hideshow" />
<div class="sheet-main-vehicle-name2 sheet-vehicle-hideshow-div1">
<h4>Vehicle Archetype :</h4>
<select name="attr_vehicle-type">
<option value="0" selected>-</option>
<option value="21 75 4 2000 100 100 50 30 23 10 5 7">Small Airplane</option>
<option value="18 350 13 500 25 5 96 75 20 45 4 35">APC</option>
<option value="9 20 2/4 450 20 20 5 22 11 3 4 0">ATV/UTV</option>
<option value="7 5 2 200 10 0 0 0 1 2 0 0">Bicycle</option>
<option value="14 100 50 600 30 7 80 35 16 4 4 7">Bus</option>
<option value="10 13 2 300 15 0 0 0 3 0 0 0">Horse</option>
<option value="17 300 4 500 25 5 25 55 19 30 10 20">Humvee</option>
<option value="11 25 5 400 20 7 30 15 13 0 5 0">Motorboat</option>
<option value="8 20 2 900 45 40 4 12 10 3 4 0">Motorcycle</option>
<option value="13 85 3+7 900 45 20 25 30 15 5 4 5">Pickup Truck</option>
<option value="12 50 2+5 600 30 8 40 15 14 6 4 5">RV</option>
<option value="12 65 5+1 1000 50 30 12 25 14 3 4 4">Sedan</option>
<option value="18 150 3+25 800 40 5 150 45 20 30 4 5">Semi Truck</option>
<option value="14 100 7 1000 50 25 20 35 16 5 4 5">SUV</option>
<option value="19 500 7 400 20 5 200 100 21 300 5 0">Tank</option>
<option value="25 5000 2 500 25 500 3000 50 27 100 10 7">Train Engine</option>
</select>
<h4>IMG URL :</h4>
<input type="text" placeholder="Image URL to Display" name="attr_vehicle-img" />
</div>
</div>
</div>
<!-- VEHICLE ENGINE STR -->
<div class="sheet-standardbox sheet-standardbox33 sheet-vehicle-main-enginestr">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-engine-str">
<input class="sheet-inputchar" type="text" step="0.01" value="0 (0)" name="attr_vehicle-engine-str" />
</div>
<h4>Engine STR</h4>
</div>
</div>
<!-- VEHICLE ENGINE HP -->
<div class="sheet-standardbox sheet-standardbox13 sheet-vehicle-main-engine">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-engine-hp">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-engine-hp_act" />
<h4>/</h4>
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-engine-hp_max" readonly />
</div>
</div>
<h4>Engine HP</h4>
</div>
</div>
<!-- VEHICLE WINDOWS HP -->
<div class="sheet-standardbox sheet-standardbox12 sheet-vehicle-main-windows">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-windows-hp">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-windows-hp_act" />
<h4>/</h4>
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-windows-hp_max" readonly />
</div>
</div>
<h4>Window HP</h4>
</div>
</div>
<!-- VEHICLE WHEEL HP -->
<div class="sheet-standardbox sheet-standardbox14 sheet-vehicle-main-wheel">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-wheel-hp">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-wheel-hp_act" />
<h4>/</h4>
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-wheel-hp_max" readonly />
</div>
</div>
<h4>Wheel HP</h4>
</div>
</div>
<!-- VEHICLE HEADLIGHT HP -->
<div class="sheet-standardbox sheet-standardbox11 sheet-vehicle-main-headlight">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-headlight-hp">
<div class="sheet-doublecolumn sheet-3">
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-headlight-hp_act" />
<h4>/</h4>
<input class="sheet-inputchar" type="number" step="0.01" value="0" name="attr_vehicle-headlight-hp_max" readonly />
</div>
</div>
<h4>Headlight HP</h4>
</div>
</div>
<script id="✓ - CALC : Vehicle Setup from Type" type="text/worker">
on("change:vehicle-type", function () {
getAttrs(["vehicle-type"], function (values) {
const raw = values["vehicle-type"];
if (!raw || raw === "0") return;
const parseValue = (v) => {
if (v.includes("+")) {
return v.split("+").reduce((sum, n) => sum + parseInt(n, 10), 0);
} else if (v.includes("/")) {
return Math.max(...v.split("/").map(n => parseInt(n, 10)));
} else {
return parseInt(v, 10);
}
};
const parts = raw.trim().split(" ");
if (parts.length !== 12) return;
const [
ac,
hpMax,
passenger,
topSpeed,
roundSpeed,
mpg,
tankSize,
engineHp,
engineStr,
wheelHp,
headlightHp,
windowHp
] = parts.map(parseValue);
const engineMod = Math.floor((engineStr - 10) / 2);
const modDisplay = engineMod >= 0 ? `(+${engineMod})` : `(${engineMod})`;
const engineStrDisplay = `${engineStr} ${modDisplay}`;
setAttrs({
"vehicle-armorclass": ac,
"vehicle-hp_max": hpMax,
"vehicle-hp_act": hpMax,
"vehicle-passenger": passenger,
"vehicle-topspeed": `${topSpeed}ft.`,
"vehicle-roundspeed": `${roundSpeed}ft.`,
"vehicle-milespergallon": mpg,
"vehicle-tanksize": `${tankSize}gal`,
"vehicle-engine-hp_max": engineHp,
"vehicle-engine-hp_act": engineHp,
"vehicle-engine-str": engineStrDisplay,
"vehicle-wheel-hp_max": wheelHp,
"vehicle-wheel-hp_act": wheelHp,
"vehicle-headlight-hp_max": headlightHp,
"vehicle-headlight-hp_act": headlightHp,
"vehicle-windows-hp_max": windowHp,
"vehicle-windows-hp_act": windowHp
});
});
});
</script>
<!-- ----- VEHICLE STORAGE ----- -->
<div class="sheet-main-vehiclestorage">
<div class="sheet-standardbox sheet-standardbox34">
<h4 class="sheet-minititles2">Vehicle Storage</h4>
<div class="sheet-oneline">
<div class="sheet-equipment">
<h4 class="sheet-left">Name</h4>
<h4>QTY</h4>
<h4>&nbsp;</h4>
<h4 class="sheet-left">Name</h4>
<h4>QTY</h4>
<h4>&nbsp;</h4>
<h4 class="sheet-left">Name</h4>
<h4>QTY</h4>
</div>
<fieldset class="repeating_vehiclestorage">
<div class="sheet-equipment">
<input class="sheet-left" type="text" placeholder="-" name="attr_equipment_name1" />
<input type="number" step="0.01" value="0" name="attr_equipment_quantity1" />
<h4>&nbsp;</h4>
<input class="sheet-left" type="text" placeholder="-" name="attr_equipment_name2" />
<input type="number" step="0.01" value="0" name="attr_equipment_quantity2" />
<h4>&nbsp;</h4>
<input class="sheet-left" type="text" placeholder="-" name="attr_equipment_name3" />
<input type="number" step="0.01" value="0" name="attr_equipment_quantity3" />
</div>
</fieldset>
<!-- --->
</div>
</div>
</div>
</div>
</div>
<div class="sheet-notes-display sheet-hidden">
<div class="sheet-background-header">
<div class="sheet-standardbox sheet-standardbox34">
<div class="sheet-oneline">
<div class="sheet-background-header-line1">
<input type="text" placeholder="-" name="attr_character_age" />
<input type="text" placeholder="-" name="attr_character_height" />
<input type="text" placeholder="-" name="attr_character_weight" />
<input type="text" placeholder="-" name="attr_character_skin" />
<input type="text" placeholder="-" name="attr_character_hair" />
<input type="text" placeholder="-" name="attr_character_eye" />
<input type="text" placeholder="-" name="attr_character_gender" />
<h4>Age</h4>
<h4>Height</h4>
<h4>Weight</h4>
<h4>Skin</h4>
<h4>Hair</h4>
<h4>Eye</h4>
<h4>Gender</h4>
</div>
</div>
</div>
</div>
<div class="sheet-background-area">
<!-- -->
<div class="sheet-background-vertical-art">
<div class="sheet-standardbox sheet-standardbox32">
<div class="sheet-oneline">
<div class="sheet-main-vehicle-name1">
<h4>Character Portrait</h4>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-portrait-hideshow" type="checkbox" name="attr_sheet-portrait-hideshow">
<span class="sheet-cogs-icon">y</span>
</div>
</div>
<input class="sheet-cogs-input sheet-portrait-hideshow" type="checkbox" name="attr_sheet-portrait-hideshow">
<input class="sheet-portrait-hideshow-div1" type="text" placeholder="(URL) Mobile Armor Portrait" name="attr_mobilearmor-portrait" />
<img name="attr_mobilearmor-portrait" />
</div>
</div>
<div class="sheet-standardbox sheet-standardbox31">
<h4 class="sheet-minititles2">Character Notes</h4>
<div class="sheet-oneline">
<textarea class="sheet-left" placeholder="-" name="attr_background-characternotes" style="height: 100px"></textarea>
</div>
</div>
</div>
<!-- -->
<div class="sheet-background-generalnotes">
<div class="sheet-standardbox sheet-standardbox34">
<h4 class="sheet-minititles2">General Notes</h4>
<div class="sheet-oneline">
<textarea class="sheet-left" name="attr_background-generalnotes"></textarea>
</div>
</div>
<div class="sheet-standardbox sheet-standardbox33">
<h4 class="sheet-minititles2">Specific Notes</h4>
<div class="sheet-oneline">
<fieldset class="repeating_notes">
<input class="sheet-hidden sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" checked />
<div class="sheet-notes1 sheet-cogs-hideshow-div1">
<input class="sheet-left" type="text" placeholder="Source" name="attr_proficiency-source" />
<input class="sheet-left" type="text" placeholder="Name" name="attr_proficiency-name" />
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" checked />
<span class="sheet-cogs-icon">y</span>
</div>
</div>
<div class="sheet-notes2 sheet-cogs-hideshow-div2">
<input class="sheet-hidden sheet-description-hideshow" type="checkbox" name="attr_sheet-description-hideshow" checked />
<span type="text" name="attr_proficiency-source"></span>
<span type="text" name="attr_proficiency-name"></span>
<div class="sheet-cogs-container">
<input class="sheet-cogs-input sheet-cogs-hideshow" type="checkbox" name="attr_sheet-cogs-hideshow" checked />
<span class="sheet-cogs-icon">y</span>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<!-- -->
</div>
</div>
<div class="sheet-bottom-background"></div>
</div>