Skip to main content

B2Action_LaunchCraft

  • Description
    * ===============
    * Launches crafting for a given crafting category: opens the standard recipe UI for the possessing user, opens a filtered menu-order recipe UI for shop/coop customers, or immediately auto-starts a random craft for NPCs.
    * ===============
    * Param:
    * S1: crafting category id (CraftingId)
    * S2: crafting policy name, resolved to EB1CraftingPolicyType (defaults to CheckAll)
    * F1: -
    * F2: -
    * Note:
    * OnInit(): Reads CraftingId from Action.S1 and CraftingPolicy from Action.S2.
    * OnPlay(): For the MenuOrder crafting keyword, opens a filtered recipe UI for shop/coop customers; otherwise opens the recipe UI for the possessing user, or auto-starts a random craft for the NPC.
    * OnTick(): Finishes once bIsCraftingUIClosed becomes true.
PropertyTypeDescriptionMetadata
CraftingIdFNameCrafting category id (from Action.S1), used to look up available recipes and drive the crafting UI/auto-start
CraftingPolicyEB1CraftingPolicyTypeCrafting policy (from Action.S2), forwarded to the crafting UI packet and auto-craft calls
bIsCraftingUIClosedboolWhether the crafting UI has been closed (or auto-craft already started), letting OnTick finish the action
ActionIdFNameIdentifier of this action instance (used for interaction tracking and mission time accounting)
StateEB2ActionStateCurrent lifecycle state of this action
MergeTypeEB2ActionMergeTypeMerge type flags for this action (e.g. interaction merge, checked in Finish())
ResultEB2InteractionResultResult of this action once it stops playing (Finish/Failed/Canceled)
SelfEntityIdFB1EntityIdEntity id performing this action
TargetEntityIdFB1EntityIdEntity id targeted by this action
GrabEntityIdFB1EntityIdEntity id grabbed/carried by self entity for this action
NonTargetLocationFVectorLocation used for script/condition context when there is no target entity
ActionFB1ActionInfoAction table data (S1/S2/F1/F2, script id lists, etc.) driving this instance
TickCalcValuefloatAccumulated tick delta time since this action started ticking
CurrentNotifyIndexint32Index into Action.NotifyScriptIds for the next notify script to run
AsyncLoadAnimInfoTArrayAnimations to async-load for this action's start/notify/tick/finish/cancel scripts
AddActionTimeIntervalfloatInterval in seconds between OnTickAddActionExecuteTime() calls
AccumAddActionTimefloatElapsed time accumulator compared against AddActionTimeInterval
StartActionTickTimeint64Tick timestamp used to measure elapsed action execution time for mission tracking
ActionKeyFB2ActionKeyKey identifying this action's slot/queue within the interaction system
TimeTaskIdFB1TimeTaskIdId of the scheduled time task used for delayed Determine/Finish
IsForceCancelableboolWhether this action is force-cancelable, copied from Action.IsForceCancelable
IsFirstActionboolMarks the first action in an interaction sequence; set on actions[0] by FB2InteractionPlayer::LinkActions(), read by FB2ActionPlayer
bMultiFlagboolSet by looping actions (PlayAnim, BookRead, Eat, WaitTalkSequence) once a loop iteration completes; read/reset by FB2ActionPlayer to gate multi-interaction selection
TalkInstanceIdFB1TalkInstanceIdId of the talk instance this action is linked to, set externally by FB2InteractionPlayer::LinkActions()
TalkSubjectEntityIdFB1EntityIdEntity id of the talk subject linked to this action, set externally by FB2InteractionPlayer::LinkActions()/OnTalkSpaceParamChanged()
bIsWaitFinishEventboolCached copy of Action.IsWaitFinishAction taken at Init(); read directly by FB2ActionPlayer for sequencing (the IsWaitFinishAction() getter instead reads Action.IsWaitFinishAction live)
AutoInsertTypeEB2ActionAutoInsertTypeType of action that was auto-inserted before this one (e.g. WalkTo, ChangePosture)