What's wrong with my mod? Containtertype/FormatID help please!

5 posts / 0 new
Last post
#1
What's wrong with my mod? Containtertype/FormatID help please!

I've finally got the first version of my mods ready to post, but one item is giving me trouble!

I've tried to make a machete sheath item that can only hold a machete, but whenever I assign a new containertype to an item item as I THOUGHT I was supposed to, said item refuses to spawn in the game, meaning there's something wrong with it.

I'm sure that I've just missed something obvious here, but I need help figuring out what. Anyone mind taking a look and letting me know what I've done wrong here?

From other threads and existing items, I thought you had to set an item's "nFormatID" to the appropriate "containertype" to make them exclusive to certain containers (i.e. putting water in bottles but not pants pockets!). What have I missed?

code removed (problem solved, see below)

My Mods:SaveMan|Fishing|Shouldered|Bottles

There is a native item, called "Items found in this hex" in the GUI Container category (ID 24, Group 93, subGroup 4) - it is basically the inventory grid. You need to add your newly added "containertype" to it in the overwrite mod, otherwise the inventory itself is not allowed to hold your new item :D


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Thank you! I knew I was missing a step somewhere and was sure it was a case of "but you have to tell the game about your new container"... but I had no idea where/how and couldn't find how the game (or other mods) were doing it.

That's very useful info, not just to solve this problem but for future modding too. The downside is that I presume this means needing to make "compatibility patches" if you want your mod to work with other mods that add containertypes?

Anyway, of course, your tip works... you're a legend, mate! Thanks again!

My Mods:SaveMan|Fishing|Shouldered|Bottles

Yup, you will need compatibility patches almost for sure, if you are overwriting something.


<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

Every time I'm adding a new container type to the game, I cringe for this exact reason. "Welp, guess I have to go through all the old items to update their aContentIDs!" :)

Dan Fedor - Founder, Blue Bottle Games