Jump to content

Improve Stackable component


Recommended Posts

This is kind of a feature request to the developers:

In relation to https://steamcommunity.com/sharedfiles/filedetails/?id=3175756875 and a bug found in the mod by @Maxil20

I've dug deeper into the issue and it seems that a client mod is unable to get the true stack size of a stackable component because it is capped by 2 6-bit integers capping it at 12 bits (max 4096). But the true max value is capped by 32 bits (which was introduced in a recent update). So it seems to me that there are 2 ways to fix this issue:

- make the mod into a server one. This one is a bit ugly, because this mod is related only to displaying things differently in the UI and it is counterintuitive that it should be a server one
- make a small change in the game code itself. Instead of having 2 6-bit integers in `stackable_replica`, there could be just one 32-bit integer corresponding to the stack size. I understand that this is a network overhead, but it seems to be a very small one. If this is unacceptable, you could instead improve the upper stack size value from 6-bit int to 32-bit int (virtually increasing max size to the true max size). Or maybe to just 16-bit int, capping the max value at 4194304 (which is way better than 4096, I doubt anyone will reach this stack size in a real gameplay)

So it would be a huge favor to the mod users (which there are already quite a bit) if the second option was chosen. It would be really appreciated!

P.S. feel free to point out any errors in my assumptions (that this could not be done without game updates or on the server only), as I am not yet an experienced modder! :)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...