Masterofnet Posted January 14, 2017 Share Posted January 14, 2017 Does AddInventoryEventFilter() work with keywords in SE. Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) AddInventoryEventFilter(Keyword) endEvent Link to comment Share on other sites More sharing options...
Masterofnet Posted January 15, 2017 Author Share Posted January 15, 2017 No it dose not. I just tested it. Link to comment Share on other sites More sharing options...
shavkacagarikia Posted January 20, 2017 Share Posted January 20, 2017 Yes it works with keywords. Link to comment Share on other sites More sharing options...
Masterofnet Posted January 20, 2017 Author Share Posted January 20, 2017 Are you sure? I tested it with VendorItemPotion and it did not work. How did you test it? Link to comment Share on other sites More sharing options...
fffseven Posted January 20, 2017 Share Posted January 20, 2017 Does AddInventoryEventFilter() work with keywords in SE. Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) AddInventoryEventFilter(Keyword) endEvent I didn't get this test? How it works? I test script below with keyword but it didn't work ? http://www.creationkit.com/index.php?title=Complete_Example_Scripts#Show_Gift_Inventory_and_Identify_Items_Given Link to comment Share on other sites More sharing options...
Masterofnet Posted January 20, 2017 Author Share Posted January 20, 2017 (edited) Yes it works with keywords. You know you would have to be a real moron to come on this thread and post your gibberish after you read the person tested it themselves and it does not work. I didn't get this test? How it works? I test script below with keyword but it didn't work ? http://www.creationkit.com/index.php?title=Complete_Example_Scripts#Show_Gift_Inventory_and_Identify_Items_Given I do not know about the " Script Below" and you do not have to bother testing this, it does not work - like I stated. However if you would like to, this is how I did. Scriptname KeywordTest extends ReferenceAlias Keyword Property vendoritemweapon Auto EVENT OnInit() AddInventoryEventFilter(vendoritemweapon) Debug.Notification("Filter Added") ENDEVENT Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) Debug.Notification("Filter Test") Endevent Place this script on a reference alias for the player and have them drop anything that is not a weapon. If the notification displays, then the inventory filter using a keyword does not work. Edited January 21, 2017 by Masterofnet Link to comment Share on other sites More sharing options...
fffseven Posted January 21, 2017 Share Posted January 21, 2017 Thank you for stating this again. I am new in papayrus and I had a hard time to get around this. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 21, 2017 Share Posted January 21, 2017 Of course it will not work with keywords. The input parameter is of Form and while it will compile with a Keyword, keywords are not added to the player inventory and thus they cannot trigger the OnItemAdded event. If you want to deal with only items of a specific keyword, you have a couple of options. 1. Check each added item for the keyword and skip it if it does not match. Works but can potentially bog down if a ton of items are transferred at once. 2. Create an empty formlist to use in the inventory event filter and use an xEdit script to create a patch file and add every object with the keyword from every plugin currently loaded into the formlist. A little more work on the users end but is adaptable and allows only the items you want to work with to trigger the OnItemAdded event. Link to comment Share on other sites More sharing options...
Masterofnet Posted January 21, 2017 Author Share Posted January 21, 2017 (edited) Of course it will not work with keywords. The input parameter is of Form and while it will compile with a Keyword, keywords are not added to the player inventory and thus they cannot trigger the OnItemAdded event. Actually, using keyword in the Fallout 4 Kit does work. That is the reason I asked the question. Before anyone answered I had decided to download the SE kit and tested it. It does not work in the Skyrim SE Kit. The Item would trigger the event and the the function would look for the keyword on the form. http://www.creationkit.com/fallout4/index.php?title=AddInventoryEventFilter_-_ScriptObject Thank you for stating this again. I am new in papayrus and I had a hard time to get around this. Glad to help. 2. Create an empty formlist to use in the inventory event filter and use an xEdit script to create a patch file and add every object with the keyword from every plugin currently loaded into the formlist. A little more work on the users end but is adaptable and allows only the items you want to work with to trigger the OnItemAdded event. I would like to hear more about how to do this. Someone needs to start a thread about xEdit that details all of its functions and how to use them. Edited January 21, 2017 by Masterofnet Link to comment Share on other sites More sharing options...
fffseven Posted January 21, 2017 Share Posted January 21, 2017 I let the player select items via giftmenu than give them back to player and I add each selected items in a formilst. This worked for me but it is a litte bit player sided and hacky way to go. Link to comment Share on other sites More sharing options...
Recommended Posts