Jump to content

[LE] Generic inventory filters question


irswat

Recommended Posts

Is there any way to apply a generic inventory filter for example to capture whenever any weapon is added or removed from inventory? I need to figure out the best way to keep track of items a player has in inventory, as well as spells learned, and shouts known. I have a method that involves going through inventory and filling formlists with items, but this must be done every time the player presses a key. Latency is a concern so I figure dumping inventory to formlists when the script is first initialized and then keeping the script updated whenever an item is added or removed is the most efficient way to keep an accurate list of a players inventory. I was thinking I could have multiple onitemadded/removed events that generically capture weapons, armor, ammo, potions, spell books, and update inventory formlists as necessary.

 

any suggestions?

I noticed I can filter by keywords. Do all weapons have a weapon keyword? do all armors have an armor keyword? etc. if so i could do this.

Edited by irswat
Link to comment
Share on other sites

The AddInventoryEventFilter only allows the object or objects if a formlist to trigger the OnItemAdded and OnItemRemoved events. I do not think you can use a keyword, although you are welcome to try.

 

Personally, I think it is better to keep it tied to the key press than try adding it to the OnItemAdded and OnItemRemoved events. There are a ton of mods and even scripts in the base game that use these events. It is very easy to overburden the system especially when the player performs a 'take all' action. By keeping your stuff tied to a key press, you are actually making it safer than it would be with the OnItemAdded and OnItemRemoved events. That is my two cents...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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