Skip to main content

FB2CollectionComponent

Overview

  • Component that manages collections.

Metadata

FieldValue
Kindcomponent
EnvironmentB2 - Simulation
Categorycomponents
ExtendsFB2Component
Requirerequire('Components.B2CollectionComponent')

Properties (8)

NameTypeDescription
CategoryToInfoMaptable<string, FB2CollectionCategoryInfo>Collection (encyclopedia) data (info on unlocked objects).
CollectedObjectIdstable<string, boolean>
CollectionInformationsFB1CollectionInformation[]Collection info (partial info acquired from others; latest 10 entries).
ReceivedCollectionRewardIdstable<string, boolean>Info on received rewards (used to prevent duplicate claims).
TagToCompletedObjectNumMaptable<string, integer>
bNeedUpdateCollectedObjectIdsboolean
bNeedUpdateCompleteObjectsByTagboolean
bUnlockAllbooleanWhether all collection info is known (e.g. a convenience-store NPC).

Functions (18)

FunctionParametersReturnsDescription
AddCollectionInformationInObjectId: string, InCollectionInformationTableRow: FB1CollectionInformationTableRow-Adds Collection Information.
CollectObject_ByGameObjectIdInCharacterEntityId: FB1EntityId, InGameObjectId: FB1EntityIdboolean
CollectObject_ByObjectIdInCharacterEntityId: FB1EntityId, InObjectId: stringboolean
GetCategoryToInfoMap-table<string, FB2CollectionCategoryInfo>Returns Category To Info Map.
GetCollectedObjectCountInCollectionCategory: stringintegerReturns Collected Object Count.
GetCollectedObjectIds-table<string, boolean>Returns Collected Object Ids.
GetCollectionInformations-FB1CollectionInformation[]Returns Collection Informations.
GetType-EB2ComponentTypeReturns Type.
GetUnlockAllFlag-booleanReturns Unlock All Flag.
InitialUnlockInFirstDiscovererEntityId: FB1EntityId, InCollectionInitialUnlockType: EB1CollectionInitialUnlockType, InHouseholdDtId: stringboolean
IsCollectedCategoryInCollectionCategory: stringbooleanReturns whether Collected Category.
IsCollectedCollectTagInCollectTag: stringbooleanReturns whether Collected Collect Tag.
IsCollectedObject_ByEntityIdInObjectId: FB1EntityIdbooleanReturns whether Collected Object_By Entity Id.
IsCollectedObject_ByObjectIdInObjectId: stringbooleanReturns whether Collected Object_By Object Id.
MergeCollectionDataInCollectionComponent: FB2CollectionComponentboolean
OpenWidgetInCharacterEntityId: FB1EntityId-
SetUnlockAllFlagbInUnlockAll: boolean-Sets Unlock All Flag.
UpdateCollectionDataFromCharacterInventory--Updates Collection Data From Character Inventory.

Override points (5)

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

FunctionParametersReturnsDescription
Override_AddCollectionInformationInObjectId: string, InCollectionInformationTableRow: FB1CollectionInformationTableRow-Adds Collection Information.
Override_InitialUnlockInFirstDiscovererEntityId: FB1EntityId, InCollectionInitialUnlockType: EB1CollectionInitialUnlockType, InHouseholdDtId: stringboolean
Override_MergeCollectionDataInCollectionComponent: FB2CollectionComponentboolean
Override_OpenWidgetInCharacterEntityId: FB1EntityId-
Override_UpdateCollectionDataFromCharacterInventory--Updates Collection Data From Character Inventory.