hereami Posted March 17, 2023 Share Posted March 17, 2023 (edited) If they are deleted explicitly by Delete(), bypassing Store/Scrap interface, will that cause any ill behaviour of Workshop processor? Like cluttering database forever by obsolete references, because it never received destruction notification.Thanks. Edited March 17, 2023 by hereami Link to comment Share on other sites More sharing options...
SKKmods Posted March 17, 2023 Share Posted March 17, 2023 I dont know the actual answer as never tested, but I ALWAYS remove the WorkshopItemKeyword LinkedRef before a scripted Disable() and Delete() to help keep the system clean: thisWorkshopObject.SetLinkedRef(None, pWorkshopItemKeyword) thisWorkshopObject.Disable() thisWorkshopObject.Delete() NOTE: never script disable/delete on a workshop object that meets these conditions else you will case a power grid SCRAP CRASH (thisWorkshopObject.GetValue(pWorkshopSnapTransmitsPower) > 0) || (thisWorkshopObject.HasKeyword(pWorkshopPowerConnectionDUPLICATE000) == TRUE) || (thisWorkshopObject == pBlackWireSpline01) Link to comment Share on other sites More sharing options...
hereami Posted March 18, 2023 Author Share Posted March 18, 2023 (edited) Thanks, good to know. It's unpowered fortunately. Is there actual reasoning for unlinking and wouldn't it be disruptive in another way? Hm, something can be tested with an "expensive" object. Whether Workshop bar would drop or not as reaction to external manipulations. Also, by the way. Why a need of Disable() before Delete()? Paired often, but looks redundant, although Delete() doesn't trigger OnUnload for some reason as i know, maybe that? Edited March 18, 2023 by hereami Link to comment Share on other sites More sharing options...
SKKmods Posted March 18, 2023 Share Posted March 18, 2023 Yes removing the linkedref will update the defense/beds/food/object polygon counts. Test: PlaceAtMe a workshop object, no workshop counters increment. Add WorkshopItemKeyword and LIVEworkshop counters update. Remove WorkshopItemKeyword and LIVE workshop counters update. Please note that the stored WorkshopRatings may not be updated unless/until ResetWorkshop triggers causing unloaded workshop resource calculation issues. Disable before Delete is simply good practice for user experience as delete can be a deferred operation. Disable is a "native latent" function so minimal cost to your careful script budget accounting. Link to comment Share on other sites More sharing options...
hereami Posted March 18, 2023 Author Share Posted March 18, 2023 Ok, thanks. Indeed, there's an immediate reaction in what regards resources, also it's updated when a related thing is disabled and reenabled. Although building budget isn't freed, as i've finally tried with a costly object to clearly see the gap. Link to comment Share on other sites More sharing options...
Recommended Posts