Skip to content

Conversation

@WarperSan
Copy link
Collaborator

This aims to fix this issue. It hashes IDs using SHA256, then cuts any part that wouldn't fit in FixedString32Bytes.

You can test this by installing this mod, and spawning an item like Rainbow Stack of Small Jars of pickles. Before, the item would be displayed as ??? in the terminal. Now, the item correctly displays, using the quite long name.

If any issue comes up from the lack of size, the type of ItemData.ID can be changed to FixedString64Bytes, but it comes with being less memory efficient.

Obviously, this breaks any save that was made before this. It also ruins the logging using IDs, since they are less informative.

@TheSoftDiamond TheSoftDiamond merged commit 8f040ef into master Jan 11, 2026
2 checks passed
@WarperSan WarperSan deleted the fix-long-ids branch January 11, 2026 22:42
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

Successfully merging this pull request may close these issues.

[BUG] Long items ID get cut off

3 participants