Questions about custom containers

So here’s a question.

Is there a way to create an item such that it’s a container but doesn’t reduce the weight of things put in it? Do I just need to edit the 2da or would I also need to add a property to make that happen?

Secondly what do you think would be the best way to ensure that the player only has 1 of an item, even if the item is readily available in stores. In my case I want to create a “Pack Frame” that is relatively cheap (gives -20% weight reduction) but I don’t want the players buying 10 of them I just want to enforce that they have no more than 1 and I don’t believe there is any sort of “exclusive” or “unique” item property.

I know I would need to check for that in the onAcquired but how do I ensure that it sells back to the store properly?

Actually containers need a property to reduce weight (Enhanced Container: Reduced Weight property). So without that property any container is what you’re looking for. Also the toolset already has some of them (Large Box for example).

Make sure there’s only one “Pack Frame” available. Then the player can only have one. Or remove the Pack Frames once the player has one.

So it in the 2da it’s flagged as a container it will have inventory space by default?

Making only one Pack Frame available won’t work well for me unfortunately. This is intended to be a multiplayer module with a DM so I need to have it available for characters. Some will get one “free” as starting gear depending on the background they choose for their character but others will want or need to buy one.

I also want them to be able to buy a replacement should theirs be lost or stolen.

In baseitems.2da there’s a column Container. By putting a ‘1’ there you can make any item type a container (I guess).

When a player opens a store add a Pack Frame to the store / remove existing Pack Frames from the store depending on if the player already has one or not. Make them cursed so a Pack Frame can’t be given from one player to the other.

Note that it is not a good idea to make a container from equippabble item. First of all, the container GUI doesn’t appear when the item is equipped. Second, I remember some crash or other issues when I tried this in EE. (Had this working in 1.69 with NWNCX as a equippable bags with a model in cloak slot, but not possible in EE.)

@Shadooow How recently have you tried this in EE? In a single player module, I have “cloaks” set to be containers since the only “cloaks” that I allow look like backpacks. I don’t recall having any issues. Granted, I haven’t tried using the “reduce weight” property.

it has been a while… I tried to look for the conversation related to this, but to no avail, this forum doesn’t have search into messages feature and it was likely not happening here anyway but discord, likely on a server I already left, so I was not able to find details about it