Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Hit Point Max does not auto-update on level up. Requires Configure HP, which increases current HP twice #730

Open
danmartinez78 opened this issue Aug 24, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@danmartinez78
Copy link

Copying from sdenec/tidy5e-sheet#789 as it seems it was never actually moved and the issue still persists through the latest versions of tidysheet

Module Version: v0.9.17

So you have Current HP, and Max HP, which looks like 0/40 if you're unconscious, or 40/40 if you're at full health.

Lets say you level up and your HP increases by 8. This should bring you to 48/48, but instead it only updates your current HP, and puts you at 48/40, which doesn't make any sense. To bring your HP Max to what it should be, you need to hit the Cog beneath your HP to open "Configure Hit Points", and then delete the HP in the popup, and you'll see it gets reset to what it should be. However, when you click save, it will update your current HP by that amount for a second time. So now your HP looks like 56/48.

If this bug could be fixed that would be great. Ideally when you level up it should just automatically boost your HP and Max HP by the same amount, so that you don't have to take a trip to the Configure HP window.

@kgar
Copy link
Owner

kgar commented Aug 24, 2024

This Tidy 5e Sheets as a module is presenting the information and allowing changes to individual fields on the sheet. It is not managing levels up. It also does not decide how much HP is being added to the current value or the max. Even the weird thing where current HP goes up by the new Max while an overridden Max stays the same (48/40) is not this sheets module. It's the system and/or a module affecting levels up. Updates go to the actor, and the sheet pulls data from the actor each time the actor changes. So there's no logic in Tidy to increase the health bar on a level up.

It sounds like the core problem is that Max HP is somehow getting set to a value when it should be blank in order to allow for the advancement-based max HP increases to go into effect. I recognize this issue from old Tidy, both as a user and when rewriting it. I just haven't had issues with this since old Tidy, because the new setup requires a person to specifically change the Max HP override in order to ignore HP advances. In old Tidy, Max HP Override could get accidentally set when changing other fields.

We can still try to figure out what's going on and see if there's some resolution, but having not had any issues with this since Tidy V1 (except for when the Max HP override was already set beforehand), I don't think a code change will solve the problem.

What is the current approach being used for levelling up?

Has the issue recurred for a given character while on the new sheets module?

Is the "Allow HP Max Override on Character" turned on? If so, it might be good to disable it, because it's entirely possible someone may accidentally change the max, causing it to shift from "calculated per advancements" to "max HP override."
image

If I go in and level up a character like this:
image

By the end, their HP has adjusted accordingly:
image

@kgar kgar added the question Further information is requested label Aug 24, 2024
@kgar kgar self-assigned this Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants