Skip to content

Object events

event.objectApplyDamageImmunity

Fired when an item applies its damage immunity effect
Note: listeners for this event should always be registered on the object prefix instead of holder

Order Handlers
suppressTheft Sync_reflectTheft, suppressTheft
suppressDamage Sync_reflectDamage, suppressDamage
invincibility (unused)
castSpell castSpell
flyaway flyaway
hitstop hitstop
sprite (unused)
sound playSound
consume Sync_consumeIfNotShove, Sync_consumeItemByHolderGrooveChain, consumeItem

event.objectApplySpellUpgrade

Fired when an object checks for any upgrades to be applied to spells

Type Field Description
string? spell the entity type name of the spell to cast
Order Handlers
all (unused)
slot (unused)
reusable (unused)
soulLink (unused)

event.objectBeginCharge

Fired when an object starts charging

Order Handlers
charge charge, chargeLimitedDuration
rhythm (unused)
sprite chargeSprite
sound playChargeSound, playChargeVoice

event.objectBeginSlide

Fired when an object starts sliding

Type Field Description
boolean? suppressed if true, the event is cancelled and the slide will not begin
Order Handlers
itemCancel (unused)
subBeat enableSubBeatActions
sound playSlideVoice
rhythm (unused)
sway startSwayAnimation

event.objectCharacterSwitchFrom

Fired before a player is about to switch to a different character class

Type Field Description
Entity.Type oldType Current character type
Entity.Type newType Target character type
Entity oldPrototype Current character prototype entity
Entity newPrototype Target character prototype entity
Order Handlers
follower removeFollower
uncurseHealth stashCursedHealth
trackHealth trackInitialHealth
inventory clearInitialItems
storage Sync_stashFromPossessionStorage
itemStash stashItems
health stashHealth

event.objectCharacterSwitchInit

Fired when computing which entity should be targeted by a character class switch

Type Field Description
Entity? target Entity to perform the switch on. If set to false, the conversion is suppressed
Entity.Type oldType Current character type
Entity.Type newType Target character type
Entity oldPrototype Current character prototype entity
Entity newPrototype Target character prototype entity
Order Handlers
possession (unused)

event.objectCharacterSwitchTo

Fired after a player has just switched to a different character class (same parameters as CharacterSwitchFrom)

Order Handlers
resetHealth resetHealth
progressionItems grantProgressionHealthItems
progressionHealth grantProgressionHealth
storage Sync_unstashToPossessionStorage
itemStash unstashItems
inventory grantInitialItems
itemsEnsemble removeEnsembleItems
itemAnimations animateUnstashedItems
slotOrder enforceSlotOrder
health finalizeHealth
curseHealth applyCursedHealth
healthItems (unused)
skin CharacterSkins_queueCharacterSkinUpload
follower grantFollower

event.objectCheckAbility

Fired when a player-controlled object is about to perform an action, locally or in-turn

Type Field Description
Action.Special action The action being performed
any args Action parameters
Ability.Flag flags Bitmask of ability flags
boolean client If set, this event is being run locally on the client side and should not alter game state
Order Handlers
actionRemap applyActionRemap
beatDelayBypass bypassBeatDelay
beatDelay applyBeatDelay
preserveBeatDelay preserveBeatDelay
stun applyStun
slide slideSubBeatActions
autoCast applyAutoCastCooldown
actionDelay applyActionDelay
ignoreRhythm (unused)
actionFilter applyActionFilter, pawnRules, NecroEdit_preventActions
speculate speculateEarlyBeat
charge Sync_clonkingFacingDirection, chargeOverride
hasActed playerHasActed
rhythmLeniency applyRhythmLeniency

event.objectCheckAttack

Fired when the wielder of a weapon attempts to attack, deciding whether/how the attack should be performed

Type Field Description
Action.Direction direction the direction of the attack
boolean suppressed if true, all effects are nullified
table result containing attack targets
Wire.QueueEntry[]? electricityQueue Stores the list of targets to be hit by an electric arc
integer? wireLevel Stores the attacker's charge level for electric attacks
Order Handlers
dwarfism dwarfismSuppressAttack
weapon innateWeapon
damageModifiers (unused)
buildElectricityQueue buildElectricityQueue
modifyElectricityQueue (unused)

event.objectCheckGrab

Fired when an object tries grabs another object (event filter is based on the object receiving the grab)

Type Field Description
Entity grabber the object performing the grab
boolean? success if true, the grab check is successful and the object will be grabbed
Order Handlers
grabbable checkGrabbability
conditionalInvincibility CryptArena_pvpTotalInvincibility
performGrab performGrab

event.objectCheckMove

Fired when an object is about to move to a different position

Type Field Description
Move.Flag moveType bitmask of flags determining which preconditions to check for the move
Action.Result: result result parameter indicating whether the movement can be performed
integer x the X position the object is trying to move to
integer y the Y position the object is trying to move to
integer prevX the X position prior to the move
integer prevY the Y position prior to the move
Order Handlers
moveType gigantismMoveFlags
frozen inhibitFrozenMovement
descent disallowMoveDuringDescent
knockback CryptArena_resistProjectionMove, inhibitHeavy, resistKnockbackWhileGrabbing
provokeOnProximity provokeOnProximity
sunken inhibitSunken
previousPosition resetPrevposOnInhibit
windVoice windVoice
telefrag telefrag
telefragMultiTile telefragMultiTile
attackCheckTangible checkInnateAttackTangibility
attackInhibition checkAttackInhibition, checkAttackTemporaryInhibition
attackCheck checkInnateAttack
attackTargetFilter inhibitNonTargetAttack
grab grabVictim
unstasisOnAttack unstasisOnAttack
attackMove (unused)
attackCollision (unused)
attackTween bounceTweenOnAttack
attackTriggers castOnAttack, fortissimoleBurrowing
attack performInnateAttack
attackSound attackSound
collision checkForPreMoveCollisions, quirks_idleNearWalls
stasisOnMove stasisOnMove
magicTile (unused)
souls moveSouls
success applyDefaultResult, Sync_oofOuchieWalls
failTween bounceTweenOnFail, CryptArena_deferMove
unstasisOnCollision unstasisOnCollision
tween (unused)

event.objectCheckPersistence

Computes the number of enemies to be removed

Type Field Description
integer count Number of enemies to remove according to this player's traits and items
Order Handlers
persistent persistent
item item
storable storable
charmable Sync_persistPets
controllable controllable
descent descent
soulFollower soulFollower
soulLink soulLink

event.objectCheckPurchase

Fired when an object is about to purchase an entity

Type Field Description
Entity price the price tag of the entity to be purchased
number multiplier factor to multiply currency-based purchase prices with
Order Handlers
multiplier Sync_purchaseOwnWares
blood (unused)
consume (unused)

event.objectClone

Fired just after an object has been cloned

Type Field Description
Entity source source entity being cloned
Entity? attributes table of component fields to merge into the newly cloned entity
Entity prototype original prototype of the entity type
Order Handlers
resetFields reset_controllable_playerID, reset_inventory_itemSlots, reset_inventory_items, reset_itemHolster_content, reset_item_dropped, reset_item_equipped, reset_item_holder, reset_lightSourceRadial_active, reset_spawnCap_counter, reset_storable_container
resetTopLevelFields resetTop_Sync_berzerk_direction, resetTop_Sync_itemCombo_combo, resetTop_itemActivable_active, resetTop_visionRadial_fovMask, resetTop_visionRadial_radius
spawnableCaster Sync_charmClonedEntity, spawnableCasterSpawnCap
spawn spawnClonedEntity
storage recurseCloneStorage
inventory recurseCloneInventory
priceTag recurseClonePriceTag
sprite reinitializeHoverEffect
singleChoice singleChoice

event.objectComputeDamage

Fired when an object's base damage (not including damage ups) needs to be computed, such as for Monkey grabs

Type Field Description
integer damage the base damage this entity can deal
Order Handlers
innateAttack innateAttack
weapon innateWeapon

event.objectComputeDigStrength

Fired when the dig strength of an object needs to be recomputed

Order Handlers
innateDigStrength innateDigStrength
shovel (unused)
moveOverride (unused)
charge chargeDigStrength
increaseCapped (unused)
increase gigantismIncreaseDigStrength
dwarfism dwarfismDigStrengthOverride
confusion confusableDigStrength
fear inhibitFearedDigs
resistanceUpgrade (unused)

event.objectComputeEnemyRemoval

Order Handlers
trait applyCharacterTrait
item (unused)

event.objectConfuse

Fired when an object becomes confused

Type Field Description
integer? turns number of turns the entity is confused (nil if the entity is confused indefinitely)
Order Handlers
ai delayClonkingOnConfuse
confusion setConfusionTime
voice playConfusionVoice

