Zorkaz Posted September 11, 2022 Share Posted September 11, 2022 There's an Event for a workshop object being placed, also one for it being moved or stored.But has someone found a way to create one for scrapping a workshop object? Link to comment Share on other sites More sharing options...
niston Posted September 11, 2022 Share Posted September 11, 2022 Event OnWorkshopObjectDestroyed(ObjectReference refWorkshop) ; code goes hereEnd Event Link to comment Share on other sites More sharing options...
LarannKiar Posted September 13, 2022 Share Posted September 13, 2022 So you need an event to detect when the object is "Scrapped" and not "Stored"? Since OnWorkshopObjectDestroyed is sent in both cases, I think (haven't tried it) you need to call WorkshopRef.GetItemCount(ScrappedOrStoredObject.GetBaseObject()) before and after scrapping/storing. Theoretically, "Store" should add one base form (of the reference) to the workshop workbench, "Scrap" adds its components. Both "destroys" the reference though. Link to comment Share on other sites More sharing options...
niston Posted September 13, 2022 Share Posted September 13, 2022 Maybe check IsDeleted(), I think it will be false if stored:One of the connectors on my isolation switch was storable in workshop earlier. When it got stored, a simple MoveToNode() brought it back into the game world. Link to comment Share on other sites More sharing options...
RaidersClamoring Posted September 13, 2022 Share Posted September 13, 2022 ...Theoretically, "Store" should add one base form (of the reference) to the workshop workbench... How and where are these items made visible, if anywhere, in the game?Tried selecting a workshop workbench in console and entering "inv". It listed all the things visible in the container menu but no stored workshop objects (though specialized work*bench* stuff like chems do show up). Is there a non-material ref somewhere in memory I could PRID? I just want to look at it visually for debugging purposes. Link to comment Share on other sites More sharing options...
LarannKiar Posted September 13, 2022 Share Posted September 13, 2022 (edited) Maybe check IsDeleted(), I think it will be false if stored:One of the connectors on my isolation switch was storable in workshop earlier. When it got stored, a simple MoveToNode() brought it back into the game world. For me, when I store an object, it gets disabled and deleted immediatelly unless it's hold by a variable. (I haven't tried MoveToNode() though). ...Theoretically, "Store" should add one base form (of the reference) to the workshop workbench... How and where are these items made visible, if anywhere, in the game?Tried selecting a workshop workbench in console and entering "inv". It listed all the things visible in the container menu but no stored workshop objects (though specialized work*bench* stuff like chems do show up). Is there a non-material ref somewhere in memory I could PRID? I just want to look at it visually for debugging purposes. I don't know where the game keeps that data. It's interesting question though.. there's no "reversed" StoreInWorkshop() unfortunately, a "Form[] Function GetWorkshopStoredObjects()" would be needed. Maybe an F4SE plugin have such function. By the way, I tested the GetItemCount() theory and no it doesn't work.. workshop objects are not even inventory items, sorry. It was a pretty bad idea. GetWorkshopObjectCount returns 0 in both cases, and GetComponentCount doesn't help either. Edited September 13, 2022 by LarannKiar Link to comment Share on other sites More sharing options...
niston Posted September 13, 2022 Share Posted September 13, 2022 What I can tell is that the connector came back with the same refID and was still connected to the wires it had before it was stored.But yeah. I'm holding that connector in a variable. Link to comment Share on other sites More sharing options...
Recommended Posts