Aller au contenu

Photo

Force items to a container


  • Veuillez vous connecter pour répondre
8 réponses à ce sujet

#1
Jereniva

Jereniva
  • Members
  • 125 messages

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.

 

 



#2
Dann-J

Dann-J
  • Members
  • 3 161 messages

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).


  • Jereniva aime ceci

#3
kevL

kevL
  • Members
  • 4 070 messages

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


  • Jereniva aime ceci

#4
Jereniva

Jereniva
  • Members
  • 125 messages

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.


  • rjshae aime ceci

#5
Jereniva

Jereniva
  • Members
  • 125 messages

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,



#6
Dann-J

Dann-J
  • Members
  • 3 161 messages

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.



#7
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages

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,


The acquire script in SoZ made sure that regardless of who picked up a recipe it would be placed in the recipe book. In the OC Makeover I removed that so that recipes could be carried independently of the recipe books. This was useful because it allowed a recipe to be used by anyone in the party.

Regards

#8
Dann-J

Dann-J
  • Members
  • 3 161 messages

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.



#9
Tchos

Tchos
  • Members
  • 5 063 messages

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.