bmarian / token-tooltip-alt

A module that adds a tooltip next to the currently hovered token to show some useful information for players and DMs.
MIT License
9 stars 15 forks source link

[BUG] .value is displayed one lower than actual when it's equal to .max #40

Closed mkahvi closed 3 years ago

mkahvi commented 3 years ago

Describe the bug Custom resource in Pathfinder 1e system sometimes shows it's .value when maxed (equal to .max) as one lower than it should. The game system itself reports it correctly in all instances related to this.

TTA shows the value wrong until the resource is modified, after which it shows it correctly.

To Reproduce Steps to reproduce the behavior:

  1. Create a custom resource
  2. Link custom resource to TTA
  3. Observe resource .value being off

Above is unreliable.

Screenshots Screenshot_2020-11-08_232654

Please complete the following information:

Additional context Add any other context about the problem here.

An export of your tooltip settings

{"gmSettings":{"default":{"items":[{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":false,"useAccentEverywhere":false,"accentColor":"#000000","tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}},"character":{"items":[{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":true,"useAccentEverywhere":false,"accentColor":"#000000","tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}},"npc":{"items":[{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":false,"useAccentEverywhere":false,"accentColor":"#000000","tokenDispositions":["FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}}},"playerSettings":{"default":{"items":[{"disposition":"OWNED","items":[]},{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":"FRIENDLY","useAccentEverywhere":false,"accentColor":"#000000","tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}},"character":{"items":[{"disposition":"OWNED","items":[{"value":"attributes.hp","icon":"fa-heart","expression":false,"isNumber":false,"color":"#a20101"},{"value":"{attributes.hp.nonlethal} NL","icon":"fa-heart","expression":true,"isNumber":false,"color":"#966969"},{"value":"{attributes.ac.normal.total} ({attributes.ac.touch.total})","icon":"fa-shield-alt","expression":true,"isNumber":false,"color":"#3d43ff"},{"value":"{attributes.speed.land.total} ft [{<attributes.speed.land.total> / 5} sq]","icon":"fa-shoe-prints","expression":true,"isNumber":false,"color":"#2aaf09"},{"value":"resources.combatStamina","icon":"fa-fist-raised","expression":false,"isNumber":false,"color":"#e46f21"},{"value":"{resources.burnTotal.max}/{resources.burn.max}","icon":"fa-fire","expression":true,"isNumber":false,"color":"#b719d7"}]},{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":"FRIENDLY","useAccentEverywhere":false,"accentColor":"#000000","tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}},"npc":{"items":[{"disposition":"OWNED","items":[]},{"disposition":"FRIENDLY","items":[]},{"disposition":"NEUTRAL","items":[]},{"disposition":"HOSTILE","items":[]}],"static":{"displayNameInTooltip":"FRIENDLY","useAccentEverywhere":false,"accentColor":"#000000","tokenDispositions":["OWNED","FRIENDLY","NEUTRAL","HOSTILE"],"useAccentColorForEverything":false}}}}
bmarian commented 3 years ago

For the moment I'm unable to reproduce this problem. If you use an expression does it have the same problem?

{<resources.combatStamina.value>}/{<resources.combatStamina.max>}

mkahvi commented 3 years ago

I'll see if that behaves any differently. But as I mentioned in the original report, I don't know how to make this happen consistently. It just keeps coming back.

bmarian commented 3 years ago

@mkahvi some update on this? On my part, I am still unable to reproduce it.

mkahvi commented 3 years ago

No, it seems like it just doesn't want to reproduce itself on demand. I'll close this for now and come back when it rears its ugly head again.