[PR][Feature] Actor Sizes (#1433)

* Added support for adversary actor sizes

* .

* .

* Finished token implementation

* Fixed token-config

* Updated SRD adversaries

* .

* Added size to Beastform tokenData

* Fixed sizing for evolved beastforms

* Beastform compendium update

* .
This commit is contained in:
WBHarry 2025-12-22 16:58:53 +01:00 committed by GitHub
parent 7926c614e3
commit 8178fa5738
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
176 changed files with 1198 additions and 203 deletions

View file

@ -25,6 +25,20 @@
{{/each}}
</fieldset>
<fieldset class="three-columns">
<legend>
{{localize "Token Sizes"}}
<a data-action="resetTokenSizes"><i class="fa-solid fa-arrow-rotate-left"></i></a>
</legend>
{{formGroup settingFields.schema.fields.tokenSizes.fields.tiny value=settingFields._source.tokenSizes.tiny localize=true}}
{{formGroup settingFields.schema.fields.tokenSizes.fields.small value=settingFields._source.tokenSizes.small localize=true}}
{{formGroup settingFields.schema.fields.tokenSizes.fields.medium value=settingFields._source.tokenSizes.medium localize=true}}
{{formGroup settingFields.schema.fields.tokenSizes.fields.large value=settingFields._source.tokenSizes.large localize=true}}
{{formGroup settingFields.schema.fields.tokenSizes.fields.huge value=settingFields._source.tokenSizes.huge localize=true}}
{{formGroup settingFields.schema.fields.tokenSizes.fields.gargantuan value=settingFields._source.tokenSizes.gargantuan localize=true}}
</fieldset>
<fieldset>
<legend>
{{localize "DAGGERHEART.SETTINGS.Homebrew.currency.title"}}

View file

@ -13,6 +13,7 @@
{{/if}}
{{formGroup systemFields.difficulty value=document._source.system.difficulty localize=true}}
</div>
{{formGroup systemFields.size value=document._source.system.size label=(localize "DAGGERHEART.GENERAL.tokenSize") localize=true}}
{{formField systemFields.description value=document._source.system.description label=(localize "DAGGERHEART.ACTORS.Adversary.FIELDS.description.label")}}
{{formField systemFields.motivesAndTactics value=document._source.system.motivesAndTactics label=(localize "DAGGERHEART.ACTORS.Adversary.FIELDS.motivesAndTactics.label")}}
</fieldset>

View file

@ -0,0 +1,82 @@
<div class="tab scrollable{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
{{formGroup fields.texture.fields.src value=source.texture.src rootId=rootId}}
{{#if randomImgEnabled}}
{{formGroup fields.randomImg value=source.randomImg classes="slim" rootId=rootId}}
{{else if hasAlternates}}
<div class="form-group">
<label for="{{rootId}}-alternateImages">{{localize "TOKEN.ImageAlts"}}</label>
<select id="{{rootId}}-alternateImages" class="alternate-images" name="alternateImages">
{{selectOptions alternateImages selected=source.texture.src blank=""}}
</select>
</div>
{{/if}}
<div class="form-group slim" {{#if actorSizeUsed}}data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.TokenConfig.actorSizeUsed"}}"{{/if}}>
<label>
{{localize "TOKEN.Dimensions"}} <span class="units">({{localize "GridSpaces"}})</span>
{{#if actorSizeUsed}}
<i class="fa-solid fa-lock"></i>
{{/if}}
</label>
<div class="form-fields">
<label for="{{rootId}}-width">{{localize "DOCUMENT.FIELDS.width.label"}}</label>
{{formInput fields.width value=source.width id=(concat rootId "-width") disabled=actorSizeUsed}}
<label for="{{rootId}}-height">{{localize "DOCUMENT.FIELDS.height.label"}}</label>
{{formInput fields.height value=source.height id=(concat rootId "-height") disabled=actorSizeUsed}}
</div>
</div>
{{#if shapes}}
{{formGroup fields.shape value=source.shape choices=shapes classes="slim" rootId=rootId}}
{{/if}}
{{formGroup fields.texture.fields.fit value=source.texture.fit choices=textureFitModes classes="slim" rootId=rootId}}
<div class="form-group slim">
<label>{{localize "Anchor"}}</label>
<div class="form-fields">
<label for="{{rootId}}-anchorX">{{localize "TOKEN.FIELDS.texture.anchorX.label"}}</label>
{{formInput fields.texture.fields.anchorX value=source.texture.anchorX id=(concat rootId "-anchorX")
placeholder="0.5"}}
<label for="{{rootId}}-anchorY">{{localize "TOKEN.FIELDS.texture.anchorY.label"}}</label>
{{formInput fields.texture.fields.anchorY value=source.texture.anchorY id=(concat rootId "-anchorY")
placeholder="0.5"}}
</div>
<p class="hint">{{localize "TOKEN.AnchorHint"}}</p>
</div>
<div class="form-group">
<label for="{{rootId}}-scale">{{localize "Scale"}} <span class="units">({{localize "Ratio"}})</span></label>
<div class="form-fields">
<range-picker id="{{rootId}}-scale" name="scale" value={{scale}} min="0.2" max="3" step="0.05"></range-picker>
</div>
</div>
<div class="form-group slim">
<label>{{localize "TOKEN.Mirror"}}</label>
<div class="form-fields">
<label class="checkbox" for="{{rootId}}-mirrorX">
{{localize "TOKEN.MirrorX"}}
<input type="checkbox" id="{{rootId}}-mirrorX" name="mirrorX" {{checked mirrorX}}>
</label>
<label class="checkbox" for="{{rootId}}-mirrorY">
{{localize "TOKEN.MirrorY"}}
<input type="checkbox" id="{{rootId}}-mirrorY" name="mirrorY" {{checked mirrorY}}>
</label>
</div>
</div>
{{formGroup fields.texture.fields.tint value=source.texture.tint placeholder="#ffffff" rootId=rootId}}
{{formGroup fields.alpha value=source.alpha step=0.05 rootId=rootId}}
{{formGroup fields.lockRotation value=source.lockRotation rootId=rootId}}
<fieldset>
<legend>{{localize "TOKEN.RING.SHEET.legend"}}</legend>
{{formGroup fields.ring.fields.enabled value=source.ring.enabled rootId=rootId}}
{{formGroup fields.ring.fields.colors.fields.ring value=source.ring.colors.ring rootId=rootId}}
{{formGroup fields.ring.fields.colors.fields.background value=source.ring.colors.background rootId=rootId}}
{{formGroup fields.ring.fields.subject.fields.texture value=source.ring.subject.texture rootId=rootId}}
{{formGroup fields.ring.fields.subject.fields.scale value=source.ring.subject.scale max=3 step=0.02 rootId=rootId}}
{{formGroup fields.ring.fields.effects value=source.ring.effects input=ringEffectsInput stacked=true rootId=rootId}}
</fieldset>
</div>

View file

@ -18,6 +18,14 @@
<span>/{{localize "DAGGERHEART.GENERAL.HitPoints.short"}}</span>
</div>
{{/if}}
<div class="tag" data-tooltip="DAGGERHEART.UI.Tooltip.tokenSize">
<i class="fa-solid fa-circle-user"></i>
{{#unless (eq source.system.size 'custom')}}
<span>{{localize (concat "DAGGERHEART.CONFIG.TokenSize." source.system.size)}}</span>
{{else}}
<span>{{source.prototypeToken.width}}x{{source.prototypeToken.height}}</span>
{{/unless}}
</div>
</div>
<line-div></line-div>
<div class="adversary-info">

View file

@ -20,18 +20,35 @@
{{/unless}}
{{/if}}
<fieldset class="two-columns even">
<fieldset>
<legend>{{localize "DAGGERHEART.ITEMS.Beastform.tokenTitle"}}</legend>
{{#unless (eq source.system.beastformType 'evolved')}}
<div class="full-width">
{{formGroup systemFields.tokenImg value=source.system.tokenImg localize=true}}
</div>
<div class="full-width">
{{formGroup systemFields.tokenImg value=source.system.tokenImg localize=true}}
</div>
<div class="full-width">
{{formGroup systemFields.tokenRingImg value=source.system.tokenRingImg localize=true}}
</div>
{{formGroup systemFields.tokenSize.fields.height value=source.system.tokenSize.height localize=true placeholder=(localize "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder") }}
{{formGroup systemFields.tokenSize.fields.width value=source.system.tokenSize.width localize=true placeholder=(localize "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder")}}
<div class="full-width">
{{formGroup systemFields.tokenRingImg value=source.system.tokenRingImg localize=true}}
</div>
<div class="nest-inputs">
{{formGroup systemFields.tokenSize.fields.size value=source.system.tokenSize.size label=(localize "DAGGERHEART.GENERAL.tokenSize") localize=true }}
{{formGroup
systemFields.tokenSize.fields.height
value=source.system.tokenSize.height
localize=true
placeholder=(localize (ifThen dimensionsDisabled "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.disabledPlaceholder" "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder"))
disabled=dimensionsDisabled
}}
{{formGroup
systemFields.tokenSize.fields.width
value=source.system.tokenSize.width
localize=true
placeholder=(localize (ifThen dimensionsDisabled "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.disabledPlaceholder" "DAGGERHEART.ITEMS.Beastform.FIELDS.tokenSize.placeholder"))
disabled=dimensionsDisabled
}}
</div>
{{else}}
<span class="hint">{{localize "DAGGERHEART.ITEMS.Beastform.evolvedTokenHint"}}</span>
{{/unless}}
</fieldset>
</section>