FB2RelationshipComponent
Overview
- Component that manages relationships between characters.
Metadata
| Field | Value |
|---|---|
| Kind | component |
| Environment | B2 - Simulation |
| Category | components |
| Extends | FB2Component |
| Require | require('Components.B2RelationshipComponent') |
Properties (8)
| Name | Type | Description |
|---|---|---|
CurrentRelationshipEvent | table<string, boolean> | |
LastDecayTime | integer | |
RELATIONSHIP_DECAY_INTERVAL | integer | |
RELATIONSHIP_DELETE_WAIT_TIME | integer | |
RelationshipEventMap | table<string, FB1RelationshipEventDataList> | |
RelationshipFlagTotalCounts | table<string, integer> | |
RelationshipMap | table<FB1EntityId, FB1RelationshipData> | |
SiteGiftSendTimeMap | table<string, integer> |
Functions (36)
| Function | Parameters | Returns | Description |
|---|---|---|---|
AddRelationshipFlag | InTargetEntityId: FB1EntityId, InRelationshipFlagId: string | - | Adds Relationship Flag. |
AddUnlockHistory | InEntityId: FB1EntityId, InTypes: table<EB1RelationshipProfileType, boolean> | - | Adds Unlock History. |
ClearAllRelationship | - | - | Clears All Relationship. |
ClearTargetEntityRelationship | InEntityId: FB1EntityId | - | Clears Target Entity Relationship. |
DoesRelationshipEventExist | InTimelineId: string | boolean | Returns whether Relationship Event Exist. |
FindProfileUnlockedData | InEntityId: FB1EntityId | FB1RelationshipProfileUnlockedData | Finds and returns Profile Unlocked Data. |
FindRelationshipData | InEntityId: FB1EntityId | FB1RelationshipData | Finds and returns Relationship Data. |
FindRelationshipRecordData | InEntityId: FB1EntityId | FB1RelationshipRecordData | Finds and returns Relationship Record Data. |
FindRelationshipStatData | InEntityId: FB1EntityId, InStatName: string | FB1RelationshipStatData | Finds and returns Relationship Stat Data. |
GetBonusRelationshipMultiplyValue | InTargetEntityId: FB1EntityId, InIsPositive: boolean | number | Returns Bonus Relationship Multiply Value. |
GetCityMovePolicyMap | InCityMoveDataPolicyType: EB1CityMoveDataPolicyType | table<string, EB1CityMoveDataPolicy> | Returns City Move Policy Map. |
GetDefaultCityMoveDataPolicy | - | EB1CityMoveDataPolicy | Returns Default City Move Data Policy. |
GetRelationshipCount | InRelationshipId: string | integer | Returns Relationship Count. |
GetRelationshipDataCopyMap | - | table<FB1EntityId, FB1RelationshipData> | Returns Relationship Data Copy Map. |
GetRelationshipDataMap | - | table<FB1EntityId, FB1RelationshipData> | Returns Relationship Data Map. |
GetRelationshipFlagTotalCount | InRelationshipFlagId: string | integer | Returns Relationship Flag Total Count. |
GetStatIdByKeyword | InTargetId: FB1EntityId, InKeywordName: string | string | Returns Stat Id By Keyword. |
HandleCustomPolicyCityMoveData | InCityMovedData: nil, InCityMoveDataPolicyType: EB1CityMoveDataPolicyType | - | |
IsFirstMeeting | InTargetId: FB1EntityId | boolean | Returns whether First Meeting. |
OnChangeGrowthStep | PrevGrowthStep: EB1GrowthStep, CurrGrowthStep: EB1GrowthStep | - | Callback invoked on Change Growth Step. |
OnDeath | - | - | Callback invoked on Death. |
OnFinishTalkInteraction | InTargetEntityId: FB1EntityId, bResult: boolean | - | Callback invoked on Finish Talk Interaction. |
OnMarriageRelationishipStat | InTargetId: FB1EntityId | - | Callback invoked on Marriage Relationiship Stat. |
OnUpdateNewRelationshipCountMission | InRelationshipId: string | - | Callback invoked on Update New Relationship Count Mission. |
RecreateRelationship | InTargetId: FB1EntityId, InIsFamily: boolean | - | |
RefreshMainRelationshipsForRelatedCharacters | - | - | |
RefreshRelationshipCountMission | InRelationshipId: string | - | |
RemoveRelationshipEvent | InTimelineId: string | boolean | Removes Relationship Event. |
SendNewUnlockList | InOwnerId: FB1EntityId, InTargetId: FB1EntityId, InTypes: table<EB1RelationshipProfileType, boolean>, InRefreshUI: boolean | - | Sends New Unlock List. |
SetDefaultUnlockDataAndSendUnlockList | InRelationshipData: FB1RelationshipData, InTargetId: FB1EntityId | - | Sets Default Unlock Data And Send Unlock List. |
ShouldUseScheduler | - | boolean | Returns whether it should Use Scheduler. |
SyncRelationshipData | - | - | |
TryAddRelationshipRecordData | InTargetId: FB1EntityId, InRecord: string | boolean | |
UnlockRelationshipProfileData | InTargetId: FB1EntityId, ProfileType: EB1RelationshipProfileType, InRefreshUI: boolean | boolean | |
UpdateLatestInteractionTime | InEntityId: FB1EntityId | - | Updates Latest Interaction Time. |
UpdateMainRelationship | InTargetId: FB1EntityId, InUpdateReason: EB1MainRelationshipUpdateReason | - | Updates Main Relationship. |
Override points (24)
Implement these in Lua as FB2RelationshipComponent.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_AddRelationshipFlag | InTargetEntityId: FB1EntityId, InRelationshipFlagId: string | - | Adds Relationship Flag. |
Override_AddUnlockHistory | InEntityId: FB1EntityId, InTypes: table<EB1RelationshipProfileType, boolean> | - | Adds Unlock History. |
Override_ClearTargetEntityRelationship | InEntityId: FB1EntityId | - | Clears Target Entity Relationship. |
Override_DoesRelationshipEventExist | InTimelineId: string | boolean | Returns whether Relationship Event Exist. |
Override_FindProfileUnlockedData | InEntityId: FB1EntityId | FB1RelationshipProfileUnlockedData | Finds and returns Profile Unlocked Data. |
Override_FindRelationshipData | InEntityId: FB1EntityId | FB1RelationshipData | Finds and returns Relationship Data. |
Override_FindRelationshipRecordData | InEntityId: FB1EntityId | FB1RelationshipRecordData | Finds and returns Relationship Record Data. |
Override_FindRelationshipStatData | InEntityId: FB1EntityId, InStatName: string | FB1RelationshipStatData | Finds and returns Relationship Stat Data. |
Override_HandleCustomPolicyCityMoveData | InCityMovedData: nil, InCityMoveDataPolicyType: EB1CityMoveDataPolicyType | - | |
Override_OnChangeGrowthStep | PrevGrowthStep: EB1GrowthStep, CurrGrowthStep: EB1GrowthStep | - | Callback invoked on Change Growth Step. |
Override_OnDeath | - | - | Callback invoked on Death. |
Override_OnFinishTalkInteraction | InTargetEntityId: FB1EntityId, bResult: boolean | - | Callback invoked on Finish Talk Interaction. |
Override_OnMarriageRelationishipStat | InTargetId: FB1EntityId | - | Callback invoked on Marriage Relationiship Stat. |
Override_OnUpdateNewRelationshipCountMission | InRelationshipId: string | - | Callback invoked on Update New Relationship Count Mission. |
Override_RecreateRelationship | InTargetId: FB1EntityId, InIsFamily: boolean | - | |
Override_RefreshMainRelationshipsForRelatedCharacters | - | - | |
Override_RefreshRelationshipCountMission | InRelationshipId: string | - | |
Override_RemoveRelationshipEvent | InTimelineId: string | boolean | Removes Relationship Event. |
Override_SendNewUnlockList | InOwnerId: FB1EntityId, InTargetId: FB1EntityId, InTypes: table<EB1RelationshipProfileType, boolean>, InRefreshUI: boolean | - | Sends New Unlock List. |
Override_SyncRelationshipData | - | - | |
Override_TryAddRelationshipRecordData | InTargetId: FB1EntityId, InRecord: string | boolean | |
Override_UnlockRelationshipProfileData | InTargetId: FB1EntityId, ProfileType: EB1RelationshipProfileType, InRefreshUI: boolean | boolean | |
Override_UpdateLatestInteractionTime | InEntityId: FB1EntityId | - | Updates Latest Interaction Time. |
Override_UpdateMainRelationship | InTargetId: FB1EntityId, InUpdateReason: EB1MainRelationshipUpdateReason | - | Updates Main Relationship. |