kgar / foundry-vtt-tidy-5e-sheets

D&D 5e sheet layouts for Foundry VTT, focused on a clean UI, user ergonomics, and extensibility.
https://kgar.github.io/foundry-vtt-tidy-5e-sheets/
MIT License
37 stars 14 forks source link

[Compatibility Request] Variant Encumbrance Dnd5e #250

Open p4535992 opened 8 months ago

p4535992 commented 8 months ago

The encumbrance bar do not play nicely with your sheet let me know possibly if you need any APIs for better integration.

Here the module reference: https://github.com/p4535992/foundryvtt-variant-encumbrance-dnd5e

kgar commented 8 months ago

Thanks for reporting!

Are there parts that work and parts that do not work? Which aspects are currently not working?

jtsmirror commented 8 months ago

From what I've noticed as a user, the color on the encumbrance bar and numerical values doesn't update in real time (see the video below), you need to refresh the page.

https://github.com/kgar/foundry-vtt-tidy-5e-sheets/assets/136428641/8551109e-84b0-482e-a05a-002065e1756c

kgar commented 8 months ago

This is very helpful, thank you! With this in mind, I will look over the make-up of the module and determine what actions are needed.

kgar commented 7 months ago

I'll have to come back to this later, in light of the dnd5e 3.0.0 situation.

MustBeAlive commented 7 months ago

dnd5e 2.4.1; tidy 1.0.0; variant encumbrance 0.15.0

Adding to previous user testing post: weight on items does not update on equip/unequip if any of the "equipped/proficient multiplier" settings are enabled (example: 50lb unequipped, 25lb equipped). It just ignores updating values in the sheet. Values in VE debug come back right though, so that's probably on the sheet side.

kgar commented 4 months ago

@p4535992 I do have a recommendation for this now. 2 Steps for Tidy integration:

  1. Use tidy5e-sheet.renderActorSheet hook for injecting content When injecting into Tidy, use the tidy5e-sheet.renderActorSheet hook instead of the renderActorSheet hooks. This hook fires every time a change occurs with Tidy sheets. The renderActorSheet hooks only fire when there a full / forced render. This has to do with Tidy using Svelte and how Svelte takes over reactivity after that first full render of the sheet.
Hooks.on(`tidy5e-sheet.renderActorSheet`, (app, element, data, forced) => {
  const html = $(element);
  // Inject something here.
});
  1. For Tidy, put data-tidy-render-scheme="handlebars" on the topmost HTML element(s) to be injected, or wrap your markup with something like <div style="display: contents;" data-tidy-render-scheme="handlebars"></div>. data-tidy-render-scheme="handlebars" tells Tidy to remove the HTML during its next render. This, combined with injecting using the hook I mentioned above, will cause the content to refresh as expected.
kgar commented 3 months ago

I fired up Variant encumbrance today in dnd5e 3.2, and I now see the weight updating. Is it working for everyone else? If so, are there any remaining Tidy-related issues to be resolved?

p4535992 commented 3 months ago

I have updated my module to keep track of the 3.2.0 breaking changes in the Dnd5e system (the latest version at a minimum of 3.2.0 in the manifest).

There remains the visual bar problem which is “not easy” to solve (at least for me), I am still deciding whether to abandon the sheet customization ui altogether and just update the “encumbrance” on the actor and let the sheet work with its own rules....

I have opened a commission about this for anyone interested on the league discord server.