Skip to main content

Player Classified

Based on game build 722832 | Last updated: 2026-04-22

Overview

player_classified is a hidden networked entity attached to each player that serves as the authoritative source for client-side HUD and gameplay state synchronization. It contains net variables for health, hunger, sanity, temperature, crafting, camera, and numerous other player systems. The prefab operates differently on server versus client: on the server it exposes interface functions for modifying state, while on the client it listens to dirty events and pushes updates to the parent player entity for HUD rendering and feedback.

This classified entity is never directly spawned by modders — it is automatically created and attached to player entities during player initialization. Modders interact with it indirectly through the parent player's components or by listening to events pushed from this classified data.

Usage example

-- Access classified data from a player entity (server-side)
local player = ThePlayer
local classified = player.player_classified

-- Modify player state through classified interface
classified:SetGhostMode(true)
classified:ShowHUD(false)
classified:SetTemperature(25)

-- Listen to events pushed from classified (on player entity)
player:ListenForEvent("healthdelta", function(inst, data)
print("Health changed from "..data.oldpercent.." to "..data.newpercent)
end)

-- Access net variable values (read-only on client)
local currentHealth = classified.currenthealth:value()
local isCraftingEnabled = classified.iscraftingenabled:value()

Dependencies & tags

External dependencies:

  • techtree -- technology tree definitions for crafting progression
  • prefabs/battlesongdefs -- battle song definitions for inspiration system

Components used:

  • playercontroller -- placement cancellation, pause prediction frames
  • playervision -- ghost vision toggling
  • playerspeedmult -- run speed calculation on dirty events
  • combat -- attacked pulse events, danger detection
  • health -- health percentage and fire damage state
  • hunger -- hunger percentage and starving state
  • sanity -- sanity percentage and insanity mode
  • builder -- recipe unlocking, tech tree levels, crafting limits
  • rider -- mount hurt state, run speed on mount
  • locomotor -- external velocity vector, strafing state

Tags:

  • CLASSIFIED -- added to the classified entity itself for identification

Properties

PropertyTypeDefault ValueDescription
currenthealthnet_ushortint100Current health value (networked)
maxhealthnet_ushortint100Maximum health value (networked)
healthpenaltynet_byte0Health penalty modifier
istakingfiredamagenet_boolfalseWhether player is taking fire damage
istakingfiredamagelownet_boolfalseWhether fire damage is low intensity
issleephealingnet_boolfalseWhether player is healing while sleeping
ishealthpulseupnet_boolfalseHealth pulse up indicator for HUD
ishealthpulsedownnet_boolfalseHealth pulse down indicator for HUD
lunarburnflagsnet_tinybyte0Lunar burn effect flags
currenthungernet_ushortint100Current hunger value (networked)
maxhungernet_ushortint100Maximum hunger value (networked)
ishungerpulseupnet_boolfalseHunger pulse up indicator for HUD
ishungerpulsedownnet_boolfalseHunger pulse down indicator for HUD
currentsanitynet_ushortint100Current sanity value (networked)
maxsanitynet_ushortint100Maximum sanity value (networked)
sanitypenaltynet_byte0Sanity penalty modifier
sanityratescalenet_tinybyte0Sanity rate scale modifier
issanitypulseupnet_boolfalseSanity pulse up indicator for HUD
issanitypulsedownnet_boolfalseSanity pulse down indicator for HUD
issanityghostdrainnet_boolfalseWhether ghost sanity drain is active
currentwerenessnet_byte0Current wereness transformation percentage
iswerenesspulseupnet_boolfalseWereness pulse up indicator
iswerenesspulsedownnet_boolfalseWereness pulse down indicator
werenessdrainratenet_smallbyte0Wereness drain rate
currentinspirationnet_byte0Current inspiration percentage
inspirationdrainingnet_boolfalseWhether inspiration is currently draining
inspirationsongstable{}Array of 3 net_tinybyte for battle song slots
hasinspirationbuffnet_boolfalseWhether inspiration buff is active
inmightygymnet_tinybyte0Mighty gym occupancy state (0 = not in gym, 1-8 = weight level)
currentmightinessnet_byte0Current mightiness percentage
mightinessratescalenet_tinybyte0Mightiness rate scale modifier
freesoulhopsnet_tinybyte0Wortox free soulhop counter
wortox_panflute_buffnet_boolfalseWortox panflute buff active state
inspectacles_gamenet_tinybyte0Winona inspectacles game ID
inspectacles_posxnet_shortint0Winona inspectacles game X position
inspectacles_posznet_shortint0Winona inspectacles game Z position
roseglasses_cooldownnet_boolfalseWinona rose glasses cooldown state
oldager_yearpercentnet_float0Oldager year percentage
oldager_ratenet_smallbyte0Oldager aging rate (use GetOldagerRate/SetOldagerRate)
currenttemperaturedatanet_bytepivotEncoded temperature value
currenttemperaturenumberTUNING.STARTING_TEMPDecoded temperature (client-side only)
moisturenet_ushortint0Current moisture value
maxmoisturenet_ushortint100Maximum moisture value
moistureratescalenet_tinybyte0Moisture rate scale modifier
stormlevelnet_tinybyte0Storm watcher storm level (0-7)
stormtypenet_tinybyte0Storm watcher storm type
isinmiasmanet_boolfalseWhether player is in miasma
isacidsizzlingnet_boolfalseWhether acid rain is affecting player
pausepredictionframesnet_tinybyte0Frames to pause movement prediction
iscontrollerenablednet_booltrueWhether player controller is enabled
voteselectionnet_tinybyte0Player voter selection
votesquelchednet_boolfalseWhether player votes are squelched
ishudvisiblenet_booltrueWhether HUD is visible
ismapcontrolsvisiblenet_booltrueWhether map controls are visible
isactionsvisiblenet_booltrueWhether action hints are visible
cameradistancenet_smallbyte0Camera distance setting
iscamerazoomednet_boolfalseWhether camera is zoomed
cameraextramaxdistnet_smallbyte0Extra maximum camera distance
camerasnapnet_boolfalseTrigger camera snap
camerashakemodenet_tinybyte0Camera shake mode
camerashaketimenet_byte0Camera shake duration
camerashakespeednet_byte0Camera shake speed
camerashakescalenet_byte0Camera shake scale
isaerialcameranet_boolfalseWhether aerial camera mode is active
minimapcenternet_boolfalseTrigger minimap center
minimapclosenet_boolfalseTrigger minimap close
isfadeinnet_booltrueWhether fade is fade-in or fade-out
fadetimenet_smallbyte0Fade duration (0-31 = black, 32+ = white)
screenflashnet_tinybyte0Screen flash intensity
wormholetraveleventnet_tinybyte0Wormhole travel type event
houndwarningeventnet_smallbyte0Hound warning level event
craftedextraelixireventnet_smallbyte0Crafted extra elixir count
techtreestableTECH.NONETechnology tree levels
techtrees_no_temptable{}Technology tree levels without temp bonus
ingredientmodnet_tinybyteINGREDIENT_MOD[1]Current ingredient modifier
isfreebuildmodenet_boolfalseWhether free build mode is active
current_prototypernet_entitynilCurrent prototyper entity
recipestable{}Unlocked recipe net_bool entries
bufferedbuildstable{}Buffered build net_bool entries
craftinglimit_recipetable{}Crafting station limited recipes
craftinglimit_amounttable{}Crafting station limited amounts
lastcombattargetnet_entitynilLast combat target entity
canattacknet_booltrueWhether player can attack
minattackperiodnet_float4Minimum attack period
isattackedbydangernet_boolfalseWhether attacked by dangerous entity
isattackredirectednet_boolfalseWhether attack was redirected
ridermountnet_entitynilCurrent mount entity
ridersaddlenet_entitynilCurrent saddle entity
isridermounthurtnet_boolfalseWhether mount is hurt
riderrunspeednet_floatTUNING.BEEFALO_RUN_SPEED.DEFAULTRun speed on mount
riderfasteronroadnet_boolfalseWhether faster on road while mounted
touchstonetrackerusednet_smallbytearray{}Used touchstone tracker
isperformactionsuccessnet_boolfalseWhether last action succeeded
isghostmodenet_boolfalseWhether ghost mode is active
actionmeternet_byte0Action meter state
actionmetertimenet_byte0Action meter time
currentstatenet_hash""Current stategraph state
isoverrideattacknet_boolfalseWhether attack is overridden
runspeednet_floatTUNING.WILSON_RUN_SPEEDBase run speed
externalspeedmultipliernet_float1External speed multiplier
externalvelocityvectorxnet_float0External velocity X component
externalvelocityvectorznet_float0External velocity Z component
busyremoteoverridelocomotenet_boolfalseWASD remote override active
busyremoteoverridelocomoteclicknet_boolfalseLeft click remote override active
isstrafingnet_boolfalseWhether player is strafing
psm_basespeednet_floatTUNING.WILSON_RUN_SPEEDPlayerSpeedMult base speed
psm_servermultnet_float1PlayerSpeedMult server multiplier
psm_cappedservermultnet_float1PlayerSpeedMult capped server multiplier
iscarefulwalkingnet_boolfalseWhether careful walking is active
cannonnet_entitynilBoat cannon user cannon entity
ischannelcastingnet_boolfalseWhether channel casting is active
ischannelcastingitemnet_boolfalseWhether channel casting item is active
bathingpoolnet_entitynilOccupying bathing pool entity
playinghorseshoesoundsnet_boolfalseWhether playing horseshoe sounds
isdeathbypknet_boolfalseWhether death was by PK
deathcausenet_string""Death cause string
hasyotbskinnet_boolfalseWhether YOTB skin is active
hasgiftnet_boolfalseWhether gift is received
hasgiftmachinenet_boolfalseWhether gift machine is active

Main functions

SetValue(inst, name, value)

  • Description: Sets a net variable value with range validation (0-65535). Used internally for server-side state modification.
  • Parameters:
    • inst -- classified entity instance
    • name -- string name of the net variable
    • value -- number value to set (must be 0-65535)
  • Returns: None
  • Error states: Errors if value is outside 0-65535 range (assert failure).

SetDirty(netvar, val)

  • Description: Forces a net variable to be dirty regardless of whether the value changed. Used to trigger client-side events without actual state change.
  • Parameters:
    • netvar -- net variable instance
    • val -- value to set
  • Returns: None

PushPausePredictionFrames(inst, frames)

  • Description: Forces pause prediction frames netvar to be dirty to trigger client-side movement prediction cancellation event.
  • Parameters:
    • inst -- classified entity instance
    • frames -- number of frames to pause prediction
  • Returns: None

SetTemperature(inst, temperature)

  • Description: Encodes and sets temperature value using precision/coarse encoding scheme for network efficiency.
  • Parameters:
    • inst -- classified entity instance
    • temperature -- number temperature value
  • Returns: None

SetOldagerRate(inst, dps)

  • Description: Sets the oldager aging rate. Value is encoded as signed value in unsigned net_var (adds 30 offset).
  • Parameters:
    • inst -- classified entity instance
    • dps -- number deaths per second rate (must be -30 to 30)
  • Returns: None
  • Error states: Errors if dps is outside -30 to 30 range (assert failure).

GetOldagerRate(inst)

  • Description: Gets the decoded oldager aging rate (subtracts 30 offset from stored value).
  • Parameters: inst -- classified entity instance
  • Returns: Number aging rate in dps

SetUsedTouchStones(inst, used)

  • Description: Sets the touchstone tracker used array.
  • Parameters:
    • inst -- classified entity instance
    • used -- table/array of used touchstone data
  • Returns: None

SetGhostMode(inst, isghostmode)

  • Description: Sets ghost mode state and immediately triggers the dirty handler (server override to avoid HUD flicker).
  • Parameters:
    • inst -- classified entity instance
    • isghostmode -- boolean ghost mode state
  • Returns: None

ShowActions(inst, show)

  • Description: Sets whether action hints are visible.
  • Parameters:
    • inst -- classified entity instance
    • show -- boolean visibility state
  • Returns: None

ShowCrafting(inst, show)

  • Description: Sets whether crafting is enabled and triggers the dirty handler immediately.
  • Parameters:
    • inst -- classified entity instance
    • show -- boolean enabled state
  • Returns: None

ShowHUD(inst, show)

  • Description: Sets HUD visibility and triggers the dirty handler immediately.
  • Parameters:
    • inst -- classified entity instance
    • show -- boolean visibility state
  • Returns: None

EnableMapControls(inst, enable)

  • Description: Sets map controls visibility and triggers the dirty handler immediately.
  • Parameters:
    • inst -- classified entity instance
    • enable -- boolean enabled state
  • Returns: None

SetBathingPoolCamera(inst, target)

  • Description: Sets the bathing pool camera focus target and updates focal point.
  • Parameters:
    • inst -- classified entity instance
    • target -- entity to focus camera on
  • Returns: None

OnEntityReplicated(inst)

  • Description: Client-side initialization function called when entity is replicated. Attaches classified to parent and registers component classified attachments.
  • Parameters: inst -- classified entity instance
  • Returns: None
  • Error states: Prints error if inst._parent is nil after GetParent() call.

BufferBuild(inst, recipename)

  • Description: Client-side function to buffer a build request. Removes ingredients, sends RPC to server, and triggers crafting refresh.
  • Parameters:
    • inst -- classified entity instance
    • recipename -- string recipe name to buffer
  • Returns: None

RefreshCrafting(inst)

  • Description: Triggers a crafting refresh event on the parent player entity.
  • Parameters: inst -- classified entity instance
  • Returns: None

FinishSeamlessPlayerSwap(parent)

  • Description: Re-initializes dirty states after seamless player swap completes. Removes its own event listener after execution.
  • Parameters: parent -- parent player entity
  • Returns: None

Events & listeners

Listens to (server/mastersim):

  • forcehealthpulse -- triggers health pulse dirty state
  • healthdelta -- updates health pulse indicators
  • hungerdelta -- updates hunger pulse indicators
  • sanitydelta -- updates sanity pulse indicators and anim overrides
  • werenessdelta -- updates wereness pulse indicators
  • attacked -- sets attacked by danger and redirect flags
  • builditem / buildstructure -- triggers build success event
  • consumehealthcost -- triggers builder damaged event
  • learnrecipe -- sends RPC to client and triggers learn recipe event
  • learnmap -- triggers learn map event
  • repair -- triggers repair success event
  • performaction / actionfailed -- sets perform action success flag
  • carefulwalking -- sets careful walking state
  • wormholetravel -- sets wormhole travel event type
  • houndwarning -- sets hound warning event level
  • makefriend -- triggers make friend event
  • feedincontainer -- triggers feed in container event
  • idplantseed -- triggers identify plant seed event
  • play_theme_music -- triggers farming music start
  • craftedextraelixir -- sets crafted extra elixir count

Listens to (client/local):

  • healthdirty -- pushes healthdelta and forcehealthpulse to parent
  • istakingfiredamagedirty -- pushes startfiredamage/stopfiredamage to parent
  • istakingfiredamagelowdirty -- pushes changefiredamage to parent
  • lunarburnflagsdirty -- pushes startlunarburn/stoplunarburn to parent
  • combat.attackedpulse -- pushes attacked event with danger/redirect flags
  • hungerdirty -- pushes hungerdelta and startstarving/stopstarving to parent
  • sanitydirty -- pushes sanitydelta to parent
  • werenessdirty -- pushes werenessdelta to parent
  • inspirationdirty -- pushes inspirationdelta to parent
  • inspirationsong1dirty / inspirationsong2dirty / inspirationsong3dirty -- pushes inspirationsongchanged to parent
  • mightinessdirty -- pushes mightinessdelta to parent
  • freesoulhopsdirty -- pushes freesoulhopschanged to parent
  • temperaturedirty -- pushes temperaturedelta and freezing/overheating events
  • moisturedirty -- pushes moisturedelta to parent
  • techtreesdirty -- updates tech tree tables and pushes techtreechange
  • recipesdirty -- pushes unlockrecipe to parent
  • iscraftingenableddirty -- shows/hides crafting UI and cancels placement
  • bufferedbuildsdirty -- cancels and triggers crafting refresh
  • isperformactionsuccessdirty -- clears buffered action and pushes performaction
  • pausepredictionframesdirty -- schedules prediction cancellation task
  • isstrafingdirty -- pushes startstrafing/stopstrafing to parent
  • iscarefulwalkingdirty -- pushes carefulwalking to parent
  • externalvelocityvectordirty -- sets motor velocity on parent physics
  • playerspeedmultdirty -- calls ApplyRunSpeed_Internal on parent
  • isghostmodedirty -- sets ghost vision and ghost mode on parent
  • actionmeterdirty -- shows/hides ring meter on HUD
  • playerhuddirty -- shows/hides HUD and map controls
  • playercamerashake -- triggers camera shake
  • playerscreenflashdirty -- triggers screen flash on world
  • attunedresurrectordirty -- pushes attunedresurrector to parent
  • cannondirty -- pushes aimingcannonchanged to parent
  • bathingpooldirty -- updates focal point camera focus

Listens to (common):

  • gym_bell_start -- triggers Startbell on parent
  • playworkcritsound -- plays critical work sound if focal point matches
  • inmightygymdirty -- pushes inmightygym to parent
  • stormleveldirty -- pushes stormlevel to parent
  • isinmiasmadirty -- pushes miasmalevel to parent
  • isacidsizzlingdirty -- pushes isacidsizzling to parent
  • hasinspirationbuffdirty -- pushes hasinspirationbuff to parent
  • builder.build -- plays sound and pushes buildsuccess
  • builder.damaged -- pushes damaged event
  • builder.opencraftingmenu -- opens crafting menu on HUD
  • builder.learnrecipe -- plays sound
  • inked -- pushes inked event
  • MapExplorer.learnmap -- plays sound
  • MapSpotRevealer.revealmapspot -- shows map spot and plays sound
  • repair.repair -- plays repair sound
  • giftsdirty -- pushes giftreceiverupdate to parent
  • yotbskindirty -- plays sound and pushes yotbskinupdate
  • ismounthurtdirty -- pushes mounthurt to parent
  • playercameradirty -- adjusts camera distance, zoom, and gains
  • playeraerialcameradirty -- adjusts camera FOV and pitch range
  • playercameraextradistdirty -- sets extra max camera distance
  • playercamerasnap -- triggers camera snap
  • playerminimapcenter -- resets minimap offset
  • playerminimapclose -- hides map
  • playerfadedirty -- triggers front end fade
  • wormholetraveldirty -- plays wormhole travel sound based on type
  • houndwarningdirty -- spawns hound warning sound prefab
  • leader.makefriend -- plays make friend sound
  • eater.feedincontainer -- plays feed sound
  • morguedirty -- records death in morgue
  • houndwarningdirty -- spawns hound warning sound
  • idplantseedevent -- plays identify plant sound
  • startfarmingmusicevent -- pushes playfarmingmusic to parent
  • ingredientmoddirty -- triggers crafting refresh
  • inspectacles_gamedirty -- pushes inspectaclesgamechanged to parent
  • roseglasses_cooldowndirty -- pushes roseglassescooldownchanged to parent
  • wortoxpanflutebuffdirty -- pushes item_buff_changed to parent
  • craftedextraelixirdirty -- plays elixir bonus sound

Pushes to parent player entity:

  • healthdelta -- health percentage change with overtime flag
  • forcehealthpulse -- health pulse direction (up/down)
  • hungerdelta -- hunger percentage change with overtime flag
  • startstarving / stopstarving -- starving state transitions
  • sanitydelta -- sanity percentage change with mode
  • werenessdelta -- wereness percentage change
  • inspirationdelta -- inspiration percentage and draining state
  • inspirationsongchanged -- battle song slot change
  • mightinessdelta -- mightiness percentage change
  • freesoulhopschanged -- free soulhop counter change
  • temperaturedelta -- temperature change
  • startfreezing / stopfreezing -- freezing state transitions
  • startoverheating / stopoverheating -- overheating state transitions
  • moisturedelta -- moisture value change
  • techtreechange -- tech tree level updates
  • unlockrecipe -- recipe unlock notification
  • refreshcrafting -- crafting UI refresh request
  • performaction -- action success notification
  • cancelmovementprediction -- movement prediction cancellation
  • startstrafing / stopstrafing -- strafing state
  • carefulwalking -- careful walking state
  • attunedresurrector -- attuned resurrector entity
  • aimingcannonchanged -- cannon aiming state
  • playfarmingmusic -- farming music start request
  • yotbskinupdate -- YOTB skin active state
  • giftreceiverupdate -- gift receiver state
  • mounthurt -- mount hurt state
  • inspectaclesgamechanged -- inspectacles game state
  • roseglassescooldownchanged -- rose glasses cooldown state
  • item_buff_changed -- item buff change notification
  • stormlevel -- storm level and type
  • miasmalevel -- miasma level
  • isacidsizzling -- acid sizzling state
  • buildsuccess -- build completion
  • damaged -- builder damage
  • inked -- inked state
  • attacked -- attack received with danger/redirect flags
  • startfiredamage / stopfiredamage / changefiredamage -- fire damage state
  • startlunarburn / stoplunarburn -- lunar burn state