Background for Fallout 4
Member of the WorkshopFramework:WSFW_API script
ObjectReferencefunctionCreateSettlementObject(<UNKNOWN_SCRIPT: WorldObject>PlaceMe, <UNKNOWN_SCRIPT: WorkshopScript>akWorkshopRef=NONE, ObjectReferenceakPositionRelativeTo=NONE, boolabStartEnabled=true)Global

Description

Documentation Comment

Creates a settlement object as if the player built it in workshop mode, and returns the reference, or None if it failed.

Parameters:
PlaceMe - Your objects should be in an array of structs per the WorldObject definition found in Library:DataStructures.

akWorkshopRef [Optional] - The objectreference of the settlement workbench cast as WorkshopScript. If this is not sent, the object will not be linked to the workshop. The Link is what allows several gameplay elements: Player Scrapping, Crafting Stations to share resources, Assignable objects to be assignable, and more.

akPositionRelativeTo [Optional] - It the positions in your PlaceMe data are offsets from a specific reference, send that reference (note that this increases the processing time by about 40%, so sending world coordinates is definitely preferred)

abStartEnabled [Optional] - If you would like to handle enabling the objects yourself, set this to false


Parameters

  1. <UNKNOWN_SCRIPT: WorldObject>PlaceMe

  2. <UNKNOWN_SCRIPT: WorkshopScript>akWorkshopRef=NONE

  3. ObjectReferenceakPositionRelativeTo=NONE

  4. boolabStartEnabled=true


Examples

Auto-Generated Example

WorldObject myWorldObject__PlaceMe
WorkshopScript myWorkshopScript__akWorkshopRef
ObjectReference myObjectReference__akPositionRelativeTo
bool myBool__abStartEnabled

ObjectReference returnedValue = WorkshopFramework:WSFW_API.CreateSettlementObject(myWorldObject__PlaceMe, myWorkshopScript__akWorkshopRef, myObjectReference__akPositionRelativeTo, myBool__abStartEnabled)
Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.