event.objectControllerChanged

Fired when an object's controlling player changes

Type Field Description
Player.ID? playerID ID of the player now controlling the object (nil when relinquishing control of an object)
Order Handlers
player assignPlayerID
clearCache clearPlayerEntityCache
coopLink updateCoopLink
persistence CharacterSkins_queueCharacterSkinUpload, CharacterSkins_updateCharacterSkin
ai toggleAI
aggro aggro
attackability updateAttackability
lobby (unused)

event.objectCurrency

Fired when an object's currency amount increases or decreases

Type Field Description
Currency.Type currency the type of currency gained or lost
integer difference the amount of currency to be added/subtracted
integer oldAmount the amount of currency the object has prior to the transaction
Entity? item reference to the currency item being added, nil if this isn't a currency pickup
boolean flyaway if true, a flyaway is created upon collection (default for item collection)
Order Handlers
forward (unused)
multiplier dadCurrencyPickupMultiplier
flyaway showCurrencyFlyaway
damage (unused)
counter CryptArena_trackLastCollectedCandy, updateCurrencyCounter
soulLink (unused)
statistics increaseCurrencyStats

event.objectDealDamage

Fired when an object deals damage to another object (event filter is based on damage dealer)

Type Field Description
Entity victim the entity receiving damage
integer damage the amount of damage dealt
string? killerName string to be displayed in the post-death "killed by" screen
Entity? killer entity to credit the kill to, if differing from the attacker
Damage.Type type determines the damage type (weapon, explosive, lute, etc.)
Action.Direction direction direction of the damage event
integer? knockback amount of tiles to move the damage receiver in the direction of the attack
Entity? weapon Weapon, spell, familiar or bomb using which damage was inflicted (nil for innate attacks)
boolean? silentHit if true, hit sounds don't play
boolean? suppressed if true, damage effects are nullified (invulnerability)
boolean? knockbackSuppressed If true, disables knockback. If false, forces knockback on suppressed hits
Order Handlers
baseMultiplier (unused)
saveBase saveBaseDamage
baseIncrease Sync_sunkenVictimDamageIncrease, applyGigantismMultiplier, baseDamageIncrease, explosiveDamageOverride, CryptArena_explosiveDamageLimit
finalMultiplier explosiveSafety
suppressPreBoss deleteOnPreBossAttack
penetration (unused)
wireModifier wiredDamageTypeModifier
knockback (unused)
freeze (unused)
sound Sync_wireFlash
target Sync_payPerPossessedAttack, Sync_targetLockCycleOnAttack
forward quirks_saveAttacker, forwardKillCreditToCaster, forwardToCaster
replacementEffects teleportingBombs, CryptArena_transferSeasonCurrency
applyDamage CryptArena_deferDamage, applyDamageToTarget
additionalEffects Sync_coopTheft, stealGoldOnAttack
damageCountdown resetDamageCountdown
screenShake shakeScreenOnAttack
statistics increaseMultiKillStats

event.objectDeath

Fired when an object's health reaches zero

Type Field Description
Entity? killer the entity performing the kill (may be nil)
string? killerName name of the lethal damage source (may be nil)
Damage.Type damageType determines the damage type (weapon, explosive, lute, etc.)
boolean? silent suppress death sound effect
Entity? weapon Weapon, spell, familiar or bomb using which the final blow was was inflicted
Entity? attacker the entity who dealt the final blow (differs from killer if kill credit was forwarded)
Order Handlers
dead setDead
provoke provokeOnShrineDeath
hitstop hitstopOnDeath, hitstopOnVisibleDeath
intangible finalizeObjectTangibility
respawn CryptArena_lobbyRespawn, setRespawn, trapSegmentImmunity
credit checkKillCredit
creditIgnore ignoreKillCredit
checkHostile checkHostileAttacker
sound deathSound, genericDeathSound, voiceEnemyDeath, voiceTaunt
markSeen markShrineContentsSeen
crateLootUpgrade crateLootUpgrade, storageCheckBans
gigantismItem gigantismItemDrop
gigantismCurrency gigantismCurrencyDropOverride
currencyDrop conditionalCurrencyDrop, CryptArena_dropCandyOnDeath, CryptArena_dropPlayerCandyOnDeath, CryptArena_dropPlayerCurrency
killLinked despawnSouls, killLuteBody, updatePriceTags
itemDrop Sync_dropItems, dropInventoryItems, dropStorageItems, CryptArena_dropRandomItem, CryptArena_dropCandyPileOnBossDeath
spellcast castOnDeath, spawnDecorTentacle, spawnOnDeath, spawnTinySlimes
timeScale timeScale
runState markShopkeeperDeath
runSummary handleRunSummary
tombstone createTombstone
sacrificeShrine activateSacrifice
existenceChecks (unused)
kill triggerKillEvent
boss conductorBatteryDeath, conductorInstrumentDeath, deleteBossMinions, despawnOtherFlawlessChests, disableFirepigsOnBatteryDeath, disableFrankenshield, forwardDeathToController, killBossOnDeath, quirks_clearBossGold
swapEntities (unused)
descent checkExitCondition
unlock unlockEnemy
statistics Sync_updateDeadRingerReflectStat, increaseDeathStats, increaseSnipeStats
postDeathVision postDeathVision

event.objectDelete

Fired when an object is deleted without dying (end of level, falling down trapdoor)

Order Handlers
intangible finalizeObjectTangibility
effects (unused)

event.objectDescentArrive

Fired when any object arrives at the start of a floor after having descended via a trapdoor or stairs

Type Field Description
boolean? ascent if true, the entity is ascending back to the current floor instead of descending to the next floor
Order Handlers
descent endDescent
targetTurn (unused)
position initializePosition
positionOffset applyPositionOffset
damageImmunity disableDamageImmunity
persistence (unused)
hover (unused)
ascent disallowAscent
follower (unused)
animation restoreVisibility
collision restoreCollisionMask
attackable updateAttackability
targeting updateTargetability
grooveChain applySoftGrooveChainImmunity
spectator resetSpectatorMode
tangible restoreTangibility
contents descentCrateContents
damage inflictDamage
homeArea resetHomeArea, resetObjectHomePosition
ambush (unused)
overlay (unused)
musicFade (unused)

event.objectDescentBegin

Fired when an object begins descending (via trapdoor or stairs)

Type Field Description
Descent.Type type the type of descent being performed
number duration the descent's duration until the entity vanishes (in timer units)
boolean? damageImmunity if true, the entity is fully immune to all types of damage during the descent
boolean? grooveChainImmunity if true, the entity is immune to all types of groove chain loss during the descent
boolean? modifyAttackableFlags if true, the entity will apply an attackability flag modifier during the descent
boolean? modifyCollisionMask if true, the entity will apply a collision mask modifier during the descent
boolean? disableInteractions if true, the entity cannot be interacted with during the descent
boolean? ambush if true, the entity will be surrounded by stair-locking minibosses left alive on the floor
Overlay.Attributes? overlay the type of screen overlay to render during the descent, if the entity is focused
boolean? animation if true, plays an animation of the entity dropping down
number? musicFadeDelay the delay after which the music starts fading out
number? musicFadeDuration the duration for which the music fades out
boolean? silent if true, suppresses the descent sound and voice line
Order Handlers
dadForward forwardDescentToController
descent activateDescent
exitRequirement exitRequirement
duration durationOverride
targetTurn (unused)
storeCollision (unused)
tangibility (unused)
collision disableCollisions
interaction (unused)
targeting updateTargetability
grooveChain dropGrooveChain, grooveChainImmunity
damageImmunity enableDamageImmunity
attackable updateAttackability
persistence (unused)
follower (unused)
sound playDescentSound
voice playDescentVoice
overlay addFadeout
music fadeMusic
animation playAnimation
hover disableHover
endAction enqueueDescentEndAction

event.objectDescentEnd

Fired when an object has finished descending (via trapdoor or stairs)

Order Handlers
complete completeDescent
targetTurn (unused)
ambush disableAmbush
intangible makeIntangible
hover restoreHover
ascent allowAscent
spectator enableSpectatorMode
collectItems (unused)
collectCurrency collectCurrency
delete delete
exitLevel exitLevel

event.objectDespawn

Common event after object deletion or death

Order Handlers
soulLink breakSoulLink
objectRowMap (unused)
tween clearTweenCancellationState
light (unused)
tileEffects (unused)
respawn lobbyRespawnable
disengage detachController, detachItemBeforeDespawning, removeFromLeader
inventory clearInventoryItems
storage clearStorageContents
intangible (unused)
despawnExtras NecroEdit_editorDeleteDependentChildren, autoDespawnTranscation, despawnAttachment, despawnPriceTags, despawnSouls
outline clearOutlineOpacity
audioLoop stopAudioLoop
spawnCap casterSpawnCap, CryptArena_decrementSpawncap
despawnEntity despawnObject
existenceChecks Sync_uncharmEnemies

