Initial rework

This commit is contained in:
2024-12-10 17:22:28 +01:00
parent 9b25cc053a
commit 2b9361d3bd
16 changed files with 299 additions and 232 deletions

View File

@@ -7,7 +7,7 @@
<div class="resources grid">
<div class="resource flex-group-center">
<label for="system.trope" class="resource-label">Trope</label>
<label for="system.trope" class="resource-label">Class</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="system.trope" value="{{system.trope}}" data-dtype="String"/>
</div>
@@ -20,9 +20,9 @@
<nav class="sheet-tabs tabs" data-group="primary">
{{!-- Default tab is specified in actor-sheet.mjs --}}
<a class="item" data-tab="features">Features</a>
<a class="item" data-tab="schoolbag">School Bag</a>
<a class="item" data-tab="strengths">Strengths</a>
<a class="item" data-tab="trope">Trope Questions</a>
<a class="item" data-tab="schoolbag">Inventory</a>
<a class="item" data-tab="strengths">Abilities</a>
<!-- <a class="item" data-tab="trope">Trope Questions</a> -->
</nav>
{{!-- Sheet Body --}}
@@ -32,12 +32,12 @@
<div class="tab features" data-group="primary" data-tab="features">
<section class="grid grid-3col">
<section class="main grid-span-2">
{{> "systems/kidsonbrooms/templates/actor/parts/actor-features.html"}}
{{> "systems/kidsonbrooms/templates/actor/parts/actor-adversity.html"}}
{{> "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-features.html"}}
{{> "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-adversity.html"}}
</section>
<aside class="sidebar">
{{> "systems/kidsonbrooms/templates/actor/parts/actor-stats.html"}}
{{> "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-stats.html"}}
</aside>
@@ -50,10 +50,7 @@
{{editor schoolbag target="system.schoolbag" engine="prosemirror" button=false collaborate=false editable=true}}
</div>
</div>
{{!-- Strengths Tab --}}
<div class="tab features editor-border" data-group="primary" data-tab="strengths">
{{editor strengths target="system.strengths" engine="prosemirror" button=false collaborate=false editable=true}}

View File

@@ -28,7 +28,7 @@
{{!-- Owned Features Tab --}}
<div class="tab features" data-group="primary" data-tab="features">
{{> "systems/kidsonbrooms/templates/actor/parts/actor-npc-stats.html"}}
{{> "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-npc-stats.html"}}
</div>
</section>
</form>

View File

