forked from GitHub-Mirrors/foundry-sw5e
Update to dnd 0.98 Core with some fixes
Updated to 0.98 core for 0.7.x compatability (untested) Class Skills are pulling in automatically on class item drop to character sheet. TODO: Expand automated skill drop for Archetypes KNOWN ISSUE: init.value is being converted to a string causing some NaN errors on the html. Initiative was changed to a number instead of a string in 0.98 likely some place is assuming it is still a string. I had to use Number() on the value because it was forcing other vales to be a string because the value is "". Maybe someone can fix this
This commit is contained in:
parent
4bed1d1869
commit
44312146a7
132 changed files with 748 additions and 1010 deletions
|
@ -17,8 +17,7 @@
|
|||
|
||||
{{#unless disableExperience}}
|
||||
<div class="experience flexrow">
|
||||
<input name="data.details.xp.value" type="text" value="{{data.details.xp.value}}"
|
||||
data-dtype="Number" placeholder="0"/>
|
||||
<input name="data.details.xp.value" type="text" value="{{data.details.xp.value}}" placeholder="0" data-dtype="Number"/>
|
||||
<span class="sep">/</span>
|
||||
<span class="max">{{data.details.xp.max}}</span>
|
||||
</div>
|
||||
|
@ -49,17 +48,15 @@
|
|||
<li class="attribute health">
|
||||
<h4 class="attribute-name box-title">{{ localize "SW5E.Health" }}</h4>
|
||||
<div class="attribute-value multiple">
|
||||
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}"
|
||||
data-dtype="Number" placeholder="10"/>
|
||||
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}" placeholder="10" data-dtype="Number"/>
|
||||
<span class="sep"> / </span>
|
||||
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}"
|
||||
data-dtype="Number" placeholder="10"/>
|
||||
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}" placeholder="10" data-dtype="Number"/>
|
||||
</div>
|
||||
<footer class="attribute-footer">
|
||||
<input name="data.attributes.hp.temp" type="text" class="temphp" placeholder="+{{ localize 'SW5E.Temp' }}"
|
||||
value="{{data.attributes.hp.temp}}" data-dtype="{{data.attributes.hp.type}}"/>
|
||||
value="{{data.attributes.hp.temp}}" data-dtype="Number"/>
|
||||
<input name="data.attributes.hp.tempmax" type="text" class="temphp" placeholder="+{{ localize 'SW5E.Max' }}"
|
||||
value="{{data.attributes.hp.tempmax}}" data-dtype="{{data.attributes.hp.type}}"/>
|
||||
value="{{data.attributes.hp.tempmax}}" data-dtype="Number"/>
|
||||
</footer>
|
||||
</li>
|
||||
|
||||
|
@ -77,8 +74,7 @@
|
|||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title">{{ localize "SW5E.ArmorClass" }}</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.attributes.ac.value" type="text" value="{{data.attributes.ac.value}}"
|
||||
data-dtype="Number" placeholder="10"/>
|
||||
<input name="data.attributes.ac.value" type="number" value="{{data.attributes.ac.value}}" placeholder="10"/>
|
||||
</div>
|
||||
<footer class="attribute-footer">
|
||||
<span class="power-dc">{{localize "SW5E.PowerDC"}} {{data.attributes.powerdc}}</span>
|
||||
|
@ -104,7 +100,7 @@
|
|||
</div>
|
||||
<footer class="attribute-footer">
|
||||
<span>{{ localize "SW5E.Modifier" }}</span>
|
||||
<input name="data.attributes.init.value" type="text" placeholder="0" data-dtype="Number"
|
||||
<input name="data.attributes.init.value" type="number" placeholder="0"
|
||||
value="{{numberFormat data.attributes.init.value decimals=0 sign=true}}"/>
|
||||
</footer>
|
||||
</li>
|
||||
|
@ -131,7 +127,7 @@
|
|||
{{#each data.abilities as |ability id|}}
|
||||
<li class="ability {{#if ability.proficient}}proficient{{/if}}" data-ability="{{id}}">
|
||||
<h4 class="ability-name box-title rollable">{{ability.label}}</h4>
|
||||
<input class="ability-score" name="data.abilities.{{id}}.value" type="text" value="{{ability.value}}" data-dtype="Number" placeholder="10"/>
|
||||
<input class="ability-score" name="data.abilities.{{id}}.value" type="number" value="{{ability.value}}" placeholder="10"/>
|
||||
<div class="ability-modifiers flexrow">
|
||||
<span class="ability-mod" title="Modifier">{{numberFormat ability.mod decimals=0 sign=true}}</span>
|
||||
<input type="hidden" name="data.abilities.{{id}}.proficient" value="{{ability.proficient}}" data-dtype="Number"/>
|
||||
|
@ -171,11 +167,9 @@
|
|||
{{ localize "SW5E.AbbreviationSR" }} <input name="data.resources.{{res.name}}.sr" type="checkbox" {{checked res.sr}}/>
|
||||
</label>
|
||||
|
||||
<input name="data.resources.{{res.name}}.value" type="text" value="{{res.value}}"
|
||||
data-dtype="Number" placeholder="0"/>
|
||||
<input name="data.resources.{{res.name}}.value" type="number" value="{{res.value}}" placeholder="0"/>
|
||||
<span class="sep"> / </span>
|
||||
<input name="data.resources.{{res.name}}.max" type="text" value="{{res.max}}"
|
||||
data-dtype="Number" placeholder="0"/>
|
||||
<input name="data.resources.{{res.name}}.max" type="number" value="{{res.max}}" placeholder="0"/>
|
||||
|
||||
<label class="recharge checkbox">
|
||||
{{ localize "SW5E.AbbreviationLR" }} <input name="data.resources.{{res.name}}.lr" type="checkbox" {{checked res.lr}}/>
|
||||
|
@ -191,17 +185,17 @@
|
|||
<h4 class="death-save rollable">{{ localize "SW5E.DeathSave" }}</h4>
|
||||
<div class="counter-value">
|
||||
<i class="fas fa-check"></i>
|
||||
<input type="text" name="data.attributes.death.success" data-dtype="Number" placeholder="0"
|
||||
<input name="data.attributes.death.success" type="number" placeholder="0"
|
||||
value="{{data.attributes.death.success}}"/>
|
||||
<i class="fas fa-times"></i>
|
||||
<input type="text" name="data.attributes.death.failure" data-dtype="Number" placeholder="0"
|
||||
<input name="data.attributes.death.failure" type="number" placeholder="0"
|
||||
value="{{data.attributes.death.failure}}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="counter flexrow exhaustion">
|
||||
<h4>{{ localize "SW5E.Exhaustion" }}</h4>
|
||||
<div class="counter-value">
|
||||
<input type="text" name="data.attributes.exhaustion" data-dtype="Number" placeholder="0"
|
||||
<input name="data.attributes.exhaustion" type="number" placeholder="0"
|
||||
value="{{data.attributes.exhaustion}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -237,15 +231,15 @@
|
|||
{{!-- Biography Tab --}}
|
||||
<div class="tab flexrow" data-group="primary" data-tab="biography">
|
||||
<div class="characteristics flexcol">
|
||||
<label>Appearance</label>
|
||||
<label>{{ localize "SW5E.Appearance" }}</label>
|
||||
<textarea name="data.details.appearance">{{data.details.appearance}}</textarea>
|
||||
<label>Personality Traits</label>
|
||||
<label>{{ localize "SW5E.PersonalityTraits" }}</label>
|
||||
<textarea name="data.details.trait">{{data.details.trait}}</textarea>
|
||||
<label>Ideals</label>
|
||||
<label>{{ localize "SW5E.Ideals" }}</label>
|
||||
<textarea name="data.details.ideal">{{data.details.ideal}}</textarea>
|
||||
<label>Bonds</label>
|
||||
<label>{{ localize "SW5E.Bonds" }}</label>
|
||||
<textarea name="data.details.bond">{{data.details.bond}}</textarea>
|
||||
<label>Flaws</label>
|
||||
<label>{{ localize "SW5E.Flaws" }}</label>
|
||||
<textarea name="data.details.flaw">{{data.details.flaw}}</textarea>
|
||||
</div>
|
||||
<div class="biography">
|
||||
|
|
|
@ -40,11 +40,9 @@
|
|||
<li class="attribute health">
|
||||
<h4 class="attribute-name box-title rollable">{{ localize "SW5E.Health" }}</h4>
|
||||
<div class="attribute-value multiple">
|
||||
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}"
|
||||
data-dtype="Number" placeholder="10"/>
|
||||
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}" placeholder="10" data-dtype="Number"/>
|
||||
<span class="sep"> / </span>
|
||||
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}"
|
||||
data-dtype="Number" placeholder="10"/>
|
||||
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}" placeholder="10" data-dtype="Number"/>
|
||||
</div>
|
||||
<footer class="attribute-footer">
|
||||
<input name="data.attributes.hp.formula" class="hpformula" type="text" placeholder="{{ localize 'SW5E.HealthFormula' }}"
|
||||
|
@ -55,8 +53,7 @@
|
|||
<li class="attribute">
|
||||
<h4 class="attribute-name box-title">{{ localize "SW5E.ArmorClass" }}</h4>
|
||||
<div class="attribute-value">
|
||||
<input name="data.attributes.ac.value" type="text" value="{{data.attributes.ac.value}}"
|
||||
data-dtype="Number" placeholder="10"/>
|
||||
<input name="data.attributes.ac.value" type="number" value="{{data.attributes.ac.value}}" placeholder="10"/>
|
||||
</div>
|
||||
<footer class="attribute-footer">
|
||||
<span>{{ localize "SW5E.Proficiency" }}</span>
|
||||
|
@ -96,7 +93,7 @@
|
|||
{{#each data.abilities as |ability id|}}
|
||||
<li class="ability {{#if ability.proficient}}proficient{{/if}}" data-ability="{{id}}">
|
||||
<h4 class="ability-name box-title rollable">{{ability.label}}</h4>
|
||||
<input class="ability-score" name="data.abilities.{{id}}.value" type="text" value="{{ability.value}}" data-dtype="Number" placeholder="10"/>
|
||||
<input class="ability-score" name="data.abilities.{{id}}.value" type="number" value="{{ability.value}}" placeholder="10"/>
|
||||
<div class="ability-modifiers flexrow">
|
||||
<span class="ability-mod" title="Modifier">{{numberFormat ability.mod decimals=0 sign=true}}</span>
|
||||
<input type="hidden" name="data.abilities.{{id}}.proficient" value="{{ability.proficient}}" data-dtype="Number"/>
|
||||
|
@ -128,21 +125,17 @@
|
|||
<div class="counter flexrow legendary">
|
||||
<h4>{{ localize "SW5E.LegAct" }}</h4>
|
||||
<div class="counter-value">
|
||||
<input type="text" name="data.resources.legact.value" data-dtype="Number" placeholder="0"
|
||||
value="{{data.resources.legact.value}}"/>
|
||||
<input name="data.resources.legact.value" type="number" value="{{data.resources.legact.value}}" placeholder="0"/>
|
||||
<span class="sep">/</span>
|
||||
<input type="text" name="data.resources.legact.max" data-dtype="Number" placeholder="0"
|
||||
value="{{data.resources.legact.max}}"/>
|
||||
<input name="data.resources.legact.max" type="number" value="{{data.resources.legact.max}}" placeholder="0"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="counter flexrow legendary">
|
||||
<h4>{{ localize "SW5E.LegRes" }}</h4>
|
||||
<div class="counter-value">
|
||||
<input type="text" name="data.resources.legres.value" data-dtype="Number" placeholder="0"
|
||||
value="{{data.resources.legres.value}}"/>
|
||||
<input name="data.resources.legres.value" type="number" value="{{data.resources.legres.value}}" placeholder="0"/>
|
||||
<span class="sep">/</span>
|
||||
<input type="text" name="data.resources.legres.max" data-dtype="Number" placeholder="0"
|
||||
value="{{data.resources.legres.max}}"/>
|
||||
<input name="data.resources.legres.max" type="number" value="{{data.resources.legres.max}}" placeholder="0"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="counter flexrow lair">
|
||||
|
@ -150,8 +143,7 @@
|
|||
<div class="counter-value">
|
||||
<input name="data.resources.lair.value" type="checkbox" value="{{data.resources.lair.value}}"
|
||||
data-dtype="Boolean" {{checked data.resources.lair.value}}/>
|
||||
<input name="data.resources.lair.initiative" type="text" value="{{data.resources.lair.initiative}}"
|
||||
data-dtype="Number" placeholder="Init."/>
|
||||
<input name="data.resources.lair.initiative" type="number" value="{{data.resources.lair.initiative}}" placeholder="20"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
28
templates/actors/parts/actor-effects.html
Normal file
28
templates/actors/parts/actor-effects.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<ol class="inventory-list">
|
||||
{{#each effects as |section sid|}}
|
||||
<li class="inventory-header flexrow">
|
||||
<h3 class="effect-name flexrow">{{localize section.label}}</h3>
|
||||
<div class="effect-source">Source</div>
|
||||
<div class="effect-source">Duration</div>
|
||||
<div class="effect-controls"></div>
|
||||
</li>
|
||||
|
||||
<ol class="effects-list item-list">
|
||||
{{#each section.effects as |effect|}}
|
||||
<li class="effect flexrow" data-effect-id="{{effect.id}}">
|
||||
<div class="effect-name flexrow">
|
||||
<img class="effect-icon" src="{{effect.data.icon}}"/>
|
||||
<h4>{{effect.data.label}}</h4>
|
||||
</div>
|
||||
<div class="effect-source">{{effect.sourceName}}</div>
|
||||
<div class="effect-duration">{{effect.duration.label}}</div>
|
||||
<div class="effect-controls">
|
||||
<a class="effect-control" data-action="toggle"><i class="fas fa-circle-notch"></i></a>
|
||||
<a class="effect-control" data-action="edit"><i class="fas fa-edit"></i></a>
|
||||
<a class="effect-control" data-action="delete"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/each}}
|
||||
</ol>
|
|
@ -59,6 +59,21 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{else if section.isSpecies}}
|
||||
<div class="item-detail player-species">
|
||||
|
||||
</div>
|
||||
|
||||
{{else if section.isArchetype}}
|
||||
<div class="item-detail player-archetype">
|
||||
{{item.data.name}}
|
||||
</div>
|
||||
|
||||
{{else if section.isClassfeatures}}
|
||||
<div class="item-detail player-classfeatures">
|
||||
{{item.data.name}}
|
||||
</div>
|
||||
|
||||
{{else if section.isClass}}
|
||||
<div class="item-detail player-class">
|
||||
{{item.data.subclass}}
|
||||
|
|
45
templates/items/archetype.html
Normal file
45
templates/items/archetype.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
<form class="{{cssClass}} flexcol" autocomplete="off">
|
||||
|
||||
{{!-- Item Sheet Header --}}
|
||||
<header class="sheet-header flexrow">
|
||||
<img class="profile" src="{{item.img}}" title="{{item.name}}" data-edit="img"/>
|
||||
|
||||
<div class="header-details flexrow">
|
||||
<h1 class="charname">
|
||||
<input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'SW5E.ItemName' }}"/>
|
||||
</h1>
|
||||
|
||||
<div class="item-subtitle">
|
||||
<h4 class="item-type">{{itemType}}</h4>
|
||||
<span class="item-status">{{itemStatus}}</span>
|
||||
</div>
|
||||
|
||||
<ul class="summary">
|
||||
<li>
|
||||
<input type="text" name="data.className" value="{{data.className}}" placeholder="{{ localize 'SW5E.ClassName' }}"/>
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" name="data.classCasterType" value="{{data.classCasterType}}" />
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" name="data.source" value="{{data.source}}" placeholder="{{ localize 'SW5E.Source' }}"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Item Sheet Navigation --}}
|
||||
<nav class="sheet-navigation tabs" data-group="primary">
|
||||
<a class="item active" data-tab="description">{{ localize "SW5E.Description" }}</a>
|
||||
<!-- <a class="item" data-tab="details">{{ localize "SW5E.Details" }}</a> -->
|
||||
</nav>
|
||||
|
||||
{{!-- Item Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
<div class="tab description" data-group="primary" data-tab="description">
|
||||
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
73
templates/items/classfeature.html
Normal file
73
templates/items/classfeature.html
Normal file
|
@ -0,0 +1,73 @@
|
|||
<form class="{{cssClass}} flexcol" autocomplete="off">
|
||||
|
||||
{{!-- Item Sheet Header --}}
|
||||
<header class="sheet-header flexrow">
|
||||
<img class="profile" src="{{item.img}}" title="{{item.name}}" data-edit="img"/>
|
||||
|
||||
<div class="header-details flexrow">
|
||||
<h1 class="charname">
|
||||
<input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'SW5E.ItemName' }}"/>
|
||||
</h1>
|
||||
|
||||
<div class="item-subtitle">
|
||||
<h4 class="item-type">{{itemType}}</h4>
|
||||
<span class="item-status">{{itemStatus}}</span>
|
||||
</div>
|
||||
|
||||
<ul class="summary">
|
||||
<li>
|
||||
{{labels.featType}}
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" name="data.requirements" value="{{data.requirements}}" placeholder="{{ localize 'SW5E.Requirements' }}"/>
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" name="data.source" value="{{data.source}}" placeholder="{{ localize 'SW5E.Source' }}"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Item Sheet Navigation --}}
|
||||
<nav class="sheet-navigation tabs" data-group="primary">
|
||||
<a class="item active" data-tab="description">{{ localize "SW5E.Description" }}</a>
|
||||
<a class="item" data-tab="details">{{ localize "SW5E.Details" }}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Item Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> "systems/sw5e/templates/items/parts/item-description.html"}}
|
||||
|
||||
{{!-- Details Tab --}}
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
|
||||
<h3 class="form-header">{{ localize "SW5E.FeatureUsage" }}</h3>
|
||||
|
||||
{{!-- Item Activation Template --}}
|
||||
{{> "systems/sw5e/templates/items/parts/item-activation.html"}}
|
||||
|
||||
{{!-- Recharge Requirement --}}
|
||||
{{#if data.activation.type}}
|
||||
<div class="form-group recharge">
|
||||
<label>{{ localize "SW5E.FeatureActionRecharge" }}</label>
|
||||
<div class="form-fields">
|
||||
<span>{{ localize "SW5E.FeatureRechargeOn" }}</span>
|
||||
<input type="text" name="data.recharge.value" value="{{data.recharge.value}}"
|
||||
data-dtype="Number" placeholder="{{ localize 'SW5E.FeatureRechargeResult' }}"/>
|
||||
<label class="checkbox">
|
||||
{{ localize "SW5E.Charged" }}
|
||||
<input type="checkbox" name="data.recharge.charged" {{checked data.recharge.charged}}/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<h3 class="form-header">{{ localize "SW5E.FeatureAttack" }}</h3>
|
||||
|
||||
{{!-- Item Action Template --}}
|
||||
{{> "systems/sw5e/templates/items/parts/item-action.html"}}
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
|
@ -68,6 +68,23 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
{{!-- Preparation Mode --}}
|
||||
<div class="form-group input-select">
|
||||
<label>{{ localize "SW5E.PowerPreparationMode" }}</label>
|
||||
<div class="form-fields">
|
||||
<label class="checkbox prepared">
|
||||
{{ localize "SW5E.PowerPrepared" }} <input type="checkbox" name="data.preparation.prepared" {{checked data.preparation.prepared}}/>
|
||||
</label>
|
||||
<select name="data.preparation.mode">
|
||||
{{#select data.preparation.mode}}
|
||||
<option value=""></option>
|
||||
{{#each config.powerPreparationModes as |name key|}}
|
||||
<option value="{{key}}">{{name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{!-- Concentration Mode --}}
|
||||
<div class="form-group input-select">
|
||||
<label>{{ localize "SW5E.PowerConcentrationMode" }}</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue