Skip to main content

FB2AutonomyComponent

Overview

  • Component that manages autonomy (AI decision-making).

Metadata

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

Properties (43)

NameTypeDescription
AOISnapSizeinteger
AoiFailUntilTickstable<FB2AoiKey, integer>Stat-selection cooldown.
AssignedRaincoatIdstring
AssignedUmbrellaIdstring
AutonomyCooltimetable<string, integer>
AutonomyPickedInteractionFB2StatResolvableInteractionInfo
AutonomyPickedSiteIdFB1EntityId
AutonomyPickedStatIdstring
AutonomyPickedStatTierEB1StatServiceTier
AutonomyStateEB2AutonomyState
CheatAddInteractionLoopFB2CheatAutonomyAddInteractionInfLoop
DLD_LastSleepTicksintegerLast tick a diary-summary reasoning was sent (once per day; stored in memory only; the DLD module handles dedup separately).
DLD_NotifyAroundRealtimeIntervalnumber
DLD_PrioritizedExistingFoodCandidatesFB2StatResolvableInteractionInfo[]
DLD_SmartZoiRequestCompleteDelegateany
DLD_SmartZoiSituationInfoFB2SmartZoiSituationInfo
DepthToObjecttable<FB1EntityId, integer>
DistanceToObjecttable<FB1EntityId, number>
EndCyclesinteger
FirstTickCoolTimenumber
ForceStatIdstring
ForceStatMaptable<integer, string>
JustDispatchedGuardCountinteger
LastAutonomyStuckTimeFDateTime
LastEnterTransientDesireTimeStampnumber
LastResumePickedCraftObjectEntityIdFB1EntityId
PickStatReasonEB2PickStatReason
ResumeSkipCraftObjectIdForPickFB1EntityId
StartCyclesinteger
TPOBanTagsstring[]
TPOCandidateBagIdstable<string, boolean>TPO autonomy state.
TPOPickedTagstring
TPOPlanAutonomyContextFB2TPOPlanAutonomyContext
TransientDesireInteractionCountinteger
TransientDesireStatListstring[]
UmbrellaEvalAccumulatorGameMinutesnumber
WaitFeedbackInteractionTimenumber
bCleanupActiveboolean
bForceTransientDesireDisableboolean
bFreeTimeModeboolean
bIsPlayingSLMboolean
bTrialUseNonTPOStatPickboolean
bTriggeredIndependentTrialboolean

Functions (59)