event.objectDig

Fired when an object capable of digging moves into a wall

Type Field Description
integer x contains the X position of the tile being dug
integer y contains the Y position of the tile being dug
Dig.Strength strength strength of the dig
boolean shovel true if this dig is using a shovel
integer radius the distance within which tiles should be broken
boolean success result parameter containing whether the dig was successful or not
Tile.Info tileInfo tile information table of the tile being dug
boolean silentVoice suppresses the dig success voiceline
boolean silentFail suppresses the dig failure sound effect
boolean noSwipe suppresses the "shovel" swipe when digging a tile
boolean multiHit cracks tiles instead of destroying them immediately, requiring multiple hits
boolean noHighResistance suppresses "high resistance" event handlers for this event
Dig.Strength resistance dig resistance of the tile being dug (nil for undiggable tiles)
Order Handlers
soundDeduplication setSoundDedupID
computeStrength computeDigStrength
multiHit (unused)
radius gigantismDigRadius
spellCondition (unused)
breakTile tryBreakTile
conditionalInvincibility (unused)
spell (unused)
swipe (unused)
flyaway spawnKeyFlyaway
consumeKey (unused)
grooveChainImmunity (unused)
dash Sync_oofOuchieWalls
damageIncrease (unused)
stun (unused)
sprite (unused)
sound digVoice, playDigFailSound
tween cancelBounceTween
screenShake shakeScreenOnDig
soundDeduplicationReset resetSoundDedupID

event.objectDirection

Fired when an object is trying to perform a directional action (attack, dig, move)

Type Field Description
Action.Direction action the attempted directional action
Action.Direction direction convenience alias for action
integer x X coordinate of the expected destination
integer y Y coordinate of the expected destination
integer dx horizontal offset of the attempted action
integer dy vertical offset of the attempted action
Action.Result result the result of the action (enforces action ordering)
Order Handlers
teamChange (unused)
storeAction storeAction
hasMoved resetHasMoved
previousPosition updatePreviousPosition
delayOffWallMoves delayOffWallMoves
actionDelay interceptActionDelay
frozen inhibitFrozenMovement
descent disallowActionDuringDescent
remap CryptArena_spawnOnDirectionInfiniteGold, Sync_deepBluesStrategicOpening, amplifyFirstMove, castle, flyingSeek, remapMovement, spawnOnDirection, wiredRotate
moveOverrideGrooveChain (unused)
moveOverride (unused)
chargeStart beginCharge, beginChargeTowardsHostile
slide slide
preFacing inhibitOnFacingChange
facing CryptArena_facingDirection, handleClonking, setFacingOnFlee
confusion applyConfusion
attackGrabber attackGrabber
stasis stasisUntilProvoked
unsink unsinkOnDirection
item (unused)
weaponAttack quirks_marvBlocksEnemies, performWeaponAttack
weaponAttackResultOverride weaponAttackResultOverride
holsterAutoSwap (unused)
castSpellAnimation (unused)
preDigAmplify (unused)
dig (unused)
digEffect (unused)
amplify amplify, frankensteinwayFast, parryCounterAttack
moveGrabbed moveGrabbed
move moveObject
interact performInteraction, Sync_shrineOfFire
moveOverrideSlide (unused)
facingLate setFacing
beatDelay (unused)
trample (unused)
spellcast resetDynamicSprite
requeue requeue
requeueOverride (unused)
stopMoveOverride (unused)
hitChain (unused)
ai (unused)
parryCooldown (unused)
grooveChain (unused)
damageCountdown (unused)
sound (unused)
screenShake shakeScreenOnWalk
teamReset (unused)

event.objectEarthquake

Fired when an object takes earthquake damage.

Type Field Description
Entity? attacker the entity that initiated the earthquake
boolean? survived if true, the entity survived the hit
integer damage the amount of damage dealt
integer remainingDamage amount of damage that has been taken by the entity's health components so far
Order Handlers
beatDelay (unused)
provoke provoke
health reduceHealth
cursedHealth reduceCursedHealth
multiPhase nextPhase
death checkDeath

event.objectEndCharge

Fired when an object stops charging

Type Field Description
boolean? silent if true, no sound is played for this charge end event
Order Handlers
charge endCharge
rhythm (unused)
sprite chargeSprite
sound playChargeStopSound
stun chargeEndBeatDelay, stunOnChargeStop
beatDelay beatDelay
heal chargeEndHeal

event.objectEndSlide

Fired when an object stops sliding

Order Handlers
subBeat disableSubBeatActions
rhythm (unused)
sway endSwayAnimation

event.objectExitLevel

Order Handlers
exitFlag (unused)
damageImmunity (unused)
grooveChain (unused)
completeLevel (unused)

event.objectFacing

Fired when an object's facing direction changes

Type Field Description
Action.Direction? direction new gameplay facing direction. If nil, direction is unchanged.
Action.Direction? visualDirection new visual facing direction. If nil, direction is unchanged.
Order Handlers
suppress fortissimoleAI
direction Sync_deployedItemMove, Sync_deployedItemAttack, setFacingDirection, Sync_deployedItemFacing
shieldDirection shieldDirection
sprite Sync_deployedItemAttachment, Sync_itemAttachment, Sync_updateAuxiliaryFacing, mirrorSpriteX, mirrorSpriteY, rotateSprite
spriteCorrection (unused)

event.objectFreeze

Fired when an object is frozen

Type Field Description
integer? turns number of turns to add to the entity's freeze duration
Freeze.Type: type the type of freeze to inflict (affects the attachment sprite)
Order Handlers
sprite (unused)
stackDuration hasActedFix
freeze CryptArena_deferFreezeEffect, addFreezeTime
cooldown tickdownCooldownOnFreeze
preventActions preventActions
attackability updateAttackableFlags
attachment (unused)
animation (unused)
wiredAnimation (unused)

event.objectGetActionItem

Gets the item corresponding to a given action value

Type Field Description
Action.Special action the action for which to retrieve the item
boolean? visual true if this event is invoked in the context of item slot rendering, false for gameplay
Entity? item Item that was found within the specified slot, or nil if no item is present
Entity? visualItem Alternate item whose sprite should be rendered instead of the primary item
Entity? container Optional item that acts as a "storage" for the result item
boolean? hideKeybinding If true, the key binding text is not rendered under this slot
string? slotImage Specifies an alternate image file to render for this item slot's frame
Order Handlers
holster (unused)
virtualItems virtualItems
innateSpells innateSpells
slotItems slotItems
deploy (unused)
reload (unused)
convert (unused)
toggle (unused)
throw (unused)
activate (unused)
visualFallback Sync_storageHUD
override (unused)
ignoreActions ignoreActions

event.objectGetHUDBeatBars

Builds a list of visual primitives to display in the HUD beat bar, replacing regular (cyan) beat bars

Type Field Description
VertexBuffer.DrawArgs[] bars List of visual primitives for special beat bars (gaps allowed)
table beatmap the player entity's beatmap object
number scale HUD scale factor
number minBeat Beat index from which beat bars should start rendering (for unpause countdown)
Order Handlers
paceUser shrineOfPaceIndicator
possession Sync_possessionBeatBars

event.objectGetHUDEquipment

Builds the list of items that should appear in an entity's equipment HUD slots

Type Field Description
table slots maps slot names to a list of items to appear within that slot
table shared set of HUD element names that should be drawn in a shared view instead
Order Handlers
inventory addInventoryItems
stash (unused)
virtual addVirtualItems, showExtraModes
innateAttack addInnateSwipe
soulLink (unused)

event.objectGetHealthBar

Fired whenever an entity's health bar is updated, influencing how the entity's health bar should be rendered

Type Field Description
Health.Heart[] hearts the list of heart types to display for this entity
Order Handlers
cursedHealth addCursedHealth
health addRedHealth
enemyHealth addEnemyHealth, Sync_possessedHearts
stash (unused)

event.objectGrab

Fired when an object grabs another object (event filter is based on the object performing the grab)

Type Field Description
Entity victim the entity being grabbed
Order Handlers
detach detachFromOldVictim
move moveOntoVictim
attach attachToVictim, grabAttachment
collision allowCharacterCollisions
attackability updateAttackability
rowOrder grabRowOrder
cast castOnGrab
sound playGrabAttackerSound, playGrabVictimSound
statusEffects inflictConfusion
ai overrideAI
health increaseHealth
drops denyKillCredit
animation Sync_showGrabFlyaway, updateAnimation
grooveChain dropGrooveChain

event.objectGrooveChain

Fired when an object's groove chain increases or decreases

Type Field Description
GrooveChain.Type type The type of groove chain event
integer? multiplier new coin multiplier
integer? killCount new kill count
Order Handlers
immunity ND1FailImmunity, applyImmunity, descentGrooveChainImmunity, grooveChainFailImmunity
maximize (unused)
sound playGrooveChainSound, provokeOnGrooveChainDrop
flyaway flyaway
damage dropFlawless, inflictDamage
shatter (unused)
multiplier applyGrooveChainValues
coinMultiplier applyCoinMultiplier
coinMultiplierItem (unused)
light (unused)
sprite (unused)
forward (unused)
soulLink (unused)

event.objectGrow

Fired when an object becomes gigantic

Type Field Description
integer? turns number of turns until the object reverts to normal size (nil if the entity remains gigantic indefinitely)
boolean? suppressed if true, the event is cancelled and the object will not grow
Order Handlers
resetSize resetDwarfism
gigantism (unused)
health applyHealthMultiplier
turnCounter setGigantismTimer
attackable updateAttackability
sprite updateScale

event.objectHeal

Fired when an object gains health or maximum health

Type Field Description
Entity? healer the entity granting health to the target (may be nil)
integer? health the amount of health added
integer? maxHealth the amount of maximum health added
integer? invincibility number of invincibility frames granted upon healing (defaults to 1; use 0 for no invincibility)
boolean? silent if true, healing visual effects and sounds are suppressed
boolean? allowOverheal if true, increasing the health past the current maximum will add heart containers
boolean? attemptedOverheal if true, this heal attempted increasing the health past the current maximum
integer? excess if the health limit is exceeded, this parameter is set to the amount of maximum health lost to the limit
Order Handlers
slideInvincibility slideInvincibility
invincibility quirks_ND1Iframes, grantInvincibility
stash stashHealth
sound playHealingSound
sprite (unused)
particles playHealParticles
uncurse uncurseHearts
maxHealth addMaxHealth
cursedHealth addCursedHealth
soulLinkLimit (unused)
cursedLimit limitCursedHealth
health CryptArena_healPoison, addHealth
gluttony Sync_activateFeastShrine
overhealConsume (unused)
overhealRounding roundOverhealHealth
overheal processOverhealHealth
rounding roundMaxHealth
limit limitMaxHealth
statistics increaseMaxHealthStats
conditionalDamage (unused)
soulLink (unused)
end (unused)

event.objectHotTileStep

Fired while an object is standing on an idle-damage-dealing (hot) tile

Type Field Description
integer x X position of the hot tile
integer y Y position of the hot tile
table idleInfo table containing tile-specific idle damage information
TileDamage.IdleResult result result of the tile step event
Order Handlers
immunity descentImmunity, gigantismHotTileProtection
turnCounter increaseIdleTurnCounter
idleSound playHotTileStepSound
damageSound playHotTileDamageSound
voice playHotTileStepVoice
damage inflictIdleDamage
screenFlash screenFlash

event.objectIntangible

Fired when an object becomes intangible, including just before despawning

Type Field Description
Entity? conversion If this intangibility occurred due to a conversion, contains the target prototype
Order Handlers
focusedEntities updateFocusedEntities
ungrab detachFromGrabVictim, detachGrabber
extras makeSoulsIntangible
sprite resetHoverEffect
objectMap removeMultiTileObjectFromMap, removeObjectFromMap
objectRowMap (unused)
collision removeFromCollisionMap, removeMultiTileCollision
equipment (unused)
light disableLightSource, shadowFieldOfView, visionRaycast
levelExit unlockStairs
existenceChecks endAmbush, provokeOnAddsDeath
targeting removeFromTargetingTeam
character preventActions

event.objectInteract

Fired when an object such as a Shrine or a Chest is interacted with

Type Field Description
Entity interactor the object performing the interaction
Action.Result result the result of the interaction
Order Handlers
requeue (unused)
consumeItem consumeKey
priceTag checkPriceTag, unlockNPC
lowPercent shrinePercent
activate Sync_activeSoulLinkShrine, CharacterSkins_showSkinSelector, activateShrine, removeShrinePriceTag, resetDamageCountdown
configInteractable changeConfiguration, characterSelect, ensembleChoice, ensembleRandom
unlock (unused)
selfDestruct CryptArena_chestEnemySpook, selfDestruct, singleChoiceShrines, takeDamage
attack (unused)
noOp noOp
sound failSound, soundInteract, soundInteractFocus
graphics failFlyaway, failSwipe
tween bounceTweenOnInteractor
result (unused)

event.objectKill

Fired when an object kills another object (event filter is based on killer entity)

Type Field Description
Entity victim the entity being killed
Kill.Credit credit bitmask determining what rewards the killer gets (blood regeneration, spell cooldowns, etc)
number? cooldownMultiplier if present, the multiplier used for kill cooldowns
Damage.Type damageType Type of damage inflicted by the lethal attack
Order Handlers
currencyBase currencyBase
currencyMinimumEarly minimumCurrencyDropEarly
currencyMultiply currencyMultiply
currencyMultiplyCoop currencyMultiplyCoop
extraCurrency (unused)
currencyMinimum minimumCurrencyDrop
currencyDrop dropCurrencyOnDeath
grooveChain increaseGrooveChain
damageCountdown resetDamageCountdown
cooldownMultiplier (unused)
cooldown (unused)
regeneration incrementRegenerationKillCounter
credit (unused)
spawnSoul spawnFollowerOnKill
soulLink (unused)
statistics increaseKillStats

event.objectKnockback

Fired when an object takes knockback.

Type Field Description
Action.Direction direction the direction into which the object is being knocked
integer distance the number of tiles to knock the entity away
Move.Type moveType the move type to apply when knocking back the entity
integer? beatDelay the number of beats to add to the entity's beatDelay
boolean? suppressed if set to true, the knockback event has no effect
Order Handlers
redirectCharge redirectCharge
oncePerFrame limitOncePerFrame
freeze inhibitWhileFrozen
defer deferDuringPlayerTurn
move moveEntity
preventActions Sync_preventActionsNonConsecutively, preventActions
beatDelay increaseBeatDelay, resetBeatDelay

event.objectMove

Fired when an object's position changes

Type Field Description
Move.Flag moveType bitfield of flags determining the movement's behavior
Action.Result result always action.Result.MOVE
integer x contains the X position the object is moving to
integer y contains the Y position the object is moving to
boolean? partial true if the move was shortened by a collision
integer prevX contains the X position prior to the move
integer prevY contains the Y position prior to the move
Tile.Info tileInfo contains the tile information table of the tile at the object's new position
Order Handlers
moveType CryptArena_moveTurn
facing particleMoleDirt, setFacingOnMove
autoCollect (unused)
position updatePosition
tween setMoveTween
previousPosition updatePreviousPosition
objectMapPre removeMultiTileObjectMapEntry
objectMap moveObjectMapAtStart, moveObjectMapEntry
objectMapPost moveMultiTileObjectMapEntry
collision followerCollectGold, markPendingMerge, moveCollisionMap, moveMultiTileCollision
light moveLightSource
damage quirks_saveXY, Sync_enPassant
damageLate quirks_familiarDisplacement
noReturn (unused)
grabbers moveGrabber
followers NecroEdit_editorMoveChildrenWithParent, NecroEdit_editorStoreLuteHeadOffset, NecroEdit_editorUpdateHome, Sync_deployedItemIdleCollision, cageFollowsNPC
readTileInfo readTileInfo
targeting (unused)
itemPickup (unused)
attachments Sync_checkGrabFlyaway
vision updateRadialVision, updateRaycastVision
stasis stasisOnApproach, stasisOnApproachMinDistance
tileEffects quirks_repeatedSinkImmunity, checkExitStairs, despawnOnWallRemoval, offWallConvert, provokeOnWallRemoval, rearmTraps, spriteOffsetIfAboveWall, stepDamage, updateShrink, updateSunken, updateWired
tileIdle resetTileIdleCounter
autoDig (unused)
takeCurseDamage (unused)
tweenOverride (unused)
redirectMoveOverride (unused)
redirectCharge redirectCharge
spell quirks_saveShield, castOnCollision, castOnMove, soulDeleteCollision, quirks_checkShield
partial Sync_partialMoveOofOuchie, attackOnPartialMove, digOnPartialMove
soulLink (unused)
sprite updateStaticPosition
camera (unused)
focus handleFocusTeleport
swipe CryptArena_addSnowFootsteps, moveSwipe
particles particleMove
sound gigantismWalkSound, parityWalkSound, stasisWalkSound, walkSound
audioLoop (unused)
hasMoved Sync_restoreConsecutiveActionPrevention, fortissimoleSpawn, hasMoved, hola, tentacleFacing, wiredRotate

event.objectMoveResult

Fired after an object acts, for both directional and special actions

Type Field Description
Action.Direction action the attempted directional action
Action.Direction direction convenience alias for action
integer x X coordinate of the expected destination
integer y Y coordinate of the expected destination
integer dx horizontal offset of the attempted action
integer dy vertical offset of the attempted action
Action.Result result the result of the action (enforces action ordering)
Order Handlers
hasActed hasActed
convertSlot (unused)
animationCycling animationCycling
animation handleClonking, moveResultAnimation, yetiAnimation
facing turnOnMoveFail
aggro aggroOnMove
trample breakBellsOnCharge, trampleAIOverride
parryCooldown parryCooldown, Sync_parryCounterAttackExtraDelay
electrifyGround electrifyGround
dig Sync_oofOuchieWallCheck, digWall, Sync_oofOuchieWalls
digEffect Sync_performInnateDigDash
spellcast castAfterMoves, castOnAttackResult, castOnMoveResult, castOnNearbyActiveHostiles, dropCurrencyOnMove
autoCast conductorAutoCast, fortissimoleBurrowing, luteFireBreathing, processAutoCasts
ai Sync_clonkingCooldown, castle, nd2Dancers, necroDancer2Phase2Bombs, necroDancerPhase2, updatePattern
facingLate patternFacing, wiredRotatePost
riskDamage inflictShrineOfRiskDamage
preserveGrooveChain dadPreserveGrooveChainOnThrow
grooveChain updateGrooveChain
grooveChainFlyaway updateGrooveChainFlyaway
ranged (unused)
hitChain updateHitChain
beatDelay resetBeatDelay
stopMoveOverride (unused)
stopCharge chargeLimitedDuration, chargeStopOnResults, stopSuperCharge
currencyDrain (unused)
itemCombo (unused)
freeze freezePendingAction
stasis (unused)
stun confusableBeatDelay, spawnCapBeatDelay, stunOnResults
spawnPrep spawnPrep
voiceTell voiceTell
moveOnAttack moveOnAttack
disappearOnCollision disappearOnCollision
convert promote

event.objectParry

Fired when an object parries an incoming attack

Order Handlers
knockback applyKnockback, playParrySound, unsuppressKnockback
flyaway createFlyaway
sound (unused)
prepareCounterAttack prepareCounterAttack, Sync_rotateCounterAttack
suppressDamage suppressDamage

event.objectPerformAttack

Fired when the wielder of a weapon attempts to attack, deciding whether/how the attack should be performed

Type Field Description
integer prevX X position where the attack started from
integer prevY Y position where the attack started from
Order Handlers
modifyElectricityQueue addConductorBatteries
resetKillEffects (unused)
savePosition savePosition
inflictDamage inflictDamage
processElectricityQueue processElectricityQueue
move move
throw throw
swipe swipe
performAttack (unused)
conditionalInvincibility (unused)
killDash (unused)
convert convertOnWeaponAttack

event.objectPostConvert

Fired just after an object is converted to a different entity type

Type Field Description
string oldType type name of the old object type
string newType type name of the new (current) object type
Entity prototype entity prototype of the new (current) object type
table? preserve set of component names that shouldn't be reset
Order Handlers
player (unused)
objectMap (unused)
multiTile (unused)
multiCollision (unused)
light (unused)
tileEffects fortissimoleBurrow, resetNecrodancerDelay
shield (unused)
ai (unused)
moveOverride (unused)
tangible (unused)
resetFields resetDynChar_dynamicItemFrameX, resetDynChar_dynamicItemFrameY, resetAiId, resetAnimationFreezeEffectNeedUpdate, resetAttachmentCopySpritePositionOffsetX, resetAttachmentCopySpritePositionOffsetY, resetAttachmentCopySpritePositionOffsetZ, resetBeatDelayInterval, resetItemOverlaySpriteHUDActive, resetItemStackQuantity, resetMinimapStaticPixelColor, resetPositionalSpriteOffsetX, resetPositionalSpriteOffsetY, resetRowOrderZ, resetSpellCooldownKillsRemainingKills, resetSpellCooldownTimeRemainingTurns, resetSpriteColor, resetSpriteHeight, resetSpriteMirrorOffsetX, resetSpriteSheetFrameX, resetSpriteSheetFrameY, resetSpriteTexture, resetSpriteWidth, resetVisionRadialRadius, resetWeaponReloadableAmmo, CharacterSkins_updateCharacterSkin
attributes setObjectAttributes
updateCollision updateCollision
perspective updatePerspective
inventory addItemAfterConverting, equipItems
spawnExtras adjustAttachment, startND2Phase2
attackability updateAttackability
facing (unused)
beatDelay postConvertBeatDelay
burrow (unused)
regenerationKillCounter updateKillCounterTotalIncrement
charge charge
sprite Sync_useCloneSprite, updateSpriteUniqueIndex, CryptArena_keepPoisonTint
tween overrideTween
rhythm updateRhythm
sound soundPostConvert

event.objectPreConvert

Fired just before an object is converted to a different entity type

Type Field Description
string oldType type name of the old (current) object type
string newType type name of the new object type (may be modified to change which entity type to convert to)
Entity prototype entity prototype of the new object type
table? preserve set of component names that shouldn't be reset
Order Handlers
ungrab (unused)
objectMap (unused)
collision (unused)
light (unused)
multiTile (unused)
multiCollision (unused)
intangible (unused)
randomizer randomizer
inventory detachItemBeforeConverting
despawnExtras despawnAttachment
spawnCap casterSpawnCap
sound soundPreConvert
statusEffects ungrowPreConvert, unshrinkPreConvert, unsinkPreConvert
slide endSlidePreConvert
shield disableShield
beatDelay preConvertBeatDelay
regenerationKillCounter updateKillCounterTotalIncrement
minimap minimapPersistColorPreConvert

event.objectPreview

Fired when an object is drawn stand-alone. This event is not fired for in-world rendering!

Type Field Description
fun(args:VertexBuffer.DrawArgs) draw Callback function for rendering a visual primitive
fun(args:VertexBuffer.DrawTextArgs) drawText Callback function for rendering text
Order Handlers
shadowVisual getShadow
spriteVisual getSprite
checkPrototype checkPrototype
shadowOffset applyShadowOffset
spriteOffset applyPositionalOffset
hover applyHoverEffect
attachmentOffset applyAttachmentOffset
animation applyNormalAnimation
skin CharacterSkins_applyCharacterSkin
outline addOutline
color applyColor
shadow drawShadow
sprite drawSprite
attachment getAttachment

event.objectProvoke

Fired when a provokable object is provoked or unprovoked

Type Field Description
Entity? attacker entity that caused the provocation
Action.Direction? direction direction of the hit (for provokeOnHit only)
Order Handlers
provokable setDecorTentacleTangibility, setProvokedFlag
musicLayer deactivateMusicLayer
sound playSound
voice playVoiceLine
attackable updateAttackableFlags
shieldBreak (unused)
spell quirks_extendoShield, castOnProvoke, despawnNecrodancerTraps
ai overrideAI
fear provokableFear
convert convertOnBossProvoke, convertOnProvoke
knockback (unused)
preventActions preventActions
beatDelay setBeatDelay
shield provokableShieldBreak
startFight Sync_provokePawnbroker, autoDespawnTranscation, spawnNecroDancerMiniboss, startShrinerFight
targetable makeTargetable
boss conductorPhase2, deadRingerPhase2
animation updateAnimation

event.objectResetBeatmap

Fired when a temporary rhythm-changing effect affecting the object ends

Order Handlers
rhythmIgnoredTemporarily rhythmIgnoredTemporarily
grooveChainImmunity grooveChainImmunity
damageCountdown damageCountdown
rhythmLeniency rhythmLeniency

event.objectRespawn

Fired when an object respawns after dying (typically at the start of a new floor)

Type Field Description
number? healPercent fraction of health to restore for the entity
integer? healFlat absolute amount of health to restore for the entity
integer? minContainers ensures that the entity has at least this much maximum health upon reviving
Order Handlers
runSummary clearRunSummary
respawnFlag removeRespawnFlag
killableFlag removeKillableFlag
health restoreHealth
itemSlot restoreItemSlot
tangible updateTangibility

event.objectReveal

Fired when an object enters any player's field of view for the first time

Order Handlers
aggro Sync_collapseWaveform, Sync_targetLockNearest, aggroOnReveal
apparition forceApparition
sound NecroEdit_silenceRevealSound, playRevealSound
animation npcFlyaways
cooldown (unused)
trample (unused)

event.objectShrink

Fired when an object becomes tiny

Type Field Description
integer? turns number of turns until the object reverts to normal size (nil if the entity remains tiny indefinitely)
boolean? suppressed if true, the event is cancelled and the object will not shrink
Order Handlers
suppressIfGigantic suppressOnGigantism
immunityItem (unused)
resetSize (unused)
dwarfism (unused)
turnCounter setDwarfismTimer
flyaway (unused)
voice (unused)
sprite (unused)

event.objectShrinkEffects

Order Handlers
flyaway spawnFlyaway
voice playVoiceLine
sprite updateScale

event.objectSink

Fired when an object sinks into a liquid tile

Type Field Description
integer x X position of the liquid tile
integer y Y position of the liquid tile
Tile.Info tileInfo tileInfo table of the liquid tile
table liquid table containing information about the liquid tile
boolean? suppressed if true, the event is cancelled and the object will not sink
Order Handlers
immunity (unused)
sound NecroEdit_silenceSinkSound, playSinkSound
animation CryptArena_drown, playSinkAnimation
particles particleSink
sink sinkEntity

event.objectSongEnd

Fired when the song has ended for all tangible player-controlled entities

Order Handlers
spawnEntity (unused)
descent CryptArena_arenaSongEnd
damage (unused)
boss forceTrapWalls
spell spell

Fired when an object's soul is linked to another

Type Field Description
Entity target
Order Handlers
health initHealth
inventory initInventory
currency initCurrency
collision updateCollisions

event.objectSoulLinkBreak

Fired when an existing soul link is broken

Type Field Description
Entity target
Order Handlers
inventory destroyInventory
currency destroyCurrency
collision updateCollisions

event.objectSpawn

Fired whenever an object is created

Type Field Description
integer x X position at which to spawn the object
integer y Y position at which to spawn the object
Entity? attributes table containing additional values for component/field initialization
Order Handlers
visibility hideUntilLit
facing randomInitialFacingDirection
delete quirks_deleteZ4Monkey, applyEnemyBans, deleteApparitions, requireGameObject
darkness darkness
safeLevel NecroEdit_provokeBossInEditor, lobbyToggleable
attributes initializeObjectAttributes, CryptArena_loadSarcSettings, CryptArena_setArenaPlayer
position initializeObjectHomePosition, initializeObjectPosition, initializeObjectPrevPosition, CryptArena_moveLatePlayersToPrepRoom
overrides Sync_clonkingCooldownDROverride, Sync_conductorSpawnCap, aggroOnSecretRoomSpawn, aiFortissimole, applyDefaultActability, applyTileProximity, freezeMonkeyLikes, intangibleInWalls, setPriceTag, tentacleFacing, useCloneSprite, wallDropSuppressorEnabled, zoneSpawnCaps
apparitionTangibility NecroEdit_forceManifestApparitionInEditor, apparitionTangibility
healthBonus grantBonusHealth, healthBonusAgainstPlayer, scalingHealth
homeArea conductorInstrumentDetectWire, initializeHomeArea, quirks_conductorInstrumentDetectWire
followerCollectGold (unused)
tangible initializeObjectTangibility
wiredRotate wiredRotateInitial
apparition forceApparition
ai setSlimeDirection
stasis setStasis
random initializeRandomState, randomizeTentacleTeleports
storageInit NecroEdit_initLevelOptions, shrineInitialContents, storageInitComplex, storageInitCrate, storageInitRandom, Sync_storageInitPerPlayer
storageModify storageApplyEnemySubstitutions
items quirks_lobbyToggleable, applyDepthMultiplier, giveInitialInventory, shrinePregenerateItems
itemsUnlockable grantUnlockedItems
itemsTraining grantTrainingWeapons, Sync_grantPossessorTrainingWeapons
itemsExtraMode grantDancepadItems, CryptArena_grantPVPStartingItems
itemsEnsemble removeEnsembleItems, Sync_autoGrantPetStash
markSeen markSeen
runSummary clearRunSummary
participation lateJoinParticipation
editorLink establishEditorLink, NecroEdit_markChildEntitiesAsNonSerializable
sizeModifier activateInitialDwarfism, activateInitialGigantism
tileEffects (unused)
sprite CharacterSkins_applyCharacterSkin, Sync_colorByTileset, Sync_spriteTileset, initSpriteUniqueIndex, initializeHoverEffect, selectRandomOffset, selectRandomOrientation, selectRandomSpriteVariant, spawnableFocusFadeEffect
particles NecroEdit_revealOnSpawn, CryptArena_currencyCandySpriteID, particleSpawn
label initializeWorldLabel, updateLocalCoopTriggerLabel
sound NecroEdit_silenceAggroSound, playVoiceAggroOnSpawn, playerGreetingVoice, reveal, voiceSpawn
audioLoop startAudioLoop
activationRange Sync_mannequin
spawnExtras CryptArena_chestEnemies, doppelganger, kingCongaThrone, makeSecretShop, noReturn, phasingInnateItem, phasingRowOrder, setBellNums, spawnAttachment, spawnFollower, spawnLuteHead
spriteStatic updateStaticPosition
lightPosition (unused)
light (unused)
collision updateCollision
attackable initializeAttackableFlags
spell Sync_fixCasterActivationDelay, blockTopRowSpawns, castOnSpawn
turnStartPosition turnStartPosition
charm Sync_charmOnSpawn
merge (unused)
upgrade convertVocalEntity
beatDelay (unused)
objectRowMap (unused)
unlock checkDiamondTriggerUnlock, checkModeTriggerUnlock, checkTriggerUnlock, unlockEnemy
zoneUnlock checkZoneTriggerUnlock
playerHealthOverride healthOverride, CryptArena_forceDefaultLobbyHealth
enforceMaxHealth enforceMaxHealth
convert NecroEdit_convertPlayerToEditorController, CryptArena_replaceSeasonalShopkeeper

event.objectSpecialAction

Fired when an object is trying to perform a non-directional action (idle, spell, bomb...)

Type Field Description
Action.Special action the attempted special action
integer x position of the entity as the action started
integer y position of the entity as the action started
integer dx always 0
integer dy always 0
Action.Result result the result of the action
Order Handlers
teamChange (unused)
storeAction storeAction
idle idle
failOnIdle failOnIdle
previousPosition previousPositionResetOnIdle, previousPositionResetOnSpecialAction
preActionDelay interceptNDActionDelay
actionDelay interceptActionDelay
tween (unused)
custom handleCustomPlayerAction
innate conductorSpells, doppelganger, handleClonking, strikeBell
innateSpell innateSpellcasts
bomb (unused)
item useActiveItem
holster (unused)
reload (unused)
toggle (unused)
throw (unused)
despawn (unused)
animation hopInPlaceOnIdle
hasMoved resetHasMoved
slide slide
slideSubBeat (unused)
requeue quirks_previousPositionResetOnIdle, requeue
faceTarget (unused)
beatDelay (unused)
ai (unused)
moveOverride (unused)
damageCountdown (unused)
grooveChain (unused)
teamReset (unused)

event.objectSpectate

Fired when the player controlling an object starts spectating (excluding auto-spectate on death)

Type Field Description
Player.ID playerID ID of the player that started spectating
boolean? suppressed if true, the player is not allowed to begin spectating
Order Handlers
checkDescent (unused)
player updatePlayerSpectatorState
spectator updateEntitySpectatorState
intangible makeIntangible
descent checkExitCondition

event.objectStasis

Fired when an object enters or leaves stasis

Type Field Description
boolean active true when entering stasis, false when leaving stasis
Order Handlers
attackability stasisAttackability
healthBar (unused)
ai (unused)
spell castOnStasis
sprite stasisMinimapPixel
particles particleUnstasis
voice voiceUnstasis

event.objectTakeDamage

Fired when an object takes damage from another object (event filter is based on damage receiver)
Note: code that sets ev.suppressed = true is expected to also set ev.damage = 0.

Type Field Description
Entity? attacker the entity dealing damage (may be nil)
boolean? survived if true, the entity survived the hit
boolean? armored if true, an armor reduced the amount of damage dealt by this event
boolean? shielded if true, a shield reduced the amount of damage dealt by this event
integer remainingDamage amount of damage that has not yet been subtracted from the entity's health
Order Handlers
friendlyFire CryptArena_panicButton, friendlyFireProtection
immunity CryptArena_pvpTotalInvincibility, applyDescentImmunity, applyDespawnedImmunity, applyPendingRespawnImmunity, followerProtectedByParent, lobbyDamageImmunity, multiHitProtection
conditionalInvincibility CryptArena_projectionDamage
suppressTypedEarly NecroEdit_checkPriceTag
parry Sync_grabRetaliation, performParry
invincibility applyInvincibility, applySpawnInvincibility, unrevealedDamageImmunity
grantInvincibility grantInvincibility
setKnockback setKnockback
suppressTypedLate damageTypeImmunity, grabProtection
barrier applyBarrier, depleteConductorBattery
suppressFirst (unused)
suppressEarly dismountOnHit
suppressLate (unused)
suppressLast (unused)
increase (unused)
attackInhibition inhibitAttacks
shieldDirection (unused)
shieldBypass quirks_checkShieldFrameBypass, Sync_checkShieldMultiDirection, Sync_shieldMultiHit, checkShieldDamageBypass, checkShieldDirection
shieldBreak conductorInstrumentShieldBypass, shieldBreakOnBypass, shieldBreakOnHit
shield quirks_luteShield, applyShield, beatDelayShield, chargeShield, grabShieldFromVictim, kingCongaShield, luteShield, necrodancerShield, stasisShield, wiredShield, Sync_applyNonTargetShield, Sync_applyStunShield, Sync_applyTargetShield
shieldDodge deathMetalShieldBreak, shieldDodge, Sync_shieldDodge
shieldInhibitAction shieldInhibitAction
shieldEffect quirks_setShieldFrameBypass, quirks_shieldHeal, Sync_createOneOffShieldFlyaway, Sync_shieldKnockbackFromTarget, convertOnShieldBreak, createShieldFlyaway, playShieldBreakSound, playShieldHitSound, shieldDamageType, shieldKnockback, shieldReflectDamage, shieldSuppressHitSound, shieldSuppressHitVoice, shieldedHitVoice, Sync_shieldStasis
sizeModifiers (unused)
dwarfism applyDwarfismMultiplier
armor (unused)
armorLate (unused)
amplify (unused)
gigantism applyGigantismMultiplier
freeze inflictFreeze
vulnerability damageTypeVulnerability
armorMinimumDamage armorMinimumDamage
painShrine Sync_shrineOfFire, activatePain, CryptArena_dropCandyFromPile
thaw thawFrozenObject
provoke provoke
shatter (unused)
holsterAutoSwap (unused)
moveOverride Sync_grabDetachFromLastPlayer, Sync_grabDragOnHit
startCharge Sync_startChargeIfVacant, startCharge
redirectCharge redirectCharge, redirectDeadRingerCharge, storeChargeDirection
deathProtection (unused)
health CryptArena_poison, Sync_possessionHealth, reduceHealth
cursedHealth reduceCursedHealth, Sync_possessionOnKill
healthConvert lowHealthConvert
grooveChain dropGrooveChain
sprite healthBarShowOnDamage
audioFilter setAudioFilterTarget
revive nextPhase
castOnLethalHit castOnLethalHit, changeConfiguration
speculate speculatePlayerDeath
soundEarly squishVoice
sound genericHitSound, grabHitSound, hitVoice
audioLoopStart startAudioLoop
audioLoopTarget setAudioLoopTarget
screenFlash drawScreenFlash
healthBar (unused)
target Sync_mannequinMorph, Sync_targetLockCycleOnHit, Sync_targetLockProvoker, Sync_targetLockSwitchNearestOnHit, targetAttacker
ai fortissimoleBurrowing
conditionalDamage (unused)
noCredit noCredit
hitstop hitstopOnDamage
soulLink (unused)
death CryptArena_pvpPlayerCheckKill, quirks_teleportToAttacker, checkDeath
statistics invalidateSnipe
particles particleBeheading, particleShieldBreak, particleTakeDamage
swapEntities swapEntitiesOnDeath
spell CryptArena_summonElves, Sync_startArc, clearCharm, goolemCastOnHit, luteCopyHealthToBody, spawnMiniboss
knockback applyKnockback
shieldSetBeatDelay shieldSetBeatDelay
spellLate castOnHit, castOnHitDeferred, castOnShieldHit, deathMetalHitTriggers, deepBluesTeleport, kingCongaTeleport, resetMetrognomeOnHit, spawnOnHit, spawnWallsOnHit, quirks_pixieRapier
reflect reflectProjectile
tween bounceTweenOnHit
screenShake shakeScreenOnHit

event.objectTangible

Fired when an object becomes tangible, including just after spawning

Type Field Description
Entity? conversion If this tangibility occurred due to a conversion, contains the target prototype
Order Handlers
focusedEntities updateFocusedEntities
extras Sync_deployedItemIdleCollision, makeSoulsTangible
objectMap addMultiTileObjectToMap, addObjectToMap, prependObjectToMap
objectRowMap (unused)
collision addMultiTileCollision, addToCollisionMap, markPendingMerge
equipment equipItems
light initializeLightSource, visionRaycast
levelExit unlockStairs
targeting addToTargetingTeam
targetingOverride (unused)
apparition forceApparitions
readTileInfo readTileInfo
tileEffects provokeOnWallRemoval, updateShrink, updateSunken, updateWired
sprite initializeHoverEffect, spriteOffsetIfAboveWall
facing initFacingDirection
followerCollectGold followerCollectGold
markSeen markSeen

event.objectTeamChange

Fired when an object's team changes

Type Field Description
Team.Id teamID ID of the new team
Team.Id prevTeamID ID of the old team
Order Handlers
team changeTeam
targeting updateTargeting
bossMinion provokeOnMinionBetrayal
follower (unused)
stairLocker stairLocker
ambush endAmbush
soulFollowers updateSoulTeams

event.objectTelefrag

Fired when an object is telefragged

Type Field Description
Entity attacker the entity causing the telefrag
boolean suppressed if true, telefrag effects are nullified
Order Handlers
suppress Sync_charmableTelefrag
takeDamage takeDamage

event.objectTickle

Fired when an object is "tickled", causing it to drop its gold and items and granting kill credit to the attacker

Type Field Description
Entity attacker the entity performing the tickle
Order Handlers
counter increaseCounter
dropCurrency dropItems
dropItems (unused)
stasis stasis
grooveChain (unused)
killCredit grantKillCredit
damage takeDamage
captiveAudience uncaptivateAudience
ambush endAmbush
provoke provoke
spell castOnTickle
convert convertEntity
boss deathMetalTickleDelay, defeatBoss, kingCongaTickle
audioLoop stopAudioLoop

event.objectTileChange

Fired when the tile under an object is changed. By the time this function is called, the tile has already changed

Type Field Description
Tile.ID tileType the new type of the tile at the object's position
Tile.Info tileInfo information table for tileType
Order Handlers
transformationTimer (unused)
tileEffects provokeOnWallRemoval, updateShrink, updateSunken, updateWired
despawn despawnNecrodancerTraps, despawnOnTileChange, despawnOnWallRemoval, teleportOnWallRemoval
wireVisibility (unused)
sprite Sync_spriteTileset
sound (unused)

event.objectTravel

Fired when an entity travels to another location via a rune

Type Field Description
integer x target X coordinate
integer y target Y coordinate
Entity trap the travel rune entity responsible for the movement
Action.Result result the result of the movement
Order Handlers
audioSpatialLink audioSpatialLink
lobby CryptArena_lobbyPvPArea, avoidPlayers
move moveObject
soulLink (unused)
nearbyVacant findNearbyVacantTile
fallbackMove fallbackMove
apparition (unused)
trap disarmTraps

event.objectTryCollectItem

Fired when an object is trying to pick up an item from the ground

Type Field Description
Entity item the item entity to be picked up
boolean silent if true, no sound effect will be played when the item is successfully picked up
integer count 0 for the preAI pickup, N for the Nth postAI pickup
ItemPickup.Result result the result of the item collection event
boolean? ignoreBans If true, item bans and slot drop bans are ignored when determining success
ItemPickup.Result? forwardedResult Original result if the item pickup was forwarded to another entity
Entity? collector Optional item that is responsible for this item collection event (e.g. Ring of Gold)
Order Handlers
checkItem Sync_mannequinItems, checkItem
ignoreBans ignoreBans
requiredComponent requiredComponent
cursedSlot (unused)
itemBans Sync_possessionStorageInit, itemBans, noLuteForDad
checkSlotReplacable checkSlotReplacability
priceTag checkPriceTag
ignoreSingleChoice (unused)
arena startArenaFight
singleChoice singleChoice
override (unused)
blockDuplicates (unused)
holster Sync_possessionStoragePickup
lowPercent itemPercent
add collectItem
soulLink (unused)
itemBanDamage itemBanDamage
pickupEffects Sync_mannequinItemPickupEffect, playPickupEffects

event.objectUnconfuse

Fired when an object ceases to be confused

Order Handlers
boss lutePhaseChange
confusion resetActivationRange, resetAggro, resetConfusionTime
ai (unused)
deaggro (unused)

event.objectUnfreeze

Fired when an object thaws

Order Handlers
thaw resetFreezeTime
attachment (unused)
attackability updateAttackableFlags

event.objectUngrab

Fired when an object releases its grab of another object (including if the grabbed entity despawns)

