Lua hooks¶
C# looks up these function names on the script table returned by
LuaScriptPath and calls them during gameplay. Override the ones you
need on a table that inherits the matching base class
(require("Content/Lua/HeldItem"), etc.).
Flora¶
Source: Content/Lua/Flora.lua.
| Hook | Signature |
|---|---|
addedToWorld |
Flora:addedToWorld() |
damaged |
Flora:damaged(damage) |
initialize |
Flora:initialize() |
removedFromWorld |
Flora:removedFromWorld() |
trunkBreak |
Flora:trunkBreak() |
update |
Flora:update() |
HeldItem¶
Source: Content/Lua/HeldItem.lua.
| Hook | Signature |
|---|---|
animationCompleted |
HeldItem:animationCompleted(monster, animationName) |
equip |
HeldItem:equip() |
hitBlock |
HeldItem:hitBlock(tileX, tileY, hitLocation, velocityAtImpact) |
hitCreature |
HeldItem:hitCreature(creature, hitLocation) |
holsterStart |
HeldItem:holsterStart() |
initialize |
HeldItem:initialize() |
keyframeTriggerEvent |
HeldItem:keyframeTriggerEvent(triggerString) |
meleeAttackEnd |
HeldItem:meleeAttackEnd() |
meleeAttackStart |
HeldItem:meleeAttackStart() |
meleeAttackUpdate |
HeldItem:meleeAttackUpdate() |
meleeStruckBlock |
HeldItem:meleeStruckBlock(tileX, tileY, hitLocation) |
meleeStruckDeposit |
HeldItem:meleeStruckDeposit(deposit, hitLocation) |
performAction |
HeldItem:performAction(actionIndex) |
performActionNetworked |
HeldItem:performActionNetworked(actionIndex) |
primaryAttackEnd |
HeldItem:primaryAttackEnd() |
primaryAttackStart |
HeldItem:primaryAttackStart() |
primaryAttackUpdate |
HeldItem:primaryAttackUpdate() |
projectTrajectory |
HeldItem:projectTrajectory() |
reloadEnd |
HeldItem:reloadEnd() |
reloadStart |
HeldItem:reloadStart() |
reloadUpdate |
HeldItem:reloadUpdate() |
removedFromWorld |
HeldItem:removedFromWorld() |
secondaryAttackEnd |
HeldItem:secondaryAttackEnd() |
secondaryAttackStart |
HeldItem:secondaryAttackStart() |
secondaryAttackUpdate |
HeldItem:secondaryAttackUpdate() |
start |
HeldItem:start() |
unequip |
HeldItem:unequip() |
updateInWorld |
HeldItem:updateInWorld(gameTime) |
updateWhileEquipped |
HeldItem:updateWhileEquipped(gameTime) |
MeleeWeapon¶
Source: Content/Lua/MeleeWeapon.lua.
| Hook | Signature |
|---|---|
animationCompleted |
MeleeWeapon:animationCompleted(monster, animationName) |
equip |
MeleeWeapon:equip() |
hitBlock |
MeleeWeapon:hitBlock(monster) |
hitCreature |
MeleeWeapon:hitCreature(monster) |
initialize |
MeleeWeapon:initialize() |
keyframeTriggerEvent |
MeleeWeapon:keyframeTriggerEvent(triggerString) |
primaryAttackEnd |
MeleeWeapon:primaryAttackEnd() |
primaryAttackStart |
MeleeWeapon:primaryAttackStart() |
primaryAttackUpdate |
MeleeWeapon:primaryAttackUpdate() |
secondaryAttackEnd |
MeleeWeapon:secondaryAttackEnd() |
secondaryAttackStart |
MeleeWeapon:secondaryAttackStart() |
secondaryAttackUpdate |
MeleeWeapon:secondaryAttackUpdate() |
start |
MeleeWeapon:start() |
unequip |
MeleeWeapon:unequip() |
updateWhileEquipped |
MeleeWeapon:updateWhileEquipped() |
Projectile¶
Source: Content/Lua/Projectile.lua.
| Hook | Signature |
|---|---|
hitBlock |
Projectile:hitBlock(tileLocX, tileLocY, collisionPoint, velocityAtImpact) |
hitCreature |
Projectile:hitCreature(creature, collisionPoint) |
initialize |
Projectile:initialize() |
start |
Projectile:start() |
update |
Projectile:update() |
StatusEffect¶
Source: Content/Lua/StatusEffect.lua.
| Hook | Signature |
|---|---|
applyEffect |
StatusEffect:applyEffect(entity, duration, intensity) |
initialize |
StatusEffect:initialize() |
Structure¶
Source: Content/Lua/Structure.lua.
| Hook | Signature |
|---|---|
animationComplete |
Structure:animationComplete(triggerString) |
damagedBone |
Structure:damagedBone() |
getState |
Structure:getState() |
initialize |
Structure:initialize() |
isAtPoint |
Structure:isAtPoint(globalPoint) |
keyframeTriggerEvent |
Structure:keyframeTriggerEvent(triggerString) |
receivedMessage |
Structure:receivedMessage(message) |
setState |
Structure:setState(newState) |
use |
Structure:use() |
Throwable¶
Source: Content/Lua/Throwable.lua.
| Hook | Signature |
|---|---|
hitBlock |
Throwable:hitBlock(tileX, tileY, hitLocation, velocityAtImpact) |
hitEntity |
Throwable:hitEntity(entity) |
initialize |
Throwable:initialize() |
removedFromWorld |
Throwable:removedFromWorld() |
Generated 2026-08-02T05:22:21.4279488Z · a7346a83 · 7 base classes.