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

Description

Documentation Comment

Creates a batch of settlement objects through the thread manager and returns the batch ID to expect via custom event. This will be much faster than creating indivdual objects, but requires planning for batch-based event handling.

Prepare to receive CustomEvent WorkshopFramework:PlaceObjectManager.SimpleObjectBatchCreated (which your akRegisterMeForEvent will be automatically registered for if you sent it). Object refs will be sent via that event in batches. The Var contents will be as follows:
Int kArgs[0] = iBatchID, Bool kArgs[1] = Whether or not to expect additional events, kArgs[1 through 127] = ObjectReferences of your created objects.

When receiving the event you should confirm that kArgs[0] as Int == the batch Id return value you received from this function.

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

akPositionRelativeTo [Optional] - It the positions in your PlaceMe data are offsets from a specific reference

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

akRegisterMeForEvent [Optional] - The object or quest you would like to receive the WorkshopFramework:PlaceObjectManager.SimpleObjectBatchCreated events. If you don't need to track the items, leave this field as None.


Parameters

  1. <UNKNOWN_SCRIPT: WorldObject>[]PlaceMe

  2. <UNKNOWN_SCRIPT: WorkshopScript>akWorkshopRef=NONE

  3. ObjectReferenceakPositionRelativeTo=NONE

  4. boolabStartEnabled=true

  5. FormakRegisterMeForEvent=NONE


Examples

Auto-Generated Example

WorldObject[] myWorldObjectArray__PlaceMe
WorkshopScript myWorkshopScript__akWorkshopRef
ObjectReference myObjectReference__akPositionRelativeTo
bool myBool__abStartEnabled
Form myForm__akRegisterMeForEvent

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