Type Field Description
Entity victim the entity being released
Order Handlers
detach detachFromVictim, grabAttachment
rowOrder ungrabRowOrder
collision resetCollision
attackability updateAttackability
statusEffects removeConfusion
ai restoreAI
health decreaseHealth
drops giveKillCredit

event.objectUngrow

Fired when an object reverts to normal size after being gigantic

Type Field Description
boolean? suppressed if true, the event is cancelled and the object will not reset its size
Order Handlers
resetSize (unused)
health resetHealthMultiplier
turnCounter resetGigantism
attackable updateAttackability
sprite updateScale

event.objectUnshrink

Fired when an object reverts to normal size after being tiny

Type Field Description
boolean? suppressed if true, the event is cancelled and the object will not reset its size
Order Handlers
resetSize (unused)
turnCounter resetDwarfismTimer
voice (unused)
sprite (unused)

event.objectUnshrinkEffects

Order Handlers
voice playVoiceLine
sprite updateScale

event.objectUnsink

Fired when an object frees itself from a liquid tile

Type Field Description
integer x X position of the liquid tile
integer y Y position of the liquid tile
Tile.Info tileInfo tileInfo table of the liquid tile
table liquid table containing information about the liquid tile
boolean? immunity true if the object has unsink immunity
Order Handlers
immunity quirks_repeatedSinkImmunity, gigantismUnsinkImmunity, grabberImmunity, innateImmunity
sound playUnsinkSound
animation CryptArena_keepDrowning, hopInPlace, playUnsinkAnimation
particles particleUnsink
unsink unsinkEntity
tile transformLiquidTile

event.objectUnspectate

Fired when the player controlling an object stops spectating

Type Field Description
Player.ID playerID ID of the player that stopped spectating
boolean? suppressed if true, the player is not allowed to join the game
Order Handlers
checkDescent (unused)
ascent performAscent
player updatePlayerSpectatorState
participation updatePlayerParticipation
spectator updateEntitySpectatorState
descent updateDescentSpectatorState
rhythmLeniency grantRhythmLeniency
tangible restoreTangibility
move moveToVacantTile

event.objectUpdateAttackability

Fired when an object's attackability needs to be recomputed

Type Field Description
Attack.Flag flags bitmask of flags describing the entity's targetability by specific attacks
Order Handlers
initialize initializeFlags
stasis stasisAttackability
provokable provokable
gigantism gigantismAttackableFlags
freeze freezeAttackableFlags
grab grab
item (unused)
descent descentAttackProtection
boss nd2TrapProtection, shieldAttackability
controllable playerControlled, playerControlledDad
finalize quirks_pendingDespawn, CryptArena_pvpTotalInvincibility, applyEffectiveFlags

event.objectUpdateCloneSprite

Fired when a clone-like character mimics the appearance of a specific target entity

Type Field Description
Entity target Object to mimic the appearance of
Order Handlers
sprite copyCloneSprite
offset copyMirrorOffsetX
shadow copyShadowSize
animation copyAlternateAnimation
skin CharacterSkins_applyCharacterSkin

event.objectUpdateCollision

Fired when an object's collision masks needs to be recomputed

Type Field Description
Collision.Type mask currently computed value for the object's collision.mask
Collision.Type checkOnMove currently computed value for the object's collisionCheckOnMove.mask
Collision.Type checkOnTeleport currently computed value for the object's collisionCheckOnTeleport.mask
Collision.Type checkOnAttack currently computed value for the object's collisionCheckOnAttack.mask
Order Handlers
item Sync_charmableCollision, dadPreboss, itemEquipmentCollision
noPlayerCollision noPlayerCollision, CryptArena_noPlayerCollision
soulLink (unused)
grab grab
descent Sync_deployedItemIdle, descent
setMask quirks_pendingDespawn, setCheckOnAttack, setCheckOnMove, setCheckOnSlide, setCheckOnTeleport, setCollisionMask

event.objectUpdateEquipmentSprite

Fired when an equipment-dependent sprite is updated

Type Field Description
integer bodyRow the sprite sheet row to display
integer headRow the sprite sheet row to display
Order Handlers
items (unused)
itemsLate (unused)
apply applyBodyRow, applyHeadRow

event.objectUpdateHover

Fired when an object needs to recompute its visual hover effect

Type Field Description
boolean active set to true to activate the hover effect
boolean? instant if true, skips the gradual animation for toggling the hover effect
Order Handlers
default applyDefaultHoverEffect
item (unused)
descent disableHoverOnDescent
tangible disableWhileIntangible
apply applyHoverEffect

event.objectUpdatePerspective

Fired when a locally controlled or observed object's perspective is recomputed

Type Field Description
table perspective table of perspective attributes (see Perspective module)
Order Handlers
tileVision NecroEdit_vision, fullTileVision, invertShadows, temporaryTileVision
brightnessRate (unused)
objectVision CryptArena_spectatorPerspective, fullObjectVision, objectMinimapVisionItem, objectUnsilhouette
visionRadius objectVisionRadius, objectVisionRadiusActivationRange, tileVisionRadius, tileVisionRadiusActivationRange
goldOutline goldOutline
instantReplay instantReplayBonusVision
targetPointer (unused)
label (unused)

event.objectUpdateRhythm

Fired when a locally controlled or observed object's rhythm settings are recomputed

Type Field Description
boolean? ignoreRhythm if true, the rhythm is ignored entirely and the player may act freely (autoPlay overrides this)
boolean? autoPlay if true, idle inputs are automatically performed on the beat, rather than at the end of the beat window
number? subdivision specifies the number of beats each beat should be subdivided into
Order Handlers
ignore NecroEdit_ignoreRhythmInEditor, ignoreRhythmInnate, ignoreRhythmOnND2BossSplash, lobbyIgnoreRhythm
ignoreTemporarily ignoreRhythmTemporarily
autoPlay slideAutoPlay
irregular skipEveryNth
subdivision subdivisionInnate
customMode applyCustomRhythmMode
subdivisionItem (unused)
spectator suspendRhythmWhileSpectating
respawnPending suspendRhythmWhileDead
musicChange musicChange
inherit (unused)
autoPlayConditional chargeAutoPlay

event.objectUpdateScale

Fired when an object needs to recompute its visual scale

Type Field Description
number scale the object's scale factor (default 1)
Order Handlers
multiply spriteDwarfismScale, spriteGigantismScale
sprite applyScaleToSprite
shadow applyScaleToShadow

event.objectUpdateTangibility

Fired when an object's tangibility needs to be recomputed

Type Field Description
boolean tangible currently computed value for the object's gameObject.tangible
Order Handlers
descent descent
spectator spectator
killable killable
item item
itemTangible itemEquipped
storable storable
apparition apparition
caster inheritFromCaster
casterSegment casterSegment
soulLink soulLink
follower (unused)

event.objectUpdateTargetability

Fired when an object's targetability needs to be recomputed

Type Field Description
boolean targetable Currently computed value for the object's targetable.active
Order Handlers
default default
provokable (unused)
possession (unused)
possessor (unused)
descent descentUntargetable
vanish CryptArena_vanishUntargetable
lobby CryptArena_lobbyUntargetable
intangible intangible
apply applyTargetability

event.objectUpdateTextLabel

Fired when a text label entity needs to recompute the text displayed on it (spawn, change language)

Type Field Description
string text the text string to apply to this label entity
Order Handlers
entityLookup performEntityLookup
inputBinding getInputBinding
localizable getLocalizedString
localizableAppend appendLocalizedString
appendStatic appendStaticString
personalStats personalStats
formatting applyFormatting
color applyColor
apply applyText

event.objectUpdateWireLevel

Fired when an object's wire level needs to be recomputed

Type Field Description
integer level the new wire level
Order Handlers
tileWire applyTileWire
tileWireImmunity (unused)
conductorWired conductorWired
itemWire CryptArena_timedWire
conditionalDamage (unused)
convert (unused)
beatDelay (unused)
animation startWireAnimationTimer
save saveWireLevel
wiredShield (unused)

event.objectVocalize

Fired when an object plays a vocalization sound effect

Type Field Description
string soundGroup the name of the sound group to be played back as a vocalization
integer x the horizontal position to play the vocalization at
integer y the vertical position to play the vocalization at
number? volume the volume to play the vocalization at (default/full volume: 1)
number? pitch the pitch to play the vocalization at (default: 1)
Order Handlers
deduplicationID (unused)
alternative alternative
pitchMultiplier CryptArena_modifyPitch, modifyPitch
volumeMultiplier modifyVolume, modifyVolumeByCaster
gigantism modifyPitchGigantism
dwarfism modifyPitchDwarfism
omnipresentVoice omnipresentVoice
channel applyVoiceChannelMask
subtitles subtitles
sound playSound