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

Tweaking config values caused weird mess #1144

Open
nicehax opened this issue Aug 29, 2024 · 3 comments
Open

Tweaking config values caused weird mess #1144

nicehax opened this issue Aug 29, 2024 · 3 comments

Comments

@nicehax
Copy link

nicehax commented Aug 29, 2024

I tried tweaking the config value for the base storage of the drawer and it was fine, so I tweaked it again to a higher amount and all of a sudden the game started bugging out. Changing it back to the original value worked out fine, but why does the below happen?

16 baseStackStorage seems fine but above that bugged out.

Screenshot 2024-08-28 at 10 21 13 PM

@jaquadro
Copy link
Owner

interesting, that's basically max negative integer.

What upgrades are present in the drawer, and how many items were in it?

In some cases drawers use MAX_INT as a value for either capacity or storage, usually related to the two creative upgrades, but possibly in other cases.

@nicehax
Copy link
Author

nicehax commented Aug 30, 2024

There were two emerald upgrades and since I was messing around with configs I had set the upgrades to increase item storage by some ridiculous number that I don't remember.

Interestingly enough it kept happening to any single drawer that I put two emerald upgrades into regardless of how many items were in it; the drawer shown had actually been broken by me and replaced with a new drawer. It's probably that changing the configs led to the possible item storage overflowing since drawers without the upgrades or with two upgrades but able to store multiple items.

@jaquadro
Copy link
Owner

jaquadro commented Sep 2, 2024

Knowing the exact values you used could be helpful.

I mostly consider this a non-issue because you're using values so large that it's definitely overflowing integer math somewhere. I couldn't quite get it to do what you're showing, but I could see the effect in some other places. In the latest release I added some overflow checking, but I don't know if it will fix the particular problem in your screenshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants