Skip to main content

FB2CraftingComponent

Overview

  • Component that manages crafting.

Metadata

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

Properties (25)

NameTypeDescription
AutonomyRecipeRetryCooltimetable<string, integer>
CraftingPlayReasonEB1InteractionPlayReason
CraftingPolicyEB1CraftingPolicyType
CraftingQueueDisplayFB1QueueDisplayParam
CraftingToolPerformanceEB1ObjectPerformanceQualityPerformance grade copied from the provisional candidate tool or the confirmed one.
CraftingToolPerformanceStateEB2CraftingToolPerformanceStateDescribes whether the cached grade is unavailable, provisional, or confirmed from the tool actually used.
CurrentCraftObjectEntityIdFB1EntityId
CurrentCraftObjectPurposeEB1ObjectCreatePurpose
CurrentFilterTargetInfoFB1FilterTargetInfo
CurrentStepinteger
CurrentWorkBenchEntityIdFB1EntityId
FinalObjectEntityIdFB1EntityId
IsWaitingForStartboolean
LaunchInteractionBagIdstring
PendingAutonomyCooldownBagIdstring
PendingCraftingQualityBoostStateEB2CraftingQualityBoostState
QualityEB1Quality
RecipeIdstring
ReservedStartCraftingContextFB1StartCraftingContext
ReservedStartCraftingContextsFB1StartCraftingContext[]
SpawnCountinteger
bIsCraftingboolean
bNeedToSkipProcessboolean
bPlayIdleAnimationboolean
bPlaySuccessAnimationboolean

Functions (35)

FunctionParametersReturnsDescription
CreateCategoryRecipeVMsInCraftingId: string, InPolicy: EB1CraftingPolicyType, bIncludeAllRecipes: booleantable<string, FB1CraftingRecipeVMs>Creates Category Recipe VMs.
DestroyCurrentCraftObject--
FillRecipeVMfromPublishableCraftObjectInEntityId: FB1EntityId, OutRecipeVM: FB1CraftingRecipeVM, InPolicy: EB1CraftingPolicyType-
FillRecipeVMfromRecipeInRecipeId: string, OutRecipeVM: FB1CraftingRecipeVM, InPolicy: EB1CraftingPolicyType-
FillRecipeVMfromRecipeGroupInRecipeGroupID: string, OutRecipeVM: FB1CraftingRecipeVM, InPolicy: EB1CraftingPolicyType-
GatherIngredientInfosInCraftingId: string, OutIngredientDatas: FB1CraftingIngredient[]-
GatherIngredientInfosFromRecipeIdInRecipeId: string, OutIngredientInfos: FB1CraftingIngredient[]-
GatherNonPublishableCategoryRecipeVMsInCraftingId: string, OutCategoryRecipeVMs: table<string, FB1CraftingRecipeVMs>, InPolicy: EB1CraftingPolicyType, bIncludeAllRecipes: boolean, bIsFallbackPolicy: boolean-
GatherPublishableCategoryRecipeVMsInCraftingId: string, OutCategoryRecipeVMs: table<string, FB1CraftingRecipeVMs>-
GatherShopWorkerCategoryRecipeVMsInCraftingId: string, InRecipeIds: string[], OutCategoryRecipeVMs: table<string, FB1CraftingRecipeVMs>-
GetCraftingToolPerformance-EB1ObjectPerformanceQualityReturns Crafting Tool Performance.
GetCraftingToolPerformanceState-EB2CraftingToolPerformanceStateReturns Crafting Tool Performance State.
GetCurrentCraftingObjectEntityId-FB1EntityIdReturns Current Crafting Object Entity Id.
GetCurrentStep-integerReturns Current Step.
GetCurrentStepSpawnObjectId-stringReturns Current Step Spawn Object Id.
GetDefaultCityMoveDataPolicy-EB1CityMoveDataPolicyReturns Default City Move Data Policy.
GetFinalObjectEntityId-FB1EntityIdReturns Final Object Entity Id.
GetIngredientContainingAmountIngredient: FB1CraftingIngredientintegerReturns Ingredient Containing Amount.
GetNextStep-integerReturns Next Step.
GetRecipeId-stringReturns Recipe Id.
HasReservedContext-booleanReturns whether it has Reserved Context.
IsCrafting-booleanReturns whether Crafting.
IsTargetCraftingObjectInCraftObjectEntityId: FB1EntityIdbooleanReturns whether Target Crafting Object.
OnApplianceAccidentInInteractionQueueId: integer-Callback invoked on Appliance Accident.
OnCancelInteractionInFinishedInteractionBagId: string, InInteractionQueueId: integer-Callback invoked on Cancel Interaction.
ReservePublishableStartCraftingInContext: FB1StartCraftingContext-
ReserveStartContextcontext: FB1StartCraftingContext-
SetCurrentCraftObjectVisibilitybVisible: boolean-Sets Current Craft Object Visibility.
ShouldPlayIdleAnimation-booleanReturns whether it should Play Idle Animation.
ShouldPlaySuccessAnimation-booleanReturns whether it should Play Success Animation.
SimulateInRecipeId: string, InCount: integer, OutResultStr: string-debug cheats
StartCraftingInContext: FB1StartCraftingContext-Starts Crafting.
StartRandomNonPublishableCraftingInCraftingId: string, InWorkbenchEntityId: FB1EntityId, InPolicy: EB1CraftingPolicyType-Starts Random Non Publishable Crafting.
StartRandomPublishableCraftingInCraftingId: string, InWorkbenchEntityId: FB1EntityId, InPolicy: EB1CraftingPolicyType-Starts Random Publishable Crafting.
StartReservedCraftingInInteractionQueueId: integer-Starts Reserved Crafting.

Override points (9)

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

FunctionParametersReturnsDescription
Override_DestroyCurrentCraftObject--
Override_OnApplianceAccidentInInteractionQueueId: integer-Callback invoked on Appliance Accident.
Override_OnCancelInteractionInFinishedInteractionBagId: string, InInteractionQueueId: integer-Callback invoked on Cancel Interaction.
Override_ReservePublishableStartCraftingInContext: FB1StartCraftingContext-
Override_ReserveStartContextcontext: FB1StartCraftingContext-
Override_StartCraftingInContext: FB1StartCraftingContext-Starts Crafting.
Override_StartRandomNonPublishableCraftingInCraftingId: string, InWorkbenchEntityId: FB1EntityId, InPolicy: EB1CraftingPolicyType-Starts Random Non Publishable Crafting.
Override_StartRandomPublishableCraftingInCraftingId: string, InWorkbenchEntityId: FB1EntityId, InPolicy: EB1CraftingPolicyType-Starts Random Publishable Crafting.
Override_StartReservedCraftingInInteractionQueueId: integer-Starts Reserved Crafting.