FB2QuestComponent
Overview
- Component that manages quests.
Metadata
| Field | Value |
|---|---|
| Kind | component |
| Environment | B2 - Simulation |
| Category | components |
| Extends | FB2Component |
| Require | require('Components.B2QuestComponent') |
Properties (6)
| Name | Type | Description |
|---|---|---|
ExecutingQuestMap | table<string, FB1ExecuteQuest> | |
PendingRemoveHistoryDataList | FB1RemoveQuest[] | |
PendingSequentialQuestMap | table<string, FB2ReserveQuestList> | |
PendingUpdateHistoryDataList | FB1UpdateQuest[] | |
ReserveQuestHeap | FB1ReserveQuest[] | |
TodayQuestHistoryData | table<string, FB1QuestHistoryData> |
Functions (18)
| Function | Parameters | Returns | Description |
|---|---|---|---|
AddQuest | InQuestId: string, InMissionType: EB1MissionType, InMissionParam: string | - | Adds Quest. |
AddQuestForCheat | InQuestId: string, InMissionDtId: string | - | If a MissionDtId is also passed, unconditionally adds the mission with that MissionDtId under the given QuestId (excluded from random selection). |
ClearQuestsForCityMoveTravel | InRemoveTargetTypes: EB1MissionType[], InCityMoveDataPolicyType: EB1CityMoveDataPolicyType | - | Clears Quests For City Move Travel. |
GetDefaultCityMoveDataPolicy | - | EB1CityMoveDataPolicy | Returns Default City Move Data Policy. |
GetReserveQuestHeap | - | FB1ReserveQuest[] | Returns Reserve Quest Heap. |
HasActiveQuestHistory | InQuestId: string | boolean | Returns whether it has Active Quest History. |
HasQuest | InQuestId: string, InMissionDtId: string | boolean | Returns whether it has Quest. |
IsProgressQuest | - | boolean | Returns whether Progress Quest. |
IsRemainQuestHistory | - | boolean | Returns whether Remain Quest History. |
OnChangePossess | - | - | Callback invoked on Change Possess. |
OnEnterSite | - | - | Callback invoked on Enter Site. |
OnFinishMission | InCurrentMissionType: EB1MissionType, InMissionId: string, bIsSuccess: boolean | - | Callback invoked on Finish Mission. |
OnMinuteChanged | InPrevTime: FDateTime, InCurrentTime: FDateTime | - | Callback invoked on Minute Changed. |
RemoveQuest | InQuestId: string, bRemoveElementToFail: boolean | - | bRemoveElementToFail decides, when removing a mission, whether to just delete it or mark it failed. |
RequestRemoveQuestsByCategory | InQuestCategoryId: string | - | Bulk-removes in-progress (ExecutingQuestMap) quests whose QuestCategoryId matches. Used for category-level cleanup such as school dropout/graduation/expulsion/transfer. |
RequestRemoveSpecificQuests | QuestIdPrefix: string | - | Requests Remove Specific Quests. |
RequestSubmitQuest | InQuestId: string | boolean | Requests Submit Quest. |
TriggerImmediateQuestRefresh | - | - | Immediately refreshes the quest UI on returning from a city move (same as the show path in OnMinuteChanged). |
Override points (13)
Implement these in Lua as FB2QuestComponent.Override_Name = function(...) end.
| Function | Parameters | Returns | Description |
|---|---|---|---|
Override_AddQuest | InQuestId: string, InMissionType: EB1MissionType, InMissionParam: string | - | Adds Quest. |
Override_AddQuestForCheat | InQuestId: string, InMissionDtId: string | - | If a MissionDtId is also passed, unconditionally adds the mission with that MissionDtId under the given QuestId (excluded from random selection). |
Override_ClearQuestsForCityMoveTravel | InRemoveTargetTypes: EB1MissionType[], InCityMoveDataPolicyType: EB1CityMoveDataPolicyType | - | Clears Quests For City Move Travel. |
Override_HasActiveQuestHistory | InQuestId: string | boolean | Returns whether it has Active Quest History. |
Override_HasQuest | InQuestId: string, InMissionDtId: string | boolean | Returns whether it has Quest. |
Override_OnChangePossess | - | - | Callback invoked on Change Possess. |
Override_OnEnterSite | - | - | Callback invoked on Enter Site. |
Override_OnFinishMission | InCurrentMissionType: EB1MissionType, InMissionId: string, bIsSuccess: boolean | - | Callback invoked on Finish Mission. |
Override_OnMinuteChanged | InPrevTime: FDateTime, InCurrentTime: FDateTime | - | Callback invoked on Minute Changed. |
Override_RemoveQuest | InQuestId: string, bRemoveElementToFail: boolean | - | bRemoveElementToFail decides, when removing a mission, whether to just delete it or mark it failed. |
Override_RequestRemoveSpecificQuests | QuestIdPrefix: string | - | Requests Remove Specific Quests. |
Override_RequestSubmitQuest | InQuestId: string | boolean | Requests Submit Quest. |
Override_TriggerImmediateQuestRefresh | - | - | Immediately refreshes the quest UI on returning from a city move (same as the show path in OnMinuteChanged). |