Jump to content

Script for an item sorter that sorts mod added items as well?


Draco856

Recommended Posts

I'm looking for a script that I can use that will sort all items no matter where they came from, It will obviously require FOSE.
Link to comment
Share on other sites

As of FOSE v1.2, there are functions available that allow us to step through an inventory. Functions added since the initial release haven't been added to the official documentation, but here is a link to some temporary documentation of these "missing" functions - Temporary documentation

 

The functions that you'll want to use to walk through an inventory are GetNumItems and GetInventoryObject (with Label and Goto to loop through them, as well). You can tell what type of form an object is via the GetType function.

 

When it comes to moving objects from the player's inventory into another inventory, the only way to do it without losing all health information is to use RemoveAllItems. The items moved by this function, when it is called on the player, can be changed by changing whether or not they are quest items, as quest items will not be removed.

 

The best way to do this is to create form lists to store the objects that have to have their "quest item" status removed after being moved, and those that should have it added back. "Quest item" status can be changed via FOSE's (undocumented) SetQuestItem, and whether or not an item is a quest item can be checked via its (again undocumented) IsQuestItem function.

 

Cipscis

Link to comment
Share on other sites

I probably should have worded this better...I'm no good when it comes to scripting. I was asking for one to be made.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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