Jump to content

[Solved] Can't get storage flags working


Screwy

Recommended Posts

Hey guys, I just started modding and encountered my first frustrating problem. I'm trying to make a pouche for plants and seeds, but the storage flags seem not to work as intended.
I tried to use the following code:

Spoiler

    "storageFlags": 2,
    "attributes": {
        "wearableAttachment": true,
        "attachShape": { "base": "item/bag/herbpouche-attached" },
        "backpack": {
            quantitySlots: 16,
            storageFlags: 32,
            slotBgColor: "#63e413"
        }

The correct storageFlags for agricultural pruposes should be 32, according to https://github.com/anegostudios/vsapi/blob/master/Common/Collectible/Item/EnumItemStorageFlags.cs
Do I miss something obvious, or does this flag simply don't work? While testing, I can't place any item in any slot of the pouche, till I change the value to 1, 2 or 4, whereas on 4 the pouche takes only metal, rocks and mining tools. That's not what a herbpouche should do, aye?
In case the flag just not works properly, can someone explain how to set up a custom one?

Edit:
Oh, let me make an educated guess... Noone ever used this flag in their item types, not even Tyron? Will I have to patch every item, that I want to go into that pouche? Please tell me, I'm missing something! 😩

Edited by Screwy
Link to comment
Share on other sites

Okay, I have no clue how it's done. I wrote a patch now, but nothing seems to work. The wiki does not tell how to add an additional variable to an itemtype, just how values are replaced. Maybe I just think to complecated, but I can't figure out what "path" to take, when I just want to add the storageFlag to an item. This is what I got right now:

Spoiler

[

    {
        "file" : "game:itemtypes/resource/seeds-*",
        "path": "/",
        "op": "add",
        "value": {"storageFlags": 32}
    },

]

It is in a patch.json within my mod.
I tried out various paths, left it blanc, tried all kinds of things. Maybe I just miss some detail. I need help 😔

Edited by Screwy
Link to comment
Share on other sites

Yes, I have to learn how codes work...
Solved it.
 

Spoiler

[

    {
        "file" : "game:itemtypes/resource/seeds*",
        "path": "/storageFlags",
        "op": "add",
        "value": 32
    }

]

I was thinking to complicated 😅

Link to comment
Share on other sites

  • Screwy changed the title to [Solved] Can't get storage flags working
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.