Skip to main content

FB2EntityManager

Overview

  • Central manager for the entity (character/object) pool and lifetime.

Metadata

FieldValue
Kindsystem
EnvironmentB2 - Simulation
Categorysystems
ExtendsFB2ManagerBase
Requirerequire('Systems.B2EntityManager')

Properties (24)

NameTypeDescription
AccumulateGameTimeDeltaForSOBuffernumber[]
AccumulateTickForSOBuffernumber[]
AllEntitiesany[]UPROPERTY(Transient)
AllEntitiesMaptable<FB1EntityId, any>UPROPERTY(Transient)
CachedCityEntityIdFB1EntityIdCities are loaded one at a time, so there can never be overlapping CityEntities.
ComponentPoolMaptable<string, any>
EntityCollectionMaptable<EB2EntityType, FB2EntityCollection>UPROPERTY(Transient)
EntityPoolMaptable<any, any>Object pool
GhostCountinteger
IsInViewportCharacterMaptable<FB1EntityId, boolean>
LazyUpdateEntityStateMaptable<FB1EntityId, FB2LazyChangeEntityStateData>
ManagedGrouptable<FB1EntityId, any[]>
OwnerlessGrabEntityListtable<FB1EntityId, boolean>
PendingDeathEntityIdstable<FB1EntityId, boolean>
PendingDestroyOnBeginPlayany[]
PendingUnregisterEntitiestable<any, boolean>
PriorityEntitiesany
RAWObjectPoolMaptable<string, any>
SLODChangeInfoListtable<EB2EntityType, FB1EntitySLODInfoMap>
SpreadOutEntitiestable<integer, any[]>Buffers used to spread tick processing across frames.
SpreadOutMaxintegerSLOD2 spread-out tick interval, tied to the preset (HIGH/MID/LOW = 60/120/180). SimulationThread-only.
UpdatePoolIndexinteger
UsedPathInfoByEntitytable<FB1EntityId, table<any, boolean>>
bLazyUpdateStateLockboolean

Functions (75)

