1.6.0 Custom Sheet Changes

Looking at the changes made which are breaking for custom sheets. Gonna make a thread for this.
C
Calego732d ago
Spell Item Labels are different
C
Calego732d ago
Symptom: object Object in your spellbook tab where components should be. Cause: labels.components has had a breaking change. Fix:
{{#each labels.components.all}}
<span class="spell-component{{#if tag}} tag{{/if}}">{{abbr}}</span>
{{/each}}
{{#each labels.components.all}}
<span class="spell-component{{#if tag}} tag{{/if}}">{{abbr}}</span>
{{/each}}
No description
C
Calego732d ago
Here's how I'm handling backwards compatibility if it's interesting to you folks:
// in my getData method:
sheetData.systemFeatures = {
componentLabels: !foundry.utils.isNewerVersion('1.6.0', systemVersion),
};
// in my getData method:
sheetData.systemFeatures = {
componentLabels: !foundry.utils.isNewerVersion('1.6.0', systemVersion),
};
then in the hbs check the systemFeatures flags with an if to handle things correctly:
{{#if @root/systemFeatures.componentLabels}}

{{#each labels.components.all}}
<span class="spell-component{{#if tag}} tag{{/if}}">{{abbr}}</span>
{{/each}}
{{else}}

{{#each labels.components}}
<span class="spell-component {{this}}">{{this}}</span>
{{/each}}

{{/if}}
{{#if @root/systemFeatures.componentLabels}}

{{#each labels.components.all}}
<span class="spell-component{{#if tag}} tag{{/if}}">{{abbr}}</span>
{{/each}}
{{else}}

{{#each labels.components}}
<span class="spell-component {{this}}">{{this}}</span>
{{/each}}

{{/if}}
@sdenec I know the above will affect you. @fyorl (hi!) might hit you too. if anyone knows jopeek of the dndbeyond sheet's handle, I do not. does not affect Monster Blocks interestingly, well played zeel.
C
Calego732d ago
It is possible now that a user's game activates additional Ability Scores, 2 are part of system settings: Honor and Sanity. If your ability scores run horizontally, odds are your layout breaks. Honestly... I don't intend to support this with my sheets... But it's something to be aware of in case you get issues opened.
No description
C
Calego732d ago
It is now expected that Level items have a dropdown to allow leveling up/down from the actor sheet, as the item sheet no longer has the "level" field. This is the respective hbs for this dropdown in the core sheet's actor-features.html:
{{else if (eq item.type "class")}}
<div class="item-detail item-action">
<select class="level-selector">
{{#select 0}}
{{#each item.availableLevels}}
<option value="{{this.delta}}" {{disabled this.disabled}}>
{{localize "DND5E.LevelNumber" level=this.level}}
{{#if this.delta}}({{numberFormat this.delta sign=true}}){{/if}}
</option>
{{/each}}
{{/select}}
</select>
</div>
{{/if}}
{{else if (eq item.type "class")}}
<div class="item-detail item-action">
<select class="level-selector">
{{#select 0}}
{{#each item.availableLevels}}
<option value="{{this.delta}}" {{disabled this.disabled}}>
{{localize "DND5E.LevelNumber" level=this.level}}
{{#if this.delta}}({{numberFormat this.delta sign=true}}){{/if}}
</option>
{{/each}}
{{/select}}
</select>
</div>
{{/if}}
C
Calego732d ago
There's more to it than this for the class display. Subclasses are displayed under their classes now, and those shouldn't have the level dropdown, but should have a little thing in front of their name.
No description
C
Calego732d ago
<h4>
{{#if (eq item.type "subclass")}}&rdsh;{{/if}}
{{item.name}}
{{#if item.data.isOriginalClass}} <i class="original-class fas fa-sun" title="{{localize 'DND5E.ClassOriginal'}}"></i>{{/if}}
</h4>
<h4>
{{#if (eq item.type "subclass")}}&rdsh;{{/if}}
{{item.name}}
{{#if item.data.isOriginalClass}} <i class="original-class fas fa-sun" title="{{localize 'DND5E.ClassOriginal'}}"></i>{{/if}}
</h4>
Want results from more Discord servers?
Add your server
More Posts
1.6.0 testingCommunity Testing Requests: For those of you interested in helping to QA this branch, I'll put togeHook documentationdnd5e Hook Documentation: https://gitlab.com/foundrynet/dnd5e/-/wikis/HooksTyphonJS Runtime Library v0.0.9 - Release CandidateAlrighty! The TyphonJS Runtime Library (TRL) v0.0.9 is out... In the last 2 weeks+ I have done massi1.6.0 - 82%@dnd5e - **No action Required** The 1.6.0 milestone is at 82% completion https://gitlab.com/foundryadvancement consumptionnow that I brought that up on #progress-reports @calego , could I maybe pester you later for some adAlternative Alignment System D&D5eWow, that is a really powerful way to codify alignment. I like it! Do you have any ideas as to how iconsumables chat data@Zhell > So that's odd. How come consumables work different and all other item types get a non-funcilthid stop dragActually, would it be possible to modify the core function that allows people to click and drag toke1.6.x mid-milestone update@dnd5e - **No Action Required** Milestone 1.6.0 is 69% Complete (_nice_) <https://gitlab.com/foundPlugin ContributorsI'm very proud to be the maintainer of a module (Export Sheet to PDF) that is getting many, many conmore-hooks-itemroll-hooksFor those of you interested in such things, I have hacked together a way to inject hooks into the mipreHooks5eJSON.stringify jankI discovered that the problem is JSON.stringify, not parselayersTIL about CSS Layers. https://developer.mozilla.org/en-US/docs/Web/CSS/@layer ```css @layer utilitiHitDice hooks MRI just added my first merge request 😄 <https://gitlab.com/foundrynet/dnd5e/-/merge_requests/495>advantage shennaneginsdevmode extension brainstormhttps://github.com/mdn/webextensions-examples/tree/master/devtools-panelsSaving Functions as module settings@wasp I remember you asked about saving functions as settings (which quickly turned into stringifyinnew consumable typesTried adding localization strings for some new consumable types, but keep getting this ("`DND5E.Consspell-compendium-5e alpha1