How to create quality WorkshopParent registered scrappable settlement workshops in Fallout 4

Originally published April 2018 by SKK.50@outlook.com


(1) WorkshopParent Registration

Whilst isolated workshops can be deployed without issue (as long as build areas do not overlap with existing workshop Locations), they will not be able to manage assigned actors as settlers or produce resources. That is managed by the WorkshopParent Quest and associated scripts (WorkshopParentScript, WorkshopScript, WorkshopObjectScript,WorkshopNPCScript). The master WorkshopParentScript is complex, fragile and easily broken. The steps in this guide help you to understand what objects, keywords and registrations are needed to avoid problems. Learn more here:

SKK Workshop Utilities – Corrupt Workshop Lists

SKK Workshop Utilities – Workshop Keyword Test


(2) Broken Precombines

To maintain performance, individual scenery elements in the game world are pre-combined into aggregate graphics objects (like a piece of road + rusty car + tree + pile of leaves) which reduces compute load. Mods which break them apart for object scrapping breaks the precombine system for that whole game cell and can tank frames per second graphics rendering performance. Ouch, that OCD pile of leaves just cost you 30 fps.

Amusingly the frame rate can govern the speed of script execution, and settlements have a lot of objects with attached scripts. So in tidying up you are slowing down both graphics rendering and script execution. Double whammy for stability and user experience.  Learn more from the SKK Script Lag Latency Detector. The steps in this guide help you to configure objects in your settlement area to be player scrappable and regenerate those precombines for performance.

The article was written using Natick Warehouse Settlement by SKK as a template.


(01) In the Creation Kit render window find the ideal location for your workshop settlement.


(02) Create a new Layer (Menu: View/Layers) PREFIX_SettlementNameLayer

Make that layer active, lock all other layers so existing objects are not nudged (creating dirty edits and possibly breaking precombines).


(03) ObjectWindow > RenderWindow Add Xmarker Heading: PREFIX_LocationCenterMarker

LocationRefType LocationCenterMarker

This is used as a hub to link and find other markers, and as an actor AI package target for travel/sandbox.


(04) ObjectWindow > RenderWindow Add Xmarker Heading: PREFIX_FastTravelMarker

Where you want to arrive on fast travel, this can be moved with the fast travel mat.

(04a) ObjectWindow > RenderWindow Add Mapmarker: PREFIX_MapMarker

Marker Data Name: Settlement Name
Type: Settlement
Can Travel To: Check
Disabled: If it should be hidden for discovery on the map.

LinkRef no keyword to > PREFIX_FastTravelMarker

Memo: If the player should be able to move the AI travel package and sandbox target with a fast travel mat, don’t add a PREFIX_FastTravelMarker, just link the PREFIX_MapMarker to > PREFIX_LocationCenterMarker.


(05) ObjectWindow Create new Encounter Zone: PREFIX_SettlementNameZone

Level 0 – 0
Never resets <= IMPORTANT avoids cell reset clearing containers
Workshop


(06) ObjectWindow Create new Location PREFIX_SettlementNameLocation

World Location Marker:  PREFIX_LocationCenterMarker

Encounter Zone: PREFIX_SettlementNameZone

Keyword: LocTypeWorkshop           (MANDATORY) ;all exterior workshops must have this.

Keyword: LocTypeWorkshopSettlement (optional)  ;this is VITAL for ResetWorkshop() settler and resource management.

Keyword: LocTypeSettlement         (optional)  ;sometimes used by quest location lookups, not important.

Keyword: LocTypeClearable          (optional)  ;used by radiant quests and WorkshopScript to grant ownership.

In CellView window select the Settlement cells F2 to Rename:SettlementNameExtNN or SettlementNameIntNN

In CellView window select Settlement cells Right click edit Location:  PREFIX_SettlementNameLocation

If you create workshop markers or assets in cells that are not included in the settlement location they may not be found by quest lookups. The “so what” is that settlement will not be picked for use as a radiant quest location.


(07) ObjectWindow > RenderWindow add COCMarkerHeading PREFIX_CoC

Where you want player to appear when consoling [ coc SettlementNameExtNN ]


(08) ObjectWindow > RenderWindow Add Xmarker Heading: PREFIX_SpawnMarker

Where you want new settlers and other friendly recruits to spawn.


(08) ObjectWindow > RenderWindow Add WorkshopWorkbench PREFIX_WorkshopREF

