Just using standard properties of a container and items, can you force things in to particular container? or does that not work? I can't tell if I'm doing it wrong or doesn't work.
Just using standard properties of a container and items, can you force things in to particular container? or does that not work? I can't tell if I'm doing it wrong or doesn't work.
It certainly worked in Storm of Zehir (recipes, bounty items, etc). I have no idea how it was implemented though.
I seem to recall that item blueprints have a 'preferred container' field, or something with a similar wording. I don't know if that alone does the job, or whether it ties into a custom SoZ script (such as a module/campaign-wide item acquired script).
Here's the results of rummaging through SoZ
---
in SoZ, module G_X2, area u02_openpalm_bazaar
kwesi grants Bounty Satchel (nx2_t_bountybag)
properties:
- Container Preference: Bounty Bag
- Force Into Preferred Container? TRUE
- Item Property Activation Preference: Active only when in inventory
- Item Properties:
- Base Item Weight Reduction
- Enhanced Container: Reduced Weight
item: Badger Claws (nx2_cp_badger)
properties:
- Base Item: Bounty Item
- Container Preference: Bounty Bag
- Force Into Preferred Container? FALSE
2da: Container_Preference.2da
#9 Bounty Bag
---
i don't know how that all goes together, but I'll guess that the two important properties of both containers and items are
- Container Preference ( defined in .2da )
- Force Into Preferred Container ( container TRUE, item FALSE (ironically))
- their 'identified' flags *may* have to be TRUE also, &tc.
ps. i doubt there's any special scripts for this
Thanks for the help!
I figured it out, through some trial and error.
If I take the properties sheet of the bounty bag and the badger claw, and replicate it still wouldn't work.
I made one simple change, and set key to Force in to Preferred Container? = TRUE and then it did work.
Here are settings I made:
Key Ring:
Base Item = Container
Container Preference = Key Ring
Force Into Preferred Container ? = TRUE (not sure if relevant)
Item Property Activation Pref = Active only when in inventory (not sure if relevant, but Bounty Satchel is set like this, and it's not default setting)
Key:
Base Item = Key
Container Preference = Key Ring
Forced Into Preferred Container = TRUE
If you pick up the bag after the key, key doesn't jump to bag, but once key is in the bag, you can't take it out.
At first I thought there must be a connection defined somewhere where Keys go into Key Rings, but I think it's much simpler than that.
I think it's as as simple as having container preference the same for two items, and if one item Base Item = Container, and the other item is something other than a container, this system will work. You could probably add more container types to the 2da you reference.
I looked around a little and the bounty bag is done without scripts, but the recipe containers do it all through script in order to check and make sure you don't have a duplicate recipe in there,
Thanks. That's good information to know.
Hopefully the system is smart enough not to try to put containers inside other containers, if you have two of the same container type. I don't know what'd happen if you nested containers (especially Bags of Holding). I expect chaos would ensue.
I've also been experimenting with containers. I've set them in baseitems.2da so that they're equippable in the player's belt slot. They continue to function just fine when equipped.
I looked around a little and the bounty bag is done without scripts, but the recipe containers do it all through script in order to check and make sure you don't have a duplicate recipe in there,
I'd have preferred the recipe books not to have been 'cursed'. It's annoying when you export a character from SoZ and you've got all these things left over in your inventory that you can't get rid of.
A tag-based 'Wand of De-Cursing' would be easy enough to create though, which turns off the 'cursed' flag on a targeted item. It could break games in progress if misused though.
I use Kaldor Silverwand's context menu additions mod, which allows you to transfer all unequipped items into a bag on the ground, from which you can opt not to take the cursed items such as the recipe books. It also allows you to turn your controlled character 100% transparent for the purpose of screenshots or playing in a pseudo 1st person.