Invisible Workshop Objects - kinggath/WorkshopFramework GitHub Wiki

#Invisible Workshop Objects

In patch 1.0.5, I've added a new script called InvisibleWorkshopObject. This is an extension of the WorkshopObjectScript, and can be used the same way, but adds some new functionality.

The idea behind the InvisibleWorkshopObject is that you can use it to create workshop objects that are otherwise invisible, such as animation or idle markers, or objects that don't have collision (as you can use a model with collision to represent your . Your main object with this script on it will only show up in Workshop Mode (for scripters - it is Disabled while outside WS Mode), it will spawn a second object that you configure, and it can be something that is invisible to the player, but will follow your object around as you move it.

Note: If your ControlledObjectForm is a Static or MoveableStatic, you'll need to create a constructible object record (COBJ) for it. The record doesn't need a Recipe Filter, so the player still won't be able to build it directly. The COBJ record ensures the item can be attached to the main object and moved together.

Why Use This Instead of My Own Scripts? The big advantage to using the Workshop Framework to do this, is that I've created a central manager to handle all of the enabling/disabling required to make objects disappear. So it will have far less of an impact on performance than if you were to have each object scripted to control itself.

The script currently adds the following properties you can configure:

ControlledObjectForm - This is the second object that will be spawned and attached to this one. Generally your invisible object

bReverse - Changing this to true will make this object the one that sticks around all of the time, and the ControlledObjectForm the one that is toggled in workshop mode.

Advanced Properties - The following properties should generally be left the default values.

bLinkControlledObjectToWorkshop - The ControlledObjectForm will be linked to the Workshop on the WorkshopItemKeyword.

bAttachObjects - The ControlledObjectForm will be linked to this object on the WorkshopStackedItemParentKeyword so the two move together.

bReverseFlipsStacking - If bReverse is true, and this is set to true, the ControlledObjectForm will become the controlling object that moves around the two.