LinkRef WorkshopLinkCenter to > PREFIX_LocationCenterMarker


(09) ObjectWindow > RenderWindow add (typically underneath PREFIX_WorkshopREF) WorkshopResourceContainerSettlement   PREFIX_WorkshopContainer

LinkedRef WorkshopLinkContainer > PREFIX_WorkshopREF ;This is not actually used, probably a holdover from before the red Workshop Workbench was itself a container. The Workshop scripts do refer to it on exception paths so best have it.


(10) ObjectWindow > RenderWindow add DefaultEmptyTrigger PREFIX_WorkshopBuildArea

LinkedRef WorkshopLinkedPrimitive TO PREFIX_WorkshopREF ; workshop build area

You can add multiple DefaultEmptyTrigger boxes linked back to the workshop with WorkshopLinkedPrimitive keyword for odd shaped build areas, but do not extend them past the Workshop location tagged cells to avoind ResetWorkshop resource issues.


(10a) For settler sandboxing you can use the PREFIX_WorkshopBuildArea trigger box, or to define a different area add another DefaultEmptyTrigger named PREFIX_WorkshopSandboxArea.

This will be linked in step (12)


(11) ObjectWindow > RenderWindow add Xmarker Heading PREFIX_OutOfSightMarker00, 01, 02 ; One or more for attack and random event spawns. They MUST BE outside the build area and best screened out of sight, but in workshop encounter zone location tagged cells if possible so they don’t reset and can be found by radiant quest location lookups.

LocRefType LocationEdgeMarker ; For Workshop*Attack quests.

LinkedRef  WorkshopLinkAttackMarker to PREFIX_LocationCenterMarker ; Used Workshop*Attack and WorkshopRadioBeaconRecruit spawns


(12) Select PREFIX_WorkshopREF

LinkedRef WorkshopLinkSandbox   TO PREFIX_WorkshopSandboxArea (or PREFIX_WorkshopBuildArea)   ; settlers sandbox movement area.

LinkedRef WorkshopLinkContainer TO PREFIX_WorkshopContainer ; not actually used as the WorkshopWorkbench is a container.

LinkeRef WorkshopLinkSpawn      TO PREFIX_SpawnMarker       ; WorkshopParentScript initial settler, some attacks, some spawns.


(13) ObjectWindow > RenderWindow add WorkshopSetOwnedTrigger infront of workshop to automatically grant player ownership.

Linkedref no keyword TO PREFIX_WorkshopREF


(14) ObjectWindow (WorldObjects/Static/Workshop) make a copy of Boston Airport WorkshopBorderAirport01 (or another appropriate sized asset), rename PREFIX_WorkshopBorder, drag into the RenderWindow.

LinkedRef WorkshopLinkedBuildAreaEdge TO PREFIX_WorkshopREF [ CHECK INITIALLY DISABLED ]


(15) For any workshop resources static placed/added (Workbench, Beds, Water, Crops, Defense) that run WorkshopObjectScript:

LinkedRef WorkshopItemKeyword TO PREFIX_WorkshopREF


(16) If you want your workshop to recruit settlers, manage resources and appear in the assign actor/provisioner lists it must be registered with WorkshopParentScript.

Whilst WorkshopParentScript will automatically detect all (LocTypeWorkshopSettlement + WorkshopKeyword) workshops at a new game start to self register, your mod added workshop may not be recognised in time to be included. To allow for that latency and for your mod to be installed anytime after a new game start, create your own registration:

ObjectWindow new Quest PREFIX_Quest

Start Game Enabled
Run Once
Priority 0 (Lower than WorkshopParent quest which is 30 so it doesn’t try to run before it in a new game)
Create Stage 10 [check run on start]
Create Stage 20 [check run on stop]

Quest Aliases New Location Alias: Location (this is optional depending on the method you choose)
Fill Type [Specific Location]: PREFIX_SettlementNameLocation

Quest Aliases New Ref Collection Alias: WorkshopsCollection

Option A Fill Type [Specific Forced reference]: Cell: SettlementNameExtNN  Ref: PREFIX_WorkshopREF
This will force the workshop registration into WorkshopParentScript even if there are location lookup errors.

Option B Fill Type [Location Alias Reference] Location [Ref Type] WorkshopRefType
This will only submit the registration if the Workshop and Location information lines up.