FunctionParametersReturnsDescription
AddInteractionQueueFailed--Adds Interaction Queue Failed.
AddTransientDesireStatInStatId: string-Adds Transient Desire Stat.
AppendCharacterRoleText (static)InCharacter: FB2Character, InRoleText: string, outString: string-
AutonomyProcess_OnTick--
ClearForceStatByQueueIdInQueueId: integer-Clears Force Stat By Queue Id.
DLD_ApplySituationReasoningRequestSLMbSuccess: boolean-Sends a reasoning request only when an inner-thought condition has been set via DLD_SetCurrentSituation.
DLD_CheckAutonomyInteractionCooltimeInInteractionBagId: stringboolean
DLD_ResetSmartZoiSituationInfoForCheat--
DLD_SetAutonomyStateForTestInState: EB2AutonomyState, InLimitCount: integer, InCollectOnlyUniqueNpc: boolean-Do not call this function. Test-only.
DLD_SetCoopInteractionBagIdCoopInteractionBagId: string-
DLD_SetCurrentSituationInSituationType: EB2SmartZoiSituationType, InSituationName: string, bNotiAround: boolean, bRequestImmediately: boolean, InSituationDescription: stringbooleanTemporarily stores the current situation so conditions can be attached when emitting inner thoughts.
DLD_SetCurrentSituationMembersInMembers: FB1EntityId[], InSituationDescription: string, bRequestImmediately: boolean-Sets additional info for inner-thought conditions; applied directly without extra checks.
DLD_SetTalkMembersAndInfoInMembers: FB1EntityId[], InSituationDescription: string-
FailedAutonomySLMInInteractionBagId: string, ReasonText: string-
ForceStatInStatId: string, bInClickedStatDesireButton: boolean, InUpdateQueueId: integerboolean
ForceStatAutonomyRestrictSiteInStatId: stringboolean
ForceStatGoHomeInStatId: stringboolean
GetAutonomyCooltime-table<string, integer>Returns Autonomy Cooltime.
GetAutonomyState-EB2AutonomyStateReturns Autonomy State.
GetDefaultCityMoveDataPolicy-EB1CityMoveDataPolicyReturns Default City Move Data Policy.
GetForceStatByQueueIdInQueueId: integerstringReturns Force Stat By Queue Id.
GetForceStatId-stringReturns Force Stat Id.
GetLastAutonomyStuckTime-FDateTimeReturns Last Autonomy Stuck Time.
GetLoopInteractionBagId-stringReturns Loop Interaction Bag Id.
GetLoopInteractionSequenceId-stringReturns Loop Interaction Sequence Id.
GetPickedStatId-stringReturns Picked Stat Id.
GetTPOBanTags-string[]Returns TPOBan Tags.
GetTPOCandidateBagIds-table<string, boolean>Returns TPOCandidate Bag Ids.
IsAoiFailOnCooldownSnapshotInStatId: string, OutRemainingTicks: integerbooleanReturns whether Aoi Fail On Cooldown Snapshot.
IsAutonomySLM-booleanReturns whether Autonomy SLM.
IsFreeTimeMode-booleanReturns whether Free Time Mode.
IsInOperatingBizSiteWithBizStat-booleanReturns whether the character has a business stat AND is in an operating business site. A common gate for SLOD2-optimized paths, AOI Talk skip, and cooldown skip.
IsOnAutonomyCooltimeInGroupTag: string, OutRemainingTicks: integerbooleanReturns whether On Autonomy Cooltime.
IsPickedStatHouseholdBizType-booleanReturns whether the currently picked autonomy stat's StatType is HouseholdBiz. Used to decide whether to apply asymmetric Talk/Object weighting for business-customer autonomy.
IsTPOMode-booleanReturns whether TPOMode.
IsTransientDesireReadySnapshot-booleanReturns whether Transient Desire Ready Snapshot.
IsTransientDesireStatInStatId: stringbooleanReturns whether Transient Desire Stat.
OnAutonomyInteractionFailedInStatId: string-Called when an autonomy-queued interaction fails while running; applies the AOI failure cooldown (called from B2InteractionComponent).
OnAutonomyInteractionFinishedInInteractionBagId: string, InStatId: string-Called when an autonomy-queued interaction finishes normally; applies cooldown and processes stat info (called from B2InteractionComponent).
OnAutonomyOptionChangedbInAutonomyEnabled: boolean-Callback invoked on Autonomy Option Changed.
OnChangeGrowthStepPrevGrowthStep: EB1GrowthStep, CurrGrowthStep: EB1GrowthStep-Callback invoked on Change Growth Step.
OnDayChangedBefore: FDateTime, After: FDateTime-Callback invoked on Day Changed.
ProcessAutonomySLMInTargetEntityId: FB1EntityId, InInteractionBagId: string, ReasonText: string-
RemoveTransientDesireStatInStatId: string-Removes Transient Desire Stat.
RequestImmediateUmbrellaEvaluation--Re-evaluates the automatic umbrella/raincoat switch once immediately, regardless of the polling interval. Called when hand-usage state changes abruptly (active-mode switch, standing up after being hit, etc.).
ResetCheatAddLoopInteraction--Resets Cheat Add Loop Interaction.
ResetForceStatId--Resets Force Stat Id.
SendAutonomyEnablePacketbInAutonomyEnabled: boolean, bInPlaySound: boolean-Sends Autonomy Enable Packet.
SetAutonomySLMbInValue: boolean-Sets Autonomy SLM.
SetCheatAddLoopInteractionInParam: FB2CheatAutonomyAddInteractionInfLoop-Sets Cheat Add Loop Interaction.
SetCoopInteractionBagId (static)TargetEntityId: FB1EntityId, CoopInteractionBagId: string-Sets Coop Interaction Bag Id.
SetCurrentSituationByCharacter (static)InCharacter: FB2Character, InSituationType: EB2SmartZoiSituationType, InSituationName: string, bNotiAround: boolean, bRequestImmediately: boolean, InSituationDescription: string, bCheat: booleanbooleanSets Current Situation By Character.
SetCurrentSituationByComponent (static)InComponent: FB2Component, InSituationType: EB2SmartZoiSituationType, InSituationName: string, bNotiAround: boolean, bRequestImmediately: boolean, InSituationDescription: stringbooleanUnifies all inner-thought condition setup through the helper functions.
SetCurrentSituationByEntityId (static)InTargetEntityId: FB1EntityId, InSituationType: EB2SmartZoiSituationType, InSituationName: string, bNotiAround: boolean, bRequestImmediately: boolean, InSituationDescription: string, bCheat: booleanbooleanSets Current Situation By Entity Id.
SetForceTransientDesireDisableInForceTransientDesireDisable: boolean-Sets Force Transient Desire Disable.
SetLastAutonomyStuckTimeToNow--Sets Last Autonomy Stuck Time To Now.
SetTalkMembersAndInfo (static)TargetEntityId: FB1EntityId, InMembers: FB1EntityId[], InSituationDescription: string-Sets Talk Members And Info.
ShouldPrioritizeDesireOverTimeline-booleanReturns whether it should Prioritize Desire Over Timeline.
ShouldUseScheduler-booleanReturns whether it should Use Scheduler.

