Stack Mod Visual Issue with Weight

Hello, been trying to figure out how to my Configurable Stack Mod, where the weight visual value doesn’t match the ini settings. For example if I make Metal Ingots weight to 0.5 in the ini setting, in-game it shows the default 0.001 but my character’s overall weight is 0.5. Meaning that the ini setting is working just not showing on the item itself.

Can you show us the code you are using to set the item weight ?

There are a couple problems with your code, first you never know what the parent is doing with those events, you may be removing critical funcionality from the item by not calling the parent.
The second problem i see is, i don’t know if you’re aware, but those 2 events are called more than once, everytime you add the item to an inventory, or move inventory, or split stacks.
This will cause your ini file to be read and reread, over and over, causing stress to the server and lag to the players.
So to fix your problem, reusing the code you provided, and by following the Ark Devkit update


 v257
 
This version has major functional additions useful for Mods, including PrimalItem "CustomItemDatas" finally fully working, with save and load support
 
 

variables.png

Do this, and your weight problem will disappear. Don’t forget to give credit where it’s due, my steam nickname “XHead”.
Enjoy

Edit: Here are the variables i used for this code:
variables.png

And here is the copy-paste code, if you got any problem
copy-paste code.txt (59.8 KB)

THANK YOU SO MUCH, that is working nicely!