Zorkaz Posted March 12, 2020 Share Posted March 12, 2020 Just a thought but it might prove useful: Settlement food gets normally transfered to the workbench container.Has anyone ideas how to get settlement food transferred to a unique container? Link to comment Share on other sites More sharing options...
SKKmods Posted March 12, 2020 Share Posted March 12, 2020 If your into hacking base game scripts then WorkshopScript.psc Line 717 ObjectReference containerRef = GetContainer()WorkshopParentScript.psc Line 2846 ObjectReference containerRef = workshopRef.GetContainer() Or register a script for each workshop WorkshopDailyUpdate, snapshot the starting resources, when it finishes count the resources and trasnfer out the difference. Or use the Global Stash off the shelf solution that removes everything from workshops already. Link to comment Share on other sites More sharing options...
Zorkaz Posted March 13, 2020 Author Share Posted March 13, 2020 Changing the main script isn't a solution of course. I then thought of a scripted container that checks if a second container has items in it and grabs them. But so far I haven't gone too deep with it. Thing is the main workshop should be out of reach, it's contents too. (That's why there's no crafting option in the Settlement Menu) Link to comment Share on other sites More sharing options...
SKKmods Posted March 13, 2020 Share Posted March 13, 2020 If your objective is to constantly clear the contents of a container to another container the most elegant solution is to put a redirect on the source container rather than remote polling from the destination container. That involves attaching a simple script to the source container that looks like this; Event OnInit() Self.AddInventoryEventFilter(akFilter = None) EndEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) Self.RemoveAllItems(akTransferTo = THEOTHERCONTAINER, abKeepOwnership = false) ;slower but safer ;Self.RemoveItem(akBaseItem, aiCount = aiItemCount, abSilent = true, akOtherContainer = THEOTHERCONTAINER) ;faster but less robust EndEvent RemoveAlltems is slower but more robust than RemoveItem as OnItemAdded events can be missed during high script system load in settlements which causes stuff to get "stuck" in the source container. Hot info as I am publishing a solution today based on this mechanism. Link to comment Share on other sites More sharing options...
pra Posted March 13, 2020 Share Posted March 13, 2020 I THINK WorkshopFramework is either planning on adding support for this, or maybe even has it already Link to comment Share on other sites More sharing options...
Zorkaz Posted March 13, 2020 Author Share Posted March 13, 2020 Thanks this saves me a lot of time and headaches. And will prove quite useful Link to comment Share on other sites More sharing options...
Recommended Posts