How to Add Multiple Items to a Container

Post » Fri Nov 16, 2012 3:18 pm

Hi there, I was just sitting here, adding one single item to a vendor chest, and thinking to myself, "I wish there was a way to just add all these items at once, instead of taking 30 minutes to do it piece by piece."

So, has anyone got a few minutes to help me out? I've looked around, but it seems like one of those unspoken little tricks I haven't discovered, yet. I don't use any third party programs to mod, with. Just the CK. Basically, I'm just wanting to simply add for example, for my apothecary shop, I wanted to have every ingredient available to buy.

I know I could just copy and paste one already used... but I just want to do everything I can do myself, without having to lean on something Bethesda has already used, due to laziness. Know what I mean? More of a pride thing, I guess.
User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Fri Nov 16, 2012 9:44 am

You can add the items to a Leveled Item and tick its "Use All" flag, then...
LeveledItem Property YourLVLI AutoObjectReference Property SomeContianerREF AutoEvent SomeEvent()	SomeContianerREF.AddItem(YourLVLI)EndEvent
...or just add the LVLI *directly to the container base.

*If it's not a vanilla container.

Note: LVLIs can be added by http://www.creationkit.com/AddItem_-_ObjectReference, but not removed.
SomeContianerREF.AddItem(YourLVLI)
SomeContianerREF.RemoveItem(YourLVLI)
While it will compile, the constituent items must be removed individually or via a FormList with the same members.
SomeContianerREF.RemoveItem(YourFLST, YourFLST.GetSize()) ; SomeContianerREF has exactly one of each item
User avatar
Nikki Hype
 
Posts: 3429
Joined: Mon Jan 01, 2007 12:38 pm

Post » Sat Nov 17, 2012 2:04 am

Thank you, JustinOther! That info was JustinCredible! (Sorry, couldn't resist) But really, thanks. This helps save so much time. Thank you.
User avatar
lolli
 
Posts: 3485
Joined: Mon Jan 01, 2007 10:42 am

Post » Fri Nov 16, 2012 4:21 pm

No prob :) It's all about time saving. FormLists, array variables, and LeveledItems are all handy ways to deal with groups of forms.

If/when you get into quest aliases, note that array variables can have ReferenceAliases while FormLists cannot.
User avatar
Je suis
 
Posts: 3350
Joined: Sat Mar 17, 2007 7:44 pm


Return to V - Skyrim