PJMail Posted January 1, 2022 Share Posted January 1, 2022 (edited) The filters (addinventoryEventFilter) only work for the onitemadded/removed events, not for openinventory etc.Any way to open a 'restricted' trade menu between Player and another NPC? Similar to what happens when you access the PA Workbench? I suppose last resort is a way to block moving/droping the wrong type objects (like bookshelves etc do) but with NPCs.Is complex 'onitem...' event script code the best way when dealing with NPC's (rather than containers which can have content restricions)? I suppose the other way is opening an 'intermediate' container with content restrictions - are there any gotchas?What 'name' apears for the container? Can I make it something like 'Please transfer some .... to ...."? I have searched through these forums and CK doco but not found anything appropriate. Thanks. Edited January 1, 2022 by PJMail Link to comment Share on other sites More sharing options...
PJMail Posted January 2, 2022 Author Share Posted January 2, 2022 This whole 'linked workbench container' stuff that workshop 'containers' do appears to be a massive kludge implimented in base game code somewhere (not scripts). E.g. When you link something back to a Workshop container via the keyword "LinkedWorkbenchConatinerKeyword", then activate that something, you get a restricted view of what is in the Workshop container - presumably based on the keyword on the 'something'... (but nothing like a formlist of 'allowed' items). Specifically, the PowerArmor workbench links the PA you are working on to itself via this keyword, then 'activates' the PA, which causes a 'restricted' trade window to appear.The PowerArmor Workbench is similarly linked back to the Settlement Workbench so the same thing happens when you 'activate' the PowerArmor Workbench. This seems to work nothing like a normal "activateLinkedRefOnActivate" where you open a remote container via another activatable object linked to it... Shame this sort of restricted trade interface isn't available in scripting... Back to my original kludge idea... Link to comment Share on other sites More sharing options...
LarannKiar Posted January 3, 2022 Share Posted January 3, 2022 Any way to open a 'restricted' trade menu between Player and another NPC? Similar to what happens when you access the PA Workbench? I don't think so. Moving the undesired objects temporarly to another container right before the trade menu opens might be the simplest solution. Link to comment Share on other sites More sharing options...
PJMail Posted January 3, 2022 Author Share Posted January 3, 2022 My thoughts exactly. However I have decided that is too much trouble and will just give the users a full 'trade' option... Link to comment Share on other sites More sharing options...
DieFeM Posted January 3, 2022 Share Posted January 3, 2022 -Maybe you could use oncontainerchanged or onitemadded or onitemremoved, to move the item back to its original container if it doesn't meet the object type, I think that's what the bobblehead stand does. Link to comment Share on other sites More sharing options...
PJMail Posted January 5, 2022 Author Share Posted January 5, 2022 I could certainly do that as I have to now monitor the NPC's inventory (so I act on that FusionCore being put in there) anyway. Not sure users can 'cheat' with full Inventory access - but if they can I will consider it. Concerning Bobblehead Stands - Containers can have 'allowed items' formlist so I just assumed it was restricted that way.... Link to comment Share on other sites More sharing options...
Recommended Posts