30d6f71fc7
- Fix TypeError: controls.find is not a function in hooks.mjs - Fix undefined 'npc' variable in applications.mjs - Fix CONFIG.VERMINE.model undefined by checking game.system.template existence - Fix TypeError: html.find(...).forEach is not a function in roll.mjs - Fix Cannot set properties of undefined (setting 'initial') in actor.mjs - Fix Cannot read properties of undefined (reading 'difficulty') in actor.mjs - Fix ActiveEffect application phase 'initial' already completed by adding combatStatus to base template - Fix Missing helper: 'select' in roll-dialog.hbs (removed invalid Handlebars select block) - Add SIZE_LEVELS labels to creatureSizeLevels config - Add SIZE_LEVELS translations to fr.json - Add combatStatus to base actor template - Convert all .html templates to .hbs for Foundry v14 compatibility - Update item-sheet.mjs to use .hbs extension - Update handlebars-manager.mjs to use .hbs for all partials Complete Vermine2047 Creature and Group sheet implementation: - Creature: Pattern, Size, Role, Pack with computed values - Group: Totem, Reserve, Morale, Objectives, Members management - All templates functional with proper styling Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
363 lines
13 KiB
Handlebars
363 lines
13 KiB
Handlebars
<form
|
|
id="dice-pool-form"
|
|
class="vermine form"
|
|
data-actor-id="{{ speakerId }}"
|
|
>
|
|
|
|
<!-- HIDDEN DATA -->
|
|
<input type="hidden" name="label" id="label" value="{{ label }}" />
|
|
<input type="hidden" name="rollType" id="rollType" value="{{ rollType }}" />
|
|
<input type="hidden" name="abilityScore" id="abilityScore" value="{{ abilityScore }}" />
|
|
<input type="hidden" name="skillScore" id="skillScore" value="{{ skillScore }}" />
|
|
<input type="hidden" name="speakerId" value="{{ speakerId }}" />
|
|
<input type="hidden" name="skillLabel" value="{{ skill }}" />
|
|
|
|
<div class="dice-pool">
|
|
|
|
<!-- MAIN ROLL SELECTION -->
|
|
<div class="flexrow main-roll-section">
|
|
|
|
<!-- CHARACTERISTIC -->
|
|
<div class="flexcol characteristic-section">
|
|
<label class="label">{{localize 'VERMINE.ability'}}</label>
|
|
<select
|
|
class="info-value"
|
|
data-roll="true"
|
|
data-dtype="String"
|
|
type="number"
|
|
name="ability"
|
|
id="ability"
|
|
min="1"
|
|
max="5"
|
|
>
|
|
<option value="0">-- {{localize 'VERMINE.choose_ability'}} --</option>
|
|
{{#each config.abilityCategories as |abilCategory catkey|}}
|
|
<optgroup label="{{ smarttlk 'ABILITY_CATEGORIES' catkey 'name' }}">
|
|
{{#each @root.actor.system.abilities as |abil key|}}
|
|
{{#ife abil.category catkey}}
|
|
<option
|
|
value="{{abil.value}}"
|
|
data-label="{{key}}"
|
|
data-category="{{abil.category}}"
|
|
{{#ife @root.rollType "ability"}}
|
|
{{#ife @root.labelKey key}}
|
|
selected="true"
|
|
{{/ife}}
|
|
{{/ife}}
|
|
>
|
|
{{ smarttlk 'ABILITIES' key 'name' }} / {{abil.value}}
|
|
</option>
|
|
{{/ife}}
|
|
{{/each}}
|
|
</optgroup>
|
|
{{/each}}
|
|
</select>
|
|
<div class="ability-score flexrow">
|
|
<span id="abilityScore">{{localize 'VERMINE.score'}}: </span>
|
|
<span id="abilityScoreValue">0</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- SKILL -->
|
|
<div class="flexcol skill-section">
|
|
<label class="label">{{localize 'VERMINE.skill_title'}}</label>
|
|
<select
|
|
class="info-value"
|
|
data-roll="true"
|
|
data-dtype="String"
|
|
type="number"
|
|
name="skill"
|
|
id="skill"
|
|
min="1"
|
|
max="5"
|
|
>
|
|
<option value="">-- {{localize 'VERMINE.choose_skill'}} --</option>
|
|
{{#each config.skillCategories as |skillCategory catkey|}}
|
|
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' catkey 'name' }}">
|
|
{{#each @root.actor.system.skills as |skill key|}}
|
|
{{#ife skill.category catkey}}
|
|
<option
|
|
value="{{skill.value}}"
|
|
data-pool="{{skillLevel 'dicePool' skill.value}}"
|
|
data-label="{{key}}"
|
|
data-category="{{skill.category}}"
|
|
data-reroll="{{skillLevel 'reroll' skill.value}}"
|
|
{{#ife @root.rollType "skill"}}
|
|
{{#ife @root.labelKey key}}
|
|
selected="true"
|
|
{{/ife}}
|
|
{{/ife}}
|
|
>
|
|
<b>{{ smarttlk 'SKILLS' key 'name' }}</b> /
|
|
<i>{{skillLevel "label" skill.value}}</i>
|
|
</option>
|
|
{{/ife}}
|
|
{{/each}}
|
|
</optgroup>
|
|
{{/each}}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- SPECIALTIES (shown when skill selected) -->
|
|
{{#if availableSpecialties.length}}
|
|
<details class="specialties-section">
|
|
<summary class="flexrow">
|
|
<span class="label">{{localize 'VERMINE.specialty'}} (+1D)</span>
|
|
<span class="current-specialty">{{localize 'VERMINE.none'}}</span>
|
|
</summary>
|
|
<div class="flexrow specialty-options">
|
|
<label class="flexrow">
|
|
<input
|
|
type="radio"
|
|
data-roll="true"
|
|
name="usingSpecialization"
|
|
id="usingSpecialization"
|
|
value="aucune"
|
|
/>
|
|
<span>{{localize 'VERMINE.none'}}</span>
|
|
</label>
|
|
{{#each availableSpecialties as |spec ind|}}
|
|
<label class="flexrow">
|
|
<input
|
|
type="radio"
|
|
data-roll="true"
|
|
name="usingSpecialization"
|
|
id="usingSpecialization"
|
|
value="{{spec.name}}"
|
|
data-spec-skill="{{spec.system.skill}}"
|
|
{{#if specialty}}checked{{/if}}
|
|
/>
|
|
<span>{{spec.name}}</span>
|
|
</label>
|
|
{{/each}}
|
|
</div>
|
|
</details>
|
|
{{/if}}
|
|
|
|
<!-- DIFFICULTY AND HANDICAP -->
|
|
<details class="difficulty-section" open>
|
|
<summary class="flexrow">
|
|
<span class="label">{{localize 'VERMINE.difficulty'}}</span>
|
|
<span class="current-values">
|
|
<span id="current-difficulty">{{localize 'DIFFICULTY_LEVELS.hard'}} (7)</span>
|
|
<span id="current-handicap">{{localize 'VERMINE.none'}}</span>
|
|
</span>
|
|
</summary>
|
|
<div class="flexrow difficulty-controls">
|
|
<div class="flexcol">
|
|
<label class="label" for="difficulty">{{localize 'VERMINE.difficulty'}}</label>
|
|
<select
|
|
class="info-value"
|
|
data-roll="true"
|
|
data-dtype="String"
|
|
type="number"
|
|
name="difficulty"
|
|
id="difficulty"
|
|
min="3"
|
|
max="10"
|
|
>
|
|
<option value="{{ diffLevel 'difficulty' 1}}">{{ diffLevel 'label' 1}} ({{ diffLevel 'difficulty' 1}})</option>
|
|
<option value="{{ diffLevel 'difficulty' 2}}">{{ diffLevel 'label' 2}} ({{ diffLevel 'difficulty' 2}})</option>
|
|
<option value="{{ diffLevel 'difficulty' 3}}" selected>{{ diffLevel 'label' 3}} ({{ diffLevel 'difficulty' 3}})</option>
|
|
<option value="{{ diffLevel 'difficulty' 4}}">{{ diffLevel 'label' 4}} ({{ diffLevel 'difficulty' 4}})</option>
|
|
<option value="{{ diffLevel 'difficulty' 5}}">{{ diffLevel 'label' 5}} ({{ diffLevel 'difficulty' 5}})</option>
|
|
</select>
|
|
</div>
|
|
<div class="flexcol">
|
|
<label class="label" for="handicap">{{localize 'VERMINE.handicap'}}</label>
|
|
<select
|
|
class="info-value"
|
|
data-roll="true"
|
|
data-dtype="String"
|
|
type="number"
|
|
name="handicap"
|
|
id="handicap"
|
|
min="0"
|
|
max="2"
|
|
>
|
|
<option value="1" selected>{{localize 'VERMINE.none'}}</option>
|
|
<option value="2">(I)</option>
|
|
<option value="3">(II)</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</details>
|
|
|
|
<!-- BONUSES SECTION -->
|
|
<details class="bonuses-section">
|
|
<summary class="flexrow">
|
|
<span class="label">{{localize 'VERMINE.bonuses'}}</span>
|
|
<span class="bonus-count">+<span id="total-bonus">0</span>D</span>
|
|
</summary>
|
|
<div class="grid grid-2col bonus-grid">
|
|
|
|
<!-- HELP -->
|
|
<div class="flexrow bonus-item">
|
|
<input
|
|
type="checkbox"
|
|
data-roll="true"
|
|
name="helped"
|
|
id="helped"
|
|
value="1"
|
|
{{#if help}}checked{{/if}}
|
|
/>
|
|
<label class="label" for="helped">{{localize 'VERMINE.help'}} (+1D)</label>
|
|
</div>
|
|
|
|
<!-- GROUP -->
|
|
<div class="flexrow bonus-item">
|
|
<label class="label" for="group">{{localize 'VERMINE.group'}}</label>
|
|
<input
|
|
type="number"
|
|
data-roll="true"
|
|
class="numeric-entry"
|
|
style="text-align: center;"
|
|
name="group"
|
|
id="group"
|
|
min="0"
|
|
max="5"
|
|
value="0"
|
|
/>
|
|
<span>D</span>
|
|
</div>
|
|
|
|
<!-- SELF CONTROL -->
|
|
<div class="flexrow bonus-item full-width">
|
|
<label class="label" for="self_control">
|
|
{{localize 'VERMINE.self_control'}}
|
|
<span>(+<span id="self_control_value">0</span>D)</span>
|
|
</label>
|
|
<input
|
|
type="range"
|
|
id="self_control"
|
|
data-roll="true"
|
|
name="self_control"
|
|
min="0"
|
|
max="0"
|
|
value="0"
|
|
/>
|
|
</div>
|
|
|
|
<!-- TOOLS -->
|
|
<div class="flexrow bonus-item full-width">
|
|
<label class="label">{{localize 'VERMINE.tooling'}} (+1D)</label>
|
|
<div class="item-list grid grid-4col">
|
|
<label>
|
|
<input
|
|
type="radio"
|
|
data-roll="true"
|
|
name="usingTools"
|
|
id="usingTools"
|
|
value="0"
|
|
checked
|
|
/>
|
|
<i>{{localize 'VERMINE.none'}}</i>
|
|
</label>
|
|
{{#each availableItems as |item ind|}}
|
|
<label>
|
|
<input
|
|
type="radio"
|
|
data-roll="true"
|
|
name="usingTools"
|
|
id="usingTools"
|
|
value="{{item.name}}"
|
|
/>
|
|
<i>{{item.name}}</i>
|
|
</label>
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- TOTEMS -->
|
|
{{#ifgt @root.actor.system.adaptation.totems.human.value 0}}
|
|
{{#ifgt @root.actor.system.adaptation.totems.adapted.value 0}}
|
|
<div class="flexrow bonus-item full-width totems-section">
|
|
<label class="label">{{localize 'VERMINE.totem_dice'}}</label>
|
|
<div class="flexrow totem-options">
|
|
<label class="totem-option">
|
|
<input
|
|
type="checkbox"
|
|
data-roll="true"
|
|
name="human-totem"
|
|
id="human-totem"
|
|
value="1"
|
|
class="totem-checkbox"
|
|
/>
|
|
<span class="totem-label">{{localize 'TOTEMS.human.name'}}</span>
|
|
<small>(+{{@root.actor.system.adaptation.totems.human.value}}D)</small>
|
|
</label>
|
|
<label class="totem-option">
|
|
<input
|
|
type="checkbox"
|
|
data-roll="true"
|
|
name="adapted-totem"
|
|
id="adapted-totem"
|
|
value="1"
|
|
class="totem-checkbox"
|
|
/>
|
|
<span class="totem-label">{{localize 'TOTEMS.adapted.name'}}</span>
|
|
<small>(+{{@root.actor.system.adaptation.totems.adapted.value}}D)</small>
|
|
</label>
|
|
</div>
|
|
<small class="totem-hint">{{localize 'VERMINE.totem_hint'}}</small>
|
|
</div>
|
|
{{else}}
|
|
{{#ifgt @root.actor.system.adaptation.totems.human.value 0}}
|
|
<div class="flexrow bonus-item totems-section">
|
|
<label class="totem-option">
|
|
<input
|
|
type="checkbox"
|
|
data-roll="true"
|
|
name="human-totem"
|
|
id="human-totem"
|
|
value="1"
|
|
/>
|
|
<span class="totem-label">{{localize 'TOTEMS.human.name'}}</span>
|
|
<small>(+{{@root.actor.system.adaptation.totems.human.value}}D)</small>
|
|
</label>
|
|
</div>
|
|
{{/ifgt}}
|
|
{{/ifgt}}
|
|
{{else}}
|
|
{{#ifgt @root.actor.system.adaptation.totems.adapted.value 0}}
|
|
<div class="flexrow bonus-item totems-section">
|
|
<label class="totem-option">
|
|
<input
|
|
type="checkbox"
|
|
data-roll="true"
|
|
name="adapted-totem"
|
|
id="adapted-totem"
|
|
value="1"
|
|
/>
|
|
<span class="totem-label">{{localize 'TOTEMS.adapted.name'}}</span>
|
|
<small>(+{{@root.actor.system.adaptation.totems.adapted.value}}D)</small>
|
|
</label>
|
|
</div>
|
|
{{/ifgt}}
|
|
{{/ifgt}}
|
|
|
|
</div>
|
|
</details>
|
|
|
|
<!-- TOTAL DICE POOL -->
|
|
<div class="flexrow total-section">
|
|
<label class="label">{{localize 'VERMINE.total'}}:</label>
|
|
<span id="dice-pool-total" class="total-value">0D</span>
|
|
{{#ifgt @root.actor.system.adaptation.totems.human.value 0}}
|
|
{{#ifgt @root.actor.system.adaptation.totems.adapted.value 0}}
|
|
<span class="totem-selector">
|
|
({{localize 'VERMINE.keep_totem'}}
|
|
<select id="keep-totem-select" name="keep_totem">
|
|
<option value="human">{{localize 'TOTEMS.human.name'}}</option>
|
|
<option value="adapted">{{localize 'TOTEMS.adapted.name'}}</option>
|
|
</select>)
|
|
</span>
|
|
{{/ifgt}}
|
|
{{/ifgt}}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|