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

[Issue Report]: Overflow with Acolyte Amulet? #6875

Open
Chonkblonk opened this issue Dec 21, 2023 · 4 comments · May be fixed by #5771
Open

[Issue Report]: Overflow with Acolyte Amulet? #6875

Chonkblonk opened this issue Dec 21, 2023 · 4 comments · May be fixed by #5771
Labels
hellfire bugs found in hellfire and NOT in 1.09

Comments

@Chonkblonk
Copy link

Operating System

Windows x64

DevilutionX version

1.5.1

Describe

I play as a Sorcerer and get to high level, in Nightmare I find the Acolyte's Amulet, which is a Hellfire item.
I think "Wow, this is perhaps the least useful drop yet!" and put it in my stash.

Fast forward some days, and I make a Warrior, he's level 1 and I go look in my stash for fun stuff I can start him out with. Seeing the Acolyte's Amulet, which transfers 50% of mana to health, I try it out for the fun of it. Expecting the meager mana to add some extra life, instead I get THIS result.

Screenshot from 2023-12-21 12-50-09
Now, this doesn't look right at all. I don't know if this is some sort of overflow or if the amulet decided to remember my Sorcerer's massive mana pool for some reason and apply that on my Warrior. After I took a screenshot and went to write this, the game also ended up freezing/crashing, so I assume that it created some situation the .exe did not like.

Loading the game up again, there he is, but this time the health and HP values are normal, so it seems self-correcting, in a way.

To Reproduce

.

Expected Behavior

No response

Additional context

No response

@julealgon
Copy link
Contributor

I don't know if this is some sort of overflow or if the amulet decided to remember my Sorcerer's massive mana pool for some reason and apply that on my Warrior.

Loading the game up again, there he is, but this time the health and HP values are normal, so it seems self-correcting, in a way.

You are probably onto something there... if this goes away when reloading, it is most likely state that wasn't correctly cleared between one game and the other (which is what happens with the vanilla game in several scenarios, such as "refreshing wirt items", or "difficulty levels in normal" etc).

This is one of the reasons why I'd actually advocate for the menu and the game being 2 separate processes.

@StephenCWills
Copy link
Member

StephenCWills commented Dec 21, 2023

This is one of the reasons why I'd actually advocate for the menu and the game being 2 separate processes.

That wouldn't help here. Stash saves item data in SP save format so it remembers the HP/mana values assigned to the item when it was picked up. Before 1.5.1, we used the heroitems file in the character saves to do the same for items in the player's inventory. But recently with the introduction of the item validation logic, we switched back to the vanilla way of regenerating the item on new game. So now there's a bit of a difference between leaving an item in your stash and holding it in your inventory when you create a new game.

@julealgon
Copy link
Contributor

Stash saves item data in SP save format so it remembers the HP/mana values assigned to the item when it was picked up.

Had no idea about that. Thanks for pointing it out!

@kphoenix137 kphoenix137 added the hellfire bugs found in hellfire and NOT in 1.09 label Mar 7, 2024
@kphoenix137
Copy link
Collaborator

I don't know if this is some sort of overflow or if the amulet decided to remember my Sorcerer's massive mana pool for some reason and apply that on my Warrior.

Loading the game up again, there he is, but this time the health and HP values are normal, so it seems self-correcting, in a way.

You are probably onto something there... if this goes away when reloading, it is most likely state that wasn't correctly cleared between one game and the other (which is what happens with the vanilla game in several scenarios, such as "refreshing wirt items", or "difficulty levels in normal" etc).

This is one of the reasons why I'd actually advocate for the menu and the game being 2 separate processes.

Specifically, the problem is rooted in how poorly these affixes were implemented. The game would write the hp/mana values when the item gets generated/regenerated. This is especially problematic in a single player game session, because you can level up, but those values written to the item never change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hellfire bugs found in hellfire and NOT in 1.09
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants