Sgwilson
Based on game build 722832 | Last updated: 2026-04-26
Overview
SGwilson is the primary animation state machine for the Wilson player character and serves as the foundation for all playable characters in Don't Starve Together. This stategraph defines over 200 states covering locomotion (run, idle, mounted movement), combat (attack, parry, recoil, weapon-specific actions), tool use (chop, mine, hammer, dig, fishing, netting), and character transformations (werebeaver, weremoose, weregoose, wereplayer). It integrates character-specific mechanics including Wanda age transitions, Wortox portal teleportation, WX-78 module abilities, Wigfrid battle mechanics, and Wormwood plant interactions. The stategraph handles death and rebirth sequences (standard, gravestone, vine save), status effects (electrocute, grogginess, freeze), and UI interactions (wardrobe, cookbook, gift opening). Stategraphs are accessed via StartStateGraph() on entity creation, not called as utility functions. ActionHandlers map player ACTIONS to appropriate animation states based on equipped items, component checks, and tag conditions.
Usage example
-- Access Wilson stategraph on a player entity
local player = ThePlayer
if player.sg ~= nil then
-- Transition to a specific state
player.sg:GoToState("idle")
-- Check current state and tags
if player.sg:HasStateTag("busy") then
print("Player is busy, cannot interrupt")
end
-- Listen for stategraph events
player:ListenForEvent("locomote", function(inst, data)
print("Player locomotion state changed")
end)
-- Check if in combat state
if player.sg.currentstate.name == "attack" then
print("Player is attacking")
end
end
Dependencies & tags
External dependencies:
stategraphs/commonstates-- Required for common state definitionseasing-- Required for animation interpolation functionsprefabs/player_common_extensions-- Required for shared player entity logicstategraphs/SGwx78_common-- Required for WX-78 common state definitionsprefabs/wx78_common-- Required for WX-78 shared mechanicsTheInput-- GetAnalogControlValue called for controller inputTheCamera-- GetRightVec and GetDownVec called for direction calculationTUNING-- CONTROLLER_DEADZONE_RADIUS accessed for input thresholdAllPlayers-- Iterated in GetRoyaltyTarget to find royalty playersTheNet-- GetServerGameMode called for lavaarena/quagmire mode checkTheWorld-- Referenced in commented-out IsNearDanger function for hounded componentGLOBAL-- EQUIPSLOTS.BODY accessed in ForceStopHeavyLiftingSpawnPrefab-- Called in DoGooseStepFX, DoGooseWalkFX, DoGooseRunFXLaunch2-- Called in DropAllItemsForDeath for item physicsPlayFootstep-- Called in DoRunSounds and PlayMooseFootstepevent_server_data-- Used to override DoRunSounds for event server modesCOLLISION-- Used in ToggleOffPhysics, ToggleOffPhysicsExceptWorld, ToggleOnPhysics for collision mask constantsEQUIPSLOTS-- Used in GetUnequipState to check HANDS slotWORTOX_SHADOW_MULT-- Global constant used in DoWortoxPortalTint for shadow allegiance multiplierWORTOX_LUNAR_OFFSET-- Global constant used in DoWortoxPortalTint for lunar allegiance offsetTheSim-- FindEntities called in TryGallopCollideUpdate to detect collision targetsACTIONS-- Referenced for BUILD, DROP, FEEDPLAYER, CHOP, MINE, REMOVELUNARBUILDUP, HAMMER, TERRAFORM, DIG, NET action typescheckbit-- Used to check collision mask bits in TryGallopCollideUpdatedistsq-- Used for distance squared calculations in collision detectionDEGREES-- Used to convert rotation to angle in TryGallopCollideUpdateMAX_PHYSICS_RADIUS-- Used in entity search radius calculationActionHandler-- Function used to define action-to-state mappingsGetValidRecipe-- Called in BUILD handler to retrieve recipe dataFunctionOrValue-- Called in BUILD handler to resolve recipe sg_stateSGWX78Common-- Accessed for WX_SPIN_PICKABLE_TAGS in PICK handlerWX78Common-- Accessed for CanSpinUsingItem in PICK and ATTACK handlersFOODTYPE-- Used to check food type in EAT handlerGetString-- Retrieve ANNOUNCE_COACH stringGetTaskRemaining-- Calculate parry time leftGetTime-- Timestamp for stunlock calculationFRAMES-- Time threshold for electrocutePLAYERSTUNLOCK-- Stunlock frequency enumsDoHurtSound-- Play hit sound effectshallowcopy-- Used to copy knockback data table.Vector3-- Used to create position vector for weregoose takeoff.FindRandomPointOnShoreFromOcean-- Used to find teleport point for weregoose.TheInventory-- CheckClientOwnership called in emote handler for validationClosePocketRummageMem-- Called in ms_closeportablestorage handlerGetTickTime-- Gets current tick time for animation syncmath2d-- DistSq for network position validationPlayerCommonExtensions-- CalcGallopSpeedMult for speed calculationForceStopHeavyLifting-- Stops heavy lifting across multiple statesClearStatusAilments-- Clears status effects before transformationSetSleeperAwakeState-- Sets sleeper component awake state on wakeup exitSerializeUserSession-- Serializes session data on resurrectionCommonHandlers-- OnHop, OnElectrocute, OnCorpseChomped handler factoriesweremoose_symbols-- Local table of symbol names for weremoose animation overridesStartElectrocuteForkOnTarget-- Called in electrocute onenter if data providedstatue_symbols-- Table used for symbol overrides in rebirth statesHUMAN_MEAT_ENABLED-- Global flag checked to determine if humanmeat prefab should be droppedDropAllItemsForDeath-- Global function called to drop player items on deathDoMountSound-- Global function called for mount death soundDoGooseRunFX-- Global function called for goose death effectsFindCharlieRezSpotFor-- Finds resurrection spot in death_vinesave_pst ontimeoutDoGooseStepFX-- Called in idle onupdate for goose step visual effectsLaunch-- Launches loot items from picked flowersDEPLOYSPACING_RADIUS-- Constant used for flower search radiusDEPLOYSPACING-- LESS enum used for deploy spacing configurationFLOWERS_MUST_TAGS-- Tag filter for flower entity searchFLOWERS_CANT_TAGS-- Exclusion tag filter for flower entity searchFALLINGREASON-- OCEAN and VOID enums checked in drownable logicOnTalk_Override-- External event handler function for ontalk event in bow stateOnDoneTalking_Override-- External event handler function for donetalking event in bow stateGetRoyaltyTarget-- Function to find royalty target entity in ontimeout handlerClearRefuseBowTask-- Callback function for refuse bow task cleanup in bow timelineClearRegalJokerTask-- Callback function for regal joker task cleanup in bow timelineNO_REFUSEBOW_RESPONSE_TIME-- Constant for refuse bow response timeout durationNO_REGALJOKER_RESPONSE_TIME-- Constant for regal joker response timeout durationCancelTalk_Override-- Helper function to cancel talk override on state exitCanEntitySeeTarget-- Global function to check line of sight to target.PlayMiningFX-- Global function to spawn mining visual effects.CAMERASHAKE-- Global table for camera shake types.CONTROL_SECONDARY-- Input control constant for RMB/controller alternate actionCONTROL_CONTROLLER_ALTACTION-- Input control constant for controller alternate actionCONTROL_PRIMARY-- Input control constant for LMB/controller primary actionCONTROL_ACTION-- Input control constant for action buttonCONTROL_CONTROLLER_ACTION-- Input control constant for controller action buttonGetUnequipState-- Determines appropriate state for unequip transitionsIsWeaponEquipped-- Checks if parry weapon is currently equippedGetGameModeProperty-- Checks no_hunger game mode property in eat onexitDoEatSound-- File-scope helper called in eat timeline and onenterTryResumePocketRummage-- File-scope helper called in eat timelineTryReturnItemToFeeder-- File-scope helper called in eat onexitCheckPocketRummageMem-- File-scope helper called in eat onexitPOPUPS-- References GIFTITEM, WARDROBE, GROOMER popup typesDoTalkSound-- Helper function to play talk sound effectsStopTalkSound-- Helper function to stop talk sound effectsDoMimeAnimations-- Called in mime state onenter.GetRandomMinMax-- Called in dohungrybuild for random talk delay generationStartActionMeter-- Called in dolongaction onenter to start action meter UIStopActionMeter-- Called in dolongaction ontimeout and onexit to stop action meter UIfind_lucy-- Function passed to FindItem to locate lucy axe in carvewood stateHandleInstrumentAssets-- Called to set up instrument animation assets for flute, horn, bell, whistle statesTimeEvent-- Defines timeline callbacks within states.EventHandler-- Defines event listeners within states.State-- Constructor for state definitions.subfmt-- Format announcement stringsOnRemoveCleanupTargetFX-- Cleanup function for target FXGetIceStaffProjectileSound-- Function called to get ice staff projectile sound pathMOOSE_AOE_MUST_TAGS-- Tag filter for moose smash area attackMOOSE_AOE_CANT_TAGS-- Exclusion tag filter for moose smash area attackATTACK_PROP_MUST_TAGS-- Tag filter for prop attack entity searchATTACK_PROP_CANT_TAGS-- Exclusion tag filter for prop attack entity searchConfigureRunState-- Local helper function to configure run state parametersGetRunStateAnim-- Local helper function to determine appropriate run animation based on transformation stateDoRunSounds-- Local helper function to play running sound effectsDoFoleySounds-- Local helper function to play footstep foley soundsDoMountedFoleySounds-- Local helper function to play mounted movement soundsPlayMooseFootstep-- Local helper function to trigger moose-specific footstep soundStateGraph-- Called at end to construct and return the stategraph with states, events, default state, and actionhandlersCommonStates-- AddRowStates and AddHopStates called to integrate common locomotion and hopping statesGymStates-- AddGymStates called from SGwilson_gymstates module to add gym workout statesTheShard-- GetShardId called in pocketwatch warpback for shard migration checksVecUtil_DistSq-- Called for distance calculations in pocketwatch warpbackShard_IsWorldAvailable-- Called to check if destination shard is available for migrationFindPlayerFloater-- Called to find player floater item in water statesDoGooseWalkFX-- Called for weregoose walking visual effectsDoMooseRunSounds-- Called for weremoose running soundsDoYawnSound-- Called during yawn stateDoEmoteFX-- Called for emote visual effectsDoEmoteSound-- Called for emote soundsDoForcedEmoteSound-- Called for forced emote soundsDoWortoxPortalTint-- Called for Wortox portal tint effectsDoThrust-- Called during multithrust stateDoHelmSplit-- Called during helmsplitter stateSetSleeperSleepState-- Called when entering sleep statesStartTeleporting-- Called when teleportation beginsDoneTeleporting-- Called when teleportation completesToggleOnPhysics-- Called to restore physics collisionToggleOffPhysics-- Called to disable physics collisionToggleOffPhysicsExceptWorld-- Called to disable physics except world collisionShakeAllCameras-- Called for camera shake effects in combat statesGetActionPassableTestFnAt-- Called to get passability test function for position validationGetCreatureImpactSound-- Called for creature impact sounds in corpse hit stateGetRockingChairStateAnim-- Called to determine rocking chair animation stateHandleModuleRemoverAssets-- Called in WX78 module removal statesCreatingJoustingData-- Called to create jousting data structureReduceAngle-- Called to normalize angle valuesIsLocalAnalogTriggered-- Called to check local analog input triggerGetLocalAnalogDir-- Called to get local analog direction inputDiffAngle-- Called to calculate angle differenceSetPocketRummageMem-- Called to set pocket rummage memoryOwnsPocketRummageContainer-- Called to verify pocket rummage container ownershipValidateMultiThruster-- Called to validate multithruster before stoppingValidateHelmSplitter-- Called to validate helmsplitter before stoppingeasing.outQuad-- Called for swim speed easing calculationGetActionFailString-- Called to get action fail stringsfind_abigail_flower-- Called to find Abigail's flower in inventory for Wendy elixir statesEntityScript.is_instance-- Called to check if data is entity instance in sitting states
Components used:
playercontroller-- Checked for input enable state in GetLocalAnalogXY, disabled in SetSleeperSleepStateinventory-- Accessed for equipslots in DoEquipmentFoleySounds, DropEverything in DropAllItemsForDeath, Hide in SetSleeperSleepState, IsHeavyLifting and Unequip in ForceStopHeavyLiftingsocketholder-- UnsocketEverything called in DropAllItemsForDeathdrownable-- IsOverWater checked in DoGooseStepFX, DoGooseWalkFX, DoGooseRunFXrider-- GetSaddle called in DoMountedFoleySoundsfreezable-- IsFrozen and Unfreeze called in ClearStatusAilmentspinnable-- IsStuck and Unstick called in ClearStatusAilmentsgrue-- AddImmunity called in SetSleeperSleepStatetalker-- IgnoreAll called in SetSleeperSleepStatefirebug-- Disable called in SetSleeperSleepStatesanity-- Referenced in commented-out IsNearDanger functionhealth-- SetInvincible called in StartTeleporting and DoneTeleportingmightiness-- IsMighty called in ConfigureRunStateskilltreeupdater-- IsActivated called in ConfigureRunState for walter_woby_sprint skillplayervision-- HasGoggleVision called in ConfigureRunStatecolouradder-- PushColour and PopColour called in DoWortoxPortalTintequippable-- IsEquipped called in IsWeaponEquippedinventoryitem-- IsHeldBy called in IsWeaponEquipped, GetGrandOwner and owner accessed in OwnsPocketRummageContainer and IsHoldingPocketRummageActionItemmultithruster-- DoThrust called in DoThrust, component checked in ValidateMultiThrusterhelmsplitter-- DoHelmSplit called in DoHelmSplit, component checked in ValidateHelmSplittercontainer-- Close called in ClosePocketRummageMeminstrument-- GetAssetOverrides called on buffered action inventory objectplayerfloater-- Checked for existence on inventory itemsfueled-- DoDelta called on gallop sticklocomotor-- GetRunSpeed called to calculate gallop speedboostworkable-- CanBeWorked, GetWorkAction, WorkedBy called on collision targetsoceanfishingrod-- Accessed to get target in fishing reel handleroceanfishable-- Checked on target in fishing reel handlerreader-- Checked for IsAspiringBookworm in read handlerpickable-- Checked for jostlepick, quickpick in pick handlersearchable-- Checked for jostlesearch, quicksearch in pick handleractivatable-- Checked on target in activate handlereater-- Checked for PrefersToEat in eat handlersouleater-- Checked for existence in eat handlercombat-- Checked for GetWeapon in attack handlerchannelable-- Checked for use_channel_longaction property in STARTCHANNELING handlerconstructionsite-- Checked for existence in CONSTRUCT handlersocketable-- Checked for GetSocketName() method in USEITEMON handlerdumbbelllifter-- Called IsLifting() method in LIFT_DUMBBELL handlerstrongman-- Accesses gym propertymightygym-- CharacterExitGym called on gym instancesleepingbag-- DoWakeUp called on sleepingbag componentwereness-- GetPercent called to check transformation readiness.revivablecorpse-- Checked for existence to determine death state path.playerspeedmult-- SetCappedPredictedSpeedMult, RemoveCappedPredictedSpeedMult for gallop speedskinner-- SetSkinMode for powerup/powerdown skin transitionsAnimState-- PlayAnimation(), OverrideSymbol(), ClearOverrideSymbol(), AnimDone(), GetCurrentAnimationLength() for animation controlSoundEmitter-- PlaySound() for transformation audio effectsPhysics-- Stop() to halt movement during transformationTransform-- GetWorldPosition() for FX spawn positioninggrogginess-- ResetGrogginess called in electrocute onenterbloomer-- PushBloom and PopBloom for electrocute shader effectburnable-- Ignite called if plantkin is electrocutedfader-- Fade called in wendy_gravestone_rebirth timelinecursable-- Died() called to handle curse removal on deathshadowparasitemanager-- SpawnHostedPlayer() called for hosted player death via TheWorld.componentstemperature-- IsFreezing and IsOverheating checked in idle onenter for temperature animationshunger-- GetPercent() called in funnyidle onenter to check hungry thresholdlunarhailbuildup-- Check if lunar hail buildup is workable.sg-- Manage state tags and transitions.parryweapon-- OnPreParry() and TryParry() called during parry setupfishingrod-- WaitForFish(), Collect(), Release() called on equipped toolgiftreceiver-- OnStartOpenGift() called when opening giftwardrobe-- CanBeginChanging() and BeginChanging() checked for wardrobe transitionsgroomer-- GetOccupant() and popuptype accessed for groomer popupDynamicShadow-- Enablecorpsereviver-- GetReviverSpeedMult called to calculate revive speed multiplierbeard-- ShouldTryToShave() called in shave state to validate shave action on beard componentshaveable-- CanShave() called in shave state to validate shave action on shaveable componentshaver-- Checked in shave state onenter to verify invobject has shaver componentghostlybond-- Accessed bondlevel property for speech string.weighable-- GetWeight and GetWeightPercent for announcementsspellbook-- HasSpellFn to check book typeaoetargeting-- SpawnTargetFXAt and CanRepeatCast for spell effectsdeployable-- deploytoss_symbol_override accessed for animation overridesoundemitter-- PlaySound() for attack and projectile soundsanimstate-- PlayAnimation(), PushAnimation(), IsCurrentAnimation(), GetCurrentAnimationFrame(), Show(), Hide() for animation controltransform-- SetPredictedEightFaced() for lancejab facing predictionplanardamage-- AddBonus and RemoveBonus called for moose smash planar damageplanarentity-- Checked on targets during moose smash to apply planar damage bonussleeper-- GoToSleep called in sleep-related statessleepingbaguser-- ShouldSleep checked before sleepingteleporter-- Activate, RegisterTeleportee, UnregisterTeleportee, UseTemporaryExit called in teleportation statesremoteteleporter-- CanActivate, OnStartTeleport, OnStopTeleport, Teleport_GetNearbyItems, SetNearbyItems called in remote teleport statesrecallmark-- IsMarkedForSameShard checked in pocketwatch portal statespocketwatch-- CanCast checked in pocketwatch cast statesaoeweapon_leap-- DoLeap called in combat leap statesaoeweapon_lunge-- DoLunge, sound accessed in combat lunge statesaoecharging-- GetChargeTicks, IsEnabled, ReleaseChargedAttack, SetChargeTicks, SetChargingOwner called in slingshot charge statesfiniteuses-- GetUses checked for slingshot and tool statestool-- CanDoAction checked in till statesperishable-- StartPerishing, StopPerishing called in item crafting statescolourtweener-- StartTween, EndTween, IsTweening called in portal rebirth statesmast-- AddSailFurler, RemoveSailFurler called in sail furling statesboatcannonuser-- GetCannon, SetCannon called in cannon aiming statessteeringwheeluser-- should_play_left_turn_anim accessed in boat steering statesanchor-- RemoveAnchorRaiser called in anchor raising statesconstructionbuilder-- OnFinishConstruction, StopConstruction called in construction statesbundler-- OnFinishBundling, StopBundling called in bundling statesfan-- Channel, IsChanneling, overridesymbol accessed in fan use stateswalkingplankuser-- Dismount called in plank mount statesjoustuser-- CheckEdge, StartJoust, EndJoust called in jousting statestackler-- CheckCollision, CheckEdge called in tackle statesslingshotmods-- CheckRequiredSkillsForPlayer, HasPartName called in slingshot statesembarker-- GetEmbarkPosition, StartMoving, Cancel, embark_speed, embarkable accessed in hopping statessittable-- IsOccupied, IsOccupiedBy, SetOccupier called in sitting statesslipperyfeet-- SetCurrent called in slipping statesupgrademoduleowner-- StartInspecting, StopInspecting, FindAndPopModule called in WX78 module statesuseableequippeditem-- IsInUse, StopUsingItem called in drone control statesgestaltcage-- OnTarget, OnUntarget called in pounce capture statesmoonstormstaticcatcher-- OnTarget, OnUntarget called in divegrab statesbathingpool-- GetRadius, IsOccupant checked in soaking stateswintersfeasttable-- current_feasters accessed in winter's feast eating statespushable-- GetPushingSpeed, ShouldStopForwardMotion, StopPushing, doer accessed in pushing statesmagician-- DropToolOnStop, StopUsing, equip, held, item accessed in tophat statessinginginspiration-- IsSongActive, CanAddSong, and other methods accessed in Wigfrid singing statessoul-- Referenced for soul-related effects
Tags:
playerghost-- checkregal-- checkregaljoker-- checkmime-- checkflying-- checkshadow-- checkghost-- checkFX-- checkNOCLICK-- checkDECOR-- checkINLIMBO-- checkwall-- checkcompanion-- checkflight-- checkinvisible-- checknotarget-- checknoattack-- checkflower-- check_combat-- checkmonster-- checkpig-- checkplayer-- checkspider-- checkspiderwhisperer-- checkspiderdisguise-- checkshadowcreature-- checkwereplayer-- checkgroggy-- checkwoby-- checkweremoose-- checkweregoose-- checkwonkey-- checkteetering-- checkminigameitem-- checknodangle-- addnoslip-- addabigail_flower-- checkgallopstick-- checkyeehaw-- checkfullhelm_hat-- checkbeaver-- checknabbag-- checksmallcreature-- checksmall-- checkgnawing-- checkprespin-- checkspinning-- checkprechop-- checkchopping-- checkpremine-- checkmining-- checkprehammer-- checkhammering-- checkpredig-- checkdigging-- checkprenet-- checknetting-- checkpartiallyhooked-- checkfishing_idle-- checkpyromaniac-- checkquagmire_fasthands-- checkrepairshortaction-- checkslowfertilize-- checkgraveplanter-- checkengineering-- checkscientist-- checkhandyperson-- checkwx78_backupbody-- checknoquickpick-- checkfarmplantfastpicker-- checkfarm_plant-- checkwoodiequickpicker-- checkspin-- checkfastpicker-- checkinventoryitemholder_take-- checkhungrybuilder-- checkfastbuilder-- checkslowbuilder-- checkexpertchef-- checkheavy-- checkportablestorage-- checkfasthealer-- checkquickeat-- checksloweat-- checkfooddrink-- checkmoonportal-- checkmoonportalkey-- checkquagmire_portal_key-- checkquagmire_altar-- checkgive_dolongaction-- checkflute-- checkhorn-- checkbell-- checkwhistle-- checkgnarwail_horn-- checkguitar-- checkcointosscast-- checkcrushitemcast-- checkquickcast-- checkveryquickcast-- checkmermbuffcast-- checkbook-- checkcanrepeatcast-- checkwillow_ember-- checkremotecontrol-- checkslingshot-- checkaoeweapon_lunge-- checkaoeweapon_leap-- checksuperjump-- checkparryweapon-- checkblowdart-- checkthrow_line-- checkrecall_unmarked-- checkpocketwatch_warp_casting-- checkpocketwatch_portal-- checksoulstealer-- checkquickfeed-- checkspecial_action_toss-- checkkeep_equip_toss-- checkthrown-- checkpillow-- checkpropweapon-- checkmultithruster-- checkhelmsplitter-- checkblowpipe-- checkquagmire_farmhand-- checkplantkin-- checkinspectingupgrademodules-- checkwateringcan-- checkwaxspray-- checkwx_remotecontroller-- checkslingshotmodkit-- checkuseabletargateditem_canselftarget-- checksocket_shadow-- checkunsummoning_spell-- checkyotb_stage-- checkfeasting-- checkingym-- checkacting-- checkis_furling-- checkelixir_drinker-- checkwx_screeching-- checkwx_shielding-- checkbusy-- checkoverridelocomote-- checkmoving-- checkbedroll-- checktent-- checkwaking-- checksleeping-- checkshell-- checktransform-- checkdismounting-- checkparrying-- checkparryhit-- checkdevoured-- checksuspended-- checknointerrupt-- checkcanelectrocute-- checkgroundspike-- checkpushing-- checknoelectrocute-- checkelectrocute-- checkwxshielding-- checkwxshieldhit-- checkcaninterrupt-- checknostunlock-- checkidle-- checkheavyarmor-- checkheavybody-- checkdrowning-- checkfalling-- checkjumping-- checkrunning-- checkis_turning_wheel-- checknocraftinginterrupt-- checkchanneling-- checkdead-- checktalking-- checknotalking-- checkfloating-- checklifting_dumbbell-- checkfishing-- checkknockout-- checknopredict-- checknomorph-- checksilentmorph-- checkspook_protection-- checkpausepredict-- addpowerup-- addtransformpre-- add/remove/checkelectricdamageimmune-- checkcanrotate-- addignoretalking-- checkkeepchannelcasting-- checkband-- checkforcedangle-- addworking-- addwoodcutter-- checkhiding-- checkpreparrying-- checkshield-- checksign-- checkautopredict-- addprefish-- addnibble-- addcatchfish-- addkeep_pocket_rummage-- adddoing-- addinwardrobe-- addpumpkincarving-- addsnowmandecorating-- addplayingbalatro-- addmoddingslingshot-- addshouldautopausecontrollerinventory-- addslowaction-- addwhip-- checkpocketwatch-- checkshadow_item-- checkjab-- checklancejab-- checkpunch-- checklight-- checknopunch-- checkplaying-- addshaving-- addshadowmagic-- checkattack-- addabouttoattack-- addreadytocatch-- addweremoosecombo-- checkrangedweapon-- checkicestaff-- checkfirestaff-- checkfirepen-- checktoolpunch-- checkchop_attack-- checkpropattack-- addmonkey-- addwonkey_run-- addsprint_woby-- addgalloping-- addgallop_run-- addgiving-- addigniting-- addwaxing-- addon_walkable_plank-- addis_using_steering_wheel-- addis_using_cannon-- addaiming-- addreeling-- addknockback-- addghostbuild-- addreviver_rebirth-- addfrozen-- addthawing-- addpinned-- addyawn-- addprechanneling-- addtilling-- addaoecharging-- addthrusting-- addhelmsplitting-- addtailslapping-- addsitting_on_chair-- addlimited_sitting-- addpushing_walk-- addboathopping-- addswimming_floater-- addnoswim-- addusing_drone_remote-- addoverrideattack-- addnodragwalk-- addself_fertilizing-- addjousting-- addwoby_dash_fade-- addforce_sprint_woby-- addiframeskeepaggro-- addcorpse-- addhit-- addfurl_fail-- addswitchtoho-- addis_heaving-- addaoe-- addpocketwatchcaster-- add
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
ATTACK_PROP_MUST_TAGS | table | { "_combat" } | Tags required for attack property targets. |
ATTACK_PROP_CANT_TAGS | table | { "flying", "shadow", "ghost", "FX", "NOCLICK", "DECOR", "INLIMBO", "playerghost" } | Tags excluded from attack property targets. |
MOOSE_AOE_MUST_TAGS | table | { "_combat" } | Tags required for moose AOE targets. |
MOOSE_AOE_CANT_TAGS | table | { "INLIMBO", "wall", "companion", "flight", "invisible", "notarget", "noattack" } | Tags excluded from moose AOE targets. |
FLOWERS_MUST_TAGS | table | { "flower" } | Tags required for flower targets. |
FLOWERS_CANT_TAGS | table | { "INLIMBO" } | Tags excluded from flower targets. |
GALLOP_HIT_CANT_TAGS | table | { "FX", "NOCLICK", "DECOR", "INLIMBO" } | Tags excluded from gallop hit targets. |
WORTOX_SHADOW_MULT | number | 0.6 | Damage multiplier for Wortox shadow attacks. |
WORTOX_LUNAR_OFFSET | number | 0.1 | Lunar phase offset for Wortox calculations. |
NO_REGALJOKER_RESPONSE_TIME | number | 6.0 | Response timeout for regal joker interactions. |
NO_REFUSEBOW_RESPONSE_TIME | number | 6.0 | Response timeout for refuse bow interactions. |
DANGER_ONEOF_TAGS | table | { "monster", "pig", "_combat" } | Tags used for danger assessment (includes pigs). |
DANGER_NOPIG_ONEOF_TAGS | table | { "monster", "_combat" } | Tags used for danger assessment (excludes pigs). |
GALLOP_NO_WORK_ACTIONS | table | (see source) | Actions excluded from gallop work behavior. |
Main functions
onenter (init)
- Description: Initializes state by transitioning to idle if locomotor component exists, otherwise corpse_idle.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (wakeup)
- Description: Disables player controller, plays appropriate wakeup animation (bedroll_wakeup or wakeup). For touch stone resurrection, sets nopredict/silentmorph tags, removes nomorph, disables invincibility, shows HUD, and sets camera distance. Sets goodsleep statemem if data.goodsleep is true.
- Parameters:
inst-- Entity owning the stategraphdata-- Optional data table, may contain goodsleep flag
- Returns: nil
- Error states: Errors if inst.components.playercontroller is accessed without nil check in some code paths.
onexit (wakeup)
- Description: Calls SetSleeperAwakeState. For resurrection, shows HUD, resets camera distance, and serializes user session. If goodsleep statemem is set, triggers talker Say with ANNOUNCE_COZY_SLEEP string.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.talker is nil when goodsleep is true - no nil guard before Say call.
onenter (powerup_wurt)
- Description: Stops heavy lifting, stops physics, plays powerup animation, and pauses prediction via playercontroller.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (powerdown_wurt)
- Description: Stops heavy lifting, stops physics, plays powerdown animation, and pauses prediction via playercontroller.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (powerup)
- Description: Spawns wolfgang_mighty_fx at entity position, stops heavy lifting and physics, plays powerup animation, and pauses prediction. Sets up for potential dumbbell lifting transition on animover.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onexit (powerup)
- Description: Clears lifting_dumbbell statemem if still set, indicating interruption occurred.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (powerdown)
- Description: Stops heavy lifting, stops physics, plays powerdown animation, and pauses prediction via playercontroller.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (becomeyounger_wanda)
- Description: Stops heavy lifting and physics, plays wanda_young animation, and plays younger_transition sound at timeline 0.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (becomeolder_wanda)
- Description: Stops heavy lifting and physics, plays wanda_old animation, and plays older_transition sound at timeline 0.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (transform_wereplayer)
- Description: Clears status ailments, stops heavy lifting and physics, closes inventory, pushes ms_closepopups event, pauses prediction and disables player controller/map controls. If riding, plays fall_off animation and stores data for later dismount. Otherwise sets transforming flag and transitions to transform_were
{mode}state. - Parameters:
inst-- Entity owning the stategraphdata-- Data table containing mode and cb for transformation target
- Returns: nil
- Error states: Errors if inst.components.playercontroller, inventory, or rider are nil - no nil guards before some component calls.
onexit (transform_wereplayer)
- Description: If not transforming, performs actual dismount, reopens inventory if not dead, and re-enables player controller and map controls.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.rider, health, inventory, or playercontroller are nil - no nil guards before component access.
onenter (electrocute)
- Description: Initializes electrocution state: clears ailments, stops locomotion, spawns shock FX, applies bloom shader, enables light, and potentially ignites the entity if it is a plant. Sets timeout based on animation length.
- Parameters:
inst-- Entity instance owning the stategraphdata-- Optional data table containing attackdata, stimuli, or duration
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.bloomer are nil (no guard present).
onexit (electrocute)
- Description: Cleans up shock FX, disables light, and removes bloom effect on state exit.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
ontimeout
- Description: Timeout handler that transitions to "idle" state if the entity does not have the "transform" state tag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil###
onenter (rebirth) - Description: Disables player controller, plays rebirth animation, applies statue skin symbols if source has skin build, sets invincibility, hides HUD, and adjusts camera distance.
- Parameters:
inst-- Entity instance owning the stategraphsource-- Optional source entity for skin build data
- Returns: nil
onexit (rebirth)
- Description: Clears symbol overrides, re-enables player controller, removes invincibility, shows HUD, resets camera, and serializes user session.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
onenter (gravestone_rebirth)
- Description: Disables player controller, overrides wormmovefx symbol, plays grave_spawn animation, sets invincibility, hides HUD, adjusts camera, and plays character-specific spawn sound based on were-form tags.
- Parameters:
inst-- Entity instance owning the stategraphsource-- Optional source entity (unused in logic)
- Returns: nil
onexit (gravestone_rebirth)
- Description: Re-enables player controller, removes invincibility, shows HUD, resets camera, and serializes user session.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
onenter (wendy_gravestone_rebirth)
- Description: Disables player controller, overrides symbols, plays wendy_resurrect animation, spawns rebirth FX, adds override build, sets invincibility, hides HUD, adjusts camera, and plays Abigail howl sound.
- Parameters:
inst-- Entity instance owning the stategraphsource-- Optional source entity (unused in logic)
- Returns: nil
onexit (wendy_gravestone_rebirth)
- Description: Clears override build, re-enables player controller, removes invincibility, shows HUD, resets camera, and serializes user session.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
onenter (death)
- Description: Handles player death entry: clears status ailments, stops locomotion, plays death animation based on transformation state (wereplayer, beaver, moose, goose), handles special cases (charlie_vinesave, wx78_backupbody_save, revivablecorpse), extinguishes fire, disables player controller, and clears buffered events.
- Parameters:
inst-- entity owning the stategraphdata-- optional state transition data, may contain hosted or corpsing flags
- Returns: nil
- Error states: Errors if inst.deathcause is nil (assert failure). May error if inst.components.locomotor, inst.components.rider, inst.components.burnable, or inst.components.playercontroller is nil without guards.
onexit (death)
- Description: Cleans up death state: clears wx_chassis_build override, resets camera distance, clears vine save flags. Contains assert(false) if leaving death state without revivablecorpse component (should never happen).
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Asserts false if inst.components.revivablecorpse is nil when exiting death state (intentional crash for invalid state transition).
onenter (death_hosted)
- Description: Handles hosted player death: adds shadow_thrall_parasite build override, clears status ailments, stops locomotion, plays parasite_death animation and possess_kill_player sound, extinguishes fire, disables player controller, drops all items, and clears buffered events.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.deathcause is nil (assert failure). May error if inst.components.locomotor, inst.components.burnable, inst.components.playercontroller, or inst.components.inventory is nil.
onenter (seamlessplayerswap_death)
- Description: Handles death state entry for seamless player swap. Checks for revivablecorpse component to transition to corpse state, otherwise pushes makeplayerghost or playerdied event based on ghostenabled flag and ground passability.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (seamlessplayerswap_death)
- Description: Asserts that entity should never leave this death state once entered. Triggers assertion failure if revivablecorpse component is nil.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Asserts false if left without revivablecorpse component — indicates invalid state transition.
onenter (death_vinesave_pst)
- Description: Handles vine save death sequence. Clears status ailments, stops locomotor, dismounts rider, disables player controller, plays death animation, disables shadow, sets camera distance. Spawns flowers as loot, creates rose prefab with bounce animation, spawns petal FX with sound, and sets 3-second timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
ontimeout (death_vinesave_pst)
- Description: Triggered after 3-second timeout. Finds Charlie resurrection spot, teleports entity, snaps camera, fades screen in, sets vinesaving flag, and transitions to respawn_vinesave state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (death_vinesave_pst)
- Description: Re-enables shadow and shows entity. Removes NOCLICK tag from rose and sets persists to true. If not vinesaving, asserts failure, clears winona_death build override, sets invincible to false, re-enables player controller, and resets camera distance.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Asserts false if left without vinesaving flag set — indicates invalid state transition.
onenter (respawn_vinesave)
- Description: Calls PlayerCommonExtensions.OnRespawnFromVineSave, disables player controller, plays rebirth animation, plays resurrect sound, sets invincible to true, hides HUD, and sets camera distance to 14.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (respawn_vinesave)
- Description: Shows HUD, resets camera distance, re-enables player controller, sets invincible to false, clears winona_death build override, and serializes user session.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (idle)
- Description: Handles idle state entry with extensive conditional logic. Stops locomotor, clears buffered actions, checks drownable for ocean/void falling, handles mounted state, checks for band equipment, processes queued talk timeout for talk/mime states. Builds animation list based on wereplayer/groggy/heavy lifting/channel casting/storm/teetering/sanity/temperature conditions. Plays or pushes animations and sets random timeout for funny animations.
- Parameters:
inst-- entity owning the stategraphpushanim-- boolean flag to push animation queue instead of playing immediately
- Returns: nil
onupdate (idle)
- Description: Monitors goose idle animation frames. When frame 5 or 14 is reached during idle_loop animation, plays footstep sound and triggers goose step FX. Tracks frame to avoid duplicate triggers.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
ontimeout
- Description: Timeout handler that checks for royalty target via GetRoyaltyTarget and transitions to bow state if found, otherwise transitions to funnyidle state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (funnyidle)
- Description: Plays idle animations based on environmental and character state conditions. Checks temperature for cold shivering or overheating animations, hunger for hungry animation with sound, sanity mode for insanity/lunacy animations, groggy tag for groggy idle, or custom idle animations/states. Uses randomization for custom idle repeat logic.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.temperature, inst.components.hunger, or inst.components.sanity is nil - no nil guards before component access in condition checks.
onenter (wes_funnyidle)
- Description: Plays Wes-specific idle animation (idle_wes). Timeline includes sound events for breathing and blowing at specific frame intervals.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (wx78_funnyidle)
- Description: Plays WX-78 specific idle animation (idle_wx).
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (waxwell_funnyidle)
- Description: Plays Maxwell/Waxwell specific idle animation with 70% chance for idle_waxwell and 30% for idle2_waxwell.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (bow)
- Description: Handles bowing animation toward royalty target. Stores target in statemem, forces entity to face target position, checks for regaljoker tag on target's equipped items, and determines bow animation variant based on isjoker and nobow flags.
- Parameters:
inst-- entity owning the stategraphtarget-- target entity to bow to
- Returns: nil
- Error states: Errors if target is provided but target.Transform or target.components.inventory is nil - no nil guards before nested property access.
onenter (bow_loop)
- Description: Plays the bow_loop animation in a loop. Stores target and talktask in statemem if data is provided.
- Parameters:
inst-- entity owning the stategraphdata-- optional data table containing target and talktask
- Returns: nil
onupdate (bow_loop)
- Description: Checks if the target is still valid, near (within
6units), and has regal equipment (but not regaljoker). Transitions to bow_pst if conditions are not met. - Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.sg.statemem.target.components.inventory is nil — no nil guard before accessing inventory component.
onexit (bow_loop)
- Description: Cancels talk override when exiting the bow_loop state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (bow_pst)
- Description: Plays the bow_pst animation and sets an 8-frame timeout before transitioning to bow_pst2.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
ontimeout (bow_pst)
- Description: Transitions to bow_pst2 state after timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (mounted_idle)
- Description: Checks for band armor equipment and transitions to enter_onemanband if found. Handles sandstorm visibility checks and plays appropriate idle animations. Sets timeout for random idle behavior if not in sandstorm.
- Parameters:
inst-- entity owning the stategraphpushanim-- boolean indicating whether to push or play animation
- Returns: nil
- Error states: Errors if inst.components.inventory or inst.components.playervision is nil — no nil guards before component access.
ontimeout (mounted_idle)
- Description: Checks mount validity and triggers various idle states based on mount type (woby), hunger state (starving), or random selection (shake, bellow, graze). Transitions to bow state if royalty target exists.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.rider, inst.components.hunger, or GetRoyaltyTarget() returns invalid data — no comprehensive nil guards.
onenter (graze)
- Description: Plays graze_loop animation and sets random timeout between 1-6 seconds before returning to mounted_idle.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
ontimeout (graze)
- Description: Transitions back to mounted_idle state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
Main functions
⚠️ Verification Notice: The Lua source provided for this documentation review contains sleep-state code (SetSleeperAwakeState, goodsleep, gooseframe) that does not match the action states documented below (chop_start, mine_start, hammer, parry_pre, graze_empty, etc.). Error state claims and behavioral details cannot be fully verified without the correct stategraph source (likely player_stategraph.lua or common_actions stategraph). Treat error state documentation as unverified until correct source is provided.
onenter (parry_idle)
- Description: Stops locomotor, sets isshield flag from data. If duration provided, schedules task to end parry after duration expires. Plays parry_loop animation. If pauseframes > 0, adds busy and pausepredict tags and calls RemotePausePrediction on playercontroller.
- Parameters:
inst-- entity owning the stategraphdata-- optional table with duration, pauseframes, talktask, isshield fields
- Returns: nil
- Error states: None
ontimeout (graze_empty)
- Description: Plays graze2_pst animation and transitions to mounted_idle with pushanim flag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (bellow)
- Description: Plays bellow animation and triggers mount grunt sound via DoMountSound helper.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.rider is nil — no nil guard before GetMount() call.
onenter (shake)
- Description: Plays shake animation.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (shake_woby)
- Description: Checks if mount has woby tag before playing shake_woby animation. Falls back to mounted_idle if mount is invalid or not woby.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.rider is nil — no nil guard before GetMount() call.
onenter (alert_woby)
- Description: Plays alert_woby animation sequence (pre, loop, pst) if mount has woby tag. Falls back to mounted_idle otherwise.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.rider is nil — no nil guard before GetMount() call.
onenter (bark_woby)
- Description: Randomly plays bark1_woby animation (50% chance) if mount has woby tag. Falls back to mounted_idle otherwise.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.rider is nil — no nil guard before GetMount() call.
onenter (mount_eat)
- Description: Stops locomotor, plays graze_loop animation, plays chew sound, and pauses prediction if playercontroller exists. Sets 9-frame timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.rider is nil — no nil guards before component access.
ontimeout (mount_eat)
- Description: Plays woby chuff sound if mount has woby tag, then transitions to idle state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.rider is nil — no nil guard before GetMount() call.
onenter (chop_start)
- Description: Stops locomotor, plays chop_pre or woodie_chop_pre animation based on woodcutter tag, and adds prechop tag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onexit (parry_knockback)
- Description: Stops physics if speed was set, clears combat redirectdamagefn if not parrying.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: None
onexit (chop)
- Description: Removes the prechop tag when exiting the chop state.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (mine_start)
- Description: Stops locomotion, plays pickaxe_pre animation, and adds premine tag.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil.
onexit (mine_start)
- Description: Removes premine tag if mining did not commence.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (mine)
- Description: Stores buffered action, plays pickaxe_loop animation, and adds premine tag.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onexit (mine)
- Description: Removes premine tag.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (mine_recoil)
- Description: Stops locomotion, clears buffered action, plays recoil animation, spawns impact prefab, shakes camera, and sets physics motor velocity.
- Parameters:
inst-- Entity owning the stategraphdata-- State data containing target info
- Returns: nil
- Error states: Errors if data.target is invalid when accessing GetPosition or recoil_effect_offset.
onupdate (mine_recoil)
- Description: Applies decay to stored speed and updates physics motor velocity.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onexit (mine_recoil)
- Description: Stops physics movement.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (attack_recoil)
- Description: Stops locomotion, clears buffered action, plays atk_recoil animation, spawns impact prefab, shakes camera, and sets physics motor velocity.
- Parameters:
inst-- Entity owning the stategraphdata-- State data containing target info
- Returns: nil
- Error states: Errors if data.target is invalid when accessing GetPosition or recoil_effect_offset.
onupdate (attack_recoil)
- Description: Applies decay to stored speed and updates physics motor velocity.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onexit (attack_recoil)
- Description: Stops physics movement.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (hammer_start)
- Description: Stops locomotion, plays pickaxe_pre animation, and adds prehammer tag.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil.
onexit (hammer_start)
- Description: Removes prehammer tag if hammering did not commence.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (hammer)
- Description: Stores buffered action, plays pickaxe_loop animation, and adds prehammer tag.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (gnaw)
- Description: Stops locomotion, stores buffered action, plays attack animations (atk_pre then atk), plays attack whoosh sound, and adds gnawing tag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (gnaw)
- Description: Removes the gnawing tag when exiting the state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (gnaw_recoil)
- Description: Stops locomotion, clears buffered action, plays hit animation, shakes camera, and sets physics motor velocity to -6 for knockback effect.
- Parameters:
inst-- entity owning the stategraphdata-- optional state transition data
- Returns: nil
onupdate (gnaw_recoil)
- Description: Applies decaying knockback velocity by multiplying stored speed by 0.6 each update until speed is nil.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (gnaw_recoil)
- Description: Stops physics when exiting the recoil state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (hide)
- Description: Stops locomotion, plays hide animation then hide_idle, and plays hide bush Foley sound.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (hide)
- Description: Calls CancelTalk_Override to clean up talking state when exiting hide.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (shell_enter)
- Description: Stops locomotion, plays hideshell animation, and sets 23-frame timeout to transition to shell_idle.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
ontimeout (shell_enter)
- Description: Transfers talktask from statemem to shell_idle state and transitions to shell_idle.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (shell_enter)
- Description: Calls CancelTalk_Override to clean up talking state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (shell_idle)
- Description: Stops locomotion, pushes hideshell_idle animation, and stores transferred talktask in statemem.
- Parameters:
inst-- entity owning the stategraphtalktask-- talk task transferred from shell_enter state
- Returns: nil
onexit (shell_idle)
- Description: Calls CancelTalk_Override to clean up talking state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (shell_hit)
- Description: Stops locomotion, clears buffered action, plays hitshell animation, plays hit sound, calls RemotePausePrediction for stun frames if playercontroller exists, and sets timeout for stun duration.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
ontimeout (shell_hit)
- Description: Transitions to idle if unequipped was set during state, otherwise transitions to shell_idle.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (parry_pre)
- Description: Detects if shield is equipped, stops locomotion, plays parry_pre animation then parry_loop, sets timeout to animation length, registers combat_parry event listener to set up parry state with redirectdamagefn, performs buffered action, then removes event callback.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.combat is nil (redirectdamagefn assigned without guard)
ontimeout (parry_pre)
- Description: Handles parry_pre state timeout. If parrying tag is active, transfers talk task to parry_idle state with duration and pauseframes. Otherwise plays parry post-animation and transitions to idle.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (parry_pre)
- Description: Cancels talk override and clears combat redirectdamagefn if not parrying.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.combat is nil — no nil guard before redirectdamagefn assignment.
onenter (parry_idle)
- Description: Stops locomotor, sets isshield flag from data. If duration provided, schedules task to end parry after duration expires. Plays parry_loop animation. If pauseframes > 0, adds busy and pausepredict tags and calls RemotePausePrediction on playercontroller.
- Parameters:
inst-- entity owning the stategraphdata-- optional table with duration, pauseframes, talktask, isshield fields
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.playercontroller is nil — no nil guards before method calls.
ontimeout (parry_idle)
- Description: Removes busy and pausepredict tags, adds idle tag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (parry_idle)
- Description: Cancels pending task if exists, cancels talk override, clears combat redirectdamagefn if not parrying.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.combat is nil — no nil guard before redirectdamagefn assignment.
onenter (parry_hit)
- Description: Stops locomotor, clears buffered action, plays parryblock animation, plays hit sound. Sets stun timeout based on pushing flag (6 frames) or default (4 frames). Stores timeleft if provided.
- Parameters:
inst-- entity owning the stategraphdata-- optional table with pushing, timeleft, isshield fields
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (parry_hit)
- Description: If unequipped, transitions to idle. Otherwise sets parrying flag and transitions to parry_idle with calculated remaining duration.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (parry_hit)
- Description: Clears combat redirectdamagefn if not parrying.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.combat is nil — no nil guard before redirectdamagefn assignment.
onenter (parry_knockback)
- Description: Stops locomotor, clears buffered action, plays parryblock animation and hit sound. Calculates knockback velocity based on distance to knocker and angle. Sets motor velocity with decay factor. Sets 6 frame timeout.
- Parameters:
inst-- entity owning the stategraphdata-- table with timeleft, knockbackdata containing radius, knocker, strengthmult
- Returns: nil
- Error states: Errors if inst.components.locomotor, inst.Physics, or inst.Transform is nil — no nil guards before method calls.
onupdate (parry_knockback)
- Description: Decays speed by 0.75 multiplier each update and applies motor velocity for knockback effect.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
ontimeout (parry_knockback)
- Description: If unequipped, transitions to idle. Otherwise sets parrying flag and transitions to parry_idle with calculated remaining duration.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (parry_knockback)
- Description: Stops physics if speed was set, clears combat redirectdamagefn if not parrying.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.combat is nil — no nil guard before redirectdamagefn assignment.
onenter (terraform)
- Description: Stops locomotor, plays shovel_pre animation then pushes shovel_loop.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onenter (dig_start)
- Description: Stops locomotor, plays shovel_pre animation, adds predig tag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onexit (dig_start)
- Description: Removes predig tag if not digging.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (dig)
- Description: Plays shovel_loop animation, stores buffered action in statemem, adds predig tag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (dig)
- Description: Removes predig tag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (bugnet_start)
- Description: Stops locomotor, plays bugnet_pre animation.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onenter (bugnet)
- Description: Plays the bugnet animation and triggers the bugnet usage sound. Sets up timeline to perform buffered action and remove prenet tag.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
onenter (fishing_ocean_pre)
- Description: Performs the buffered fishing action and immediately transitions to idle state.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
<!-- NOTE: Content accuracy cannot be fully verified - provided Lua context appears to be from a different stategraph (sleep state) than the documented action states. Correct player_stategraph or common_actions stategraph source needed for verification. -->### onenter
- Description: Sets initial state based on locomotor component availability. Goes to "idle" if locomotor exists, otherwise "corpse_idle" for entities without locomotion.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
- Error states: None
ontimeout
- Description: Checks if entity has "transform" state tag. If not transforming, transitions to "idle" state with force push enabled.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
- Error states: None
onexit
- Description: Calls SetSleeperAwakeState to restore awake state. Handles resurrection logic: if isresurrection flag is set (touch stone rez), shows HUD, restores camera distance, and serializes user session. If goodsleep flag is set, plays cozy sleep announcement via talker component.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.talker is nil and goodsleep flag is set (unguarded access in Say() call).
onupdate
- Description: Tracks goose stepping animation frames when gooseframe state memory is set. When animation frame reaches 5 or 14 (and differs from stored frame), plays footstep sound and triggers goose step FX. Updates stored frame to current animation frame.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
- Error states: None###
onexit(sleep) - Description: State: sleep. Handles state exit for sleep/resurrection. Wakes the sleeper, shows HUD and restores camera distance on touch stone resurrection, serializes user session, and announces cozy sleep if the sleep was beneficial.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.talker is nil (no nil guard before Say call).
onenter (carvewood)
- Description: Transitions the entity to "idle" state if it has a locomotor component, otherwise transitions to "corpse_idle" state. Used for sleep/resurrection state handling.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
- Error states: None
onexit (singsong)
- Description: Kills singsong sound, stops talk sound if not interrupted, and calls ShutUp on talker component if available.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (unsaddle)
- Description: Stops locomotor, plays unsaddle_pre then unsaddle animation, stores buffered action, and sets 21-frame timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (unsaddle)
- Description: Transitions to idle state after timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (unsaddle)
- Description: Clears buffered action if it matches stored action and playercontroller lastheldaction does not match.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (heavylifting_start)
- Description: Stops locomotor, clears buffered action, plays heavy_pickup_pst animation, and calls RemotePausePrediction on playercontroller if available.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onenter (heavylifting_mount_start)
- Description: Stops locomotor movement, clears buffered action, checks if riding woby mount, plays heavy_mount animation, and calls RemotePausePrediction.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.rider is nil — no nil guards before component access.
onenter (heavylifting_stop)
- Description: Stops locomotor, clears buffered action, plays pickup then pickup_pst animation, calls RemotePausePrediction with 6 stun frames, and sets timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (heavylifting_stop)
- Description: Transitions to idle state after timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (heavylifting_item_hat)
- Description: Stops locomotor, clears buffered action, plays heavy_item_hat then heavy_item_hat_pst animation, calls RemotePausePrediction, and sets 12-frame timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (heavylifting_item_hat)
- Description: Transitions to idle state after timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (heavylifting_drop)
- Description: Stops locomotor, plays heavy_item_hat then heavy_item_hat_pst animation, stores buffered action, and sets 12-frame timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (heavylifting_drop)
- Description: Transitions to idle state after timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (heavylifting_drop)
- Description: Clears buffered action if it matches stored action and playercontroller lastheldaction does not match.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (dostandingaction)
- Description: Stops locomotor, plays give then give_pst animation, stores buffered action, and sets 14-frame timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (dostandingaction)
- Description: Transitions to idle state after timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (dostandingaction)
- Description: Clears buffered action if it matches stored action and playercontroller lastheldaction does not match.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (doequippedaction)
- Description: Stops locomotor, plays give_equipped then give_equipped_pst animation, stores buffered action, and sets 14-frame timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (doequippedaction)
- Description: Transitions to idle state after timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (doequippedaction)
- Description: Clears buffered action if it matches stored action and playercontroller lastheldaction does not match.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (doshortaction)
- Description: Stops locomotor, plays atk_pre/atk animations if beaver tag present otherwise pickup/pickup_pst, stores action and silent flag, sets 10-frame timeout.
- Parameters:
inst-- entity owning the stategraphsilent-- boolean flag to suppress talker output during action
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.talker is nil — no nil guards before component access in timeline callback.
ontimeout (doshortaction)
- Description: Transitions to idle state after timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (doshortaction)
- Description: Clears buffered action if it matches stored action and playercontroller lastheldaction does not match, then calls CheckPocketRummageMem.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (dosilentshortaction)
- Description: Transitions to doshortaction state with silent=true parameter.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (dohungrybuild)
- Description: Checks hunger percent against HUNGRY_THRESH, triggers hungry build talk announcements based on slow/fast build state and timing, then transitions to dolongaction with speed multiplier.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.hunger or inst.components.talker is nil — no nil guards before component access.
onenter (domediumaction)
- Description: Transitions to dolongaction state with 0.5 speed multiplier.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (revivecorpse)
- Description: Plays reviving announcement via talker component, retrieves buffered action target, and transitions to dolongaction state with timeout calculated from revive speed multipliers from both corpsereviver and revivablecorpse components.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.talker is nil (no guard before Say call). Errors if inst.components.corpsereviver or target.components.revivablecorpse accessed without nil checks in multiplier calculation.
onenter (dolongestaction)
- Description: Transitions to dolongaction state with TUNING.LONGEST_ACTION_TIMEOUT as the timeout value.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (use_dumbbell_pre)
- Description: Stops locomotor, performs buffered action, validates dumbbell entity, overrides dumbbell symbol on AnimState, and plays pre-lift animation based on mightiness state (wimpy/normal/mighty). Returns to idle if dumbbell is invalid.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil (no guard before Stop call). Errors if inst.components.dumbbelllifter is nil (accesses .dumbbell property). Errors if inst.components.mightiness accessed without nil guard in some paths.
onexit (use_dumbbell_pre)
- Description: Resumes mightiness draining and stops dumbbell lifting if the dumbbell animation was not completed (checked via statemem.dumbbell_anim_done).
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.mightiness or inst.components.dumbbelllifter is nil (no nil guards before method calls).
onenter (use_dumbbell_loop)
- Description: Plays looping dumbbell animation based on current mightiness state (skinny/normal/mighty variants).
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.mightiness is nil (no guard before GetState call).
onexit (use_dumbbell_loop)
- Description: Stops dumbbell lifting if the animation was not completed.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.dumbbelllifter is nil (no guard before StopLifting call).
onenter (use_dumbbell_pst)
- Description: Stores current mightiness state in statemem, plays post-lift animation variant based on mightiness state (skinny/normal/mighty).
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.mightiness is nil (no guard before GetState call).
onexit (use_dumbbell_pst)
- Description: Stops dumbbell lifting, resumes mightiness draining, and clears the dumbbell symbol override on AnimState.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.dumbbelllifter or inst.components.mightiness is nil (no guards before method calls).
onenter (dolongaction)
- Description: Sets timeout (adds slowaction tag if timeout
>1), stops locomotor, plays build animation loop, starts action meter if action has actionmeter, and pushes startlongaction event to target. Stores action in statemem. - Parameters:
inst-- entity owning the stategraphtimeout-- duration for the long action, defaults to 1 if nil
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil (no guard before Stop call). Errors if inst.bufferedaction.target accessed without validity check before PushEvent.
ontimeout (dolongaction)
- Description: Kills make sound, plays build post animation, stops action meter, removes busy tag, and performs the buffered action.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (dolongaction)
- Description: Kills make sound, stops action meter if active, clears buffered action if it matches statemem.action and playercontroller lastheldaction differs, and checks pocket rummage memory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.playercontroller accessed without nil guard in condition check.
onenter (graveurn_in)
- Description: Stops locomotor and queues useitem_pre, graveurn_in, and useitem_pst animations sequentially.
- Parameters:
inst-- entity owning the stategraphtimeout-- timeout parameter (unused in this state)
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil (no guard before Stop call).
onexit (graveurn_in)
- Description: Clears buffered action if it matches statemem.action and playercontroller lastheldaction differs, and checks pocket rummage memory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.playercontroller accessed without nil guard in condition check.
onenter (graveurn_out)
- Description: Stops locomotor and queues useitem_pre, graveurn_out, and useitem_pst animations sequentially.
- Parameters:
inst-- entity owning the stategraphtimeout-- timeout parameter (unused in this state)
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil (no guard before Stop call).
onexit (graveurn_out)
- Description: Clears buffered action if it matches statemem.action and playercontroller lastheldaction differs, and checks pocket rummage memory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.playercontroller accessed without nil guard in condition check.
onenter (carvewood_boards)
- Description: Transitions immediately to the carvewood state with timeout parameter 1.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (carvewood)
- Description: Stops locomotion, plays carving animations (useitem_pre, carving_pre, carving_loop), adds slowaction tag if timeout
>1, and overrides the lucy axe symbol with skin build if the equipped item has a skin. - Parameters:
inst-- Entity owning the stategraphtimeout-- Optional timeout duration, defaults to 1.5 seconds
- Returns: nil
- Error states: Errors if inst.components.inventory or inst.components.locomotor is nil - no nil guard before accessing FindItem or Stop methods.
ontimeout (carvewood)
- Description: Kills the carve sound, plays useitem_pst animation, removes busy tag, and performs the buffered action.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onexit (carvewood)
- Description: Clears the lucy axe symbol override, kills carve sound, clears buffered action if it matches statemem.action and playercontroller conditions are met, and checks pocket rummage memory.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (dojostleaction)
- Description: Stops locomotion and plays different attack animations based on equipped item type: mount attack (riding), whip, pocketwatch (with shadow variant), jab, lancejab, weapon, light/nopunch items, beaver form, or default punch. Sets timeout based on weapon type cooldown and faces target if valid.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor, inst.components.rider, or inst.components.inventory is nil - no nil guards before accessing these components.
ontimeout (dojostleaction)
- Description: Transitions to idle state with force parameter true.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onexit (dojostleaction)
- Description: Clears predicted facing model if predictedfacing flag is set, and clears buffered action if it matches statemem.action and playercontroller conditions are met.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (doswipeaction)
- Description: Stops locomotion, plays atk_prop animations, and forces entity to face the buffered action target if valid.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil - no nil guard before Stop() call.
onexit (doswipeaction)
- Description: Clears buffered action if it matches statemem.action and playercontroller conditions are met.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (blowdart)(inst)
- Description: Checks if locomotor component exists and transitions to "idle" state, or "corpse_idle" if locomotor is missing.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: None###
ontimeout (dochannelaction) - Description: Performs buffered action; if it fails, plays channel_pst animation and transitions to idle state.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onexit (dochannelaction)
- Description: Clears buffered action if it matches statemem.action and playercontroller conditions are met, and calls CancelTalk_Override.
- Parameters:
inst-- Entity owning the stategraph
- Returns: nil
onenter (finishcontinuousaction)
- Description: Stops locomotor, plays trap-making sound if not already playing, queues build_pre and build_loop animations, stores buffered action target in statemem, and sets 0.5 second timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (finishcontinuousaction)
- Description: Performs buffered action, kills make sound, plays build_pst animation, and transitions to idle state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (finishcontinuousaction)
- Description: Kills make sound and pushes stopcontinuousaction event to stored target if present.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (dodismountaction)
- Description: Stops locomotor and plays dismount animation. Used for heavy pickup while mounted.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onexit (dodismountaction)
- Description: Calls ActualDismount on rider component if keepmount flag is not set in statemem.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.rider is nil — no nil guard before ActualDismount() call.
onenter (makeballoon)
- Description: Stores buffered action, sets timeout, stops locomotor, plays balloon make and blowup sounds, and queues build_pre then build_loop animations.
- Parameters:
inst-- entity owning the stategraphtimeout-- optional timeout value, defaults to 1
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (makeballoon)
- Description: Kills make sound, plays build_pst animation, removes busy tag, and performs buffered action.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (makeballoon)
- Description: Kills make sound, clears buffered action if it matches statemem action and playercontroller lastheldaction differs, then checks pocket rummage memory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (dostorytelling)
- Description: Stores buffered action, stops locomotor, performs buffered action. If failed, marks not_interrupted and goes to idle. If mime tag present, sets mime flag and plays mime13 animation. Otherwise plays idle_walter_storytelling_pre animation.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onexit (dostorytelling)
- Description: Clears buffered action if it matches statemem action and playercontroller lastheldaction differs. If not_interrupted flag is false, stops talk sound and calls ShutUp on talker component if present.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (dostorytelling_loop)
- Description: Stops locomotor. If mime is true, sets mime flag and calls DoMimeAnimations. Else if skilltreeupdater has walter_camp_fire activated, plays storytelling animations based on current state. Otherwise plays random storytelling animation variant.
- Parameters:
inst-- entity owning the stategraphmime-- boolean indicating mime mode
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call. Errors if inst.components.skilltreeupdater:IsActivated is called without nil guard.
onexit (dostorytelling_loop)
- Description: If not_interrupted flag is false, stops talk sound and calls ShutUp on talker component if present.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (shave)
- Description: Stops locomotor. Validates shave action by checking bufferedaction invobject has shaver component, then checks target/doer for beard or shaveable component and calls ShouldTryToShave or CanShave. If validation fails, pushes actionfailed event, clears buffered action, and goes to idle. Otherwise plays shave sound and queues build animations with 1 second timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
ontimeout (shave)
- Description: Performs buffered action, plays build_pst animation, and transitions to idle state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onexit (shave)
- Description: Kills shave sound.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (enter_onemanband)(inst, pushanim)
- Description: Stops locomotor. Plays or pushes idle_onemanband1_pre animation based on pushanim flag. If animation is current, plays onemanband sound and sets soundplayed flag.
- Parameters:
inst-- entity owning the stategraphpushanim-- boolean to push animation instead of play
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onupdate (enter_onemanband)(inst)
- Description: If sound not yet played and current animation is idle_onemanband1_pre, plays onemanband sound and sets soundplayed flag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (play_onemanband)(inst)
- Description: Stops locomotor, plays idle_onemanband1_loop animation, and plays onemanband sound.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil — no nil guard before Stop() call.
onenter (idle_onemanband)(inst)
- Description: Stops locomotion, plays one-man-band idle animation sequence (pst, pre, loop, pst), and plays the onemanband sound effect.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil (no guard before Stop() call).
onenter (play_flute)(inst)
- Description: Stops locomotion, plays flute animation sequence, handles instrument assets via HandleInstrumentAssets, and returns the active action item to inventory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.inventory is nil (no guards before method calls).
onexit (play_flute)(inst)
- Description: Kills the flute sound and clears the pan_flute01 symbol override from the animation state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (play_horn)(inst)
- Description: Stops locomotion, plays horn animation sequence, handles instrument assets via HandleInstrumentAssets, and returns the active action item to inventory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.inventory is nil (no guards before method calls).
onexit (play_horn)(inst)
- Description: Clears the horn01 symbol override from the animation state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (play_bell)(inst)
- Description: Stops locomotion, plays bell animation sequence, handles instrument assets via HandleInstrumentAssets, and returns the active action item to inventory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.inventory is nil (no guards before method calls).
onexit (play_bell)(inst)
- Description: Clears the bell01 symbol override from the animation state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (play_whistle)(inst)
- Description: Stops locomotion, plays whistle animation sequence, handles hound whistle instrument assets, and returns the active action item to inventory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.inventory is nil (no guards before method calls).
onexit (play_whistle)(inst)
- Description: Clears the hound_whistle01 symbol override from the animation state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (coach)(inst)
- Description: Makes the entity say the ANNOUNCE_COACH string, plays the coach animation, triggers talk sound, and clears the queuetalk_timeout memory.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.talker is nil (no guard before Say() call).
onexit (coach)(inst)
- Description: Calls StopTalkSound to end the talking sound effect.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (play_gnarwail_horn)(inst)
- Description: Stops locomotion, plays hornblow animation sequence (pre then main).
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil (no guard before Stop() call).
onenter (use_beef_bell)(inst)
- Description: Stops locomotion, plays cowbell animation sequence, retrieves the buffered action item, sets the sound memory, and overrides the cbell symbol based on item skin or default build.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.inventory is nil (no guards before method calls).
onexit (use_beef_bell)(inst)
- Description: Clears the cbell symbol override from the animation state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (summon_abigail)(inst)
- Description: Stops locomotion, plays summon animation, overrides flower skin symbol if buffered action exists, and stores action in state memory.
- Parameters:
inst-- The entity instance owning the stategraph.
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.AnimState is nil.
onexit (summon_abigail)(inst)
- Description: Clears flower symbol override, removes spawned fx prefab, and clears buffered action if it matches state memory and playercontroller conditions.
- Parameters:
inst-- The entity instance owning the stategraph.
- Returns: nil
- Error states: Errors if inst.AnimState is nil.
onenter (unsummon_abigail)(inst)
- Description: Stops locomotion, plays recall animation, overrides flower skin symbol, stores action, and triggers talker say event.
- Parameters:
inst-- The entity instance owning the stategraph.
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.talker is nil.
onexit (unsummon_abigail)(inst)
- Description: Removes spawned fx prefab, clears flower symbol override, and clears buffered action if conditions match.
- Parameters:
inst-- The entity instance owning the stategraph.
- Returns: nil
onenter (commune_with_abigail)(inst)
- Description: Stops locomotion, plays commune animation, plays whisper sound, overrides flower skin symbol, and stores action.
- Parameters:
inst-- The entity instance owning the stategraph.
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.SoundEmitter is nil.
onexit (commune_with_abigail)(inst)
- Description: Kills whisper sound, clears flower symbol override, and clears buffered action if conditions match.
- Parameters:
inst-- The entity instance owning the stategraph.
- Returns: nil
onenter (play_strum)(inst)
- Description: Stops locomotion, plays strum animation, and overrides trident symbol.
- Parameters:
inst-- The entity instance owning the stategraph.
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.AnimState is nil.
onenter (channel_longaction)(inst, channelitem)
- Description: Stops locomotion, plays give animation, stores channelitem in state memory or derives from buffered action and performs action.
- Parameters:
inst-- The entity instance owning the stategraph.channelitem-- Optional target entity for channeling.
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil.
onexit (channel_longaction)(inst)
- Description: Pushes channel_finished event on channelitem if channeling was not active.
- Parameters:
inst-- The entity instance owning the stategraph.
- Returns: nil
onenter (book_repeatcast)(inst)
- Description: Transitions immediately to book state with repeatcast flag enabled.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
onenter (book)(inst, repeatcast)
- Description: Stops locomotion, plays pre-animation, returns active action item, spawns target FX or book FX, and transitions to book2 if repeatcast.
- Parameters:
inst-- Entity instance owning the stategraphrepeatcast-- Boolean flag indicating if this is a repeat cast
- Returns: nil
- Error states: Errors if inst.components.inventory or inst.bufferedaction is nil.
onexit (book)(inst)
- Description: Removes book FX and target FX if the action was interrupted.
- Parameters:
inst-- Entity instance owning the stategraph
- Returns: nil
onenter (book_peruse)(inst)
- Description: Stops locomotion, plays book peruse animations, and overrides book symbols based on skin or swap_build. Stores symbol override state in statemem for cleanup on exit.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.inventory or inst.components.locomotor is nil — no nil guard before component access.
onexit (book_peruse)(inst)
- Description: Restores book_peruse symbol override to default if symbolsoverridden flag is set in statemem.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (blowdart)(inst)
- Description: Checks combat cooldown, sets combat target, starts attack, stops locomotion, plays dart animation. Handles chained attacks by setting frame offset. Sets timeout based on chained state and min_attack_period. Faces target if valid. Calculates projectiledelay for projectile weapons.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.combat, inst.components.inventory, or inst.components.locomotor is nil — no nil guard before component access.
onupdate (blowdart)(inst, dt)
- Description: Decrements projectiledelay counter each frame. When delay reaches zero or below, performs buffered action and removes abouttoattack tag.
- Parameters:
inst-- entity owning the stategraphdt-- delta time since last update
- Returns: nil
ontimeout (blowdart)(inst)
- Description: Removes attack state tag and adds idle state tag to transition state.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (run)(inst)
- Description: Transitions the stategraph to "idle" if the entity has a locomotor component, otherwise transitions to "corpse_idle" for entities without locomotion capability.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: None
onenter (throw_keep_equip)(inst)
- Description: Stops locomotion, plays throw animation, faces the action point, and temporarily equips the throw object if it is a valid hands-slot equippable that is not restricted.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (throw)(inst)
- Description: Checks combat cooldown, clears buffered action and returns to idle if on cooldown. Otherwise sets combat target, starts attack, stops locomotion, plays throw animation, sets timeout based on min_attack_period, and faces the target if valid.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.combat is nil — no nil guard before combat method calls.
ontimeout (catch_pre)(inst)
- Description: Transitions to idle state when timeout expires, if entity does not have transform state tag.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: None
onexit (throw)(inst)
- Description: Handles state exit: wakes sleeper, processes resurrection (shows HUD, sets camera, serializes session) if isresurrection flag set, and announces cozy sleep if goodsleep flag set.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (catch_pre)(inst)
- Description: Stops locomotion, plays catch_pre animation, and sets a 3-second timeout.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
ontimeout (catch_pre)(inst)
- Description: Clears buffered action and transitions to idle state when catch_pre times out.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (catch)(inst)
- Description: Stops locomotion, plays catch animation, plays boomerang catch sound, and pauses prediction via playercontroller if available.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (attack_pillow_pre)(inst)
- Description: Stops locomotion, plays pillow attack pre-animation, pushes hold animation loop, faces buffered action target if valid, and sets timeout based on pillow lag length or 1.0 second default.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.components.inventory is nil - no nil guards present
ontimeout (attack_pillow_pre)(inst)
- Description: Transitions to attack_pillow state when pre-attack timeout expires.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
onenter (attack_pillow)(inst)
- Description: Stops locomotion, plays pillow attack animation, plays whoosh sound, and pauses prediction if playercontroller component exists.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil - no nil guard present
onenter (attack_prop_pre)(inst)
- Description: Stops locomotion, plays prop attack pre-animation, and faces buffered action target if valid.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil - no nil guard present
onenter (attack_prop)(inst)
- Description: Stops locomotion, plays prop attack animation, plays whoosh sound, and pauses prediction if playercontroller component exists.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor is nil - no nil guard present
onenter (run)(inst)
- Description: Configures run state, determines animation based on transformation state (teeter becomes teeter_loop, run/run_woby become loop variants), adds teetering state tag if applicable, plays looping animation, and sets timeout based on animation length.
- Parameters:
inst-- entity owning the stategraph
- Returns: nil
- Error states: Errors if inst.components.locomotor or inst.AnimState is nil - no nil guard before method access.
Events & listeners
Listens to:
onremove— Listened on targetfx entity in OnRemoveCleanupTargetFX to cleanup FX on removallocomote— Triggered when movement state changesblocked— Triggered when movement is blockedcoach— Triggered by coach interactionattacked— Triggered when entity takes damagesnared— Triggered when entity is snaredstartled— Triggered when entity is startledrepelled— Triggered when entity is repelledknockback— Handles knockback reactions, checking for wereplayer, shielding, parrying, or heavy armor to determine state transition.souloverload— Triggers talk announcement and hit state on soul overload if not dead, sleeping, drowning, or falling.mindcontrolled— Transitions to mindcontrolled state if not busy or dead.devoured— Transitions to devoured state if not dead and attacker is valid.suspended— Transitions to suspended state if not dead, riding, and attacker is valid and alive.feetslipped— Transitions to slip state if running and not noslip.set_heading— Sets steering memory and transitions to steer_boat_turning state if not busy, dead, or turning wheel.consumehealthcost— Transitions to hit state on health cost consumption if not crafting-interrupted or dead.equip— Handles equipment changes, triggering heavy lifting, mount, catch, or item states based on slot and tags.unequip— Handles unequipment, triggering heavy lifting stop or item states based on slot and tags.death— Wakes up sleeping bag if active, then transitions to corpse or death state based on cause and revival status.ontalk— Triggers acting, talk, mime, or closeinspect states based on acting status, tags, and talk parameters.silentcloseinspect— Transitions to closeinspect state if idle and not talking, riding, lifting, or channeling.powerup_wurt— Transitions to powerup_wurt state if not dead.powerdown_wurt— Transitions to powerdown_wurt state if not dead.powerup— Stops dumbbell lifting if active and transitions to powerup state if not dead.powerdown— Transitions to powerdown state if not dead.wx78_spark— Transitions to hit state if not nointerrupt or floating.becomeyounger_wanda— Transitions to becomeyounger_wanda state if idle.becomeolder_wanda— Transitions to becomeolder_wanda state if idle.onsink— Transitions to sink or sink_fast state if not dead, drowning, floating, and drownable check passes.onfallinvoid— Transitions to weregoose_takeoff or abyss_fall state if not dead, falling, and fall-in-void check passes.transform_wereplayer— Transitions to transform_wereplayer state if not transforming, wereplayer, and wereness percent is greater than 0.transform_person— Transitions to transform mode person state if not transforming and is wereplayer.toolbroke— Transitions to toolbroke state if not nointerrupt.armorbroke— Transitions to armorbroke state if not nointerrupt tagfishingcancel— Transitions to fishing_pst state if fishing and not busyknockedout— Handles knockout state transitions, queues post-land state if jumpingyawn— Transitions to yawn state if not dead, sleeping, frozen, or pinnedemote— Transitions to emote state with multiple conditions for mount, transformation, and ownership validationpinned— Transitions to pinned_pre state if pinnable, or calls Unstick if already stuckfreeze— Transitions to frozen state if not deadwonteatfood— Transitions to refuseeat state if not dead and not floatingms_opengift— Transitions to opengift state if not busydismount— Transitions to dismount state if riding and not dismountingbucked— Transitions to falloff or bucked state based on gentle flag if ridingfeedmount— Transitions to mount_eat state if eater matches current mountoceanfishing_stoppedfishing— Handles ocean fishing stop with different states based on reason (linesnapped, toofaraway, linetooloose, badcast, gotaway)spooked— Transitions to spooked state if not busy, dead, riding, or wearing spook protection (Hallowed Nights)feastinterrupted— Transitions to idle state if feasting (Winter's Feast)singsong— Transitions to singsong state if not dead and not busyyotb_learnblueprint— Transitions to research state if not deadhideandseek_start— Transitions to hideandseek_counting state with multiple conditions for busy, sleeping, lifting, riding, and transformation tagsperform_do_next_line— Handles acting states (mime, idle, action, talk) based on tags and dataacting— Handles bow or curtsy acting if not deadstartstageacting— Transitions to acting_idle state if not deadmonkeycursehit— Handles curse receiving or removal with hit or hit_spike state transitionspillowfight_ended— Transitions to happy or angry emote based on win/loss resultms_closeportablestorage— Calls ClosePocketRummageMem for the storage itemwoby_showrack— Transitions to woby_rack_appear state if idle and ridingrecoil_off— Returns to stored recoilstate with target datapredict_gallop_trip— Triggered when gallop stick trip prediction is needed for network reconciliationanimover— Multiple states listen for animation completion to transition to idle or next stateanimqueueover— Triggers transition to idle when animation queue is done (electrocute state)stormlevel— Transitions to idle state when sandstorm level changes below threshold and not ignoring sandstormmiasmalevel— Transitions to idle state when miasma level changes below threshold and not ignoring sandstormstopchannelcast— Ends channel casting animation and returns to idle when not actively channel castingstartteetering— Triggers idle state when teetering begins if not already teetering and not ignoring sandstormstopteetering— Plays teeter post animation and returns to idle when teetering stopsdonetalking— Handles talk completion during bow state via OnDoneTalking_Override handlercombat_parry— Sets up parry state when parry event fires during parry_prefishingnibble— Transitions to fishing_nibble state when fish nibbles (fishing).fishingstrain— Transitions to fishing_strain state when fish strains (fishing_nibble).fishingcatch— Transitions to catchfish state with build data when fish is caught (fishing_strain).fishingloserod— Transitions to loserod state when rod is lost (fishing_strain).queue_post_eat_state— Queues a post-eat state transition and optionally adds nointerrupt tag (eat).firedamage— Interrupts gift/wardrobe states on fire damagems_doneopengift— Validates wardrobe transition after gift openingms_closepopup— Closes cookbook or plant registry popup based on datams_endpumpkincarving— Ends pumpkin carving state and transitions to idlems_endsnowmandecorating— Ends snowman decorating state and transitions to idle.ms_endplayingbalatro— Ends Balatro playing state and transitions to idle.ms_slingshotmodsclosed— Closes slingshot mods state if moddingslingshot tag is present.stopliftingdumbbell— Triggers queue_stop flag or immediate idle transition during dumbbell lifting statesinterruptcontinuousaction— Triggers in finishcontinuousaction state to kill sound, play build_pst, and go to idle if target matches statemem targetcatch— Transitions from catch_pre to catch state when catch event fires.cancelcatch— Clears buffered action and returns to idle when catch is cancelled.gogglevision— Triggers state transitions based on goggle vision enabled/disabled statecarefulwalking— Triggers state transitions based on careful walking togglestopfurling— Triggers sail furling stop statejoust_collide— Triggers joust collision stateon_washed_ashore— Triggers washed ashore state after drowningspitout— Handles being spat out after being devoured or suspendedabouttospit— Handles about to be spit event during suspended stateonthaw— Triggers thaw state when frozen entity begins thawingunfreeze— Triggers hit state when frozen entity is unfrozenonunpin— Triggers breakfree state when unpinnedbecomeunsittable— Triggers jumpoff state when chair becomes unsittablepushable_targetswap— Updates target reference during pushing walkms_enterbathingpool— Triggers soakin_jump state when entering bathing poolms_leavebathingpool— Triggers soakin_jumpout state when leaving bathing poolms_overridelocomote_click— Handles locomote click override during soakingunplugmodule— Triggers unplug_module state for WX78 module removalsocketholder_unsocket— Triggers unplug_module state for socket unsocketingstopinspectingmodule— Triggers stop states for WX78 module inspectionnewactiveitem— Triggers state transitions when active item changescontroller_removing_module— Triggers removing_module state from controller inputcontroller_plugging_module— Triggers plugging_module state from controller inputmagicianstopped— Triggers idle state when magician tool use stops unexpectedlyperformaction— Handles perform action events during various statesattackbutton— Handles attack button press during drone controlchargingreticulecancelled— Triggers idle state when charging reticule is cancelledchargingreticulereleased— Triggers slingshot_special2 state when charging reticule is releasedbegin_retrieving— Triggers cast_net_retrieving statebegin_final_pickup— Triggers cast_net_release statenewfishingtarget— Handles new fishing target acquisitionstop_steering_boat— Triggers idle state when boat steering stopsplayerstopturning— Triggers steer_boat_turning_pst statestopraisinganchor— Triggers idle state when anchor raising stopscometo— Triggers wakeup state during knockoutvault_teleport— Triggers vault_teleport state during channelingactionfailed— Handles action failure during various statescancelhop— Triggers hop_cancelhop stateonhop— Triggers float_hop_pre statefeasterfinished— Pushed when winter's feast eating finishesdancingplayer— Pushed to world when player starts dancingdancingplayerdata— Pushed to world with dance animation datasoulhop— Pushed during Wortox soul hoponwarpback— Pushed after Wanda pocketwatch warpback completesplayersuspended— Pushed to attacker when player is suspendedsuspendedplayerdied— Pushed to attacker when suspended player diesknockbackdropped— Pushed when item is dropped during knockbacksuperjumpstarted— Pushed to weapon when superjump startssuperjumpcancelled— Pushed to weapon when superjump is cancelleddropallaggro— Pushed during superjump to drop aggrostartghostbuildinstate— Pushed when ghost build starts in rebirth statestopghostbuildinstate— Pushed when ghost build stops in rebirth stateinvincibletoggle— Pushed when health invincibility togglesmoisturedelta— Pushed when moisture changesencumberedwalking— Pushed during heavy lifting walk cyclegotosleep— Pushed when entity goes to sleepdismounted— Pushed when entity dismountsbecomesittable— Pushed when chair becomes sittablestartlongaction— Pushed to anchor target when raising startsstopconstruction— Triggers idle state when construction stopsstopchanneling— Handles channeling stopteleportato_teleport— Used for teleportato teleportation statems_playerdespawnandmigrate— Pushed to world for shard migrationms_sync_chair_rocking— Pushed to chair for rocking chair syncondash_woby— Pushed to mount during Woby dashcaptured— Pushed to target when captured by pounce or divegrab
Pushes:
ms_closepopups— Pushed in SetSleeperSleepState when entity goes to sleepattacked— Pushed to collision target in TryGallopCollideUpdate with attacker and 0 damageknockback— PushedImmediate to collision target in TryGallopCollideUpdate with knocker, forcelanded, radius, and strengthmultwonteatfood— Pushed when eater/souleater component rejects food in ACTIONS.EAT handler.feasterstarted— Pushed to TheWorld when WINTERSFEAST_FEAST action is performed and inst does not have 'feasting' state tagmakeplayerghost— Pushed when ghostenabled is true and player should become a ghost, includes skeleton flagplayerdied— Pushed when player dies without ghost enabled, includes skeleton flagstartlongaction— Pushed to buffered action target when dolongaction state beginsstartcontinuousaction— Pushed to target entity in startcontinuousaction onenter when buffered action has valid targetactionfailed— Pushed in shave state onenter when shave validation fails, includes action and reasonstopcontinuousaction— Pushed to target entity in finishcontinuousaction, dostorytelling, and dostorytelling_loop onexit handlersfail_fx— Pushed on book_fx entity when buffered action fails in book casting statepropsmashed— Pushed to prop entity onexit with smash position dataperformaction— Pushed when action needs to be performed or re-performedfeasterfinished— Pushed when winter's feast eating finishesdancingplayer— Pushed to world when player starts dancingdancingplayerdata— Pushed to world with dance animation datasoulhop— Pushed during Wortox soul hoponwarpback— Pushed after Wanda pocketwatch warpback completesonsink— Pushed to mount when player sinksplayersuspended— Pushed to attacker when player is suspendedsuspendedplayerdied— Pushed to attacker when suspended player diesknockbackdropped— Pushed when item is dropped during knockbacksuperjumpstarted— Pushed to weapon when superjump startssuperjumpcancelled— Pushed to weapon when superjump is cancelleddropallaggro— Pushed during superjump to drop aggrostartghostbuildinstate— Pushed when ghost build starts in rebirth statestopghostbuildinstate— Pushed when ghost build stops in rebirth stateinvincibletoggle— Pushed when health invincibility togglesmoisturedelta— Pushed when moisture changesencumberedwalking— Pushed during heavy lifting walk cyclegotosleep— Pushed when entity goes to sleepunfreeze— Pushed when entity is unfrozenonunpin— Pushed when entity is unpinneddismounted— Pushed when entity dismountsbecomesittable— Pushed when chair becomes sittablebecomeunsittable— Pushed when chair becomes unsittablestopconstruction— Pushed when construction stopsms_sync_chair_rocking— Pushed to chair for rocking chair syncondash_woby— Pushed to mount during Woby dashcaptured— Pushed to target when captured by pounce or divegrablocomote— Pushed for locomotion eventsstarttravelsound— Pushed to teleporter target when travel sound should startfeetslipped— Pushed when slippery feet threshold is metcolourtweener_start— Pushed when colour tween startscolourtweener_end— Pushed when colour tween endsstopfurling— Pushed when sail furling stopsjoust_collide— Pushed when joust collision occursontalk— Pushed when talking startsdonetalking— Pushed when talking completesanimqueueover— Pushed when animation queue completesonburnt— Listened to during sail furling for burnt maston_washed_ashore— Pushed when washed ashore after drowning