LarannKiar Posted March 4, 2023 Share Posted March 4, 2023 With F4SE, one can call the Take All function by UI.Invoke too: UI.Invoke("ContainerMenu", "root1.FilterHolder_mc.Menu_mc.onTakeAll") onTakeAll() is a public function in ContainerMenu.swf that calls: this.BGSCodeObj.takeAllItems(). (".this" is the MovieClip, BGSCodeObj is a public variable filled by the native game code (this is the actual object whose container is open), takeAllItems() is a function defined in the .exe that takes everything that is meant to be takeable).This is very interesting. Can you specify another target/container ? also, is there a similar function that can be used as an alternative to addItem() ? (the papyrus one can cause a reset inventory bug on some NPCs) This function works only if ContainerMenu is open so one would need to call Activate() (for object references) or OpenInventory() (for actors) on the target object first. The .exe sends container data to AS3, for example, integer:uiMode (like 'CM_Teammate' if the target is a player follower or 'CM_Workbench' if it's a workshop container), string:ContainerName. The native function that AS3 can call and is the closest to AddItem() is: this.BGSCodeObj.transferItem(ItemList.selectedIndex,iitemCount, ContainerList) This would transfer iitemCount number of the inventory item whose item index is selectedIndex from ItemList to ContainerList. Link to comment Share on other sites More sharing options...
lee3310 Posted March 4, 2023 Share Posted March 4, 2023 With F4SE, one can call the Take All function by UI.Invoke too: UI.Invoke("ContainerMenu", "root1.FilterHolder_mc.Menu_mc.onTakeAll") onTakeAll() is a public function in ContainerMenu.swf that calls: this.BGSCodeObj.takeAllItems(). (".this" is the MovieClip, BGSCodeObj is a public variable filled by the native game code (this is the actual object whose container is open), takeAllItems() is a function defined in the .exe that takes everything that is meant to be takeable).This is very interesting. Can you specify another target/container ? also, is there a similar function that can be used as an alternative to addItem() ? (the papyrus one can cause a reset inventory bug on some NPCs) You can get around that additem/reset issue in papyrus by doing the additem(s) on a temporary container then using "Container.RemoveAllitems(NPC)" to transfer the object(s) to the NPC.This does not trigger the inventory/outfit reset issue. Great, i'll give it a shot. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts