Announcement

Collapse
No announcement yet.

Stack Mod Visual Issue with Weight

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    Originally posted by idlehands88 View Post
    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 ?

    Comment


      #3
      Originally posted by fullbanner View Post

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

      Comment


        #4
        Originally posted by idlehands88 View Post

        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
        Code:
         
        v257
        This version has major functional additions useful for Mods, including PrimalItem "CustomItemDatas" finally fully working, with save and load support
        Click image for larger version  Name:	correct stack weight.png Views:	1 Size:	459.8 KB ID:	1469304

        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:
        Click image for larger version  Name:	variables.png Views:	1 Size:	9.5 KB ID:	1469317

        And here is the copy-paste code, if you got any problem
        copy-paste code.txt
        Last edited by fullbanner; 05-01-2018, 04:24 AM.

        Comment


          #5
          THANK YOU SO MUCH, that is working nicely!

          Comment

          Working...
          X