FunctionParametersReturnsDescription
AccumulateSOBufferGameTimeDeltaGameDeltaMinutes: number-
AccumulateSOBufferTicksDeletaTime: number-
AddOwnerlessGrabEntityInEntityId: FB1EntityId-Handles grab objects that have lost their OwnerEntityId.
AddPriorityEntityEntity: any-Adds Priority Entity.
AddTickableComponentInEntityType: EB2EntityType, InComponent: FB2Component-Adds Tickable Component.
AddUsedPathInfoEntityId: FB1EntityId, SitePathFindingCom: FB2Component-Accumulates Entity:PathFollowingCom path-usage info.
AppendEntityToManagedGroupGroupEntityId: FB1EntityId, MemberEntity: FB2Entity-Groups actual objects into an Id-managed entity group (like Site), for fast Find lookups.
BeginDestroy--Begins Destroy.
ChangeCrowdSpawnCountInCrowdSpawnCount: integer-
ClearAccumulateGameDeltaBufferIndex: integer-Clears Accumulate Game Delta.
ClearAccumulateTickBufferIndex: integer-Clears Accumulate Tick.
ClearPostProcessTask--Clears Post Process Task.
DecreaseGhostCount (static)--
DestroyObjectEntity: FB2Entity, InReason: EB2EntityDestroyReason-
FindAvailableEventCrowd--Finds and returns Available Event Crowd.
FindCharacterentityId: FB1EntityId-Finds and returns Character.
FindCurrentCity--Finds and returns Current City.
FindGameObjectentityId: FB1EntityId-Finds and returns Game Object.
FindHouseholdentityId: FB1EntityId-Finds and returns Household.
FindSiteentityId: FB1EntityId-Finds and returns Site.
FindSiteByCareerDtIdCareerDtId: string-Finds and returns Site By Career Dt Id.
FindSiteBySiteIdSiteId: string-Finds and returns Site By Site Id.
FlushLazyUpdateEntityState--
Get--
GetAccumulateGameDeltaCurrentBufferIndex: integernumberReturns Accumulate Game Delta.
GetAccumulateTickCurrentBufferIndex: integernumberReturns Accumulate Tick.
GetAllEntitiesEntityType: EB2EntityType-Returns All Entities.
GetCityDefaultSiteDatasNewGameFolderPath: string, OutSiteJsonPath: string[]-Returns City Default Site Datas.
GetCurrentCrowdCount-integerReturns Current Crowd Count.
GetDeepSize-SIZE_TReturns Deep Size.
GetGhostCount (static)-integerReturns Ghost Count.
GetLastEntityId-integerReturns Last Entity Id.
GetOwnerlessGrabEntityList-table<FB1EntityId, boolean>Returns Ownerless Grab Entity List.
GetSpreadOutMax-integerControls the SLOD2 spread-out tick interval. Allows one of 60/120/180. SimulationThread-only (must not be called from the GameThread).
GetType-EB2ManagerTypeReturns Type.
IncreaseGhostCount (static)--
InitializeNewGameEntityNewGameFolderPath: string-Initializes New Game Entity.
IsInViewportCharacter (static)InEntityId: FB1EntityIdbooleanReturns whether In Viewport Character.
IsNeedSLODPacketInInfo: FB1EntitySLODInfobooleanReturns whether Need SLODPacket.
IsRegisteredInComponentPoolComponent: FB2ComponentbooleanReturns whether Registered In Component Pool.
IsRegisteredInEntityPoolEntity: FB2EntitybooleanReturns whether Registered In Entity Pool.
IsRegisteredInRAWObjectPoolRAWObject: FB2RawObjectbooleanReturns whether Registered In RAWObject Pool.
IsReleasedEntityEntity: FB2EntitybooleanReturns whether Released Entity.
IsTickable-booleanReturns whether Tickable.
OnObserverForSiteMemberSiteEntityId: FB1EntityId, MemberEntity: FB2Entity, IsRegister: boolean-Callback invoked on Observer For Site Member.
OnRemoveEntityUsedPathEntityId: FB1EntityId-Callback invoked on Remove Entity Used Path.
OnSLODChange (static)InEntityId: FB1EntityId, InInfo: FB1EntitySLODInfo-Callback invoked on SLODChange.
OnSetIsInViewportCharacter (static)InViewportCharacterMap: table<FB1EntityId, boolean>-Callback invoked on Set Is In Viewport Character.
PostProcessTasks--
ProcessExpandPoolTask--
ProcessOwnershipDataCompatibilityInGameObject: any-
ProcessPendingUnregisterEntities--
RegisterEntity: any, bPostInit: booleanFB1EntityId
RegisterCharactersInCityName: string, InHouseholdEntityId: FB1EntityId, InCharacterInfoList: FB1CustomizedCharacterInfo[]booleanRegisters Characters.
RegisterHouseholdInCityName: string, InHouseholdInfo: FB1CustomizedHouseholdInfoFB1EntityIdRegisters Household.
ReleaseObjectEntity: FB2Entity-
ReleaseObjectAndComponentsEntity: FB2Entity-
RemoveEntityFromManagedGroupGroupEntityId: FB1EntityId, MemberEntity: FB2Entity-Removes Entity From Managed Group.
RemovePriorityEntityEntity: any-Removes Priority Entity.
RemoveTickableComponentInEntityType: EB2EntityType, InComponent: FB2Component-Removes Tickable Component.
RemoveUsedPathInfoEntityId: FB1EntityId, SitePathFindingCom: FB2Component-Removes Used Path Info.
RequestCharacterStateChangeInEntityId: FB1EntityId, InState: EB2CharacterState, InReason: EB2EntityStateChangeReason-Requests Character State Change.
RequestPendingDeathInEntityId: FB1EntityId-Requests Pending Death.
RequestPendingDestroyOnBeginPlayInEntity: any, InReason: EB2EntityDestroyReason-Requests Pending Destroy On Begin Play.
ResetOnCompletedRegister--Resets On Completed Register.
ResetOnCompletedStateChanged--Resets On Completed State Changed.
ResetOnCompletedUnregister--Resets On Completed Unregister.
ResetOwnerlessGrabEntityList--Resets Ownerless Grab Entity List.
SetForceSimulationLevelOfDetailTwo (static)bIsOn: boolean-Sets Force Simulation Level Of Detail Two.
SetIsInViewportCharacterInViewportCharacterMap: table<FB1EntityId, boolean>-Sets Is In Viewport Character.
SetLastEntityIdInLastEntityId: integer-Sets Last Entity Id.
SetSpreadOutMaxInNewMax: integer-Sets Spread Out Max.
UnregisterEntity: any-
UnregisterInternalEntity: any-Unregisters Internal.
ValidateAllEntityHierarchyInValidateEntityType: EB2EntityType-

Override points (2)

Implement these in Lua as FB2EntityManager.Override_Name = function(...) end.

FunctionParametersReturnsDescription
Override_RegisterCharactersInCityName: string, InHouseholdEntityId: FB1EntityId, InCharacterInfoList: FB1CustomizedCharacterInfo[]booleanRegisters Characters.
Override_RegisterHouseholdInCityName: string, InHouseholdInfo: FB1CustomizedHouseholdInfoFB1EntityIdRegisters Household.