@@ -1,49 +1,56 @@
<section class="grid grid-3col">
<fieldset class="resource grid-span-3 flexcol">
<div class="resource flexrow">
<label for="system.age" class="resource-label">Age</label>
<input type="text" name="system.age" value="{{system.age}}" data-dtype="String"/>
</div>
<div class="resource grid-span-2 flexrow">
<label for="system.pronouns" class="resource-label">Pronouns</label>
<input type="text" name="system.pronouns" value="{{system.pronouns}}" data-dtype="String"/>
</div>
<div class="resource grid-span-3 flexrow">
<label for="system.fear" class="resource-label">Fear</label>
<input type="text" name="system.fear" value="{{system.fear}}" data-dtype="String"/>
</div>
<div class="resource grid-span-3 flexrow" >
<label for="system.motivation" class="resource-label">Motivation</label>
<input type="text" name="system.motivation" value="{{system.motivation}}" data-dtype="String"/>
</div>
<div class="resource grid-span-3 flexrow" >
<label for="system.description" class="resource-label">Description</label>
<input type="text" name="system.description" value="{{system.description}}" data-dtype="String"/>
</div>
<div class="resource grid-span-3 flexrow">
<label for="system.grade" class="resource-label">Grade</label>
<input type="text" name="system.grade" value="{{system.grade}}" data-dtype="String"/>
</div>
</fieldset>
<fieldset class="resource grid-span-3 flexcol">
<legend>Your Broom</legend>
<div class="resource grid-span-3 flexrow">
<label for="system.grade" class="resource-label">Species</label>
<input type="text" name="system.grade" value="{{system.grade}}" data-dtype="String" />
</div>
<div class="resource flexrow">
<label for="system.age" class="resource-label">Age</label>
<input type="text" name="system.age" value="{{system.age}}" data-dtype="String" />
</div>
<div class="resource grid-span-2 flexrow">
<label for="system.pronouns" class="resource-label">Pronouns</label>
<input type="text" name="system.pronouns" value="{{system.pronouns}}" data-dtype="String" />
</div>
<div class="resource grid-span-3 flexrow">
<label for="system.fear" class="resource-label">Fear</label>
<input type="text" name="system.fear" value="{{system.fear}}" data-dtype="String" />
</div>
<div class="resource grid-span-3 flexrow">
<label for="system.motivation" class="resource-label">Motivation</label>
<input type="text" name="system.motivation" value="{{system.motivation}}" data-dtype="String" />
</div>
<div class="resource grid-span-3 flexrow">
<label for="system.description" class="resource-label">Description</label>
<input type="text" name="system.description" value="{{system.description}}" data-dtype="String" />
</div>
</fieldset>
<!-- <fieldset class="resource grid-span-3 flexcol">
<legend>Your Broom</legend> -->
<!-- Broom Name Input with Dropdown -->
<!--
<div class="resource flexrow">
<label for="broom-name" class="resource-label">Name</label>
<input list="broomOptions" id="broom-name" name="system.broom.name"
value="{{system.broom.name}}" data-dtype="String" placeholder="Select or Enter Broom Name"
oninput="updateBroomDetails()" onblur="updateBroomDetails()">
<input list="broomOptions" id="broom-name" name="system.broom.name" value="{{system.broom.name}}"
data-dtype="String" placeholder="Select or Enter Broom Name" oninput="updateBroomDetails()"
onblur="updateBroomDetails()">
<datalist id="broomOptions">
<option value="The Blocker's Broom" data-look="Defensive" data-mechanical="Gain the Guardian Strength"></option>
<option value="Bolting 4000" data-look="Fast" data-mechanical="+1 to Flight checks"></option>
<option value="The Bruiser" data-look="Intense" data-mechanical="+1 to Fight checks"></option>
<option value="Cunning Captains Cruiser" data-look="Natural Leader" data-mechanical="Treat Snap Decisions as Planned Actions unless facing fear"></option>
<option value="Daredevils Duster" data-look="Flashy" data-mechanical="+3 to Charm checks when performing a stunt"></option>
<option value="The Daring Dodger 3000" data-look="Ambitious" data-mechanical="Each Adversity Token adds +2 to your roll instead of +1"></option>
<option value="Heartwoods Helper" data-look="Outgoing" data-mechanical="Each successful check grants an ally one Adversity Token"></option>
<option value="Mapmakers Friend" data-look="Level-Headed" data-mechanical="Cannot get lost if you know the area"></option>
<option value="Cunning Captains Cruiser" data-look="Natural Leader"
data-mechanical="Treat Snap Decisions as Planned Actions unless facing fear"></option>
<option value="Daredevils Duster" data-look="Flashy"
data-mechanical="+3 to Charm checks when performing a stunt"></option>
<option value="The Daring Dodger 3000" data-look="Ambitious"
data-mechanical="Each Adversity Token adds +2 to your roll instead of +1"></option>
<option value="Heartwoods Helper" data-look="Outgoing"
data-mechanical="Each successful check grants an ally one Adversity Token"></option>
<option value="Mapmakers Friend" data-look="Level-Headed"
data-mechanical="Cannot get lost if you know the area"></option>
<option value="The Masterminds Sweeper" data-look="Confident" data-mechanical="+1 to Brains checks"></option>
<option value="The Strong Sweep 2500" data-look="Strong" data-mechanical="+1 to Brawn checks"></option>
<option value="The Suave Sweeper" data-look="Trustworthy" data-mechanical="+1 to Charm checks"></option>
@@ -52,105 +59,125 @@
<option value="Weasels Whisk" data-look="Sneaky" data-mechanical="Gain the Unassuming Strength"></option>
</datalist>
</div>
<!-- Broom Look -->
-->
<!--
<div class="resource flexrow">
<label for="broom-look" class="resource-label">Look</label>
<input type="text" id="broom-look" name="system.broom.look"
value="{{system.broom.look}}" data-dtype="String"/>
<input type="text" id="broom-look" name="system.broom.look" value="{{system.broom.look}}" data-dtype="String" />
</div>
<!-- Mechanical Benefit as Textarea -->
<div class="resource flexrow">
<label for="broom-mechanical" class="resource-label">Mechanical Benefit</label>
<textarea id="broom-mechanical" name="system.broom.mechanicalbenefit"
data-dtype="String" rows="3" style="resize:none;"></textarea>
<textarea id="broom-mechanical" name="system.broom.mechanicalbenefit" data-dtype="String" rows="3"
style="resize:none;"></textarea>
</div>
</fieldset>
</fieldset> -->
<script>
function updateBroomDetails() {
// Use a short delay to allow browser to properly handle the datalist input
setTimeout(function() {
const broomNameInput = document.getElementById("broom-name").value.trim();
const broomOptions = document.querySelectorAll("#broomOptions option");
function updateBroomDetails() {
// Use a short delay to allow browser to properly handle the datalist input
setTimeout(function () {
const broomNameInput = document.getElementById("broom-name").value.trim();
const broomOptions = document.querySelectorAll("#broomOptions option");
let selectedLook = "";
let selectedMechanical = "";
let selectedLook = "";
let selectedMechanical = "";
// Loop through the datalist options to find a matching broom name
broomOptions.forEach(option => {
if (option.value.toLowerCase() === broomNameInput.toLowerCase()) {
selectedLook = option.getAttribute("data-look");
selectedMechanical = option.getAttribute("data-mechanical");
}
});
// Loop through the datalist options to find a matching broom name
broomOptions.forEach(option => {
if (option.value.toLowerCase() === broomNameInput.toLowerCase()) {
selectedLook = option.getAttribute("data-look");
selectedMechanical = option.getAttribute("data-mechanical");
}
});
// Update the look and mechanical benefit fields if a predefined broom is selected
document.getElementById("broom-look").value = selectedLook || "";
document.getElementById("broom-mechanical").value = selectedMechanical || "";
}, 100); // Delay of 100 milliseconds
}
// Update the look and mechanical benefit fields if a predefined broom is selected
document.getElementById("broom-look").value = selectedLook || "";
document.getElementById("broom-mechanical").value = selectedMechanical || "";
}, 100); // Delay of 100 milliseconds
}
</script>
<fieldset class="resource grid-span-3 flexcol">
<legend>Wand Selection</legend>
<!-- Wood Selection -->
<div class="resource-flexrow">
<label for="system.wand.wood" class="resource-label">Wood Type</label>
<input list="WoodOptions" id="wandWoodChoice" name="system.wand.wood" value="{{system.wand.wood}}" placeholder="Select Wood type"
oninput="updateWandWoodDetails()" onblur="updateWandWoodDetails()">
<datalist id="WoodOptions">
<option value="">Select Wood</option>
<option value="Wisteria">(Brains)</option>
<option value="Hawthorn">(Brains)</option>
<option value="Pine">(Brawn)</option>
<option value="Oak">(Brawn)</option>
<option value="Crabapple">(Fight)</option>
<option value="Dogwood">(Fight)</option>
<option value="Birch">(Flight)</option>
<option value="Bamboo">(Flight)</option>
<option value="Ironwood">(Grit)</option>
<option value="Maple">(Grit)</option>
<option value="Lilac">(Charm)</option>
<option value="Cherry">(Charm)</option>
</datalist>
</div>
<!-- Core Selection -->
<div class="resource-flexrow">
<label for="system.wand.core" class="resource-label">Core Type</label>
<input list="CoreOptions" id="wandCoreChoice" name="system.wand.core" value="{{system.wand.core}}" placeholder="Select Core type"
oninput="updateWandCoreDetails()" onblur="updateWandCoreDetails()">
<datalist id="CoreOptions">
<option value="">Select Core</option>
<option value="Parchment">(Brains)</option>
<option value="Phoenix Feather">(Brains)</option>
<option value="Owl Feather">(Brains)</option>
<option value="Gorilla Fur">(Brawn)</option>
<option value="Ogres Fingernail">(Brawn)</option>
<option value="Hippos Tooth">(Brawn)</option>
<option value="Dragons Heartstring">(Fight)</option>
<option value="Wolfs Tooth">(Fight)</option>
<option value="Elks Antler">(Fight)</option>
<option value="Hawks Feather">(Flight)</option>
<option value="Bats Bone">(Flight)</option>
<option value="Changelings Hair">(Charm)</option>
<option value="Gold">(Charm)</option>
<option value="Mirror">(Charm)</option>
<option value="Steel">(Grit)</option>
<option value="Diamond">(Grit)</option>
<option value="Lions Mane">(Grit)</option>
</datalist>
</div>
<!--
<fieldset class="resource grid-span-3 flexcol">
<legend>Wand Selection</legend>
<div class="resource-flexrow">
<label for="system.wand.wood" class="resource-label">Wood Type</label>
<input list="WoodOptions" id="wandWoodChoice" name="system.wand.wood" value="{{system.wand.wood}}"
placeholder="Select Wood type" oninput="updateWandWoodDetails()" onblur="updateWandWoodDetails()">
<datalist id="WoodOptions">
<option value="">Select Wood</option>
<option value="Wisteria">(Brains)</option>
<option value="Hawthorn">(Brains)</option>
<option value="Pine">(Brawn)</option>
<option value="Oak">(Brawn)</option>
<option value="Crabapple">(Fight)</option>
<option value="Dogwood">(Fight)</option>
<option value="Birch">(Flight)</option>
<option value="Bamboo">(Flight)</option>
<option value="Ironwood">(Grit)</option>
<option value="Maple">(Grit)</option>
<option value="Lilac">(Charm)</option>
<option value="Cherry">(Charm)</option>
</datalist>
</div>
<div class="resource-flexrow">
<label for="system.wand.core" class="resource-label">Core Type</label>
<input list="CoreOptions" id="wandCoreChoice" name="system.wand.core" value="{{system.wand.core}}"
placeholder="Select Core type" oninput="updateWandCoreDetails()" onblur="updateWandCoreDetails()">
<datalist id="CoreOptions">
<option value="">Select Core</option>
<option value="Parchment">(Brains)</option>
<option value="Phoenix Feather">(Brains)</option>
<option value="Owl Feather">(Brains)</option>
<option value="Gorilla Fur">(Brawn)</option>
<option value="Ogres Fingernail">(Brawn)</option>
<option value="Hippos Tooth">(Brawn)</option>
<option value="Dragons Heartstring">(Fight)</option>
<option value="Wolfs Tooth">(Fight)</option>
<option value="Elks Antler">(Fight)</option>
<option value="Hawks Feather">(Flight)</option>
<option value="Bats Bone">(Flight)</option>
<option value="Changelings Hair">(Charm)</option>
<option value="Gold">(Charm)</option>
<option value="Mirror">(Charm)</option>
<option value="Steel">(Grit)</option>
<option value="Diamond">(Grit)</option>
<option value="Lions Mane">(Grit)</option>
</datalist>
</div>
</fieldset>
<fieldset class="resource grid-span-3 flexcol">
<legend>Animal Familiar</legend>
<div class="resource grid-span-3 flexrow">
<label for="system.animalfamiliar" class="resource-label">Animal Familiar</label>
<input type="text" name="system.animalfamiliar" value="{{system.animalfamiliar}}" data-dtype="String"/>
<input type="text" name="system.animalfamiliar" value="{{system.animalfamiliar}}" data-dtype="String" />
</div>
</fieldset>
-->
<fieldset class="resource grid-span-3 flexcol">
<legend>Wounds</legend>
<div class="flexrow">
<span>Minor</span>
{{#each system.wounds.minor as |minorWound key|}}
<input type="checkbox" name="system.wounds.minor.{{key}}" {{checked minorWound}} />
{{/each}}
</div>
<div class="flexrow">
<span>Moderate</span>
{{#each system.wounds.moderate as |minorWound key|}}
<input type="checkbox" name="system.wounds.moderate.{{key}}" {{checked minorWound}} />
{{/each}}
</div>
<div class="flexrow">
<span>Mortal</span>
{{#each system.wounds.mortal as |minorWound key|}}
<input type="checkbox" name="system.wounds.mortal.{{key}}" {{checked minorWound}} />
{{/each}}
</div>
</fieldset>
</section>

View File

@@ -1,7 +1,7 @@
<section class="flexcol">
{{#each system.stats as |stat key|}}
<Fieldset class="grid grid-5col">
<legend>{{key}}</legend>
<legend>{{stat.name}}</legend>
<select name="system.stats.{{key}}.value">
{{#select stat.value}}
<option value="d20">d20</option>
@@ -18,11 +18,13 @@
<span class="ability-mod rollable" data-roll="{{stat.value}}+{{stat.stat}}" data-label="Stat Roll for {{key}}"><i class="fas fa-dice-d20"></i></span>
<input type="text" name="system.stats.{{key}}.stat" value="{{stat.stat}}" data-dtype="String"/>
</Fieldset>
<!--
<Fieldset class="flexrow">
<legend>Magic</legend>
<span class="ability-mod rollable" data-roll="{{stat.value}}+{{stat.magic}}" data-label="Magic Roll for {{key}}"><i class="fas fa-dice-d20"></i></span>
<input type="text" name="system.stats.{{key}}.magic" value="{{stat.magic}}" data-dtype="String"/>
</Fieldset>
-->
</div>
</Fieldset>
{{/each}}

View File

@@ -1,16 +1,16 @@
<section class="flexcol">
{{#each system.stats as |stat key|}}
<Fieldset class="flexrow">
<legend>{{capitalizeFirst key}}</legend>
<legend><input type="text" value="{{capitalizeFirst stat.name}}" name="system.stats.{{key}}.name"></legend>
<div class="flexrow flex-group-center">
<!-- Die type dropdown -->
<select name="system.stats.{{key}}.value">
<option value="d20" {{#if (eq stat.value 'd20')}}selected{{/if}}>Superb</option>
<option value="d12" {{#if (eq stat.value 'd12')}}selected{{/if}}>Impressive</option>
<option value="d10" {{#if (eq stat.value 'd10')}}selected{{/if}}>Above Average</option>
<option value="d8" {{#if (eq stat.value 'd8')}}selected{{/if}}>Below Average</option>
<option value="d6" {{#if (eq stat.value 'd6')}}selected{{/if}}>Bad</option>
<option value="d4" {{#if (eq stat.value 'd4')}}selected{{/if}}>Terrible</option>
<option value="d20" {{#if (eq stat.value 'd20')}}selected{{/if}}>d20</option>
<option value="d12" {{#if (eq stat.value 'd12')}}selected{{/if}}>d12</option>
<option value="d10" {{#if (eq stat.value 'd10')}}selected{{/if}}>d10</option>
<option value="d8" {{#if (eq stat.value 'd8')}}selected{{/if}}>d8</option>
<option value="d6" {{#if (eq stat.value 'd6')}}selected{{/if}}>d6</option>
<option value="d4" {{#if (eq stat.value 'd4')}}selected{{/if}}>d4</option>
</select>
<!-- Stat rolling and input -->
@@ -22,13 +22,13 @@
<input type="number" name="system.stats.{{key}}.stat" value="{{stat.stat}}" data-dtype="Number"/>
</Fieldset>
<!-- Magic rolling and input -->
<!-- Magic rolling and input
<Fieldset class="flexrow flex-group-center">
<legend>Magic</legend>
<span class="ability-mod rollable" data-roll="1{{stat.value}}x+1d4x+{{stat.stat}}" data-label="Magic Roll for {{key}}" data-key="{{key}}">
<i class="fas fa-dice-d20"></i>
</span>
</Fieldset>
</Fieldset>-->
</div>