FB2BuffComponent
Overview
- Component that manages buffs/debuffs.
Metadata
| Field | Value |
|---|---|
| Kind | component |
| Environment | B2 - Simulation |
| Category | components |
| Extends | FB2Component |
| Require | require('Components.B2BuffComponent') |
Properties (12)
| Name | Type | Description |
|---|---|---|
BuffLastApplyTimeMap | table<string, integer> | |
BuffTagMap | table<string, integer> | |
BuffTickStatDeltaMap | table<string, FB2BuffTickStatDelta> | |
Buffs | table<string, FB1Buff> | |
CurrentAdmitBoostLevel | integer | |
CurrentAdmitBoostTendency | EB1EmotionTendency | |
CurrentEmotionInertiaTriggerCount | integer | |
DeferredModifierNameSet | table<string, boolean> | |
InteractionBagWhiteList | table<string, integer> | |
JoyfulBoostBuffId | string | |
LastSendUpdateModifierPacketTicks | integer | |
NeedModifierUpdate | boolean |
Functions (28)
| Function | Parameters | Returns | Description |
|---|---|---|---|
AddBuff | InBuffId: string, InDetail: FB1BuffDetail, InDesireBoostEmotionId: string | - | Adds Buff. |
AddBuffImmediately | InBuffId: string, InDetail: FB1BuffDetail, InDesireBoostEmotionId: string | - | Adds a buff immediately without deferred processing (added to resolve an issue at the first autosave point). |
AddBuffMatchWithTag | InBuffId: string, InTag: string | - | Adds Buff Match With Tag. |
AddRandomBuff | InRandomBuffPoolId: string, InDetail: FB1BuffDetail | - | Adds Random Buff. |
CatchUpBuff | InToTick: integer | - | |
ChangeAdmitBoostValue | InTendency: EB1EmotionTendency, InLevel: integer | - | |
ChangeJoyfulBoostBuff | InJoyfulBoostBuffId: string | - | |
ClearAllBuff | bInForce: boolean | - | Clears All Buff. |
FlushBuffCommands | - | - | |
GetBuff | InBuffId: string | FB1Buff | Returns Buff. |
GetBuffs | - | table<string, FB1Buff> | Returns Buffs. |
GetDefaultCityMoveDataPolicy | - | EB1CityMoveDataPolicy | Returns Default City Move Data Policy. |
GetDreamBuffId | - | string | Returns Dream Buff Id. |
GetInteractionBagWhitelist | - | table<string, integer> | Returns Interaction Bag Whitelist. |
GetTickStatDelta | InStatId: string | number | Returns Tick Stat Delta. |
HasBuff | InBuffId: string | boolean | Returns whether it has Buff. |
HasBuffTag | InBuffTag: string | boolean | Returns whether it has Buff Tag. |
HasDreamBuff | - | boolean | Returns whether it has Dream Buff. |
HasUnexpiredBuffWithTag | InBuffTag: string, InToTick: integer | boolean | Returns whether it has Unexpired Buff With Tag. |
ModifyBuff | InModifyParam: FB2RequestModifyBuffParam | - | |
OnAddedModifier | InModifierId: string | - | Callback invoked on Added Modifier. |
OnEmotionChanged | InPrev: FB1EmotionInfo, InCurr: FB1EmotionInfo | - | Callback invoked on Emotion Changed. |
RemoveBuff | InBuffId: string, IsCanceled: boolean | - | Removes Buff. |
RemoveBuffTag | InBuffTag: string, IsCanceled: boolean | - | Removes Buff Tag. |
Send_S_UpdateBuffMap | - | - | |
ShouldUseScheduler | - | boolean | Returns whether it should Use Scheduler. |
UpdateCurrentEmotionComponent | - | - | Updates Current Emotion Component. |
UpdateDesireBoost | - | - | Updates Desire Boost. |
Override points (19)
Implement these in Lua as FB2BuffComponent.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_AddBuff | InBuffId: string, InDetail: FB1BuffDetail, InDesireBoostEmotionId: string | - | Adds Buff. |
Override_AddBuffImmediately | InBuffId: string, InDetail: FB1BuffDetail, InDesireBoostEmotionId: string | - | Adds a buff immediately without deferred processing (added to resolve an issue at the first autosave point). |
Override_AddBuffMatchWithTag | InBuffId: string, InTag: string | - | Adds Buff Match With Tag. |
Override_AddRandomBuff | InRandomBuffPoolId: string, InDetail: FB1BuffDetail | - | Adds Random Buff. |
Override_CatchUpBuff | InToTick: integer | - | |
Override_ChangeAdmitBoostValue | InTendency: EB1EmotionTendency, InLevel: integer | - | |
Override_ChangeJoyfulBoostBuff | InJoyfulBoostBuffId: string | - | |
Override_ClearAllBuff | bInForce: boolean | - | Clears All Buff. |
Override_FlushBuffCommands | - | - | |
Override_HasBuff | InBuffId: string | boolean | Returns whether it has Buff. |
Override_HasBuffTag | InBuffTag: string | boolean | Returns whether it has Buff Tag. |
Override_HasDreamBuff | - | boolean | Returns whether it has Dream Buff. |
Override_OnAddedModifier | InModifierId: string | - | Callback invoked on Added Modifier. |
Override_OnEmotionChanged | InPrev: FB1EmotionInfo, InCurr: FB1EmotionInfo | - | Callback invoked on Emotion Changed. |
Override_RemoveBuff | InBuffId: string, IsCanceled: boolean | - | Removes Buff. |
Override_RemoveBuffTag | InBuffTag: string, IsCanceled: boolean | - | Removes Buff Tag. |
Override_Send_S_UpdateBuffMap | - | - | |
Override_UpdateCurrentEmotionComponent | - | - | Updates Current Emotion Component. |
Override_UpdateDesireBoost | - | - | Updates Desire Boost. |