Override points (16)

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

FunctionParametersReturnsDescription
Override_AddInteractionQueueFailed--Adds Interaction Queue Failed.
Override_AddTransientDesireStatInStatId: string-Adds Transient Desire Stat.
Override_AutonomyProcess_OnTick--
Override_ClearForceStatByQueueIdInQueueId: integer-Clears Force Stat By Queue Id.
Override_ForceStatInStatId: string, bInClickedStatDesireButton: boolean, InUpdateQueueId: integerboolean
Override_ForceStatAutonomyRestrictSiteInStatId: stringboolean
Override_ForceStatGoHomeInStatId: stringboolean
Override_OnAutonomyInteractionFailedInStatId: string-Called when an autonomy-queued interaction fails while running; applies the AOI failure cooldown (called from B2InteractionComponent).
Override_OnAutonomyInteractionFinishedInInteractionBagId: string, InStatId: string-Called when an autonomy-queued interaction finishes normally; applies cooldown and processes stat info (called from B2InteractionComponent).
Override_OnAutonomyOptionChangedbInAutonomyEnabled: boolean-Callback invoked on Autonomy Option Changed.
Override_OnChangeGrowthStepPrevGrowthStep: EB1GrowthStep, CurrGrowthStep: EB1GrowthStep-Callback invoked on Change Growth Step.
Override_OnDayChangedBefore: FDateTime, After: FDateTime-Callback invoked on Day Changed.
Override_RemoveTransientDesireStatInStatId: string-Removes Transient Desire Stat.
Override_RequestImmediateUmbrellaEvaluation--Re-evaluates the automatic umbrella/raincoat switch once immediately, regardless of the polling interval. Called when hand-usage state changes abruptly (active-mode switch, standing up after being hit, etc.).
Override_ResetForceStatId--Resets Force Stat Id.
Override_SendAutonomyEnablePacketbInAutonomyEnabled: boolean, bInPlaySound: boolean-Sends Autonomy Enable Packet.