Alias Inventory add WorkshopInitialResources_Settlement

Scripts Button
Add script WorkshopAddLocationsScript
Set WorkshopParent property > WorkshopParent
Set WorkshopsCollection property > PREFIX_Quest > WorkshopsCollection
Add script DefaultQuestShutdownScript
Set StartTimerStage to 20


(16.1) MULTIPLE WORKSHOPS

If you are trying to register multiple workshops, to allow WorkshopParentScript to queue the requests either;

(a) Create a new keyword that is unique to this mod (e.g. SKK_RRWorkshopKeyword), add that keyword as a LinkedRef to each of the WorkshopREFs linking to say the map marker (why later). On alias WorkshopsCollection set [Max Initial Fill Count 0] [Find Matching Reference] Conditions [HasKeyword WorkshopKeyword == 1] [HasLinkedRef SKK_RRWorkshopKeyword == 1] to find your workshops and no others.

(b) Create a separate registration quest for each workshop and assign them different priorities from 0 to 29 so they can be sequenced and do not run before WorkshopParentScript has finished initialising. This is not 100% reliable.

(c) Split them into separate ESP/ESL mods each with a forced reference registration quest.


(16.2) MULTIPLE MAP MARKERS

If there are multiple map markers in the workshop location its random chance if the registration process will pick the right one for your workshop. Base game example: HangmansAlley.MyMapMarker gets connected to Flagon Tunnel map marker as it is closer than the actual Workshop map marker, and why the fast travel mat doesn’t work D-OH ! If you have this problem you will need a seperate script to run after the WorkshopParentScript registration process to fix the map marker assignment (using option a LinkedRef above).


(16.3) LOCATION OVERWRITE

If other mods lower in the load order overwrite the world location, your workshop registration will probably fail or be incomplete as the location lookup references will not be found. You will know if there is a problem from the workshop name reported in the PipBoy workshop list (Typically COMMONWEALTH) or using Workshop Ownership Utilities diagnostics.


(17) Intentional blank


(18) Test this all works in a new game. A Vault 111 exit clean unmodified save game, or use SKK Fast Start New Game to get there in 2 minutes. Do not try to add a new workshop mod to a savegame multiple times, the WorkshopParent registrations may/probably/will be inconsistent.

Use SKK Workshop Ownership Utilities to validate your workshop keywords and WorkshopParent registration in game. For a checklist of Workshop Keywords, read article SKK Workshop Utilities – Workshop Keyword Test.


(19) Open your mod file ESP or ESL in xEdit and remove all of the dirty Cell or Worldspace edits you made by touching stuff without realising it. Betcha $10 you touched one or more MistLargeRoundDustyDim in an interior cell or nudged some markers around.

********* YOU CAN STOP HERE, OR


(20) If you want to break static items out of precombine so they are player scrappable and regenerate the precombines for performance:

ObjectWindow > RenderWindow drag a new WoodCrate_Empty (hide under the workshop for the base game “tediously select individual items to scrap” experience, or place visible for a one click “scrapall” style experience) name PREFIX_ScrapallHUB

Menu: View/Layers new PREFIX_ScrapallLayer (thanks to Trosski for this)
Make that layer active, lock all other layers.
Right click add any base game stuff that wants to be scrappable on that layer.

(-) minus key to group select.
In the batch window add LinkedRef for keyword WorkshopStackedItemParentKEYWORD referencing PREFIX_ScrapallHUB. This will exclude items from regenerated precombine so they can be scrapped if they have an associated scrap _co recipe.

Menu: World/PrecombineGeometry for each modified cell (B in the render window shows cell boundaries).
Menu: Visibility/Generate Precombined Visibility for each modified cell.

If you have problems with stairs clipping or navmeshes not working:
Menu: View/Layers new PREFIX_DisableForPrecombineLayer (thanks to RedRocketTV for this)
Make that layer active, lock all other layers.
Right click add any base game stuff that needs to be excluded from precombine so it works (but is not scrappable) on that layer.

(-) minus key to group select in the batch window set Starts Disabled [DO IT]

Menu: World/PrecombineGeometry for each modified cell (B in the render window shows cell boundaries).
Menu: Visibility/Generate Precombined Visibility for each modified cell.

(-) minus key to group select in the batch window set Starts Disabled checkbox clear [DO IT]


(21) Enjoy !


This article has been transferred from its original publishing location.