Jump to content

Idea for a simple inventory sorter


cscottydont

Recommended Posts

idk if this has been suggested yet, I did a search for "inventory sort" and didn't turn up any promising hits...

 

Anywho, I've been playing around with ShowGiftMenu in order to limit what items you can give to my reanimated minions and it got me thinking (my mind wanders quite a bit, I'm very unproductive).

 

You could set up a very simple/easy inventory sorting device using ShowGiftMenu, a dummy inventory npc, a chest, some activators, and some very light scripting...

Other sorting methods I've seen proposed involve sifting though a ton of OnItemAdded events, or walking through an inventory with SKSE functions.

 

What I'm suggesting would only be useful for a player storage type deal for pack rats (I personally swipe everything that isn't bolted to the floor and then give up halfway through sorting it all out), you'd need to use another method to do anything with specific items.

 

Method:

 

Set up a dummy npc out in an empty cell somewhere.

Set up a scripted chest that uses RemoveAllItems to move anything put into it to the dummy npc's inventory.

Set up a few scripted activators that use ShowGiftMenu on the dummy npc with some neat filtering formlists (I've been using the vendorItem-xyz keywords and they work swimmingly).

The Dummy npc's inventory will always have all the items but you'll only be able to see the items that the specific activator you've clicked is filtering for.

You could even filter what items go in by using ShowGiftMenu directly on the dummy npc instead of going through an intermediate chest (for instance, you don't want misc items in your storage inventory for some reason - just filter out VendorItemMisc).

 

This assumes that all items follow a logical keyword convention (I haven't looked at every item so this may not be the case) and would be compatible with any mod added items that follow Bethsoft's keyword conventions.

 

 

Might be useful for Player house mods, but I'm not really into those so iguess these are just some random musings.

 

Edit: If any of you home makers out there are interested, I'd be happy to share some simple test code bits I've been playing around with. Just post here or pm me if you need more than the above outline.

Edited by cscottydont
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...