Table of Contents

Havok Behavior Script

Covers all of the exposed functions available within Havok Script files (.hks).

Havok Script exposes the following Lua libraries:

General

Name Parameters Notes
act <action id>, <value> Used for FromSoftware commands in Havok Script
env <condition id>, <value> Used for FromSoftware conditions in Havok Script
ActivateRightArmAdd <frame index>: ?
CalcArmTwistAngle ? ?
ChangeWaistTwist <a>, <b>, <c>, <d> ?
ConvergeValue <value 1>, <value 2>, <increment value>, <decrement value> ?
DebugPrint <index>, <value> ?
ForwardLeg - Returns the index of the forward leg
IncNum ? ?
IsRightArmAddState ? ?
PrintString ? ?
RightArmLocation ? ?
SetTimeActEditorVariable ? ?
UpdateFemaleBlend ? ?
UpdateRightArmAdd ? ?
UpdateShoulderTwist ? ?
UpdateWristTwist ? ?

Havok-Specific

Name Parameters Notes
hkbAssignLineDockingTarget ? ?
hkbAssignNullDockingTarget ? ?
hkbAssignPlaneDockingTarget ? ?
hkbCastRay ? ?
hkbFireEvent <event name> The name corresponds to the events listed in eventnameid.txt
hkbGetBoneIndex ? ?
hkbGetBoneLocalSpace ? ?
hkbGetBoneModelSpace <bone name> Returns a hkbBone object
hkbGetBoneName ? ?
hkbGetBoneParent ? ?
hkbGetCharacterControllerIsSupported ? ?
hkbGetCharacterControllerSupportingNormal ? ?
hkbGetCharacterControllerVelocity ? ?
hkbGetHandleEventName ? ?
hkbGetNumBones ? ?
hkbGetOldBoneLocalSpace ? ?
hkbGetOldBoneModelSpace ? ?
hkbGetOldWorldFromModel ? ?
hkbGetRagdollBalanceErrorModelSpace ? ?
hkbGetTimestep ? ?
hkbGetUpAxis ? ?
hkbGetVariable <variable name> Returns the value from a Havok variable.
hkbGetWorldFromModel ? ?
hkbIsBoneValid ? ?
hkbIsNodeActive ? ?
hkbLoadAnimationAssets ? ?
hkbPrint ? ?
hkbSetBoneLocalSpace ? ?
hkbSetBoneModelSpace ? ?
hkbSetVariable ? ?
hkbSetWorldFromModel ? ?
hkbUnloadAnimationAssets ? ?

havokscript

Name Parameters Notes
havokscript.compilerSettings ? ?
havokscript.getgcweights ? ?
havokscript.setgcweights ? ?

hkDebugDisplay

Name Parameters Notes
hkDebugDisplay.showLine ? ?
hkDebugDisplay.showPoint ? ?

hkQsTransform

Name Parameters Notes
hkQsTransform.new ? ?

hkQuaternion

Name Parameters Notes
hkQuaternion.new ? ?

hkVector4

Name Parameters Notes
hkVector4.new ? ?