Skip to content

Script bindings: Characters

Verified against: SLUS_212.15 (NTSC-U, SHA1 e9cb2cc49aa046b9e494313dce2f5038ed17b2f4).

Bindings for one human: creation, state, health, animation, commands, the player's crew: 204 in all. Conventions, the other categories and how to read an entry are on the masterlist.

Binding Returns Scripts Boot Mission 1 Evidence
AddAllAnimCallback boolean 1 no no confirmed (code)
AddAnimCallback boolean 3 no yes confirmed (code)
AddCommand - 2 yes no confirmed (code)
ClimbFilter - 1 no no confirmed (code)
CullCorpses boolean 3 no no confirmed (code)
DelAnimCallback - 3 no yes confirmed (code)
DelCommand - 6 no no confirmed (code)
EnableCommand - 19 no yes confirmed (code)
EnableCommands - 8 no yes confirmed (code)
ForceCommand - 0 no no confirmed (code)
GetDistanceTweenHumans number 6 yes no confirmed (code)
HuActionDialog - 7 no no confirmed (code)
HuApplyDamageModifier - 8 no no confirmed (code)
HuAreActionsBlocked boolean 4 no no confirmed (code)
HuAttachGear - 2 yes no confirmed (code)
HuAttachSpinningIcon - 18 no yes confirmed (code)
HuBlockClimb - 1 no no confirmed (code)
HuBlockFrontGrab - 0 no no confirmed (code)
HuBlockGrab - 1 no no confirmed (code)
HuBlockJump - 7 no no confirmed (code)
HuBlockLook - 46 no no confirmed (code)
HuBlockRearGrab - 1 no no confirmed (code)
HuBlockTackle - 3 no no confirmed (code)
HuButtonMiniGame - 2 no no confirmed (code)
HuCanSee boolean 2 no no confirmed (code)
HuChangePlayerGang boolean 12 no yes confirmed (code)
HuClearLook - 5 no no confirmed (code)
HuColor - 6 no no confirmed (code)
HuCreate number 100 no yes confirmed (code)
HuDelete - 80 no no confirmed (code)
HuDrop - 0 no no speculative
HuDropWeapon - 29 yes yes confirmed (code)
HuEnableController - 7 no no confirmed (code)
HuEnableOnFire - 1 no no confirmed (code)
HuEnableSoundCommands - 57 no no confirmed (code)
HuEnableSpeaking - 21 no no confirmed (code)
HuEnableTagCheer - 1 no no confirmed (code)
HuEnableTagDone - 3 no no confirmed (code)
HuExitWorld - 41 no no confirmed (code)
HuFind number 0 no no confirmed (code)
HuForceEnableReticule - 3 no no confirmed (code)
HuForceLook - 3 no no confirmed (code)
HuGet number 0 no no confirmed (code)
HuGetCharType number 7 no no confirmed (code)
HuGetControlName string 1 no no confirmed (code)
HuGetGang number 104 yes no confirmed (code)
HuGetGangType number 35 yes yes confirmed (code)
HuGetHeading number 0 no no confirmed (code)
HuGetHealthPercent number 25 no yes confirmed (code)
HuGetHeldObject number 23 no yes confirmed (code)
HuGetHUD number 0 no no confirmed (code)
HuGetMoney number 1 no no confirmed (code)
HuGetPlayer number 0 no no confirmed (code)
HuGetPosition usertype 5 no no confirmed (code)
HuGetVoiceIndex number 2 no no confirmed (code)
HuGiveCuffs - 2 no no confirmed (code)
HuGiveWeapon - 0 no no speculative
HuHasHat number 8 no no confirmed (code)
HuInCombat boolean 1 no no confirmed (code)
HuIsAimingAt boolean 1 no no confirmed (code)
HuIsAlive boolean 157 yes yes confirmed (code)
HuIsAPlayer boolean 167 yes yes confirmed (code)
HuIsArrested boolean 13 yes yes confirmed (code)
HuIsDead boolean 3 yes no confirmed (code)
HuIsGrabbed boolean 2 no no confirmed (code)
HuIsHidden boolean 4 no no confirmed (code)
HuIsInScene boolean 1 no no confirmed (code)
HuIsMugged boolean 0 no no confirmed (code)
HuIsOnFire boolean 2 no no confirmed (code)
HuIsProne boolean 0 no no inferred
HuIsTagging boolean 3 no no confirmed (code)
HuKill - 29 no no confirmed (code)
HuLockMovement - 35 no no confirmed (code)
HuLockPad - 37 no yes confirmed (code)
HuLockPadMovement - 10 no no confirmed (code)
HuMakeBeatUp - 1 no no confirmed (code)
HuMakeGrounded - 3 no no confirmed (runtime)
HuMarkReachable - 9 no no confirmed (code)
HuPlaceHatOnHead - 0 no no inferred
HuPlaceItemInHand number 62 yes yes confirmed (code)
HuPlayDynamicAnim - 1 no no confirmed (code)
HuPlayDynAnim - 1 no no confirmed (code)
HuPlayDynPair - 1 no no confirmed (code)
HuPutItemInPocket - 28 no no confirmed (code)
HuRemoveItemInPocket - 36 no no confirmed (code)
HuRemoveSpinningIcon - 55 no yes confirmed (code)
HuRender - 0 no no speculative
HuRevive - 55 yes yes confirmed (code)
HuRubberNeck - 2 no no inferred
HuSay - 3 no no confirmed (code)
HuSetAccurate - 0 no no speculative
HuSetArrested - 51 yes yes confirmed (code)
HuSetAutoCombat - 4 no no confirmed (code)
HuSetAutoEscape - 8 no no confirmed (code)
HuSetBlockFromReact - 0 no no inferred
HuSetBlurMode - 2 no no confirmed (code)
HuSetButtonTapControl - 3 no no confirmed (code)
HuSetCanBlockKD - 0 no no speculative
HuSetCarriedItem - 37 no yes confirmed (code)
HuSetCombatMode - 5 no no confirmed (code)
HuSetConscious - 4 no no confirmed (code)
HuSetDamage - 2 no no confirmed (code)
HuSetDemiGodMode - 8 no yes confirmed (code)
HuSetDoubleDamage - 1 no no confirmed (code)
HuSetFastClimber - 12 no yes confirmed (code)
HuSetFireProof - 8 no no confirmed (code)
HuSetFullRage - 1 yes yes confirmed (code)
HuSetGodMode - 81 yes yes confirmed (code)
HuSetHardToStun - 0 no no confirmed (code)
HuSetHealth - 23 no no confirmed (code)
HuSetHealthPercent - 17 no yes confirmed (code)
HuSetHearRange - 5 no no confirmed (code)
HuSetHelpHearRange - 2 no no confirmed (code)
HuSetIdleAnim - 0 no no inferred
HuSetIdleDialogMaxIter - 2 no no confirmed (code)
HuSetIncreasedReact - 2 yes yes confirmed (code)
HuSetInterrogation boolean 5 no no confirmed (code)
HuSetKeepHat - 7 no no confirmed (code)
HuSetKeepWeapon - 12 yes yes confirmed (code)
HuSetKillerMode - 4 no no confirmed (code)
HuSetLockedRage - 3 yes yes confirmed (code)
HuSetLookAtTarget - 3 no no confirmed (code)
HuSetLookPos - 0 no no confirmed (code)
HuSetLookTarget - 41 no yes confirmed (code)
HuSetLOSRange - 27 no no confirmed (code)
HuSetManualStun - 0 no no inferred
HuSetMass - 0 no no confirmed (code)
HuSetMaxHealth - 39 no no confirmed (code)
HuSetMoney - 55 no yes confirmed (code)
HuSetMug - 18 no no confirmed (code)
HuSetMugCallback - 6 no yes confirmed (code)
HuSetName - 1 no no confirmed (code)
HuSetNoAutoLock - 4 no no inferred
HuSetNoEscape - 0 no no inferred
HuSetNoReact - 10 no no confirmed (code)
HuSetNormalMode - 82 no yes confirmed (code)
HuSetNoTarget - 31 no yes confirmed (code)
HuSetNoThrowWeapon - 1 no yes confirmed (code)
HuSetOnFire - 3 no no confirmed (code)
HuSetPedReaction - 2 no no confirmed (code)
HuSetPreventRage - 44 no yes confirmed (code)
HuSetPushable - 48 yes yes confirmed (code)
HuSetRageFrac - 1 no yes confirmed (code)
HuSetRageMode - 9 no no confirmed (code)
HuSetReducedReact - 7 yes yes confirmed (code)
HuSetRevivable - 56 no no confirmed (code)
HuSetScale - 17 no no confirmed (code)
HuSetSlowMo - 2 no no confirmed (code)
HuSetSpecialCallbacks - 0 no no inferred
HuSetSpinningIconColor - 0 no no confirmed (code)
HuSetStateRespVoiceIndex - 4 no no confirmed (code)
HuSetStrong - 0 no no inferred
HuSetStunned - 1 no no confirmed (runtime)
HuSetTireless - 50 yes yes confirmed (code)
HuSetUnarrestable - 4 no no confirmed (code)
HuSetUngrabbable - 23 yes yes confirmed (code)
HuSetUngroundable - 29 yes yes confirmed (code)
HuSetUnstunnable - 40 yes yes confirmed (code)
HuSetVoiceIndex - 2 no no confirmed (code)
HuSetWarChief boolean 4 no no confirmed (code)
HuSetWarChiefHUD - 0 no no speculative
HuSetWheelchairControl - 1 no no confirmed (code)
HuSetWorkoutBlend - 1 no no confirmed (code)
HuSetWorkoutCallbacks - 1 no no confirmed (code)
HuSetWorkoutParams - 0 no no speculative
HuSetWoundable - 20 no no inferred
HuSetWounded - 1 no no confirmed (code)
HuShadow - 10 no no confirmed (code)
HuShutUp - 39 no yes confirmed (code)
HuSpeak - 43 no yes confirmed (code)
HuSpeakNI - 101 no yes confirmed (code)
HuSpecial - 0 no no inferred
HuStopSpecial - 0 no no inferred
HuStopWorkout - 1 no no confirmed (code)
HuSwitchPlayer number 34 no no confirmed (code)
HuTag - 10 yes no confirmed (code)
HuTagColor - 9 no no confirmed (code)
HuTagDifficulty - 0 no no confirmed (code)
HuTagPattern - 7 yes no confirmed (code)
HuTeleportFollowers - 0 no no inferred
HuTeleportNearHuman - 7 no yes confirmed (code)
HuUseAnim boolean 103 no yes confirmed (code)
HuUseAnyAnim boolean 4 no no confirmed (code)
HuWhatAmIHolding number 3 no no confirmed (code)
HuWorkout - 1 no no confirmed (code)
IsAHuman boolean 1 no no confirmed (code)
IssueWarriorCommand - 7 no no confirmed (code)
KillHumans - 4 yes no confirmed (code)
LoadBumAnims - 8 no no confirmed (code)
ResetCommands - 1 yes no confirmed (code)
SetCharacterModel - 61 no no confirmed (code)
SetDeathTimer - 2 yes no confirmed (code)
SetDynamicAnimation - 88 no yes confirmed (code)
SwapPlayerControl - 0 no no inferred
Teleport - 54 no no confirmed (code)
TeleportToFlag - 162 no yes confirmed (code)
TurnWarriorCommands - 2 no no confirmed (code)
WalkingDistance number 5 no no confirmed (code)
WCEnableAllCommands - 20 no yes confirmed (code)
WCEnableAutomaticSwitching - 5 no no confirmed (code)
WCEnableCommand - 25 no no confirmed (code)
WCIssueCommand - 25 no yes confirmed (code)
WCLockCommands - 10 no no confirmed (code)
WCSetCallback - 4 no no confirmed (code)

AddAllAnimCallback

AddAllAnimCallback(anim, callback) -> boolean
# Argument Read as Meaning
1 anim number, truncated to an unsigned integer Animation id (an ANIM_* constant the level script defines) to watch for, on any human.
2 callback string Name of the Lua function to call, dotted names allowed ("C1.ThrowTalk"); stored interned and looked up when it fires.

Returns boolean (1 for true, nil for false): True when the callback was stored; nil when all 16 callback slots are in use.

Registers a Lua function to be called, as f(humanHandle, animId), each time any human starts playing the given animation. It takes the first of the 16 slots at 0x006b6710 whose handle does not resolve and whose all-humans flag is 0, stores the anim id, sets the flag and interns the name; the slot's handle field is left as it was.

Notes. Dispatch as for AddAnimCallback (first matching slot only). Remove it with DelAnimCallback(0, anim); AddAnimCallback can overwrite the slot since it does not test the flag. Details: Characters.

  • Evidence: confirmed (code) at 0x0023aab0; detail: traced
  • Wrapper 0x0035ea90 (registered by RegisterBindings); calls 0x0023aab0 AnimCallback_AddForAll
  • Used by 1 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level92 (flashback 2)
  • Coney: implemented

AddAnimCallback

AddAnimCallback(human, anim, callback) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human to watch (from HuCreate or similar).
2 anim number, truncated to an unsigned integer Animation id (an ANIM_* constant such as the fight idle or a grab hold) that triggers the callback.
3 callback string Name of the Lua function to call, dotted names allowed ("P1.ExplainGrappling"); stored interned through the script system and looked up by name when it fires.

Returns boolean (1 for true, nil for false): True when a free slot was found and the callback stored; nil when all 16 slots of the table at 0x006b6710 are taken.

Registers a Lua function to be called, as f(humanHandle, animId), each time this human starts playing the given animation; the first mission's tutorial uses it to react to the player idling, mounting or holding a grab. Entries live in a 16-slot table of {human, anim, all-humans flag, interned name}; an entry stays until DelAnimCallback or the next level.

Notes. The dispatch (0x0023ac50) runs synchronously when the animation code resolves the id to a clip to play (0x00175080), and only the first matching slot fires. A slot counts as free when its human handle no longer resolves, so entries of deleted humans (and, since the flag is not tested, all-humans entries) can be overwritten. Details: Characters.

  • Evidence: confirmed (code) at 0x0023a9f8; detail: traced
  • Wrapper 0x0035e9f8 (registered by RegisterBindings); calls 0x0023a9f8 AnimCallback_Add
  • Used by 3 of 467 script chunks (11 references); boot to menu: no; mission 1: yes; result used: no
  • Coney: implemented

AddCommand

AddCommand(command, trigger, buttons, extra)
# Argument Read as Meaning
1 command number, truncated to an integer Command id, 1 to 57 (others are ignored); the scripts assign the ids (global.lua binds 37 to 44 to the d-pad, for example). An existing binding of the same id is removed first.
2 trigger number, truncated to an integer How the buttons must be used, 1 to 9: 1 held, 2 newly pressed, 3 released, 4 a pad query at 0x00144c38, 5 tapped, 6 held for a while, 7 a hold over the 8-sample history, 8 a combination with every button of both masks held, 9 a combination with one newly pressed. Other values add nothing.
3 buttons number, truncated to an integer Button mask in the pad word layout (0x1000 up, 0x2000 right, 0x4000 down, 0x8000 left, 0x0010 triangle, 0x0020 circle, 0x0040 cross, 0x0080 square, 0x0004 L1, 0x0008 R1, 0x0001 L2, 0x0002 R2, 0x0100 select, 0x0800 start).
4 extra number, truncated to an integer For triggers 8 and 9 the second button mask of the combination; for triggers 1, 2 and 6 a minimum hold count the button must exceed (0 for none).

Returns nothing.

Binds a player command id to a gamepad button pattern; each frame the pad-controlled humans' pads are matched against the nine trigger tables and the matching command becomes the human's command for that update. New bindings start enabled for every pad.

Notes. Tables at 0x005ddd10 onwards, counts at 0x0050b740-0x0050b760, matched by 0x00147940. Commands are global (not per human); EnableCommand masks them per pad.

  • Evidence: confirmed (code) at 0x00147430; detail: traced
  • Wrapper 0x00369518 (registered by RegisterBindings); calls 0x00147430 PlayerCommand_Add
  • Used by 2 of 467 script chunks (35 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level84 (mission 18)
  • Coney: not implemented

ClimbFilter

ClimbFilter(enabled)
# Argument Read as Meaning
1 enabled boolean (nil or 0 is false) true turns the route penalties on (0x0051059c = 1), false off.

Returns nothing.

Makes AI route planning avoid special path edges. While on, each edge cost in the A* search (0x00251890) gets +200 (12.5 m) for flag-8 edges, +320 (20 m) for flag-0x80 edges (inferred: jumps/climbs) and +80 (5 m) for flag-4 choke points, and a route found through a 0x80 edge is searched again without such edges and the cheaper one kept (0x002511c8). Route requests whose edge mask has 0x100 are exempt. Only level 82 calls it, with true.

Notes. The name says climb; what edge flags 8 and 0x80 look like in play is not traced (ai-moving.md#path-planning). The switch is global and stays set until changed (not traced whether a level load clears it).

  • Evidence: confirmed (code) at 0x002511b8; detail: traced
  • Wrapper 0x0036e438 (registered by RegisterBindings); calls 0x002511b8 Climb_SetFilter
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level82 (flashback 1)
  • Coney: not implemented

CullCorpses

CullCorpses(all) -> boolean
# Argument Read as Meaning
1 all boolean (nil or 0 is false); default true true (the default) culls every eligible human; false only the one farthest from the camera. Any number counts as true (one script passes 88).

Returns boolean (1 for true, nil for false): true when at least one human was culled; nil otherwise.

Frees human slots during big fights by marking downed humans dead. It walks the 60 human slots and takes every human that has a state record, is not a player (flag word bit 0x4 clear), is out of the fight (0x00227e60) and fails the check 0x002283c8; each one (or only the farthest from the active camera when all is false) gets state flag 0x200000000, dead (Characters), after which the usual dead-human handling removes it.

Notes. What 0x002283c8 excludes is not traced (inferred: a human being carried or arrested). Distances are measured to the camera of view 0 (0x0011f9b0(0)). The removal path after the dead flag is not traced here.

  • Evidence: confirmed (code) at 0x00232230; detail: traced
  • Wrapper 0x0036d9c8 (registered by RegisterBindings); calls 0x00232230 Humans_CullCorpses
  • Used by 3 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level81 (mission 8)
  • Coney: not implemented

DelAnimCallback

DelAnimCallback(human, anim)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human the callback was registered for; 0 (or any value) also removes an all-humans entry for the animation.
2 anim number, truncated to an unsigned integer The animation id given to AddAnimCallback or AddAllAnimCallback.

Returns nothing.

Removes the animation callback for this human and animation (or the all-humans one for the animation), freeing its slot.

Notes. Only the first matching slot is removed.

  • Evidence: confirmed (code) at 0x0023ab80; detail: traced
  • Wrapper 0x0035eb00 (registered by RegisterBindings); calls 0x0023ab80 AnimCallback_Remove
  • Used by 3 of 467 script chunks (11 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 1 of 28 levels, first level92 (flashback 2)
  • Coney: implemented

DelCommand

DelCommand(command)
# Argument Read as Meaning
1 command number, truncated to an integer Command id, 1 to 57, as given to AddCommand; other values do nothing.

Returns nothing.

Removes a command's button binding, so its buttons no longer produce it. The nine trigger tables (12-byte entries at 0x005ddd10 onwards, counts at 0x0050b740-0x0050b760) are searched in order and the first entry with this id is cleared and the rest of its table moved down one place.

Notes. Only the first matching entry goes; a command bound twice (AddCommand already removes an old binding, so only by other means) keeps its second binding. An id with no binding does nothing.

  • Evidence: confirmed (code) at 0x00146b90; detail: traced
  • Wrapper 0x00369600 (registered by RegisterBindings); calls 0x00146b90 PlayerCommand_Remove
  • Used by 6 of 467 script chunks (11 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level84 (mission 18)
  • Coney: not implemented

EnableCommand

EnableCommand(human, command, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a pad-controlled human (a player); other humans are ignored.
2 command number, truncated to an integer Command id, 1 to 57, as bound with AddCommand.
3 enable number, truncated to an integer Non-zero enables the command for this human's pad, 0 disables it.

Returns nothing.

Enables or disables one player command for the pad that controls this human. The first mission turns two commands (37 and 38) off for its tutorial.

Notes. Sets or clears the pad's bit in the per-binding pad mask. A disabled command is still matched, but the matcher (0x00147940) stores it in the per-player record's pending +0x24 instead of +0x20, so the human does not act on it; the PadSetHandlerEx handler still receives it (PadSetHandlerEx, confirmed (runtime) for command 6). Command ids: Commands (6 is L1 held, 8 L1 released). Has no effect while the human is AI-controlled (player record +0x1b clear).

  • Evidence: confirmed (code) at 0x001467a8; detail: traced
  • Wrapper 0x00369638 (registered by RegisterBindings); calls 0x001467a8 PlayerCommand_EnableForHuman
  • Used by 19 of 467 script chunks (96 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 10 of 28 levels, first level80 (mission 2)
  • Coney: implemented

EnableCommands

EnableCommands(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a pad-controlled human (a player).
2 enable number, truncated to an integer Non-zero enables every bound command for this human's pad, 0 disables them all.

Returns nothing.

Enables or disables all player commands at once for the pad that controls this human, for cutscenes and scripted moments.

  • Evidence: confirmed (code) at 0x001463e0; detail: traced
  • Wrapper 0x003696d8 (registered by RegisterBindings); calls 0x001463e0 PlayerCommand_EnableAllForHuman
  • Used by 8 of 467 script chunks (19 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 4 of 28 levels, first level80 (mission 2)
  • Coney: implemented

ForceCommand

ForceCommand(human, command, ms)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a pad-controlled human.
2 command number, truncated to an integer Command id, 1 to 57.
3 ms number, truncated to an integer How long to force it, in milliseconds of game time.

Returns nothing.

Makes a player's human act as if the command's buttons were used, for the given time, regardless of the pad.

Notes. Stores the command and an end time (game timer + ms) in the player record; no script calls it.

  • Evidence: confirmed (code) at 0x00147660; detail: brief
  • Wrapper 0x00369750 (registered by RegisterBindings); calls 0x00147660 PlayerCommand_ForceForHuman
  • Used by no script on the disc
  • Coney: not implemented

GetDistanceTweenHumans

GetDistanceTweenHumans(a, b) -> number
# Argument Read as Meaning
1 a number, truncated to an unsigned integer Handle of the first human (any object with a position works).
2 b number, truncated to an unsigned integer Handle of the second human or object.

Returns number: The straight-line distance between the two positions, in metres.

Returns the straight-line distance in metres between two humans (or any two objects with a position). Both handles are resolved without a check and each position is read through the object's own position method, then measured with the engine's vector distance (0x00336d88).

Notes. No handle check: a dead or wrong handle is dereferenced, so pass live handles only (compare TestDistance, which checks).

  • Evidence: confirmed (code) at 0x002fee38; detail: traced
  • Wrapper 0x0035dc08 (registered by RegisterBindings); calls 0x002fee38 Objects_GetDistance
  • Used by 6 of 467 script chunks (12 references); boot to menu: yes; mission 1: no; result used: yes
  • Later in the story: 20 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuActionDialog

HuActionDialog(a, lineA, b, lineB, callback)
# Argument Read as Meaning
1 a number, truncated to an unsigned integer Handle of the first speaker; a bad handle skips its line.
2 lineA string Speech file name for the first speaker's line, as for HuSpeak.
3 b number, truncated to an unsigned integer Handle of the second speaker; a bad handle skips its line and the callback.
4 lineB string Speech file name for the second speaker's line.
5 callback string Name of a Lua function called (with no argument) when the second line ends, or nil.

Returns nothing.

Makes two humans exchange lines: each is given its line as by HuSpeakNI (cutting off whatever it was saying, with no look-at target and the sound flag off), the first with no callback and the second with callback, and each has the other's handle stored as its conversation partner (human +0x18c).

Notes. Both lines start in the same call and play together (each a mono stream, no queue between humans); the partner link +0x18c is read only by Human_UpdateSpeech (0x0021e940), which clears both links once the partners are within 10 m and stops nothing still playing. That they overlap audibly is not checked at runtime (Scripts: level5).

  • Evidence: confirmed (code) at 0x00239788, 0x002395a0; detail: traced
  • Wrapper 0x003650d0 (registered by RegisterBindings); calls 0x00239788 Human_ActionDialog, 0x002395a0 Human_SpeakInterrupt
  • Used by 7 of 467 script chunks (21 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level5 (mission 7)
  • Coney: implemented

HuApplyDamageModifier

HuApplyDamageModifier(human, factor)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human whose attacks change; a bad handle does nothing.
2 factor number (single precision) Multiplier on the human's attack damages (1 restores the class's values; scripts use values such as 0.35). For a player it is further multiplied by the Warrior class byte +0x06 as a percentage.

Returns nothing.

Rewrites the damage of each of the human's 45 attack entries (its Anim Range List) to the character class's value (CfgChar record +0xb8) times factor, rounded. It changes the damage the human deals, not the damage it takes; each call starts from the class values, so calls do not compound.

Notes. An entry whose scaled value rounds to 0 is not written and keeps its previous damage. The write is 0x002548f0, as when the human is made (Combat: damage).

  • Evidence: confirmed (code) at 0x00236038, 0x00229b90; detail: traced
  • Wrapper 0x00359cb0 (registered by RegisterBindings); calls 0x00236038 Human_ApplyDamageModifier, 0x00229b90 Human_ScaleAttackDamages
  • Used by 8 of 467 script chunks (30 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 8 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuAreActionsBlocked

HuAreActionsBlocked(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): true (1) when the human is busy in a state that blocks new actions; nil otherwise or when the handle is not a human.

Tells whether the human is locked into something and cannot start a new action: true when any of its state flags 0x7bf9e9f7ff0 is set, which covers grabbing or being grabbed, mugging or being mugged, tackling or being tackled, throwing, tagging, a mini-game (lock picking and the like), being dead and the airborne states (jump, fall, landing). Fight stance, blocking and sprinting do not count.

Notes. The same mask gates the player's context actions and jumps (characters.md) and is tested by about 88 AI and combat functions. Bits 0x2000, 0x4000, 0x10000-0x40000, 0x100000, 0x800000, 0x8000000, 0x10000000, 0x80000000, 0x100000000 and 0x10000000000-0x40000000000 are in the mask but not yet named.

  • Evidence: confirmed (code) at 0x002387a8, 0x00228228; detail: traced
  • Wrapper 0x003654a0 (registered by RegisterBindings); calls 0x002387a8 Human_AreActionsBlocked, 0x00228228 HumanRecord_AreActionsBlocked
  • Used by 4 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 3 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuAttachGear

HuAttachGear(human, attach)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player's human; others are ignored.
2 attach boolean (nil or 0 is false) True attaches the gear, false removes it.

Returns nothing.

Gives a player's character the unlockable fighting gear: brass knuckles on both hands (dyn_brassknkl) and steel-toe boots on both feet (dyn_steeltoe), each pair only when the unlockables manager says it is unlocked. False deletes the gear objects again.

Notes. On: 0x0024cef0 checks unlockables 5 and 6 of group 6 (0x00424130 on 0x006fe998) and spawns each pair only if the slots are empty. Off: 0x0024d340 deletes the four objects. Only exactly 1 attaches. global.lua calls it when a player is created.

  • Evidence: confirmed (code) at 0x00236188; detail: traced
  • Wrapper 0x00359c50 (registered by RegisterBindings); calls 0x00236188 Human_SetUnlockedGear
  • Used by 2 of 467 script chunks (4 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuAttachSpinningIcon

HuAttachSpinningIcon(human, object, param)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human to mark.
2 object string Name of the icon object to spawn above the head, such as dyn_rockstar (the mission-target star) or dyn_crown. dyn_p_one and dyn_p_two are swapped for the language's own player-one/two icon.
3 param number, truncated to an integer A number passed to the object spawner with the icon (0 in every script).

Returns nothing.

Spawns a spinning marker object attached to the human, the icon that shows mission targets and important characters. If the human already has the same icon nothing happens; a different one is replaced.

Notes. The icon's handle is kept at +0x360; remove it with HuRemoveSpinningIcon.

  • Evidence: confirmed (code) at 0x00238a88; detail: traced
  • Wrapper 0x0035aeb0 (registered by RegisterBindings); calls 0x00238a88 Human_AttachSpinningIcon
  • Used by 18 of 467 script chunks (34 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 6 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuBlockClimb

HuBlockClimb(human, block)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 block boolean (nil or 0 is false) True stops the human from climbing, false allows it again.

Returns nothing.

Blocks or allows climbing for the human (bit 0x20000000 of its behaviour flags at +0xe0).

  • Evidence: confirmed (code) at 0x002379c0; detail: brief
  • Wrapper 0x00359080 (registered by RegisterBindings); calls 0x002379c0
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Coney: not implemented

HuBlockFrontGrab

HuBlockFrontGrab(human, block)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 block boolean (nil or 0 is false) True stops the human being grabbed from the front.

Returns nothing.

Blocks or allows grabs from the front on this human (flag 0x40000000 at +0xe0).

  • Evidence: confirmed (code) at 0x00237a98; detail: brief
  • Wrapper 0x003591a0 (registered by RegisterBindings); calls 0x00237a98
  • Used by no script on the disc
  • Coney: not implemented

HuBlockGrab

HuBlockGrab(human, block)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 block boolean (nil or 0 is false) true stops the human being grabbed from the front or from behind; false allows both.

Returns nothing.

Sets or clears both grab-block bits of the human's flag word (+0xe0) at once: 0x40000000 (front, as HuBlockFrontGrab) and 0x80000000 (rear, as HuBlockRearGrab).

Notes. An unresolved handle does nothing; the grab code that tests the two bits was not found here.

  • Evidence: confirmed (code) at 0x00237a28; detail: traced
  • Wrapper 0x003590e0 (registered by RegisterBindings); calls 0x00237a28 Human_BlockGrab
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level93 (mission 10)
  • Coney: implemented

HuBlockJump

HuBlockJump(human, block)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 block boolean (nil or 0 is false) true stops the human from jumping; false (or nil) allows it again.

Returns nothing.

Sets or clears human flag 0x10000000 (+0xe0). While it is set, the triangle button never starts a jump (Player_TryJump is skipped, 0x0027c120); a climb, a context action or an object action can still take the press (Characters: jumping).

Notes. Only players jump, so it matters only for a player human. The same bit is seen set briefly while a start clip plays (characters.md), so a script clearing it may race the game's own use (inferred).

  • Evidence: confirmed (code) at 0x00237958; detail: traced
  • Wrapper 0x00359020 (registered by RegisterBindings); calls 0x00237958 Human_SetBlockJump
  • Used by 7 of 467 script chunks (16 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level2 (mission 5)
  • Coney: implemented

HuBlockLook

HuBlockLook(human, block)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 block boolean (nil or 0 is false) true stops the human turning its head toward things; false lets it again.

Returns nothing.

Sets or clears flag 0x1000 of the human's flag word (+0xe0). Each update the head-look (0x00248428) turns the head toward the current look-at target (up to 55° sideways, 90° for some requests, and 45° up or down) only when 0x002482e0 allows it, and that refuses while 0x1000 is set, so the head is left as it is. Scripts set it on characters posed for a scene or a conversation.

Notes. HuForceLook (0x10000) overrides it: the check is skipped. A dead human and two other states (0x00228070, 0x00228090) never turn the head either way.

  • Evidence: confirmed (code) at 0x0023a2c0; detail: traced
  • Wrapper 0x00358b98 (registered by RegisterBindings); calls 0x0023a2c0 Human_SetBlockLook
  • Used by 46 of 467 script chunks (127 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 7 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuBlockRearGrab

HuBlockRearGrab(human, block)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 block boolean (nil or 0 is false) true forbids grabs from behind involving this human; false allows them. Missing counts as false.

Returns nothing.

Sets or clears human flag 0x80000000 (+0xe0). When a grab's intro ends (Grab_IntroEnd, 0x0026c1d8) and the grabber is behind the victim, the rear grab only starts when neither has this flag, so a flagged human can neither be grabbed from behind nor grab someone from behind. HuBlockFrontGrab is the same for front grabs (0x40000000); a player with both flags cannot start a grab at all (Player_GrabOrTackle, 0x00284920).

Notes. A blocked grab simply does not continue past the intro; no other reaction was seen.

  • Evidence: confirmed (code) at 0x00237b00; detail: traced
  • Wrapper 0x00359140 (registered by RegisterBindings); calls 0x00237b00 Human_SetBlockRearGrab
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level52 (mission 15)
  • Coney: implemented

HuBlockTackle

HuBlockTackle(human, block)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 block boolean (nil or 0 is false) true sets the flag, false (or nil) clears it.

Returns nothing.

Sets or clears bit 0x100000000 of the human's 64-bit flag word (+0xe0), which from the name keeps the human from being tackled (a boss the player must fight standing).

Notes. Only the storage is confirmed: the tackle code that reads the bit was not found (it is not tested in the tackle start 0x002707a8); scripts set it on hub and level-52 bosses.

  • Evidence: confirmed (code) at 0x00237b70; detail: traced
  • Wrapper 0x00359200 (registered by RegisterBindings); calls 0x00237b70 Human_SetBlockTackle
  • Used by 3 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuButtonMiniGame

HuButtonMiniGame(human, buttons, startMs, endMs, callback, loopAnim, failAnim)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the player's human doing the mini-game; a bad handle does nothing.
2 buttons number, truncated to an unsigned integer Pad button mask (low 8 bits kept) the player must press; all its buttons are needed.
3 startMs number, truncated to an unsigned integer When the press window opens, in ms of game time from now; earlier presses are ignored.
4 endMs number, truncated to an unsigned integer When it closes, in ms from now; no press by then counts as a failure.
5 callback string Name of the Lua function told the outcome: called with (success, human); its result decides whether the mini-game goes on. nil for none.
6 loopAnim string Dynamic animation (.anm) loaded into slot 4 (anim id 668) and played looping from the start. Was listed as the success animation.
7 failAnim string Dynamic animation loaded into slot 5 (anim id 669) and played once after a failure.

Returns nothing.

Starts or re-arms a timed button press, mini-game mode 5 of the shared record (Crimes), used by the dance contests. Each update after the window opens, a press of exactly the mask's buttons is a success and any other button a failure; when the window closes or a result is in, the callback runs with (success, human). A truthy return keeps the mode running so the script can arm the next press (called again while running, it only reloads the animations and times); otherwise the mini-game ends.

Notes. A press of only some of the buttons waits for the rest. With no callback the mode never ends by itself once a result is in. Starting sets human state 0x4000000; ending clears it and sets state 0x20000000 (0x00255f08).

  • Evidence: confirmed (code) at 0x0023aee0, 0x0026b848, 0x0022e4c0, 0x0022e558; detail: traced
  • Wrapper 0x0035d610 (registered by RegisterBindings); calls 0x0023aee0 Human_StartButtonMiniGame, 0x0026b848 ButtonMiniGame_Update, 0x0022e4c0, 0x0022e558
  • Used by 2 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level55 (mission 17)
  • Coney: not implemented

HuCanSee

HuCanSee(viewer, target) -> boolean
# Argument Read as Meaning
1 viewer number, truncated to an unsigned integer Handle of the human looking; a bad handle gives nil.
2 target number, truncated to an unsigned integer Handle of a human or any other object to look for; a bad handle gives nil.

Returns boolean (1 for true, nil for false): true when the viewer can see the target; nil otherwise.

Runs the AI's own sight test from the viewer: the target must be within the viewer's sight range (brain +0x130, 30 m by default and never below 30 m in a gang whose +0x32 is 1; 0x0028bf00); closer than 3 m it is seen all round, farther it must be inside the field of view (brain +0x12c, BrSetFOV); then a line of sight is cast. A human target whose brain byte +0x2d4 is set (hidden or sneaking, inferred) is seen only within 2 m. It is the test the attack warnings use (AI); objects use the same rule against their position. Scripts use it to check whether a guard notices the player.

Notes. The 3 m and 2 m come from the squared constants 9.0 and 4.0 the binding passes. Line of sight: 0x00222288 (human) and 0x00222370 (point).

  • Evidence: confirmed (code) at 0x00238288, 0x002223e8, 0x00222508; detail: traced
  • Wrapper 0x0035c180 (registered by RegisterBindings); calls 0x00238288 Human_CanSee, 0x002223e8 Human_CanSeeHuman, 0x00222508 Human_CanSeePoint
  • Used by 2 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 2 of 28 levels, first level86 (mission 9)
  • Coney: not implemented

HuChangePlayerGang

HuChangePlayerGang(gang, stamp) -> boolean
# Argument Read as Meaning
1 gang number, truncated to an integer Gang id (the gang's index, as created by GangCreate) whose members the players take over.
2 stamp boolean (nil or 0 is false) True also records the current game time at 0x0051054c (the moment of the switch).

Returns boolean (1 for true, nil for false): Always true.

Moves player control to the members of another gang: the current players' humans are handed back to the AI and the same pads take over humans of the new gang, pulling a member from the gang when it has too few. Missions use it when the story switches which group of Warriors you play.

Notes. Returns at once if player 1 is already in that gang. Each player of player 1's gang is released (Human_ReleasePlayer 0x0022a2a8: pad and HUD panel freed, off the player list and the camera targets); then, per player owed, the new gang's non-player member with the lowest non-zero HuCreate player argument (+0x1b1; Rembrandt 1 before Ash 2) is made a player (Human_MakePlayer, pad -1) and added to the camera targets. The old humans stay in the world as AI. Characters, players.

  • Evidence: confirmed (code) at 0x00239b80; detail: traced
  • Wrapper 0x0035d1a8 (registered by RegisterBindings); calls 0x00239b80 Players_ChangeGang
  • Used by 12 of 467 script chunks (15 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 8 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuClearLook

HuClearLook(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human (passed on but ignored).

Returns nothing.

Does nothing in this build: the function it calls returns at once. Scripts call it to end a head look-at; look-ats here end by themselves (AI: turning).

  • Evidence: confirmed (code) at 0x0023a460; detail: traced
  • Wrapper 0x00358c58 (registered by RegisterBindings); calls 0x0023a460 Human_ClearLook_Stub
  • Used by 5 of 467 script chunks (6 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 4 of 28 levels, first level2 (mission 5)
  • Coney: implemented

HuColor

HuColor(human, rgba)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 rgba table of 4 numbers (t[1]..t[4]) Table {r, g, b, a}, each 0 to 1 (packed to bytes by 0x0017aca8); {1, 1, 1, 1} is the normal colour, {0.3, 0.3, 0.3, 1} darkens the model. Written back unchanged.

Returns nothing.

Tints the human's model: the packed colour goes to the render instance's colour word (human +0xd8, +0x28) and, when the instance has a second part (+0x10), to that part's +0x20 too; the renderer multiplies the material colour by it (Lighting: humans). Armies of the Night uses it to shade fighters.

Notes. Skipped when the human has no model instance yet (0x00217a70). The tint stays until set again; it is not reset on respawn (not traced). The second part at +0x10 is inferred to be an attachment or shadow instance.

  • Evidence: confirmed (code) at 0x00239100; detail: traced
  • Wrapper 0x0035d730 (registered by RegisterBindings); calls 0x00239100 Human_SetColour
  • Used by 6 of 467 script chunks (84 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level60 (Armies of the Night 1)
  • Coney: not implemented

HuCreate

HuCreate(name, type, pos, heading, unused, player, gang, flag) -> number
# Argument Read as Meaning
1 name string The human's name (15 characters kept); HuFind and scripts use it.
2 type number, truncated to an integer Character type id, the CfgChar record (32 Rembrandt, 40 Ash); remapped to a behaviour class at creation.
3 pos table of 3 numbers (t[1]..t[3]) Position {x, y, z} in metres, game axes with z up; written back with the ground-snapped position.
4 heading number (single precision) Facing in degrees, a rotation about the vertical axis.
5 unused string A string the scripts pass ("warr_sw", "warr_cl", nil); not read by Human_Create.
6 player number, truncated to an integer Hand-over priority, stored at +0x1b1: 1 also tries to make the human a player (Human_MakePlayer), which fails and leaves it an AI when a player 1 exists and no other pad is free; any other value (0, 2 for Ash) makes an AI human. A hand-over picks the lowest non-zero value.
7 gang number, truncated to an integer Gang id (as returned by GangCreate) the human belongs to.
8 flag boolean (nil or 0 is false) Stored at +0x19d of the human; the Rumble scripts pass true. Meaning not traced.

Returns number: The new human's handle, or NilHandle when no slot is free (60 humans at most).

Creates a human (character) in the world, snaps it to the ground and, for a player index of 1, makes it player 1's character. This is how every level script puts the Warriors, enemies and civilians into the world.

Notes. Steps and offsets: Characters, creation and players. The model loads later if its files are not yet resident. Human_MakePlayer's result is ignored, so a second HuCreate(..., 1, ...) while a player exists normally leaves the old player in control; level scripts then move the player with HuChangePlayerGang.

  • Evidence: confirmed (code) at 0x00233d60; detail: traced
  • Wrapper 0x00358428 (registered by RegisterBindings); calls 0x00233d60 Human_Create
  • Used by 100 of 467 script chunks (3411 references); boot to menu: no; mission 1: yes; result used: yes
  • Later in the story: 28 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuDelete

HuDelete(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human to remove.

Returns nothing.

Takes a human out at once: sets its record's dead flag (0x200000000), clears its record +0xcc handle and has its world object run its per-slot method for all 26 slots (0x003858b8), with no death animation or event of its own.

Notes. What the object's slot method (vtable +0x0c, called with 0-25) does is not traced; that the dead flag makes the human update remove it is inferred. Contrast HuKill, which kills through the damage path. Record flags: Characters.

  • Evidence: confirmed (code) at 0x00233ef0; detail: traced
  • Wrapper 0x00358608 (registered by RegisterBindings); calls 0x00233ef0 Human_Delete
  • Used by 80 of 467 script chunks (213 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 24 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuDrop

HuDrop(human, first, second, held)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 first boolean (nil or 0 is false) True drops one kind of carried item (0x00258330).
3 second boolean (nil or 0 is false) True drops a second kind (0x0024ce40).
4 held boolean (nil or 0 is false) True drops what the human holds in its hands (the same routine as HuDropWeapon).

Returns nothing.

Makes the human drop the kinds of items selected by the three flags.

Notes. Which item kinds the first two flags drop is not traced. No script calls it.

  • Evidence: speculative; detail: brief
  • Wrapper 0x003596e0 (registered by RegisterBindings); calls 0x002360f8
  • Used by no script on the disc
  • Coney: not implemented

HuDropWeapon

HuDropWeapon(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns nothing.

Makes the human drop the object in its hands, but only if that object is a weapon (its object class has a weapon type); the dropped object becomes a free world object again.

Notes. Checks the held object's class byte +0x86 (0x00231a38) before calling the drop routine 0x00257f38.

  • Evidence: confirmed (code) at 0x002994b8; detail: traced
  • Wrapper 0x0035ae78 (registered by RegisterBindings); calls 0x002994b8 Human_DropWeapon
  • Used by 29 of 467 script chunks (66 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 15 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuEnableController

HuEnableController(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player's human; a bad handle does nothing.
2 enable boolean (nil or 0 is false) true gives the human back to its pad; false (or nil) hands it to the AI.

Returns nothing.

Switches a player's human between pad control and AI control by setting its per-player record byte +0x1b (record 0x00660f50 + i × 0x2c, via Human_GetPlayerRecord). With 0 the brain drives it (its goals and actions run, AI grab counters apply); with 1 the pad's commands drive it again.

Notes. Readers: AI, Combat and the follow camera (camera.md), which only acts for a pad-controlled player. Armies of the Night uses it for players that have not joined.

  • Evidence: confirmed (code) at 0x002384f8; detail: traced
  • Wrapper 0x0035c120 (registered by RegisterBindings); calls 0x002384f8 Human_EnableController
  • Used by 7 of 467 script chunks (30 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level60 (Armies of the Night 1)
  • Coney: not implemented

HuEnableOnFire

HuEnableOnFire(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 enable boolean (nil or 0 is false); default true True (the default) lets the human shout the onfire line; false keeps it quiet.

Returns nothing.

Allows or silences the human's onfire speech command (107, Speech) by writing human byte +0x19b (1 at spawn). When the human catches fire (0x00219238, reached from a strike's contact and from a burn timer) and on the human's sound event 0x8b (0x0021f700), it says command 107 through Human_SayCommand only while the byte is set. It does not stop the human burning.

Notes. That 0x00219238 is the moment the human is set alight is inferred (it sets state flags and plays a reaction); the line still needs the can-speak byte +0x199 (HuEnableSoundCommands) and voice lines for command 107.

  • Evidence: confirmed (code) at 0x00239280, 0x00219238, 0x0021f700; detail: traced
  • Wrapper 0x00364de8 (registered by RegisterBindings); calls 0x00239280 Human_EnableOnFireSpeech, 0x00219238, 0x0021f700
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level93 (mission 10)
  • Coney: not implemented

HuEnableSoundCommands

HuEnableSoundCommands(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 enable boolean (nil or 0 is false); default true true (the default) lets the human say speech commands; false silences them.

Returns nothing.

Sets the human's can-speak byte (+0x199). Human_SayCommand (0x002205e0) says nothing while it is clear, so a disabled human makes none of its automatic speech-command lines (taunts, pain, greetings, the goals' lines) nor those scripts ask for with SoundPlayCommand (Sound: speech).

Notes. Whether HuSpeak's named lines also check the byte is not traced.

  • Evidence: confirmed (code) at 0x00239240; detail: traced
  • Wrapper 0x00364cc8 (registered by RegisterBindings); calls 0x00239240 Human_EnableSoundCommands
  • Used by 57 of 467 script chunks (196 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuEnableSpeaking

HuEnableSpeaking(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 enable boolean (nil or 0 is false); default true true (the default) lets the human speak; false silences it.

Returns nothing.

Allows or silences all of the human's voice lines (human byte +0x198, which Human_Init sets to 1). Both speech players, 0x0021e400 and the interrupting 0x0021e698, play nothing while it is 0 (or while a cinematic scene plays, game state +0x410); they serve scripted lines (Human_Speak, Human_SpeakInterrupt), speech commands (Human_SayCommand), idle chatter and reactions. A script callback given with a silenced line is called at once.

Notes. The on-fire, tag and idle gates (+0x19b, +0x19a, +0x197) are separate and apply on top of this one.

  • Evidence: confirmed (code) at 0x00239200; detail: traced
  • Wrapper 0x00364c68 (registered by RegisterBindings); calls 0x00239200 Human_EnableSpeaking
  • Used by 21 of 467 script chunks (125 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level54 (mission 16)
  • Coney: not implemented

HuEnableTagCheer

HuEnableTagCheer(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the tagger (the player); a bad handle does nothing.
2 enable boolean (nil or 0 is false); default true true (the default) enables the comments, false disables them.

Returns nothing.

Sets the tagger's byte +0x19c: while it is set, when the tag stick game snaps the cursor back after it went off track, a crew member may comment (speech command 80 tagcheer; TagGame_Update, 0x002748a8).

Notes. Rules of the stick game: Crimes: tagging.

  • Evidence: confirmed (code) at 0x00239300; detail: traced
  • Wrapper 0x00364d88 (registered by RegisterBindings); calls 0x00239300 Human_EnableTagCheer
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuEnableTagDone

HuEnableTagDone(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 enable boolean (nil or 0 is false); default true true (the default) lets the human comment on tags; false silences it.

Returns nothing.

Lets the human comment on a crew mate's tag (human byte +0x19a, which Human_Init sets to 1): when a tag is finished or fumbled, 0x00273a68 picks a random gang member in range with this set to say tagdone (speech 83) or tagcheer (80) (Crimes: tagging).

Notes. 0x00273bf4 is the only reader of the byte.

  • Evidence: confirmed (code) at 0x002392c0; detail: traced
  • Wrapper 0x00364d28 (registered by RegisterBindings); calls 0x002392c0 Human_EnableTagDoneSpeech
  • Used by 3 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level9 (mission 13)
  • Coney: implemented

HuExitWorld

HuExitWorld(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human to send away.

Returns nothing.

Sends a human off the map: finds the nearest enabled exit flag (activity 8) its brain accepts (0x00416f08) and gives it a MoveToExitFlag goal at gait 4 (run) with a 2 m arrival radius; a human that reaches an exit flag is removed. Nothing happens when there is no such flag.

Notes. Exit flags and removal on arrival: World flags.

  • Evidence: confirmed (code) at 0x00238478; detail: traced
  • Wrapper 0x0035c368 (registered by RegisterBindings); calls 0x00238478 Human_ExitWorld
  • Used by 41 of 467 script chunks (85 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 22 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuFind

HuFind(name) -> number
# Argument Read as Meaning
1 name string The name given to HuCreate.

Returns number: The handle of the first human with that name, or NilHandle.

Looks a human up by name among the 60 human slots.

  • Evidence: confirmed (code) at 0x00235010; detail: brief
  • Wrapper 0x0035b260 (registered by RegisterBindings); calls 0x00235010
  • Used by no script on the disc
  • Coney: not implemented

HuForceEnableReticule

HuForceEnableReticule(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a human; only checked to resolve (a bad handle leaves the setting unchanged).
2 enable boolean (nil or 0 is false) true forces the player reticules on, false gives them back their normal rule.

Returns nothing.

Sets one global (0x005104f8), not a per-human flag. The reticule update (0x0024b780) draws each player's health and power rings at its feet (HUD: the health rings) while the HUD shows and the player is not down, airborne, climbing or in a scene: normally only after SELECT is pressed or a flash used (held 4 s, then fading over 0.5 s), in a fight stance, or at 20 % health or below; with the global set, every such player's rings are drawn every frame at full strength. The rings of the players' targets are not affected.

Notes. The setting persists until changed, across humans. Rumble turns it on for every fighter.

  • Evidence: confirmed (code) at 0x00236978, 0x0024b780; detail: traced
  • Wrapper 0x0035ada0 (registered by RegisterBindings); calls 0x00236978 Human_ForceEnableReticule, 0x0024b780 Reticules_Update
  • Used by 3 of 467 script chunks (9 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level86 (mission 9)
  • Coney: implemented

HuForceLook

HuForceLook(human, force)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 force boolean (nil or 0 is false) true lets the head turn to look whatever the human is doing; false restores the usual checks.

Returns nothing.

Sets or clears flag 0x10000 of the human's flag word (+0xe0). While it is set the head-look check (0x002482e0) skips its usual refusals (action and fight states, a player's busy states, HuBlockLook), so the head keeps turning toward its look-at target even mid-animation; only death and two other states (0x00228070, 0x00228090) still stop it.

Notes. GoalPlayDynAnimation sets and clears the same bit around its clip (AI), so the end of such a goal also clears a forced look.

  • Evidence: confirmed (code) at 0x0023a328; detail: traced
  • Wrapper 0x00358bf8 (registered by RegisterBindings); calls 0x0023a328 Human_SetForceLook
  • Used by 3 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuGet

HuGet(index) -> number
# Argument Read as Meaning
1 index number, truncated to an integer Human slot index, 0 to 59.

Returns number: The handle of the human in that slot, or NilHandle if the slot is empty.

Returns the human in a slot of the human table, for scripts that loop over all humans.

  • Evidence: confirmed (code) at 0x00234f68; detail: brief
  • Wrapper 0x0035b110 (registered by RegisterBindings); calls 0x00234f68
  • Used by no script on the disc
  • Coney: not implemented

HuGetCharType

HuGetCharType(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: The human's behaviour class (+0xcc), or 0 for an invalid handle.

Returns the human's behaviour class: the character type it was created with after Human_Init's remap (Rembrandt, created as type 32, answers 30), which selects its class record (speeds, brain type, attack table).

Notes. The type the human was created as is at +0xd0 and is not returned; 0 is also a valid class number.

  • Evidence: confirmed (code) at 0x00235890; detail: traced
  • Wrapper 0x0035b848 (registered by RegisterBindings); calls 0x00235890 Human_GetCharType
  • Used by 7 of 467 script chunks (14 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 3 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuGetControlName

HuGetControlName(human) -> string
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns string (nil for none): Name of the human's current control handler: nullControl, aiControl, screenRelativeControl, lockOnControl, grabbingControl, grabbedControl, throwControl, aiStepControl, jumpingControl, wheelchairControl, buttonTapControl or INVALID_CONTROL; nil for an invalid handle.

Returns the name of the control handler driving the human (the member function held at human +0x1bc-+0x1c0, named by 0x0023fb00): how its movement is currently produced, for example screenRelativeControl for a player walking with the stick, throwControl while aiming a throw, grabbingControl while holding someone, or aiControl for a brain-driven human.

Notes. A handler not in the list (or a virtual one) gives INVALID_CONTROL. The names are the game's own strings at 0x00510328-0x00510488.

  • Evidence: confirmed (code) at 0x002380c0; detail: traced
  • Wrapper 0x00358fd0 (registered by RegisterBindings); calls 0x002380c0 Human_GetControlName
  • Used by 1 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuGetGang

HuGetGang(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: The id of the human's gang (gang record +0x30), or 65535 for an invalid handle.

Returns the gang id the human belongs to, comparable with the ids GangCreate gives; scripts use it to tell friends from enemies.

  • Evidence: confirmed (code) at 0x00235438; detail: traced
  • Wrapper 0x0035b398 (registered by RegisterBindings); calls 0x00235438 Human_GetGangId
  • Used by 104 of 467 script chunks (245 references); boot to menu: yes; mission 1: no; result used: yes
  • Later in the story: 21 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuGetGangType

HuGetGangType(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: The type of the human's gang (gang record +0x2c), or 65535 for an invalid handle.

Returns the type of the human's gang (which faction it is: the Warriors, a rival gang, police...), as opposed to the id of the particular gang.

Notes. The values come from the gang's configuration; the list of types is with the gang bindings.

  • Evidence: confirmed (code) at 0x00235478; detail: traced
  • Wrapper 0x0035b3f0 (registered by RegisterBindings); calls 0x00235478 Human_GetGangType
  • Used by 35 of 467 script chunks (75 references); boot to menu: yes; mission 1: yes; result used: yes
  • Later in the story: 26 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuGetHeading

HuGetHeading(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: The facing in degrees, 0 to 360, the same convention as HuCreate's heading; 0 for an invalid handle.

Returns the direction the human faces.

  • Evidence: confirmed (code) at 0x002352f8; detail: brief
  • Wrapper 0x0035b340 (registered by RegisterBindings); calls 0x002352f8
  • Used by no script on the disc
  • Coney: not implemented

HuGetHealthPercent

HuGetHealthPercent(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: Health as a percentage, 0 to 100 (current hitpoints at record +0x144 over the maximum); 0 for an invalid handle.

Returns how much health the human has left, as a percentage of its maximum. The tutorial uses it to wait for the training enemies to be beaten down.

  • Evidence: confirmed (code) at 0x00237c38; detail: traced
  • Wrapper 0x0035bc40 (registered by RegisterBindings); calls 0x00237c38 Human_GetHealthPercent
  • Used by 25 of 467 script chunks (28 references); boot to menu: no; mission 1: yes; result used: yes
  • Later in the story: 16 of 28 levels, first level5 (mission 7)
  • Coney: implemented

HuGetHeldObject

HuGetHeldObject(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: The handle of the object in the human's hands (kept at +0x338), or NilHandle when its hands are empty.

Returns the object (weapon or item) the human is holding.

Notes. NilHandle is a number, so test the result against NilHandle, not for nil.

  • Evidence: confirmed (code) at 0x00237d48; detail: traced
  • Wrapper 0x0035bf68 (registered by RegisterBindings); calls 0x00237d48 Human_GetHeldObject
  • Used by 23 of 467 script chunks (59 references); boot to menu: no; mission 1: yes; result used: yes
  • Later in the story: 12 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuGetHUD

HuGetHUD(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player's human.

Returns number: The human's HUD index (+0x380), or -1 (as 4294967295) for an invalid handle.

Returns which player HUD belongs to this human.

  • Evidence: confirmed (code) at 0x00239850; detail: brief
  • Wrapper 0x0035d0c8 (registered by RegisterBindings); calls 0x00239850
  • Used by no script on the disc
  • Coney: not implemented

HuGetMoney

HuGetMoney(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: The cash the human carries (+0x370, 0-999 dollars), or 0 for an invalid handle.

Returns how much cash the human carries: the money a player takes from it by mugging or beating it, set with HuSetMoney.

Notes. A player's own money is inventory item 2 (InvGetMoney), not this field.

  • Evidence: confirmed (code) at 0x00238158; detail: traced
  • Wrapper 0x0035c418 (registered by RegisterBindings); calls 0x00238158 Human_GetMoney
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuGetPlayer

HuGetPlayer(player) -> number
# Argument Read as Meaning
1 player number, truncated to an unsigned integer Player index, 0 for player 1 and 1 for player 2.

Returns number: The handle of that player's human, or NilHandle.

Returns the human a player controls, from the game state's player list (+0x228).

  • Evidence: confirmed (code) at 0x00234fb8; detail: brief
  • Wrapper 0x0035b188 (registered by RegisterBindings); calls 0x00234fb8
  • Used by no script on the disc
  • Coney: not implemented

HuGetPosition

HuGetPosition(human) -> M_Vector4
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns M_Vector4 object (nil for none): The human's position (x, y, z in metres, game axes with z up; w); for an invalid handle the shared zero vector at 0x005116c0.

Returns the human's position: its entry in the world position table (0x00714b00 + index x 0x20), or, while it is jumping or falling (state flags 0x1c00000000) or climbing (state flag 0x40), the point where the fall will end or the climb starts (+0x2c0).

Notes. The usertype is pushed as a pointer into game memory, not a copy, so it follows the human as it moves and writing its fields would move the stored vector; copy x, y, z out to keep a snapshot.

  • Evidence: confirmed (code) at 0x002352b0, 0x0021d080; detail: traced
  • Wrapper 0x0035b2d0 (registered by RegisterBindings); calls 0x002352b0 Human_GetPositionRef, 0x0021d080 Human_GetPosition
  • Used by 5 of 467 script chunks (11 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 2 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuGetVoiceIndex

HuGetVoiceIndex(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: The human's voice set (+0x3b0), or -1 (as 4294967295) for an invalid handle.

Returns which voice set the human speaks with: the set Human_SayCommand picks speech-command lines from (Sound: speech).

Notes. Voice sets: Speech.

  • Evidence: confirmed (code) at 0x0023adc8; detail: traced
  • Wrapper 0x0035d308 (registered by RegisterBindings); calls 0x0023adc8 Human_GetVoiceIndex
  • Used by 2 of 467 script chunks (30 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuGiveCuffs

HuGiveCuffs(human, count)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 count number, truncated to an unsigned integer How many handcuffs to add (scripts pass 1 to 3); read as unsigned, so a negative number wraps and, added in 32 or 8 bits, takes cuffs away.

Returns nothing.

Adds handcuffs. For a player it adds count to item 5 (handcuffs) of that player's inventory (game state +0x480, the player's block +0x380), clamped to the item's limits, and runs the inventory's Lua callbacks for the change; for an AI human it adds to the human's own cuff count (byte +0x378), clamped to 0-9.

Notes. No HUD message is sent; cops always count as having cuffs (Human_GetCuffCount answers 1 for brain type 1).

  • Evidence: confirmed (code) at 0x002372a8, 0x00222980, 0x0041e5b0, 0x00222908; detail: traced
  • Wrapper 0x0035aa28 (registered by RegisterBindings); calls 0x002372a8 Human_GiveCuffs, 0x00222980 Human_AddCuffs, 0x0041e5b0 Inventory_AddItem, 0x00222908 Human_GetCuffCount
  • Used by 2 of 467 script chunks (7 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuGiveWeapon

HuGiveWeapon(human, weapon)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 weapon number, truncated to an integer Weapon id, stored as a pending weapon (+0x3a8, with 0x80 set).

Returns nothing.

Queues a weapon for the human to be given.

Notes. No script calls it; what consumes +0x3a8 is not traced.

  • Evidence: speculative; detail: brief
  • Wrapper 0x0035ae00 (registered by RegisterBindings); calls 0x00299470
  • Used by no script on the disc
  • Coney: not implemented

HuHasHat

HuHasHat(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: Handle of the hat object the human wears (human +0x364), or NilHandle when it has none, the hat no longer exists, or the human handle is bad.

Returns the handle of the human's hat, if the hat object it refers to still exists.

Notes. Despite the name it returns a handle, not a boolean; compare with NilHandle. Where +0x364 is set and cleared is not traced here.

  • Evidence: confirmed (code) at 0x00235530; detail: traced
  • Wrapper 0x0035b028 (registered by RegisterBindings); calls 0x00235530 Human_GetHat
  • Used by 8 of 467 script chunks (11 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 3 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuInCombat

HuInCombat(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): true when someone holds one of the human's attack slots or its brain has a live target; nil otherwise or for a bad handle.

Tells whether the human is fighting, as its AI sees it: it is engaged when any of the 16 attack slots on it (brain +0x1a4, the attackers that claimed it) is taken, or its brain target (+0x124) still resolves.

Notes. Works for players too (their brain's slots fill when AIs attack them). A stale target handle counts as no target.

  • Evidence: confirmed (code) at 0x00237db8, 0x002904a0; detail: traced
  • Wrapper 0x0035bfe0 (registered by RegisterBindings); calls 0x00237db8 Human_IsInCombat, 0x002904a0 Brain_IsEngaged
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level20 (flashback 4)
  • Coney: implemented

HuIsAimingAt

HuIsAimingAt(human, target) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player's human.
2 target number, truncated to an unsigned integer Handle of the object (or human) to test.

Returns boolean (1 for true, nil for false): true when the human is a player and the target is the object its throw aim last landed on (human +0x634); nil otherwise.

Tells whether a player aiming a throw would hit the given object. While a player is in the throw control (0x00244770) the aim trace 0x0018fee0 follows the throw's arc and stores the first object it meets at human +0x634; this compares that with target. Level scripts use it to react when the player lines up a throw at a particular object.

Notes. Always false for a non-player (+0x1b0 = -1) or an invalid target. +0x634 is written only by the aim trace (and cleared by Human_Init), so it keeps the last aimed object after the aim ends.

  • Evidence: confirmed (code) at 0x0023a468; detail: traced
  • Wrapper 0x00358f50 (registered by RegisterBindings); calls 0x0023a468 Human_IsAimingAt
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuIsAlive

HuIsAlive(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): True when the handle is a live human that is not dead and not down; nil otherwise, including for an invalid handle.

Tells whether the human is alive and on its feet: false when it is dead or in a down state (knocked out, beaten, arrested and similar, flags 0x180050000).

  • Evidence: confirmed (code) at 0x00235628; detail: traced
  • Wrapper 0x0035b5c8 (registered by RegisterBindings); calls 0x00235628 Human_IsAlive
  • Used by 157 of 467 script chunks (1535 references); boot to menu: yes; mission 1: yes; result used: yes
  • Later in the story: 28 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuIsAPlayer

HuIsAPlayer(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): True when the human has a player index (+0x1b0 not -1); nil for AI humans and invalid handles.

Tells whether a human is controlled by a player.

  • Evidence: confirmed (code) at 0x00235758; detail: traced
  • Wrapper 0x0035b708 (registered by RegisterBindings); calls 0x00235758 Human_IsPlayer
  • Used by 167 of 467 script chunks (1132 references); boot to menu: yes; mission 1: yes; result used: yes
  • Later in the story: 28 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuIsArrested

HuIsArrested(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): True when the human is under arrest (state flag 0x20000).

Tells whether the police have arrested (cuffed) the human.

  • Evidence: confirmed (code) at 0x00235718; detail: traced
  • Wrapper 0x0035b6b8 (registered by RegisterBindings); calls 0x00235718 Human_IsArrested
  • Used by 13 of 467 script chunks (51 references); boot to menu: yes; mission 1: yes; result used: yes
  • Later in the story: 26 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuIsDead

HuIsDead(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): True when the human is dead (flag 0x100000000) or the handle no longer resolves.

Tells whether the human is dead; a deleted human also counts as dead.

  • Evidence: confirmed (code) at 0x00235688; detail: traced
  • Wrapper 0x0035b618 (registered by RegisterBindings); calls 0x00235688 Human_IsDead
  • Used by 3 of 467 script chunks (4 references); boot to menu: yes; mission 1: no; result used: yes
  • Later in the story: 2 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuIsGrabbed

HuIsGrabbed(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): true (1) while the human is held in a grab from the front or the rear or pinned by a tackle; nil otherwise, or when the handle is not a human.

Tells whether the human is on the receiving end of a grapple: true while any of its state flags 0x10 (grabbed from the front), 0x20 (grabbed from the rear) or 0x800 (pinned by a tackle) is set (Combat: state flags). The grabber itself does not count.

Notes. Tests record +0xd4 flags with 0x002265f0(human, 0x830); a handle that is not a human (type flag 0x40) gives nil.

  • Evidence: confirmed (code) at 0x002355e0; detail: traced
  • Wrapper 0x0035b578 (registered by RegisterBindings); calls 0x002355e0 Human_IsGrabbed
  • Used by 2 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuIsHidden

HuIsHidden(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): true while the human is hiding in a shadow; false otherwise or for a handle that is not a human.

Tells whether the human is hidden in a shadow: brain byte +0x2d4, set by Brain_SetHiddenInShadow (0x0028ee88) when the human enters or leaves a hiding spot (0x0023e6e8, 0x0023eab8) and cleared when the brain resets. While it is set, enemies only notice the human's attacks within 2 m (AI) and the camera holds a fixed look-at height (Camera).

Notes. What makes a spot a hiding spot (the callers at 0x0023e6e8 and 0x0023eab8) was not traced.

  • Evidence: confirmed (code) at 0x00235798; detail: traced
  • Wrapper 0x0035b758 (registered by RegisterBindings); calls 0x00235798 Human_IsHidden
  • Used by 4 of 467 script chunks (5 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 3 of 28 levels, first level51 (mission 14)
  • Coney: implemented

HuIsInScene

HuIsInScene(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): true while the human is bound to a playing scene; nil for a bad handle or a human not in one.

Tells whether the human is taking part in a scripted scene: true when its scene id (human +0x280) is not -1, or when it carries the in-scene state flag 0x800000 that the scene player sets on bound humans while a scene starts.

Notes. Human +0x280 is also read as an attachment by the movement code (characters.md); scene binding: Scenes. A human with no record (+0xd4 = 0) and +0x280 = -1 gives nil.

  • Evidence: confirmed (code) at 0x002356c8, 0x00227d28; detail: traced
  • Wrapper 0x0035b668 (registered by RegisterBindings); calls 0x002356c8 Human_IsInScene, 0x00227d28 Human_IsInSceneState
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level20 (flashback 4)
  • Coney: implemented

HuIsMugged

HuIsMugged(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): True while the human is being mugged (state 0x200).

Tells whether the human is being mugged now (state bit 0x200, 0x00228090); it says nothing of earlier muggings.

  • Evidence: confirmed (code) at 0x002357d8; detail: brief
  • Wrapper 0x0035b7a8 (registered by RegisterBindings); calls 0x002357d8
  • Used by no script on the disc
  • Coney: not implemented

HuIsOnFire

HuIsOnFire(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): true while the human has state flag 0x4000 (burning); false otherwise or when the handle is not a human.

Tells whether the human is on fire: tests state flag 0x4000 of its state record, the flag HuSetOnFire sets and putting the fire out clears.

  • Evidence: confirmed (code) at 0x00235f80, 0x00227fb8; detail: traced
  • Wrapper 0x00359b40 (registered by RegisterBindings); calls 0x00235f80 HumanHandle_IsOnFire, 0x00227fb8 Human_IsOnFire
  • Used by 2 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level93 (mission 10)
  • Coney: not implemented

HuIsProne

HuIsProne(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): True when the human lies on the ground (either of two prone states).

Tells whether the human is lying down.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035b7f8 (registered by RegisterBindings); calls 0x00235818
  • Used by no script on the disc
  • Coney: not implemented

HuIsTagging

HuIsTagging(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns boolean (1 for true, nil for false): true while the human is spraying a tag; nil for a bad handle.

Tells whether the human is tagging: bit 0x2000000 of its 64-bit state word (the word human +0xd4 points to), which is set while a tag is being sprayed (Crimes). Scripts poll it in the tagging levels.

Notes. A human with no state word reads as not tagging. The code that sets and clears the bit is on the crimes page, not re-traced here.

  • Evidence: confirmed (code) at 0x002387e8, 0x002238c0, 0x002265f0; detail: traced
  • Wrapper 0x003654f0 (registered by RegisterBindings); calls 0x002387e8 Human_IsTagging, 0x002238c0, 0x002265f0 Human_HasStateFlag
  • Used by 3 of 467 script chunks (6 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 2 of 28 levels, first level5 (mission 7)
  • Coney: implemented

HuKill

HuKill(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; not checked, so pass a live handle.

Returns nothing.

Kills a human through the damage path: unless it is already dead or flagged 0x80000000, its hat is knocked off (Human_KnockOffHat 0x00258330), its health is set to 1 and 100 damage is left pending (record +0x118, human +0x5d2), so the next damage update finishes it with the usual death.

Notes. The handle is not checked for being a human. That the pending damage is applied on the next update is from the damage page (Combat); the outcome (knock-out or death) follows the usual rules (inferred).

  • Evidence: confirmed (code) at 0x00237e70; detail: traced
  • Wrapper 0x00358640 (registered by RegisterBindings); calls 0x00237e70 Human_Kill
  • Used by 29 of 467 script chunks (46 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 20 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuLockMovement

HuLockMovement(human, lock)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 lock boolean (nil or 0 is false) True stops the human moving.

Returns nothing.

Locks or unlocks the human's movement (flag 0x200000000 at +0xe0).

  • Evidence: confirmed (code) at 0x00234ef8; detail: brief
  • Wrapper 0x0035abc0 (registered by RegisterBindings); calls 0x00234ef8
  • Used by 35 of 467 script chunks (38 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

HuLockPad

HuLockPad(human, lock)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player's human.
2 lock boolean (nil or 0 is false) True locks the player's pad input, false unlocks it.

Returns nothing.

Locks or unlocks the gamepad of the player controlling this human, so scripted moments can take control without handing the character to the AI.

Notes. Writes the player record's +0x1e; HuLockPadMovement writes the neighbouring +0x1f, which locks only the analog stick movement. That +0x1e locks the buttons is inferred from the pair.

  • Evidence: confirmed (code) at 0x0023ae40; detail: traced
  • Wrapper 0x00365540 (registered by RegisterBindings); calls 0x0023ae40 Human_LockPad
  • Used by 37 of 467 script chunks (52 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 2 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuLockPadMovement

HuLockPadMovement(human, lock)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player's human; a human no player controls is ignored.
2 lock boolean (nil or 0 is false) true locks the left stick; false frees it.

Returns nothing.

Locks the left-stick movement of the player controlling this human (byte +0x1f of the player record): while set, the player record's update reads the stick as centred (angle π/2, length 0), so the character stands still but its buttons (attacks, commands, actions) still work.

Notes. Reader: PlayerRecord_Update (0x00146078), Characters. The lock stays until cleared.

  • Evidence: confirmed (code) at 0x0023ae90; detail: traced
  • Wrapper 0x003655a0 (registered by RegisterBindings); calls 0x0023ae90 Human_LockPadMovement
  • Used by 10 of 467 script chunks (28 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 5 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuMakeBeatUp

HuMakeBeatUp(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.

Returns nothing.

Leaves the human beaten and helpless: its brain is put on hold (brain +0x09 = 1, as at the Rumble intro), it drops what it carries, and, unless record state flag 0x10000 is already set, its anim-mode stack is emptied, state flags 0x180040000 cleared, it is knocked down, its state code set to 0, its health to 1 hit point and state flag 0x20000000 set. Finally human flag +0xe0 0x10 and state flag 0x40000000 are set.

Notes. The AI stays held until something releases brain +0x09 (not traced which binding). State flag 0x40000000 is the down latch (HuMakeGrounded false clears it; confirmed (runtime): 196 at once, health 1, then 199 on the update after the latch was cleared, combat-reactions.md#scripted-knockdowns). State flags 0x10000 and 0x20000000 and human flag 0x10 (also set by a hit stopped at a health floor) are not named yet. Bit meanings: characters.md#the-record, combat.md#state-flags.

  • Evidence: confirmed (code) at 0x00234d70, 0x0022f100; detail: traced
  • Wrapper 0x003593e0 (registered by RegisterBindings); calls 0x00234d70 Human_MakeBeatUp, 0x0022f100 Human_KnockDown
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level92 (flashback 2)
  • Coney: not implemented

HuMakeGrounded

HuMakeGrounded(human, down)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 down boolean (nil or 0 is false) true knocks the human down and keeps it down; false lets it get up. Missing counts as false.

Returns nothing.

With true, a human that is not already down or dead is knocked down (Human_KnockDown, no attacker and no stun: state 0x80000, grounded) and lies in 196 at once, with no fall clip; its state code is set to 3 and state flags 0x20000000 and 0x40000000 (the down latch) set. While latched it never rises. With false the latch is cleared, and the human rises (199) on its next update if its down time has run out, else when it does (Combat).

Notes. The latch is read by Human_UpdateDown (0x00256a60), which skips the rise and the stun's end while it is set, by Humans_Update (no removal, no bleed-out mark) and by CullCorpses (which spares latched humans). False does not itself make the human stand.

  • Evidence: confirmed (runtime); detail: traced
  • Wrapper 0x00359418 (registered by RegisterBindings); calls 0x00234e58 Human_MakeGrounded, 0x0022f100 Human_KnockDown
  • Used by 3 of 467 script chunks (10 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level54 (mission 16)
  • Coney: not implemented

HuMarkReachable

HuMarkReachable(human, reachable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 reachable boolean (nil or 0 is false) true marks the human as one other AI can reach to fight; false clears it.

Returns nothing.

Writes the "reachable" byte of the human's brain (+0x11e). AI asking whether a human is reachable (0x0028abc0) gets yes only when this byte is set, the human is not standing near a running train hazard this frame (brain +0x2e0, ObjSetTrainPoint) and it is not in state 0x4000; enemy scoring (0x0029ce98) takes 5 points off a target that is not reachable, and the attack picker and several combat goals check it too.

Notes. The value a new brain starts with is not traced (inferred: set from the character's config). Readers: Brain_PickAttack 0x0028e708 and goals at 0x002ae2e8, 0x002bc198, 0x002bd808, 0x002be818.

  • Evidence: confirmed (code) at 0x00239e30; detail: traced
  • Wrapper 0x0035d5b0 (registered by RegisterBindings); calls 0x00239e30 Human_MarkReachable
  • Used by 9 of 467 script chunks (29 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 8 of 28 levels, first level5 (mission 7)
  • Coney: implemented

HuPlaceHatOnHead

HuPlaceHatOnHead(human, hat)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 hat string Name of the hat object to put on.

Returns nothing.

Puts a hat object on the human's head.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035cff0 (registered by RegisterBindings); calls 0x002385f8
  • Used by no script on the disc
  • Coney: implemented

HuPlaceItemInHand

HuPlaceItemInHand(human, object) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 object string Object name to spawn in its hand, such as dyn_bat, dyn_pipe_a, dyn_machet or dyn_beerbottle.

Returns number: The new object's handle, or NilHandle when the human is invalid, already holds something, or cannot take an item.

Spawns a weapon or item and puts it in the human's hand, which is how levels arm enemies and the Warriors.

  • Evidence: confirmed (code) at 0x00238540; detail: traced
  • Wrapper 0x0035cf60 (registered by RegisterBindings); calls 0x00238540 Human_PlaceItemInHand
  • Used by 62 of 467 script chunks (265 references); boot to menu: yes; mission 1: yes; result used: yes
  • Later in the story: 27 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuPlayDynamicAnim

HuPlayDynamicAnim(human, unused, anim, unused2)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 unused number, truncated to an unsigned integer Read but never used (scripts pass 0).
3 anim string Name of a dynamic animation (.anm) loaded for the level with SetDynamicAnimation.
4 unused2 number, truncated to an integer Read but not used by the callee (scripts pass 1).

Returns nothing.

Same as HuPlayDynAnim with two ignored extra arguments: binds the clip to the human's dynamic animation slot (anim id 668) and sets its state code to 16 (0x10), so the human plays it at once without going through its brain. Refused for a human without a model or animation record, or in state 0x100000000 or 0x80000000.

Notes. The body at 0x002389e8 matches Human_PlayDynAnim (0x00238948) apart from the unused parameter.

  • Evidence: confirmed (code) at 0x002389e8; detail: traced
  • Wrapper 0x003652b0 (registered by RegisterBindings); calls 0x002389e8 Human_PlayDynamicAnim
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level52 (mission 15)
  • Coney: not implemented

HuPlayDynAnim

HuPlayDynAnim(human, anim)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 anim string Name of a dynamic animation (.anm) loaded for the level with SetDynamicAnimation.

Returns nothing.

Binds the clip to the human's dynamic animation slot (anim id 668) and sets its state code to 16 (0x10, record +0x14), so the human plays it at once, without going through its brain. Refused for a human without a model or animation record, or in state 0x100000000 or 0x80000000.

Notes. No callback; GoalPlayDynAnimation is the brain-driven, queued version; what state 16 does when the clip ends is not traced.

  • Evidence: confirmed (code) at 0x00238948; detail: traced
  • Wrapper 0x003651a0 (registered by RegisterBindings); calls 0x00238948 Human_PlayDynAnim
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuPlayDynPair

HuPlayDynPair(a, b, animA, animB)
# Argument Read as Meaning
1 a number, truncated to an unsigned integer Handle of the first human.
2 b number, truncated to an unsigned integer Handle of the second human.
3 animA string Name of a dynamic animation (.anm, loaded with SetDynamicAnimation) for the first, e.g. money_give.
4 animB string Dynamic animation for the second, e.g. money_take.

Returns nothing.

Plays a two-person animation: each human gets its clip bound to the dynamic animation slot (anim id 668) and state code 17 (0x11, record +0x14), and each one's state record stores the other's handle as its partner (+0xc8), so the pair plays together at once without going through their brains. Nothing happens unless both humans exist, have a model and a state record, and neither is out of the fight.

Notes. The pair version of HuPlayDynAnim (which uses state 16); no callback. How state 17 lines the two up or ends is not traced.

  • Evidence: confirmed (code) at 0x00238828, 0x00226910; detail: traced
  • Wrapper 0x00365200 (registered by RegisterBindings); calls 0x00238828 Human_PlayDynPair, 0x00226910 Human_SetPartner
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level86 (mission 9)
  • Coney: not implemented

HuPutItemInPocket

HuPutItemInPocket(human, item, count)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 item number, truncated to an integer Inventory item id 0-22 (0 empties the pocket).
3 count number, truncated to an integer; default 1 How many (default 1); stored as a byte, so 0-255. Forced to 0 when item is 0.

Returns nothing.

Gives a human a pocket item: the item id goes to human +0x250 and the count to +0x254. The pocket is what the player gets by mugging the human (Mug_CanMugVictim, 0x00226130, checks the count) and what the human drops when knocked down (Human_DropCarried, 0x00232d24). HuRemoveItemInPocket (0x00238214) empties it.

Notes. Item 12 (the ledger) makes the human unmuggable (Crimes: mugging); the item id is not range-checked here.

  • Evidence: confirmed (code) at 0x00238190; detail: traced
  • Wrapper 0x0035c4d0 (registered by RegisterBindings); calls 0x00238190 Human_SetPocketItem
  • Used by 28 of 467 script chunks (78 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 12 of 28 levels, first level9 (mission 13)
  • Coney: implemented

HuRemoveItemInPocket

HuRemoveItemInPocket(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.

Returns nothing.

Empties the human's pocket: the item id (human +0x250) and the count (byte +0x254) become 0, so a mugging or a knock-down no longer yields the item set by HuPutItemInPocket.

Notes. Pocket fields: Crimes and player-state.md. Money (+0x370) is untouched.

  • Evidence: confirmed (code) at 0x002381f0; detail: traced
  • Wrapper 0x0035c568 (registered by RegisterBindings); calls 0x002381f0 Human_RemoveItemInPocket
  • Used by 36 of 467 script chunks (69 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level20 (flashback 4)
  • Coney: implemented

HuRemoveSpinningIcon

HuRemoveSpinningIcon(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns nothing.

Removes the marker icon attached with HuAttachSpinningIcon.

  • Evidence: confirmed (code) at 0x00238ae0; detail: traced
  • Wrapper 0x0035af48 (registered by RegisterBindings); calls 0x00238ae0 Human_RemoveSpinningIcon
  • Used by 55 of 467 script chunks (105 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 9 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuRender

HuRender(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns nothing.

Re-applies render state to the human's model and related objects.

Notes. No script calls it.

  • Evidence: speculative; detail: brief
  • Wrapper 0x00358aa0 (registered by RegisterBindings); calls 0x00237e98
  • Used by no script on the disc
  • Coney: not implemented

HuRevive

HuRevive(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns nothing.

Brings a downed human back: ends the knocked-out or beaten state, restores full health and gets it back on its feet.

Notes. Calls 0x0022eb40 with full=1: health (record +0x144) set to the maximum.

  • Evidence: confirmed (code) at 0x002377f8; detail: traced
  • Wrapper 0x0035bc98 (registered by RegisterBindings); calls 0x002377f8 Human_Revive
  • Used by 55 of 467 script chunks (73 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 27 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuRubberNeck

HuRubberNeck(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 enable boolean (nil or 0 is false) true sets the flag, false clears it. Missing counts as false.

Returns nothing.

Sets or clears human flag 0x1000000 (+0xe0), from the name letting the human stop and stare at nearby events.

Notes. The store is confirmed (code) at 0x0023a258; no reader of the human flag (as opposed to the state flag of the same value) was found, so its effect is open.

  • Evidence: inferred; detail: traced
  • Wrapper 0x00358b38 (registered by RegisterBindings); calls 0x0023a258 Human_SetRubberNeck
  • Used by 2 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level54 (mission 16)
  • Coney: implemented

HuSay

HuSay(human, line)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the speaker.
2 line string Speech file name, as for HuSpeak; nil plays nothing.

Returns nothing.

Shorthand for HuSpeak with no callback, no callback argument, the flag true and no listener: the human says the line unless it is already speaking, speech is off or the human does not exist.

  • Evidence: confirmed (code) at 0x00239340, 0x00239370; detail: traced
  • Wrapper 0x00364c08 (registered by RegisterBindings); calls 0x00239340 Human_Say, 0x00239370 Human_Speak
  • Used by 3 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetAccurate

HuSetAccurate(human, accurate)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 accurate boolean (nil or 0 is false) True sets the flag.

Returns nothing.

Sets the human's accuracy flag (0x40000 at +0xe0).

  • Evidence: speculative; detail: brief
  • Wrapper 0x00358870 (registered by RegisterBindings); calls 0x00234d08
  • Used by no script on the disc
  • Coney: not implemented

HuSetArrested

HuSetArrested(human, arrested)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 arrested boolean (nil or 0 is false) True puts the human in the arrested state; false releases it.

Returns nothing.

Arrests or releases the human, as the police do; a released human gets back up.

  • Evidence: confirmed (code) at 0x00237700; detail: traced
  • Wrapper 0x0035ad40 (registered by RegisterBindings); calls 0x00237700 Human_SetArrested
  • Used by 51 of 467 script chunks (60 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 26 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetAutoCombat

HuSetAutoCombat(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 enable boolean (nil or 0 is false) true sets the flag, false (or nil) clears it.

Returns nothing.

Sets or clears bit 0x200000000000 of the human's flag word (human +0xe0). From the name it lets the human fight on its own; the scripts set it on the Warriors during set-piece fights.

Notes. Only the store is confirmed; no reader of the bit was found (it is not the global auto-combat switch 0x005104b0 of CfgAutoCombat, which the player target routine 0x00241b90 reads), so the effect stays open.

  • Evidence: confirmed (code) at 0x00234118; detail: traced
  • Wrapper 0x00358810 (registered by RegisterBindings); calls 0x00234118 Human_SetAutoCombat
  • Used by 4 of 467 script chunks (8 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuSetAutoEscape

HuSetAutoEscape(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 enable boolean (nil or 0 is false) true lets the human break out of grabs; false clears it.

Returns nothing.

Sets or clears flag 0x20000 of the human's flag word (+0xe0). A human with it escapes a grab when the grabber's power runs out (instead of both letting go), and can counter a grab attempt at the end of the grabber's intro, so the player cannot simply hold it.

Notes. Readers: the power-out escape in Human_UpdateMeters (0x002562d0) and the grab intro's end (0x0026c1d8), Combat.

  • Evidence: confirmed (code) at 0x00235200; detail: traced
  • Wrapper 0x00359380 (registered by RegisterBindings); calls 0x00235200 Human_SetAutoEscape
  • Used by 8 of 467 script chunks (13 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetBlockFromReact

HuSetBlockFromReact(human, block)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 block boolean (nil or 0 is false) True blocks the reactions.

Returns nothing.

Stops the human reacting to hits (flag 0x800000000 at +0xe0).

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035bdf0 (registered by RegisterBindings); calls 0x002375b8
  • Used by no script on the disc
  • Coney: not implemented

HuSetBlurMode

HuSetBlurMode(human, blur, param)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player's human; a human with no view (+0x1b0 = -1) or a bad handle does nothing.
2 blur boolean (nil or 0 is false) true starts the blur, false ends it at once.
3 param number, truncated to an unsigned integer Stored in the blur pulse (manager +0x204) when starting; its reader is not traced. Ignored when ending.

Returns nothing.

Starts or stops the blur pulse (screen effect types 4 and 5) on the screen-effects manager of the human's own view, as when a player is dazed or drugged: on, the blur fades in over 5 s and then holds for look 5's frame time before ending itself (Graphics); off ends it with no fade. Only that player's view is affected, unlike ScreenQueueEffect.

Notes. The 5 s comes from the constant at 0x0051029c. The view index is the human's +0x1b0 (into the manager table 0x005fdeb8).

  • Evidence: confirmed (code) at 0x002371d8, 0x0018d450, 0x0018d058; detail: traced
  • Wrapper 0x003594d8 (registered by RegisterBindings); calls 0x002371d8 Human_SetBlurMode, 0x0018d450, 0x0018d058 ScreenFx_StartBlurPulse
  • Used by 2 of 467 script chunks (5 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level81 (mission 8)
  • Coney: not implemented

HuSetButtonTapControl

HuSetButtonTapControl(human, enable, points, target)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player's human; a bad handle does nothing.
2 enable boolean (nil or 0 is false) true starts the tap control, false ends it and gives the commands back.
3 points table of 16 numbers (t[1]..t[16]) Up to 16 handles (flags or objects) the human is driven through in order, ended by NilHandle (missing entries read as NilHandle); written back unchanged.
4 target number, truncated to an unsigned integer Handle of the object being pushed (the bus in the scripts), kept at human +0x6bc.

Returns nothing.

Puts a player's human under button-tap control, as when the Warriors push a bus: its other commands are disabled, command 45 (0x2d) is added, state bit 0x100000000000 is set and its movement handler becomes 0x00242ce0. Each update the human turns toward the current point (at its turn rate) and moves at its top speed scaled by how fast the button is tapped: full when presses come at most 2 frames apart, falling by 1/8 per extra frame to nothing at 10. Within 1 m of a point it moves to the next; when the points run out or the human is down, the control ends and the commands come back. enable false ends it at once, keeping command 45 only for the other player in two-player play.

Notes. Which pad button command 45 is bound to (inferred: cross) and what reads +0x6bc are not traced. Calling it with true while the control is already on does nothing.

  • Evidence: confirmed (code) at 0x00234318, 0x00242ce0; detail: traced
  • Wrapper 0x00358930 (registered by RegisterBindings); calls 0x00234318 Human_SetButtonTapControl, 0x00242ce0 Human_ButtonTapMove
  • Used by 3 of 467 script chunks (19 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level81 (mission 8)
  • Coney: not implemented

HuSetCanBlockKD

HuSetCanBlockKD(human, enable)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 enable boolean (nil or 0 is false) True sets the flag.

Returns nothing.

Lets the human block knock-down attacks (flag 0x400000000 at +0xe0).

  • Evidence: speculative; detail: brief
  • Wrapper 0x0035bd90 (registered by RegisterBindings); calls 0x00237548
  • Used by no script on the disc
  • Coney: not implemented

HuSetCarriedItem

HuSetCarriedItem(human, object)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 object string Object name of the item the human carries (31 characters kept); "none" for nothing.

Returns nothing.

Sets the item a human carries and will drop, by object name; the first mission's training enemies are given "none" so they drop nothing.

Notes. Stores the name at +0x257 and sets +0x278 to 100 (likely the drop chance in percent, inferred). At creation both come from the type's CfgChar record (Crimes: starting money).

  • Evidence: confirmed (code) at 0x00238230; detail: traced
  • Wrapper 0x0035c470 (registered by RegisterBindings); calls 0x00238230 Human_SetCarriedItemName
  • Used by 37 of 467 script chunks (72 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 2 of 28 levels, first level34 (mission 4)
  • Coney: implemented

HuSetCombatMode

HuSetCombatMode(human, combat)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 combat boolean (nil or 0 is false) true puts it in fight stance, false (or nil) takes it out.

Returns nothing.

Turns a human's fight stance on or off. On sets state flags 0x3 and restarts the stance timer (record +0xfc = now + the global 0x00510994 seconds), unless the human is being tackled or in a state of 0xe0000. Off clears flags 0x7 (stance and target); for a pad-driven human standing idle it also resets its stance animation.

Notes. Fight stance: Combat. An AI's brain can put it back in stance on its next fight decision.

  • Evidence: confirmed (code) at 0x0023a1b0, 0x0022fe80, 0x0022fef0; detail: traced
  • Wrapper 0x0035c030 (registered by RegisterBindings); calls 0x0023a1b0 Human_SetCombatMode, 0x0022fe80 Human_EnterFightStance, 0x0022fef0 Human_LeaveFightStance
  • Used by 5 of 467 script chunks (5 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 4 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetConscious

HuSetConscious(human, conscious)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 conscious boolean (nil or 0 is false) false (or nil) knocks the human out; true brings it round.

Returns nothing.

false knocks the human unconscious (0x00230328): it drops into the knocked-out state (record state flag 0x40000, blocking 0x8000 cleared), its brain is switched off (0x0028c3b0), its wake-up time (record +0xf0) is set 14 s ahead (0x00510794 = 14000 ms), and a player human also ends slow motion (0x0041ab60). A knock-out of a player's gang member counts a statistic and may show a hint. true wakes it (0x00230598): the knocked-out flags (0x1c8007) are cleared, it plays its get-up mode (anim mode 0x12) and its brain resumes. Both set state flag 0x20000000.

Notes. Knocking out does nothing to a human that is already knocked out (state 0x40000) or has no record. What wakes it after the 14 s (the reader of +0xf0) is not traced; inferred: it gets up by itself. The optional +0xfc timer (0x002800b8) is off because its setting 0x00510994 is -1.

  • Evidence: confirmed (code) at 0x00237778, 0x00230328, 0x00230598; detail: traced
  • Wrapper 0x0035ace0 (registered by RegisterBindings); calls 0x00237778 Human_SetConscious, 0x00230328 Human_KnockOut, 0x00230598 Human_WakeUp
  • Used by 4 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level60 (Armies of the Night 1)
  • Coney: implemented

HuSetDamage

HuSetDamage(human, amount, attacker, react, useHeld)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human to hurt; a bad handle does nothing.
2 amount number, truncated to an integer Damage in hitpoints (16 bits; the sign is kept, the size compared).
3 attacker number, truncated to an unsigned integer Handle of the human credited with the hit, or 0 for none (0 is tested, not NilHandle).
4 react number, truncated to an unsigned integer Stored in record +0x11a, read only when the victim is in a grab: 2 or more plays the heavier paired reaction. It does not decide whether the victim reacts (Combat).
5 useHeld boolean (nil or 0 is false) With no attacker, true records the human's own held object as what hit it; ignored with an attacker.

Returns nothing.

Queues damage on the human as one more hit of this update, through the same path as a melee strike: it becomes the pending damage (record +0x118) only when at least as large as any hit already pending, and is applied in the human's next damage step (block, demi-god cap, health drop, reaction). With an attacker the hit is credited to it, and is doubled for an attacker with human flag 0x4000 and quartered for a class-128 victim against a brain of type 3, as for real hits.

Notes. A smaller hit in the same update is dropped, not added. Also written: human +0x5d2 (last damage). Scripts pass attacker 0 to hurt without blame; the victim is then its own foe, and a standing victim plays 275 (hit code 10 from its own side 3), confirmed (runtime) (Combat).

  • Evidence: confirmed (code) at 0x002358c8, 0x00264bd8; detail: traced
  • Wrapper 0x0035b8a0 (registered by RegisterBindings); calls 0x002358c8 Human_SetDamage, 0x00264bd8 Human_AddPendingDamage
  • Used by 2 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level81 (mission 8)
  • Coney: not implemented

HuSetDemiGodMode

HuSetDemiGodMode(human, on, fraction)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human (from HuCreate).
2 on boolean (nil or 0 is false) true sets demi-god mode, false clears it.
3 fraction number (single precision) Stored only when turning the mode on, in one global shared by every human (0x0051024c): the share of the maximum health a hit cannot take the human below. The scripts pass 0.25.

Returns nothing.

Sets or clears flag bit 0x20000000000 of the human's flag word; turning it on also stores fraction in a single global, so the last call wins for every demi-god human. The tutorial gives it to Rembrandt and Ash so they can be hurt but not killed.

Notes. A hit that would take a demi-god's health below the fraction sets it to the fraction instead and sets god mode (flag 0x10), so it takes no more damage until a script clears that (0x00265f70, 0x00256f28; combat.md#damage-table). Only an on of exactly 1 sets the bit.

  • Evidence: confirmed (code) at 0x002359a0; detail: traced
  • Wrapper 0x0035ba40 (registered by RegisterBindings); calls 0x002359a0 Human_SetDemiGodMode
  • Used by 8 of 467 script chunks (21 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 2 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetDoubleDamage

HuSetDoubleDamage(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true sets the flag, false (or nil) clears it.

Returns nothing.

Sets or clears human flag +0xe0 0x4000. With it the human's hits deal double damage and ignore the victim's hit armour (Human_AddPendingDamage 0x00264bd8); as a grabbed victim it also escapes when the grabber's power runs out (0x002562d0).

Notes. Effects of the flag: Combat. Weapon and thrown hits go through the same damage path (inferred).

  • Evidence: confirmed (code) at 0x00235e10; detail: traced
  • Wrapper 0x00359a80 (registered by RegisterBindings); calls 0x00235e10 Human_SetDoubleDamage
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level83 (flashback 3)
  • Coney: implemented

HuSetFastClimber

HuSetFastClimber(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x2 of the human's flag word; from the name, the human climbs (fences, ladders) faster.

Notes. The bit is confirmed (code) at 0x00235b68; its effect on climbing is inferred from the name.

  • Evidence: confirmed (code) at 0x00235b68; detail: traced
  • Wrapper 0x00359840 (registered by RegisterBindings); calls 0x00235b68 Human_SetFastClimber
  • Used by 12 of 467 script chunks (22 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 5 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuSetFireProof

HuSetFireProof(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true makes the human fire-proof and puts out any fire on it; false clears the flag only.

Returns nothing.

Sets or clears bit 0x800000 of the human's flag word (+0xe0). Setting it also puts the human out at once (0x0022fe10: state flag 0x4000, on fire, cleared, the burn end time in the state record +0x10c zeroed, and 0x0021adb0 run, inferred: the flames removed). While the bit is set HuSetOnFire does nothing, so the human cannot catch fire (molotovs, burning objects).

Notes. Clearing the flag does not set the human alight again. Fire itself: HuSetOnFire, HuIsOnFire.

  • Evidence: confirmed (code) at 0x00235fc0, 0x0022fe10; detail: traced
  • Wrapper 0x00359bf0 (registered by RegisterBindings); calls 0x00235fc0 Human_SetFireProof, 0x0022fe10 Human_Extinguish
  • Used by 8 of 467 script chunks (27 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 4 of 28 levels, first level86 (mission 9)
  • Coney: not implemented

HuSetFullRage

HuSetFullRage(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human (normally a player).

Returns nothing.

Fills the human's rage meter: the current rage (+0x650) becomes the human's maximum (0x00223260), the drain counter (+0x654) is cleared and the meter's timer (+0x648) is set to now plus a global delay (0x00510290). global.lua uses it to fill both players' meters.

  • Evidence: confirmed (code) at 0x00236a68; detail: traced
  • Wrapper 0x003596a8 (registered by RegisterBindings); calls 0x00236a68 Human_SetFullRage
  • Used by 1 of 467 script chunks (2 references); boot to menu: yes; mission 1: yes; result used: no
  • Coney: implemented

HuSetGodMode

HuSetGodMode(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true makes the human invulnerable, false or nil makes it vulnerable again.

Returns nothing.

Sets or clears flag bit 0x10 of the human's flag word, which makes the human take no damage. Scripts use it to protect story characters and the players during scenes.

Notes. The bit is confirmed (code) at 0x00235a28; that it blocks damage is inferred from the name and how the scripts use it. Only an on of exactly 1 sets the bit.

  • Evidence: confirmed (code) at 0x00235a28; detail: traced
  • Wrapper 0x0035b9e0 (registered by RegisterBindings); calls 0x00235a28 Human_SetGodMode
  • Used by 81 of 467 script chunks (496 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 24 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetHardToStun

HuSetHardToStun(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x1000000000 of the human's flag word (power class byte +0x3b sets it too). With it, a hit stuns the human only when he is already standing stunned: the hit's stun flag 0x400 and the caller's stun request are ignored (Human_PlayReaction 0x0026a6d0).

  • Evidence: confirmed (code) at 0x002373f8; detail: brief
  • Wrapper 0x0035be50 (registered by RegisterBindings); calls 0x002373f8 Human_SetHardToStun
  • Used by no script on the disc
  • Coney: not implemented

HuSetHealth

HuSetHealth(human, health)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 health number, truncated to an integer New health in hit points, truncated to 16 bits; anything above the human's maximum gives full health.

Returns nothing.

Sets the human's current health (+0x144 of its record at human +0xd4) to health, or to its maximum (+0x146) when health is larger. Nothing else is started: no damage, reaction or death, and the health bar simply shows the new value.

Notes. No lower bound: 0 or a negative value is stored as given; what the damage code then does with it is not traced (HuKill is the way to kill). Health scale: Combat.

  • Evidence: confirmed (code) at 0x00237848; detail: traced
  • Wrapper 0x0035bad8 (registered by RegisterBindings); calls 0x00237848 Human_SetHealth
  • Used by 23 of 467 script chunks (57 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 15 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetHealthPercent

HuSetHealthPercent(human, percent)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 percent number (single precision) Health as a percentage of the maximum, above 0 and up to 100; 0 or less, or above 100, gives full health.

Returns nothing.

Sets the human's current health to percent per cent of its maximum (truncated to whole hit points). A value outside (0, 100] restores full health rather than killing the human.

  • Evidence: confirmed (code) at 0x002378a8; detail: traced
  • Wrapper 0x0035bb50 (registered by RegisterBindings); calls 0x002378a8 Human_SetHealthPercent
  • Used by 17 of 467 script chunks (29 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 9 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetHearRange

HuSetHearRange(human, range)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 range number (single precision) Hearing distance in metres (50 by default; scripts use 0 to 9); 0 makes it deaf.

Returns nothing.

Sets how far a human's AI hears noises (brain +0x134, a float; the brain constructor 0x0028a570 sets 50 m, next to the 30 m sight range at +0x130 and the field of view at +0x12c). Scripts lower it so that sentries or sleepers do not react to fights and noises nearby.

Notes. The store and default are confirmed; the hearing checks that read +0x134 were not isolated in this pass, so the exact use (inferred: the radius for noise events such as fights and breaking glass) stays open.

  • Evidence: confirmed (code) at 0x002383e8; detail: traced
  • Wrapper 0x0035c278 (registered by RegisterBindings); calls 0x002383e8 Human_SetHearRange
  • Used by 5 of 467 script chunks (7 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 4 of 28 levels, first level86 (mission 9)
  • Coney: implemented

HuSetHelpHearRange

HuSetHelpHearRange(human, range)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 range number (single precision) Hearing range in metres for gang calls for help.

Returns nothing.

Sets how far this human's AI hears its gang's calls for help (brain +0x138). When a gang member is attacked or mugged, Gang_BroadcastHelpCall (0x00293640) sends message 0x14 to every member of the gang, and Brain_IsInHearRange (0x002935d8) lets a member react only when it is within this range; other messages use the general hearing range at +0x134.

Notes. The brain's reset (0x0028a570) sets it to 20 m and the general range to 50 m. The help call's senders include GangBrain_OnEvent and Player_UpdateMugging (both callers of 0x00293640).

  • Evidence: confirmed (code) at 0x00238430; detail: traced
  • Wrapper 0x0035c2f0 (registered by RegisterBindings); calls 0x00238430 Human_SetHelpHearRange
  • Used by 2 of 467 script chunks (8 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level9 (mission 13)
  • Coney: implemented

HuSetIdleAnim

HuSetIdleAnim(human, slot, anim)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 slot number, truncated to an unsigned integer Dynamic animation slot 0-3 (larger values use slot 3).
3 anim string Animation file name such as fidget_crossarms.anm; it must have been requested with SetDynamicAnimation.

Returns nothing.

Puts an animation file into one of the human's dynamic animation slots (+0x3c8 + slot × 0x28) without binding it to an animation id. No script calls it.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035c090 (registered by RegisterBindings); calls 0x00237e00 Human_SetIdleAnim
  • Used by no script on the disc
  • Coney: not implemented

HuSetIdleDialogMaxIter

HuSetIdleDialogMaxIter(human, count)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 count number, truncated to an integer Number of idle lines the human has for this checkpoint (byte, 0-255); 0 disables its idle chatter. Scripts use 0 to 2.

Returns nothing.

Sets how many numbered idle-chatter lines this crew member has (human byte +0x197). When the player's gang has had nobody fighting for 25 seconds, the crew idle logic (0x00311638) picks a random member whose next line exists (Human_HasIdleDialogLine, 0x00220360) and plays it (Human_PlayIdleDialogLine, 0x00220430); the others look at the speaker for 4 seconds. Lines are the voice files l<level>_c<checkpoint>_idle_<NN> of the human's voice; the index (+0x196) advances after each line and wraps to 1 past this count.

Notes. If the next line's file is missing, line 1 is played and the index goes to 2. The starting values come from Human_Init (0x002184ec-0x00218560): +0x197 is set to 0, then for line numbers 1, 2 and 3 the name vags/character/voices/<voice>/l<level>_c<checkpoint>_idle_<NN> is built (voice: human +0x3b0; level: the current level table entry's number; checkpoint: game state +0x33a) and looked up in the loaded sounds (Sound_FindByName, 0x00110d78); each one found adds 1 to +0x197 and sets +0x196 to 1. So a crew member starts with as many lines as exist among 01-03 (at most 3) and his counter at 1; the script's count replaces it. Confirmed (code).

  • Evidence: confirmed (code) at 0x002391c0; detail: traced
  • Wrapper 0x00365058 (registered by RegisterBindings); calls 0x002391c0 Human_SetIdleDialogMaxIter
  • Used by 2 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level9 (mission 13)
  • Coney: not implemented

HuSetIncreasedReact

HuSetIncreasedReact(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x200000 of the human's flag word; from the name, the human reacts more strongly to hits (staggers and falls more).

Notes. Bit confirmed (code) at 0x00235ce8; the effect is inferred from the name. The counterpart is HuSetReducedReact (bit 0x200).

  • Evidence: confirmed (code) at 0x00235ce8; detail: traced
  • Wrapper 0x003599c0 (registered by RegisterBindings); calls 0x00235ce8 Human_SetIncreasedReact
  • Used by 2 of 467 script chunks (4 references); boot to menu: yes; mission 1: yes; result used: no
  • Coney: implemented

HuSetInterrogation

HuSetInterrogation(human, line1, line2, line3, line4, callback, icon) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human to be interrogated.
2 line1 string First speech file (a path such as vags/speeches/l2/l2_t3_016), looked up in the speech table (0x005d91e0); nil for none.
3 line2 string Second speech file, or nil.
4 line3 string Third speech file, or nil.
5 line4 string Fourth speech file, said when the interrogation succeeds, or nil.
6 callback string Name of the Lua function to call when the interrogation succeeds (dotted names such as P2.JesseGivesUp work); nil clears the interrogation.
7 icon number, truncated to an unsigned integer; default 1 Non-zero (the default 1, or the scripts' ICON_* values) also puts a spinning icon over the human; 0 shows none. Only zero or non-zero matters.

Returns boolean (1 for true, nil for false): true when the handle names an object, nil otherwise.

Makes a human interrogable: the four lines are stored at +0x590-+0x59c and the callback at +0x5a0. A player who grabs the human can then shake it down like a mugging (prompt "interrogate"): the human speaks its set lines instead of the mugging lines, and on success says the fourth and the callback runs (Crimes: mugging).

Notes. The icon value itself is not passed on; one fixed icon (0x0055c6e0, Human_AttachSpinningIcon) is used. The lines are cleared first, so nil lines remove earlier ones; a nil callback leaves +0x5a0 0, which is what marks a human as not interrogable. On success 0x00226168 calls the callback with (victim, mugger, true) and clears +0x5a0 and the lines, so an interrogation works once; a failure calls nothing (Crimes: interrogation). Which of lines 1-3 plays at which moment is not traced.

  • Evidence: confirmed (code) at 0x00239f20; detail: traced
  • Wrapper 0x0035d498 (registered by RegisterBindings); calls 0x00239f20 Human_SetInterrogation
  • Used by 5 of 467 script chunks (10 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level2 (mission 5)
  • Coney: implemented

HuSetKeepHat

HuSetKeepHat(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true keeps the human's hat on; false lets it be knocked off again.

Returns nothing.

Sets (true) or clears bit 0x10000000000 of the human's flag word (+0xe0). The hat knock-off 0x00258330, called when a human is hit hard, killed or removed, returns at once while the bit is set, so the hat (the object at human +0x364, see HuHasHat) stays on; otherwise the hat is detached and tossed away from the blow.

Notes. Only exactly true sets the bit. A riot hat (TYPE_RIOT_HAT) never comes off. A knocked-off hat may be given a timer (0x00395d20, 8 s or game state +0x26c) whose meaning is not traced.

  • Evidence: confirmed (code) at 0x00237388; detail: traced
  • Wrapper 0x00359780 (registered by RegisterBindings); calls 0x00237388 Human_SetKeepHat
  • Used by 7 of 467 script chunks (9 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetKeepWeapon

HuSetKeepWeapon(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x2000 of the human's flag word, which keeps a held weapon in hand when he is knocked down or stunned while hurt, grabbed, mounted, arrested, hit by a counter or a special move, or starts a grab or tackle. An object of anim set 4 or 6 (the two-handed props, the ghetto blasters) is dropped anyway.

Notes. Bit set at 0x00237328 and read at five places (0x00257ce8, 0x00257d70, 0x00257e38, 0x0026a7bc, 0x0022ed14). It does not stop the drop of an object whose throw a hit interrupts, nor of a kind-39 object (Human_ApplyPendingDamage, 0x00265f70). Rage's SetRageMode sets it. Details: Combat: dropping what is held when hit.

  • Evidence: confirmed (code) at 0x00237328; detail: traced
  • Wrapper 0x003597e0 (registered by RegisterBindings); calls 0x00237328 Human_SetKeepWeapon
  • Used by 12 of 467 script chunks (18 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 6 of 28 levels, first level34 (mission 4)
  • Coney: implemented

HuSetKillerMode

HuSetKillerMode(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true sets killer mode, false clears it.

Returns nothing.

Sets or clears bit 0x20 of the human's flag word (+0xe0). With it set, every strike the human lands deals the victim's whole remaining health (Strike_Contact, Combat), so one hit knocks out or kills; scripts give it to a few scripted killers.

Notes. Only melee strikes read the bit as far as traced; thrown objects and HuSetDamage are not affected.

  • Evidence: confirmed (code) at 0x00235a88; detail: traced
  • Wrapper 0x0035b980 (registered by RegisterBindings); calls 0x00235a88 Human_SetKillerMode
  • Used by 4 of 467 script chunks (7 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level81 (mission 8)
  • Coney: implemented

HuSetLockedRage

HuSetLockedRage(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human (normally a player).
2 on boolean (nil or 0 is false) true locks the rage meter; false unlocks it and restarts its timers.

Returns nothing.

Sets flag bit 0x100000 of the human's flag word, which keeps the rage meter where it is. Clearing it also clears the drain counter (+0x654), restarts the meter's timer (+0x64c) and, if the human is raging (bit 0x80000), clears +0x648.

Notes. That the bit freezes the meter is inferred from the name; the writes are confirmed (code) at 0x00236b38.

  • Evidence: confirmed (code) at 0x00236b38; detail: traced
  • Wrapper 0x00359570 (registered by RegisterBindings); calls 0x00236b38 Human_SetLockedRage
  • Used by 3 of 467 script chunks (9 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 1 of 28 levels, first level11 (flashback 5)
  • Coney: implemented

HuSetLookAtTarget

HuSetLookAtTarget(human, target)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human (ignored).
2 target number, truncated to an unsigned integer Handle of the target (ignored).

Returns nothing.

Does nothing in this build: the wrapper reads both handles and calls 0x00299238, which returns at once. Use HuSetLookTarget to make a human look at something.

  • Evidence: confirmed (code) at 0x00299238; detail: traced
  • Wrapper 0x00364b30 (registered by RegisterBindings); calls 0x00299238 Human_SetLookAtTarget
  • Used by 3 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetLookPos

HuSetLookPos(human, pos)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 pos table of 3 numbers (t[1]..t[3]) Position {x, y, z} in metres; written back unchanged.

Returns nothing.

Does nothing in this build: it looks the human up and returns (0x0023a390).

  • Evidence: confirmed (code) at 0x0023a390; detail: brief
  • Wrapper 0x00358d08 (registered by RegisterBindings); calls 0x0023a390 Human_SetLookPos
  • Used by no script on the disc
  • Coney: not implemented

HuSetLookTarget

HuSetLookTarget(human, target, ms, weight, flagA, flagB)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human that turns its head.
2 target number, truncated to an unsigned integer Handle of what to look at: another human or an object (a flag works too, as the scripts pass flags).
3 ms number, truncated to an unsigned integer; default 2000 How long to look, in milliseconds (default 2000); the scripts pass -1 for no limit.
4 weight number (single precision); default 1 Number passed to the head-look controller (default 1), probably the blend weight or turn speed (inferred).
5 flagA boolean (nil or 0 is false) true adds look option 0x20 (meaning not traced).
6 flagB boolean (nil or 0 is false) true adds look option 0x40 (meaning not traced).

Returns nothing.

Makes the human look at a target for a time, through the head-look controller at +0x284 (0x0029a000). Nothing happens unless both the human and the target exist.

Notes. The two option bits are passed on as 0x20 / 0x40 but what they change in the controller is not traced.

  • Evidence: confirmed (code) at 0x0023a3b8; detail: traced
  • Wrapper 0x00358de0 (registered by RegisterBindings); calls 0x0023a3b8 Human_SetLookTarget
  • Used by 41 of 467 script chunks (160 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 20 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetLOSRange

HuSetLOSRange(human, range)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 range number (single precision) Sight distance in metres (scripts use 1 to 60).

Returns nothing.

Sets how far a human's AI sees, in metres (brain +0x130), the range the sight checks (0x002223e8) and tactics use; hang-out and use-flag tactics change it too.

Notes. Storage at 0x002383a0. The AI's sight check: AI.

  • Evidence: confirmed (code) at 0x002383a0; detail: traced
  • Wrapper 0x0035c200 (registered by RegisterBindings); calls 0x002383a0 Human_SetLOSRange
  • Used by 27 of 467 script chunks (71 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 16 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuSetManualStun

HuSetManualStun(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x8000000 of the human's flag word; from the name, the human's stun is controlled by script rather than by its own timer.

  • Evidence: inferred; detail: brief
  • Wrapper 0x003592c0 (registered by RegisterBindings); calls 0x00235130 Human_SetManualStun
  • Used by no script on the disc
  • Coney: not implemented

HuSetMass

HuSetMass(human, heavy)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 heavy boolean (nil or 0 is false) true gives the human a huge mass (1e9) so nothing can push it; false restores a mass of 1.

Returns nothing.

Sets the mass of the human's physics body through a virtual call: 1e9 when heavy is exactly true, 1.0 otherwise. No script calls it.

  • Evidence: confirmed (code) at 0x00237c78; detail: brief
  • Wrapper 0x0035beb0 (registered by RegisterBindings); calls 0x00237c78 Human_SetMass
  • Used by no script on the disc
  • Coney: not implemented

HuSetMaxHealth

HuSetMaxHealth(human, health)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 health number, truncated to an integer New maximum health in hit points, kept as a signed 16-bit value (up to 32767; the player has 900 in level 99, a civilian 600).

Returns nothing.

Sets the human's maximum health and refills it: both the maximum (record +0x146) and the current health (+0x144) become health, so the health bar shows full. Scripts use it to make bosses and key enemies tougher.

Notes. Also heals a hurt human to full. No clamping: values above 32767 wrap negative. Health fields: characters.md#the-record.

  • Evidence: confirmed (code) at 0x00237be0; detail: traced
  • Wrapper 0x0035bbc8 (registered by RegisterBindings); calls 0x00237be0 Human_SetMaxHealth
  • Used by 39 of 467 script chunks (205 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 16 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuSetMoney

HuSetMoney(human, dollars)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 dollars number, truncated to an integer Cash the human carries, in dollars; clamped to 0-999.

Returns nothing.

Sets how much money the human carries (+0x370), clamped to 0-999, replacing the amount rolled at creation from its character class (Crimes: starting money). This is the cash a player gets by mugging or beating the human; scripts often set 0 so a character drops nothing.

Notes. A mugging hands over all of +0x370 as item 2 and sets it to 0 (confirmed (code) at 0x002856b8); the drop on a beating is at 0x00233494.

  • Evidence: confirmed (code) at 0x00238100; detail: traced
  • Wrapper 0x0035c3a0 (registered by RegisterBindings); calls 0x00238100 Human_SetMoney
  • Used by 55 of 467 script chunks (109 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 13 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuSetMug

HuSetMug(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true lets the human be mugged, false (or nil) prevents it (the scripts pass false for bosses).

Returns nothing.

Stores whether the human can be mugged (word +0x5b0, 1 or 0); Mug_CanMugVictim (0x00225ff0) requires it unless the human is set up for interrogation (Crimes: mugging).

  • Evidence: confirmed (code) at 0x00239ee0; detail: traced
  • Wrapper 0x0035d438 (registered by RegisterBindings); calls 0x00239ee0 Human_SetMug
  • Used by 18 of 467 script chunks (111 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 7 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetMugCallback

HuSetMugCallback(human, callback)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human doing the mugging (the scripts set it on the players).
2 callback string Name of a Lua function (dotted names work), or nil to remove it.

Returns nothing.

Stores the interned name of a Lua function (+0x5a4) that is called with (mugger, success) at the end of every mugging this human does of a non-player victim with no interrogation set: when the mugger's success or failure end clip finishes, or when the mugging is broken off (success false). The money has already moved by then; a victim with nothing to give ends through the success clips, so the call passes true. The tutorial uses it to notice the player's first mugging (Crimes: mugging).

Notes. Storage confirmed (code) at 0x00239e78; the call at 0x002262f0 from 0x0022ceb8, reached from the end clips' callbacks 0x00273090 / 0x00273038 and the aborts.

  • Evidence: confirmed (code) at 0x00239e78; detail: traced
  • Wrapper 0x0035d3d8 (registered by RegisterBindings); calls 0x00239e78 Human_SetMugCallback
  • Used by 6 of 467 script chunks (20 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 3 of 28 levels, first level34 (mission 4)
  • Coney: implemented

HuSetName

HuSetName(human, name)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 name string New name; the first 15 characters are kept.

Returns nothing.

Renames the human: clears its 16-byte name field (+0x80) and copies up to 15 characters of name into it, so HuFind finds it under the new name.

Notes. Longer names are cut silently; nothing checks that the name is unique (HuFind returns the first match).

  • Evidence: confirmed (code) at 0x00238078, 0x0021cda8; detail: traced
  • Wrapper 0x00358ef0 (registered by RegisterBindings); calls 0x00238078 Human_SetName, 0x0021cda8 Human_StoreName
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetNoAutoLock

HuSetNoAutoLock(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a handle that is not a human does nothing.
2 on boolean (nil or 0 is false) true sets the flag, false clears it. Missing counts as false.

Returns nothing.

Sets or clears human flag 0x8000000000 (+0xe0); from the name, the player's automatic target lock skips a human with it set.

Notes. The store is confirmed (code) at 0x002340a8; no reader of bit 0x8000000000 was found. Combat's flag table pairs this binding with 0x100000000000 (tested by 0x00227d78 in the target filter 0x00279410); that is a different bit and the pairing looks wrong.

  • Evidence: inferred; detail: traced
  • Wrapper 0x003587b0 (registered by RegisterBindings); calls 0x002340a8 Human_SetNoAutoLock
  • Used by 4 of 467 script chunks (8 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level54 (mission 16)
  • Coney: implemented

HuSetNoEscape

HuSetNoEscape(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x2000000000 of the human's flag word; from the name, the human cannot break free of a grab or flee. No script calls it.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035bd30 (registered by RegisterBindings); calls 0x002374d8 Human_SetNoEscape
  • Used by no script on the disc
  • Coney: not implemented

HuSetNoReact

HuSetNoReact(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true sets the flag, false (or nil) clears it.

Returns nothing.

Sets or clears bit 0x800 of the human's flag word (human +0xe0): while it is set the human takes damage but plays no hit reaction (Human_ApplyPendingDamage, 0x00265f70), so blows do not stagger or interrupt it.

Notes. The engage-enemy goal also sets and clears the same bit for itself (it remembers whether it was already set, AI), so a fight can clear a flag a script did not set but keeps one the script set first.

  • Evidence: confirmed (code) at 0x00235198; detail: traced
  • Wrapper 0x00359320 (registered by RegisterBindings); calls 0x00235198 Human_SetNoReact
  • Used by 10 of 467 script chunks (13 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 7 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuSetNormalMode

HuSetNormalMode(human, full)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 full boolean (nil or 0 is false); default true Default true: also revive and reset the human (health back to at least 1, special states and held objects dropped, state reset). false only ends grabs, stuns, fire and similar states.

Returns nothing.

Returns a human to its normal state (0x002325e0): it ends any grab or hold with its partner, puts out fire, ends stun, wound and rage states, ends the slow motion a player caused, and with full also clears the down/dying state, drops what it holds and restarts its state machine. Scripts call it before scenes and when handing a character back to the AI.

Notes. The order of the checks and which pair states end is long; the summary follows the calls made (0x0022fe10 extinguish, 0x0022fc00 unwound, 0x0022f3c8 / 0x0022f8d8 for bits 0x80000 / 0x100000, 0x002266a8 state 0) and is not exhaustive.

  • Evidence: confirmed (code) at 0x0023a210; detail: traced
  • Wrapper 0x0035ac20 (registered by RegisterBindings); calls 0x0023a210 Human_SetNormalMode
  • Used by 82 of 467 script chunks (169 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 20 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetNoTarget

HuSetNoTarget(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x100000000000 of the human's flag word, which from the name keeps other characters (and the player's targeting) from picking this human as a target. The tutorial uses it on bystanders.

Notes. Bit confirmed (code) at 0x00234038; the effect is inferred from the name.

  • Evidence: confirmed (code) at 0x00234038; detail: traced
  • Wrapper 0x00358750 (registered by RegisterBindings); calls 0x00234038 Human_SetNoTarget
  • Used by 31 of 467 script chunks (322 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 14 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetNoThrowWeapon

HuSetNoThrowWeapon(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x4000000000 of the human's flag word; from the name, the human never throws the weapon it holds.

Notes. Bit confirmed (code) at 0x00237468; the effect is inferred from the name.

  • Evidence: confirmed (code) at 0x00237468; detail: traced
  • Wrapper 0x003586f0 (registered by RegisterBindings); calls 0x00237468 Human_SetNoThrowWeapon
  • Used by 1 of 467 script chunks (5 references); boot to menu: no; mission 1: yes; result used: no
  • Coney: implemented

HuSetOnFire

HuSetOnFire(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the human on fire, false puts the fire out.

Returns nothing.

Sets the human on fire or puts it out. Lighting does nothing when the human is fire-proof (+0xe0 bit 0x800000), raging (0x80000), down or dead, in a scene state or in state flags 0x1c16a40; otherwise it sets state 0x4000 (and clears 0x8000), starts the burning reaction and sets the burn's end 3 s ahead (state record +0x10c, 3000 ms at 0x00510220). Lighting a human already on fire only pushes the end back to 3 s from now.

Notes. For a player moving at gait 2-5 who is not yet burning, lighting is deferred by a countdown of 30 (+0x6c0, value at 0x00510224) instead; the code that runs it down was not traced. That the burn ends at +0x10c is inferred.

  • Evidence: confirmed (code) at 0x00235f20, 0x0022fce8, 0x00219238, 0x0022fe10; detail: traced
  • Wrapper 0x00359b90 (registered by RegisterBindings); calls 0x00235f20 Human_SetOnFire, 0x0022fce8 Human_Ignite, 0x00219238 Human_StartBurning, 0x0022fe10 Human_Extinguish
  • Used by 3 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level93 (mission 10)
  • Coney: not implemented

HuSetPedReaction

HuSetPedReaction(human, reaction)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human (a pedestrian); a bad handle does nothing.
2 reaction number, truncated to an integer Reaction style, read as 16 bits and sign-extended; the pedestrian goals use 1-6 (7 there means a random one of 1-6, but this binding stores 7 as is); level95 uses 3.

Returns nothing.

Stores the pedestrian's reaction style in its brain (+0x270), the same field the pedestrian path and flag goals (types 68, 69, constructors 0x002a6178, 0x002a6760) set from their own argument when they start, choosing how the pedestrian reacts to trouble around it.

Notes. Only the storage is confirmed; no reader of brain +0x270 was found, so what each style does is open; a pedestrian goal pushed later overwrites the value.

  • Evidence: confirmed (code) at 0x00238640; detail: traced
  • Wrapper 0x0035d050 (registered by RegisterBindings); calls 0x00238640 Human_SetPedReaction
  • Used by 2 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetPreventRage

HuSetPreventRage(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human (normally a player).
2 on boolean (nil or 0 is false) true clears flag bit 0x2000000; false (or nil) sets it. Note the inversion.

Returns nothing.

Writes flag bit 0x2000000 of the human's flag word, inverted: true clears the bit and false sets it. Given the name, the bit therefore means rage is allowed, and HuSetPreventRage(h, true) stops the human from raging.

Notes. The inversion is confirmed (code) at 0x00236ad0; what the bit gates is inferred from the name.

  • Evidence: confirmed (code) at 0x00236ad0; detail: traced
  • Wrapper 0x003595d0 (registered by RegisterBindings); calls 0x00236ad0 Human_SetPreventRage
  • Used by 44 of 467 script chunks (93 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 6 of 28 levels, first level84 (mission 18)
  • Coney: implemented

HuSetPushable

HuSetPushable(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true lets other characters push the human aside; false makes it hold its ground.

Returns nothing.

Sets whether the human can be pushed (0x0021d848): it clears (true) or sets (false) bit 0x200 of its physics body's flags (+0x40 of the body at +0x1a0) and stores the value at +0x3bf.

  • Evidence: confirmed (code) at 0x00235268; detail: traced
  • Wrapper 0x0035b200 (registered by RegisterBindings); calls 0x00235268 Human_SetPushable
  • Used by 48 of 467 script chunks (197 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 24 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuSetRageFrac

HuSetRageFrac(human, fraction)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human (normally a player).
2 fraction number (single precision) Share of the full rage meter, 0 to 1 (0.5 is half).

Returns nothing.

Sets the human's rage meter to fraction of its maximum (+0x650), clears the drain counter and restarts the meter's timer. The tutorial uses 0.5.

  • Evidence: confirmed (code) at 0x002369b8; detail: traced
  • Wrapper 0x00359630 (registered by RegisterBindings); calls 0x002369b8 Human_SetRageFrac
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: yes; result used: no
  • Coney: implemented

HuSetRageMode

HuSetRageMode(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true starts rage; false ends it if the player of that human is raging.

Returns nothing.

Starts or ends rage for a human. On: Human_StartRageMode (0x00236d28) calls a Lua function with the human, sets the raging flag (0x80000), clears the rage hold timer, shows the player's HUD rage state 2 and tells his camera; off: when the player human with the same player number is raging, Human_EndRageMode (0x00236fb8) ends it (HUD state 3) and clears the flag.

Notes. The Lua function is the first name given to CfgRageHandlers (copied to 0x006b6830 by Cfg_SetRageHandlers); global.lua registers SetRageMode there, which sets god mode, unstunnable, reduced and increased reaction, ungrabbable, ungroundable and keep-weapon on the human; ending calls the second name, ClrRageMode, which clears them (Scripts: level5). Rage itself: Combat.

  • Evidence: confirmed (code) at 0x00237128; detail: traced
  • Wrapper 0x00359478 (registered by RegisterBindings); calls 0x00237128 Human_SetRageMode
  • Used by 9 of 467 script chunks (18 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 7 of 28 levels, first level5 (mission 7)
  • Coney: implemented

HuSetReducedReact

HuSetReducedReact(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x200 of the human's flag word; from the name, the human reacts less to hits (staggers less).

Notes. Bit confirmed (code) at 0x00235d50; the effect is inferred from the name.

  • Evidence: confirmed (code) at 0x00235d50; detail: traced
  • Wrapper 0x00359a20 (registered by RegisterBindings); calls 0x00235d50 Human_SetReducedReact
  • Used by 7 of 467 script chunks (10 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 1 of 28 levels, first level54 (mission 16)
  • Coney: implemented

HuSetRevivable

HuSetRevivable(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true lets the human be revived when down; false stops it.

Returns nothing.

Sets (true) or clears bit 0x4 of the human's flag word (+0xe0). The revive search (0x00279078, test 0x00278fa0) accepts only a knocked-down human with the bit, in the reviver's gang, not dead and not in a few excluded states, within 3 m; such a human gets the revive prompt and can be brought back with a flash.

Notes. Only exactly true sets the bit. Human_MakePlayer sets it on every player, so scripts clear it to keep a character down or set it on allies. The same-gang test is skipped for some revivers (0x00222a90).

  • Evidence: confirmed (code) at 0x00235db0; detail: traced
  • Wrapper 0x0035ab60 (registered by RegisterBindings); calls 0x00235db0 Human_SetRevivable
  • Used by 56 of 467 script chunks (107 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 11 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSetScale

HuSetScale(human, scale)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 scale number (single precision) Size factor, 1 for normal (scripts use 0.97 to 1.28); not range-checked.

Returns nothing.

Sets the human's body scale (+0x65c) and rebuilds its physics body (+0x1a0) at that size: the collision capsule's height becomes 2 x scale and its radius 0.35 x scale, and each of its ten collision spheres is scaled. Everything that asks for the human's size (camera framing, reach and steering in fights, lights, the speed check) reads the same factor, so bosses and henchmen become bigger or smaller.

Notes. While the human is linked to another in a grab (+0x280 set) or its move state has flag 0x800000, a scale below 1.1 counts as 1; whether the drawn model scales too is not traced.

  • Evidence: confirmed (code) at 0x0023b0e0, 0x00219608, 0x0021d020, 0x00341f28; detail: traced
  • Wrapper 0x00358c90 (registered by RegisterBindings); calls 0x0023b0e0 Human_SetScale, 0x00219608 Human_StoreScale, 0x0021d020 Human_GetScale, 0x00341f28 PhysicsBody_ApplyHumanScale
  • Used by 17 of 467 script chunks (29 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 8 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetSlowMo

HuSetSlowMo(fraction, human)
# Argument Read as Meaning
1 fraction number (single precision) Speed of time, above 0 and below 1 (0.5 is half speed); any other value (the scripts use -1 or 1) returns to normal speed.
2 human number, truncated to an unsigned integer; default 4294967295 Optional player human whose byte +0x3bb is set (slow) or cleared (normal); ignored for a non-player or NilHandle (the default).

Returns nothing.

Slows the whole game: the characters' time step (0x005102cc, normally 1/30 s) becomes fraction times 1/30 s, or 1/30 s again for any value outside 0-1. A player human given is marked at +0x3bb while it lasts.

Notes. The step is global, not per human. Who reads +0x3bb is not traced.

  • Evidence: confirmed (code) at 0x0023b778; detail: traced
  • Wrapper 0x0035b4f8 (registered by RegisterBindings); calls 0x0023b778 Human_SetSlowMo
  • Used by 2 of 467 script chunks (6 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuSetSpecialCallbacks

HuSetSpecialCallbacks(onStart, onStep, onEnd)
# Argument Read as Meaning
1 onStart string Lua function name, interned into 0x00510248.
2 onStep string Lua function name, interned into 0x00510240.
3 onEnd string Lua function name, interned into 0x00510244.

Returns nothing.

Stores three Lua callback names used by the special move set up with HuSpecial (global, not per human). No script calls it.

Notes. Which callback fires when is inferred from the order and from HuSetWorkoutCallbacks, which has the same shape.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035cba8 (registered by RegisterBindings); calls 0x002348f8 Human_SetSpecialCallbacks
  • Used by no script on the disc
  • Coney: not implemented

HuSetSpinningIconColor

HuSetSpinningIconColor(human, steps, colour)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human with the icon.
2 steps number, truncated to an unsigned integer Number of icon updates (every 2 ticks) the fade takes; 0 sets the colour at once.
3 colour number, truncated to an unsigned integer; default 4294967040 Target tint word of the icon (default 0xFFFFFF00, white with alpha 0).

Returns nothing.

Fades the tint of the spinning icon over a human to a target colour over a number of updates (message 0x34). The message's arguments are popped last in, first out, so the second argument is the step count and the third the colour. No script calls it.

Notes. The step is the difference of the whole 32-bit tint words divided by the step count, not per channel; the game itself only fades the alpha byte. See characters.md#spinning-icon.

  • Evidence: confirmed (code) at 0x00238b18, 0x003e93d0; detail: traced
  • Wrapper 0x0035af80 (registered by RegisterBindings); calls 0x00238b18 Human_SetSpinningIconColor, 0x003e93d0 DynIcon_SetColourFade
  • Used by no script on the disc
  • Coney: not implemented

HuSetStateRespVoiceIndex

HuSetStateRespVoiceIndex(human, voice)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 voice number, truncated to an integer Voice set number for the state responses (the scripts use 325 to 338).

Returns nothing.

Stores a second voice set at human +0x3b4, used for state responses: Human_SayStateResponse picks the next line of a speech command from this set (not the normal one at +0x3b0) and plays it at the human when it can speak. Its callers are six gang-tactic routines (0x00312208-0x0031fa10) that run call-and-answer exchanges between two members (commands 20 and 21, with 77 and 78 as alternatives).

Notes. Global time gates (0x0065ff40, 0x0065ff48) keep two responses from overlapping. Which tactics own the six callers was not traced.

  • Evidence: confirmed (code) at 0x0023ae00, 0x002208f0; detail: traced
  • Wrapper 0x0035d360 (registered by RegisterBindings); calls 0x0023ae00 Human_SetStateRespVoiceIndex, 0x002208f0 Human_SayStateResponse
  • Used by 4 of 467 script chunks (10 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level93 (mission 10)
  • Coney: not implemented

HuSetStrong

HuSetStrong(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true or false, stored as a byte at +0x3b9.

Returns nothing.

Stores a strength flag for the human (+0x3b9). No script calls it.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035bcd0 (registered by RegisterBindings); calls 0x002355a0 Human_SetStrong
  • Used by no script on the disc
  • Coney: not implemented

HuSetStunned

HuSetStunned(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true stuns the human, false ends the stun at once.

Returns nothing.

Stuns a human as a fighting stun would, with no attacker: it enters the stunned motion state (0xe), gets state flag 0x100000, and the stun ends at now + its stun time (the stats block's +0x30, in ms, scaled when 0x00222ff8 holds); if human flag +0xe0 0x8000000 is set the stun lasts until ended by script. With false the stun state is left, flag 0x100000 cleared and the human recovers. Both set state flag 0x20000000.

Notes. A human with flag 0x100 (+0xe1 bit 0, as HuSetUnstunnable sets; Human_Stun tests it at 0x0022f68c) ignores the stun unless it has the endless-stun flag 0x8000000; confirmed (runtime): with 0x100 nothing happened, without it 355/356 for the class's 750 ms, then 357 (Combat). Humans in movement styles 7-10 or 0xf, knocked down, or flagged 0xcf0/0x10200 are not stunned. Ending a stun on a dead, downed or grabbed human only clears the flag. What state flag 0x20000000 means is open. Used on Luther in level 64.

  • Evidence: confirmed (runtime); detail: traced
  • Wrapper 0x0035ac80 (registered by RegisterBindings); calls 0x002354b8 Human_SetStunned, 0x0022f658 Human_Stun, 0x0022f8d8 Human_EndStun, 0x00223720 Human_GetStunTime
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level64 (Armies of the Night 5)
  • Coney: not implemented

HuSetTireless

HuSetTireless(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x4000000 of the human's flag word; from the name, the human never tires when sprinting.

Notes. Bit confirmed (code) at 0x002350c8; the effect is inferred from the name.

  • Evidence: confirmed (code) at 0x002350c8; detail: traced
  • Wrapper 0x00359260 (registered by RegisterBindings); calls 0x002350c8 Human_SetTireless
  • Used by 50 of 467 script chunks (144 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 5 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuSetUnarrestable

HuSetUnarrestable(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true marks the human and offers the uncuff action on it; false (or nil) removes both.

Returns nothing.

Despite the name, this makes a human one the player can un-arrest: true sets flag 0x8000 of its flag word (+0xe0) and registers the human (record at +0x664) as a context action of kind 0, a handcuffed human, so a player within reach gets the uncuff prompt (GSTRING.HUD 2) and triangle starts the uncuff mash (Crimes: context records). false clears the flag and withdraws the action.

Notes. Registering does nothing when the human already has a context record; what else reads flag 0x8000 of +0xe0 is not traced.

  • Evidence: confirmed (code) at 0x00235e70, 0x00240800, 0x00240850; detail: traced
  • Wrapper 0x00359ae0 (registered by RegisterBindings); calls 0x00235e70 Human_SetUnarrestable, 0x00240800 Human_RegisterContextAction, 0x00240850 Human_UnregisterContextAction
  • Used by 4 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetUngrabbable

HuSetUngrabbable(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x40 of the human's flag word; from the name, nobody can grab the human.

Notes. Bit confirmed (code) at 0x00235bc8; the effect is inferred from the name.

  • Evidence: confirmed (code) at 0x00235bc8; detail: traced
  • Wrapper 0x003598a0 (registered by RegisterBindings); calls 0x00235bc8 Human_SetUngrabbable
  • Used by 23 of 467 script chunks (30 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 9 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetUngroundable

HuSetUngroundable(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x80 of the human's flag word; from the name, the human cannot be knocked to the ground.

Notes. Bit confirmed (code) at 0x00235c28; the effect is inferred from the name.

  • Evidence: confirmed (code) at 0x00235c28; detail: traced
  • Wrapper 0x00359900 (registered by RegisterBindings); calls 0x00235c28 Human_SetUngroundable
  • Used by 29 of 467 script chunks (261 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 10 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetUnstunnable

HuSetUnstunnable(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true sets the flag, false clears it.

Returns nothing.

Sets or clears flag bit 0x100 of the human's flag word; from the name, the human cannot be stunned.

Notes. Bit confirmed (code) at 0x00235c88; the effect is inferred from the name.

  • Evidence: confirmed (code) at 0x00235c88; detail: traced
  • Wrapper 0x00359960 (registered by RegisterBindings); calls 0x00235c88 Human_SetUnstunnable
  • Used by 40 of 467 script chunks (113 references); boot to menu: yes; mission 1: yes; result used: no
  • Later in the story: 3 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetVoiceIndex

HuSetVoiceIndex(human, voice)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 voice number, truncated to an integer Voice set number, an index into the table SndAllocateCharacterVoices makes (0-349; level93 uses 156).

Returns nothing.

Replaces the voice set the human speaks with (human +0x3b0, set from CfgChar's voice when it is made), so its speech lines come from vags/character/voices/<voice>/ (Sound: the voice table).

Notes. Not range-checked. The boss tactics write the same field (TacticBossScenarioH 137, TacticBossScenarioG 138) each time they assign the boss a goal, so a script's value can be overwritten.

  • Evidence: confirmed (code) at 0x0023ad88; detail: traced
  • Wrapper 0x0035d290 (registered by RegisterBindings); calls 0x0023ad88 Human_SetVoiceIndex
  • Used by 2 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level93 (mission 10)
  • Coney: not implemented

HuSetWarChief

HuSetWarChief(human) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the gang member to make war chief.

Returns boolean (1 for true, nil for false): true when the change was made; nil when the human does not exist or could not be made a player (the old chief is then restored).

Makes the human its gang's war chief, the player-controlled leader who gives the Warrior commands. The current chief is the player human with +0x3ac = 1 in the same gang; it loses the flag. A non-player human takes over the old chief's pad and player slot (the old chief becomes AI-controlled), the camera follows the new chief, and the gang's chief handle (gang +0x44) is set; a human that is already a player (the second player) is simply swapped into the first player slot and the HUD updated. Used when Snow takes over the gang.

Notes. The two humans also swap the byte at +0x1b1 (1 when there was no old chief). Player switch 0x00229c40, player-slot swap 0x00419e10, camera hand-over 0x00122438 / 0x001222b0; their internals are not traced here.

  • Evidence: confirmed (code) at 0x002398b0; detail: traced
  • Wrapper 0x0035d158 (registered by RegisterBindings); calls 0x002398b0 Human_SetWarChief
  • Used by 4 of 467 script chunks (8 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level81 (mission 8)
  • Coney: not implemented

HuSetWarChiefHUD

HuSetWarChiefHUD(mode)
# Argument Read as Meaning
1 mode number, truncated to an integer Number passed to the game state (0x00419a68); meaning not traced.

Returns nothing.

Sets the game state's war-chief HUD mode. No script calls it.

  • Evidence: speculative; detail: brief
  • Wrapper 0x0035d120 (registered by RegisterBindings); calls 0x00239888 GameState_SetWarChiefHUD
  • Used by no script on the disc
  • Coney: not implemented

HuSetWheelchairControl

HuSetWheelchairControl(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the player human.
2 on boolean (nil or 0 is false) true switches the player to wheelchair control; false switches back.

Returns nothing.

Switches a player between normal and wheelchair control. On: state flag 0x80000000000, the current control saved and replaced by wheelchairControl (0x002427e8), every other player command off and commands 46 (L1) and 47 (R1) added; the look-behind switch 11 goes to 0. Off undoes it. In the chair L1 and R1 together push forward (+0.5 an update up to the sprint speed), one alone turns (L1 left, R1 right, 0.08 rad an update at a standstill down to 0.03 at top speed) while the speed decays by 0.04, cross brakes (−0.5), and the sticks do nothing (Characters: wheelchair control).

Notes. A human that is not pad-driven (per-player record +0x1b 0, inferred) runs its normal control even with the flag, so the Rumble CPU follows its path as usual.

  • Evidence: confirmed (code) at 0x00234188; detail: traced
  • Wrapper 0x003588d0 (registered by RegisterBindings); calls 0x00234188 Human_SetWheelchairControl
  • Used by 1 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

HuSetWorkoutBlend

HuSetWorkoutBlend(human, blend)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human working out.
2 blend number (single precision) Effort: below 1 the first loop clip plays and the value sets its speed; from 1 up, the value minus 1 blends toward the harder loop clips.

Returns nothing.

Sets the effort (+0x670) of a human who is working out (state flag 0x20000000000); does nothing otherwise. For an AI human the workout update uses it as is each frame; for a player the update overwrites it from the pad.

Notes. Not clamped; the player's own effort ranges 0-1 and is scaled by 3 before the same use, so an AI's 0-3 matches the player's range.

  • Evidence: confirmed (code) at 0x00238cd8; detail: traced
  • Wrapper 0x0035ca38 (registered by RegisterBindings); calls 0x00238cd8 Human_SetWorkoutBlend
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetWorkoutCallbacks

HuSetWorkoutCallbacks(onStart, onRep, onEnd)
# Argument Read as Meaning
1 onStart string Lua function called with the human's handle when a workout begins (the start animation is set up), or nil.
2 onRep string Lua function called with the human's handle from the workout's loop animation, once per repetition (inferred), or nil.
3 onEnd string Lua function called with the human's handle when the workout ends, by quitting, running out of effort or HuStopWorkout, or nil.

Returns nothing.

Interns three Lua function names as the game-wide workout callbacks (globals 0x0051023c, 0x00510234, 0x00510238); every human's workout calls the same three, each with the working-out human's handle. Each is called only when it is set and the script system finds the function.

Notes. One set for the whole game, replaced by the next call; the repetition callback is handed to the loop animation node (0x002557b0), so its exact timing is not traced.

  • Evidence: confirmed (code) at 0x002345f8, 0x002346a0, 0x00234768, 0x00234830; detail: traced
  • Wrapper 0x0035c878 (registered by RegisterBindings); calls 0x002345f8 Human_SetWorkoutCallbacks, 0x002346a0 Workout_CallStart, 0x00234768 Workout_CallRep, 0x00234830 Workout_CallEnd
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSetWorkoutParams

HuSetWorkoutParams(a, b, count)
# Argument Read as Meaning
1 a number (single precision) First workout parameter (a number).
2 b number (single precision) Second workout parameter (a number).
3 count number, truncated to an integer Integer parameter, probably a repetition count.

Returns nothing.

Stores three workout tuning values in globals (0x00510680-0x00510688). No script calls it.

  • Evidence: speculative; detail: brief
  • Wrapper 0x0035c7d8 (registered by RegisterBindings); calls 0x002345d8 Human_SetWorkoutParams
  • Used by no script on the disc
  • Coney: not implemented

HuSetWoundable

HuSetWoundable(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true sets the flag (only the exact value 1 counts), false clears it.

Returns nothing.

Sets or clears bit 0x8 of the human's flag word (+0xe0). Human_MakePlayer clears the same bit, so players start without it (Characters). From the name, a woundable human can be left hurt (limping, wounded idle) rather than only knocked out; scripts set it on many story extras.

Notes. The store is confirmed (code); the readers of bit 0x8 in +0xe0 were not found in this pass, so the effect is inferred from the name.

  • Evidence: inferred; detail: traced
  • Wrapper 0x0035ab00 (registered by RegisterBindings); calls 0x002376a0 Human_SetWoundable
  • Used by 20 of 467 script chunks (117 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 10 of 28 levels, first level86 (mission 9)
  • Coney: implemented

HuSetWounded

HuSetWounded(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.
2 on boolean (nil or 0 is false) true puts the human into its wounded state, false (or nil) takes it out.

Returns nothing.

Wounds or heals a human. Wounding (only when it has a record and is not already wounded) breaks off any fight stance, grab or throw (clears state bits 0x14800f), drops its health to a quarter of its maximum, sets the wounded state bit 0x10000, stamps record +0xf0 with now + 14 s and flushes its brain's goals and actions. Healing clears 0x10000 and ends the wounded animation layer (0xd). Either way the anim state is re-chosen (bit 0x20000000).

Notes. The 14 s (0x00510794 = 14000 ms) stamp's reader is not traced (inferred: the wounded human's recovery time). The two calls to the human's vtable slot +0xe4 (1e9 on wounding, 1.0 on healing, channel 7) are not traced.

  • Evidence: confirmed (code) at 0x00237628, 0x0022fa78, 0x0022fc00; detail: traced
  • Wrapper 0x0035aaa0 (registered by RegisterBindings); calls 0x00237628 Human_SetWounded, 0x0022fa78 Human_StartWounded, 0x0022fc00 Human_EndWounded
  • Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level34 (mission 4)
  • Coney: implemented

HuShadow

HuShadow(human, on)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 on boolean (nil or 0 is false) true draws the human's blob shadow, false hides it.

Returns nothing.

Turns the human's blob shadow on or off: the value goes to +0x2b4 of its character instance (human +0xd8), which the human's draw reads before it puts the shadow sprite on the ground under it. Scripts hide it for characters placed where a shadow would look wrong.

Notes. Nothing happens for an invalid handle or a human with no instance. The shadow and its other conditions: Lighting. The default value of +0x2b4 is not traced.

  • Evidence: confirmed (code) at 0x00238030; detail: traced
  • Wrapper 0x00358ad8 (registered by RegisterBindings); calls 0x00238030 Human_SetShadow
  • Used by 10 of 467 script chunks (38 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 10 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuShutUp

HuShutUp(human, force)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the speaking human.
2 force boolean (nil or 0 is false) true stops the current line in any case; false (the usual call) stops it only when the human's speech-allowed byte (+0x194) is set.

Returns nothing.

Stops the line the human is saying (the speech handle at +0x178) and marks it as finished. Scripts call it before a scene or a new line.

Notes. +0x194 is the line's cut-able byte: set while no line plays and by HuSpeak's lines, cleared by HuSpeakNI's (0x0021e698), so HuShutUp without force cannot stop a HuSpeakNI line. A stopped line's callback still runs on the next update. Confirmed (code) at 0x0021ec38 and 0x0021e940.

  • Evidence: confirmed (code) at 0x00239558; detail: traced
  • Wrapper 0x00364ba8 (registered by RegisterBindings); calls 0x00239558 Human_ShutUp
  • Used by 39 of 467 script chunks (126 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 18 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuSpeak

HuSpeak(human, line, callback, arg, flag, listener)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the speaker.
2 line string Speech file name (a path such as vags/speeches/l31/l31_t7_001), looked up by name; nil only runs the callback.
3 callback string Name of a Lua function to call when the line ends (dotted names work), or nil.
4 arg number, truncated to an integer Number passed to the callback; 0 (the default) calls it with no argument.
5 flag boolean (nil or 0 is false); default true Default true: the line is duckable. False makes it non-duckable, so other duckable directional sounds of non-players drop to 0.2 while it plays (Sound: speech lines).
6 listener number, truncated to an unsigned integer; default 4294967295 Optional handle of a human to look at; the speaker turns its head to it for the line's length plus 0.5 s. Default NilHandle.

Returns nothing.

Makes a human say a line unless it is already speaking: the line plays at the speaker and the callback runs when it ends. If the human does not exist, the line is nil, speech is off in the game state (+0x410) or another line is playing, the callback runs at once instead.

Notes. HuSpeakNI is the same but cuts off the current line instead of giving up. A cinematic (game state +0x410) also makes it give up. The line starts once its stream is primed (Human_UpdateSpeech, 0x0021e940), which then runs the callback when the line is gone, also after HuShutUp.

  • Evidence: confirmed (code) at 0x00239370; detail: traced
  • Wrapper 0x00364e48 (registered by RegisterBindings); calls 0x00239370 Human_Speak
  • Used by 43 of 467 script chunks (142 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 19 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuSpeakNI

HuSpeakNI(human, line, callback, arg, flag, listener)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the speaker.
2 line string Speech file name, as for HuSpeak; nil only runs the callback.
3 callback string Name of a Lua function to call when the line ends, or nil.
4 arg number, truncated to an integer Number passed to the callback; 0 (the default) calls it with no argument.
5 flag boolean (nil or 0 is false); default true Default true: the line is duckable; false makes it non-duckable, as for HuSpeak.
6 listener number, truncated to an unsigned integer; default 4294967295 Optional handle of a human to look at while speaking. Default NilHandle.

Returns nothing.

Like HuSpeak, but it cuts a line started by HuSpeak (stopping it, whose callback is then lost) and its own line cannot be cut: while a HuSpeakNI line plays, another HuSpeakNI or HuSpeak on that human is dropped and its callback runs at once, and HuShutUp without force does not stop it. The callback runs on the human's first update after the line's sound has finished (the stream's handle no longer resolves), so at the end of the sample, and also after a forced HuShutUp. A missing human or line, speech off for the human or muted by a scene runs the callback at once, inside the call. The most used speech binding in the scripts.

Notes. Human_PlaySpeechCutting (0x0021e698) refuses when the current line (+0x178) is alive and the cut-able byte +0x194 is 0, else stops it (Human_StopSpeech(h, 0), which acts only when +0x194 is set), stores the callback (+0x188) and its argument (+0x190) and clears +0x194. HuSpeak (0x0021e400) plays only when no line is alive and +0x194 is set, and leaves +0x194 set. Human_UpdateSpeech (0x0021e940) runs the callback once when the handle dies and sets +0x194 again one update later, so a HuSpeak called from inside a HuSpeakNI callback is dropped (its callback runs at once) while a HuSpeakNI there plays. 'NI' read as 'no interrupt' (speculative).

  • Evidence: confirmed (code) at 0x002395a0; detail: traced
  • Wrapper 0x00364f50 (registered by RegisterBindings); calls 0x002395a0 Human_SpeakInterrupt
  • Used by 101 of 467 script chunks (627 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 23 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuSpecial

HuSpecial(human, animA, animB, animC, animD)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 animA string Animation file for anim id 0x2a0.
3 animB string Animation file for anim id 0x2a1.
4 animC string Animation file for anim id 0x29f.
5 animD string Animation file for anim id 0x2a2.

Returns nothing.

Binds four animation files to the human's special-move anim ids and puts it into the special state (state 0x1d); HuStopSpecial ends it. No script calls it.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035cab0 (registered by RegisterBindings); calls 0x00234bf8 Human_StartSpecial
  • Used by no script on the disc
  • Coney: not implemented

HuStopSpecial

HuStopSpecial(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns nothing.

Ends the special state started by HuSpecial (state 0x1e) when the human is in it.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035cb70 (registered by RegisterBindings); calls 0x00234cb0 Human_StopSpecial
  • Used by no script on the disc
  • Coney: not implemented

HuStopWorkout

HuStopWorkout(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human; a bad handle does nothing.

Returns nothing.

Ends a workout: a human working out (state flag 0x20000000000) gets state code 0x1c, which clears the flag, calls the end callback and plays the end clip (anim id 692); one that HuWorkout has started but who has not begun yet (state code still 0x1b) goes back to state code 0. Otherwise nothing.

Notes. A cancelled start does not call the end callback.

  • Evidence: confirmed (code) at 0x00238d30; detail: traced
  • Wrapper 0x0035ca00 (registered by RegisterBindings); calls 0x00238d30 Human_StopWorkout
  • Used by 1 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

HuSwitchPlayer

HuSwitchPlayer(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of a player-controlled human.

Returns number: Handle of the gang member who now has the player's pad, or NilHandle when there is no one to switch to.

Hands the player's control from human to another member of its gang (a standing, non-player member, preferring the lowest non-zero priority byte +0x1b1), moving the pad and the camera target. Used in Rumble mode and when a player character is out.

Notes. 0x0041a8c0; the member is chosen by 0x0022a770 (also used by other player hand-overs). Behaviour: Rumble.

  • Evidence: confirmed (code) at 0x00239e08; detail: brief
  • Wrapper 0x0035d218 (registered by RegisterBindings); calls 0x00239e08 GameState_SwitchPlayer
  • Used by 34 of 467 script chunks (266 references); boot to menu: no; mission 1: no; result used: yes
  • Coney: implemented

HuTag

HuTag(human, tag, flag)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human who sprays.
2 tag number, truncated to an unsigned integer Handle of the tag object to spray (the level's tag spot).
3 flag number, truncated to an unsigned integer Handle of the flag (marker) the human sprays from.

Returns nothing.

Starts the tagging action: the human goes to the flag and sprays the tag (state 0x17). A player with no spray paint (inventory item 3) only plays a refusal reaction instead.

Notes. The inventory check (0x0041e420 on item 3) is confirmed (code); that item 3 is the spray can is inferred.

  • Evidence: confirmed (code) at 0x00238db0; detail: traced
  • Wrapper 0x0035cc50 (registered by RegisterBindings); calls 0x00238db0 Human_Tag
  • Used by 10 of 467 script chunks (12 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 15 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuTagColor

HuTagColor(human, colour)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the tagger; a handle that is not a human does nothing.
2 colour table of 4 numbers (t[1]..t[4]) Colour {t1, t2, t3, t4}, each a whole number 0-255; the scripts write it as {r, g, b, a}, which the spray mist reads as written and the HUD reversed. Written back unchanged.

Returns nothing.

Sets the colour of the paint a human sprays when tagging (human +0x640): bytes t4, t3, t2, t1 in memory order. Each element is multiplied by 255 twice (here and in the packer 0x0017aca8) and the low byte of the result kept; since 255 × 255 = 65025 leaves 1 modulo 256, a whole number 0-255 comes out unchanged. The two readers take the bytes in opposite orders: the tagging panel draws bytes 0-2 as r, g, b, (t4, t3, t2), while the spray mist reads the word as 0xRRGGBBAA with alpha in byte 0, (t1, t2, t3) at alpha t4 (Crimes: what the player sees).

Notes. 0-1 fractions give near-black bytes (1.0 gives 1, 0.5 gives 0); negatives give 0. A human never given a colour keeps Human_Init's bytes 50 07 05 20 (HUD (80, 7, 5), mist (32, 5, 7) at alpha 80; confirmed (runtime)).

  • Evidence: confirmed (code) at 0x00239080; detail: traced
  • Wrapper 0x0035ccf0 (registered by RegisterBindings); calls 0x00239080 Human_SetTagColour
  • Used by 9 of 467 script chunks (16 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuTagDifficulty

HuTagDifficulty(chargeMs, pauseMs, speed)
# Argument Read as Meaning
1 chargeMs number, truncated to an unsigned integer; default 15000 How long one spray-paint charge lasts while tagging, in ms (0x0051093c).
2 pauseMs number, truncated to an unsigned integer; default 1000 The pause after a slip or a new charge, in ms (0x00510940); non-zero makes these values replace the class table.
3 speed number (single precision); default 0.06 The cursor's speed, grid cells per ms at full stick (0x00510944).

Returns nothing.

Sets the tagging game's tuning for every tagger. Unset (no script calls it), TagGame_Difficulty (0x002739d8) takes a row of the table at 0x00510918 by the Warrior class's byte +0x09 instead (Crimes: tagging).

  • Evidence: confirmed (code) at 0x002391a8; detail: brief
  • Wrapper 0x0035cea0 (registered by RegisterBindings); calls 0x002391a8 Human_SetTagDifficulty
  • Used by no script on the disc
  • Coney: not implemented

HuTagPattern

HuTagPattern(count, points)
# Argument Read as Meaning
1 count number, truncated to an unsigned integer Number of points in the pattern.
2 points table of 256 numbers (t[1]..t[256]) The pattern's points as a flat list of numbers (x1, y1, x2, y2, ...); the wrapper reads 256 entries and writes them back, but only the first 128 (64 points) are copied.

Returns nothing.

Loads the stick pattern for the next spray tag: count goes to 0x00510914 and 64 (x, y) pairs to 0x006cd978. global.lua's tag helper calls it before HuTag. The player follows the pattern with the analog stick (inferred).

Notes. The copy is confirmed (code) at 0x00274188. TagGame_Init (0x002741d8) samples the points along a uniform Catmull-Rom curve (0x00273ff0, end points clamped), ⌊300 / count⌋ samples a segment at t = k · count / 300, and keeps a sample whose squared distance from the last kept is over 6. Each value is truncated and its low byte kept, so x and y are cells of the 256 × 256 grid (0-255), unscaled (crimes.md#tagging). That the player traces it with the stick is inferred from the tagging minigame.

  • Evidence: confirmed (code) at 0x00239188; detail: traced
  • Wrapper 0x0035cdc8 (registered by RegisterBindings); calls 0x00239188 Tag_SetPattern
  • Used by 7 of 467 script chunks (13 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 15 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuTeleportFollowers

HuTeleportFollowers(human)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the leader.

Returns nothing.

Moves the members of the leader's gang (up to 16) to positions around the leader.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0035b448 (registered by RegisterBindings); calls 0x0023a058 Human_TeleportFollowers
  • Used by no script on the disc
  • Coney: not implemented

HuTeleportNearHuman

HuTeleportNearHuman(human, near)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human to move.
2 near number, truncated to an unsigned integer Handle of the human to put it next to.

Returns nothing.

Moves human to a free spot beside near, using both humans' collision radii to keep them apart. The tutorial uses it to bring Ash to Rembrandt. Nothing happens if either is missing or both are the same.

Notes. The checks and the radii (0x00219860) are confirmed (code) at 0x0023b138; how the free spot is searched is not traced.

  • Evidence: confirmed (code) at 0x0023b138; detail: traced
  • Wrapper 0x0035b480 (registered by RegisterBindings); calls 0x0023b138 Human_TeleportNear
  • Used by 7 of 467 script chunks (7 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 6 of 28 levels, first level54 (mission 16)
  • Coney: implemented

HuUseAnim

HuUseAnim(human, slot, anim) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 slot number, truncated to an unsigned integer Which animation to replace: 0 the idle / fidget animation (anim id 0x184; the scripts almost always use this), 1 anim id 0x198, 2 anim id 0x19a, 3 anim id 0x29c. Any other value does nothing.
3 anim string Animation file name such as fidget_crossarms.anm, requested earlier with SetDynamicAnimation; nil removes the replacement.

Returns boolean (1 for true, nil for false): true when the clip is loaded (it plays at once if the human is in that animation); false (nil) when it is not loaded yet, the human is missing or no slot is free.

Replaces one of the human's animations with a dynamic animation file, using one of its seven override slots (+0x3c8). For slot 0 it also makes the human unpushable while the replacement is set.

  • Evidence: confirmed (code) at 0x00238690; detail: traced
  • Wrapper 0x00365370 (registered by RegisterBindings); calls 0x00238690 Human_UseAnim
  • Used by 103 of 467 script chunks (625 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 24 of 28 levels, first level87 (mission 3)
  • Coney: implemented

HuUseAnyAnim

HuUseAnyAnim(human, animId, anim) -> boolean
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.
2 animId number, truncated to an unsigned integer Animation id to replace (the scripts use constants such as ANIM_SPECIAL_OPEN_DOOR).
3 anim string Animation file name (requested earlier with SetDynamicAnimation), or nil or an empty string to remove the replacement for that id.

Returns boolean (1 for true, nil for false): true when the clip is loaded (or, on removal, was loaded); false (nil) when it is not loaded yet, the human is missing, no override slot is free, or no replacement existed.

Like HuUseAnim, but for any animation id: it puts the file in the human's override slot for that id (reusing the slot if one already has the id, else the first free of the seven at +0x3c8). If the human is playing that animation when a loaded clip is set or removed, the animation is restarted (state flag 0x20000000).

Notes. Unlike HuUseAnim slot 0 it does not change whether the human can be pushed.

  • Evidence: confirmed (code) at 0x00238748, 0x00221aa0; detail: traced
  • Wrapper 0x00365408 (registered by RegisterBindings); calls 0x00238748 Human_UseAnyAnim, 0x00221aa0 Human_SetAnimOverride
  • Used by 4 of 467 script chunks (8 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level3 (mission 6)
  • Coney: implemented

HuWhatAmIHolding

HuWhatAmIHolding(human) -> number
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human.

Returns number: The TYPE_* object type of what the human holds (byte +0x86 of the object's type record: 3 TYPE_BAT, 4 TYPE_BOTTLE, 8 TYPE_MOLOTOV, 16 TYPE_SPRAYCAN ...), or 0 (TYPE_NOTHING) when it holds nothing or the handle is invalid.

Tells a script what kind of object the human is holding, as one of the TYPE_* script constants: the held object comes from 0x00226ff0 and its type record from the object-type table (0x00391330).

Notes. The constants are on the enums list.

  • Evidence: confirmed (code) at 0x00237d08; detail: traced
  • Wrapper 0x0035bf10 (registered by RegisterBindings); calls 0x00237d08 Human_GetHeldObjectType
  • Used by 3 of 467 script chunks (4 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 3 of 28 levels, first level80 (mission 2)
  • Coney: implemented

HuWorkout

HuWorkout(human, equipment, startAnim, endAnim, loop1, loop2, loop3)
# Argument Read as Meaning
1 human number, truncated to an unsigned integer Handle of the human who works out; a bad handle does nothing.
2 equipment number, truncated to an unsigned integer Handle of the object worked out on (any world object; it becomes the human's target object); a bad handle does nothing.
3 startAnim string Animation file bound to anim id 691 (ANIM_WORKOUT_START) on this human.
4 endAnim string Animation file bound to anim id 692 (ANIM_WORKOUT_END).
5 loop1 string Animation file bound to anim id 693 (ANIM_WORKOUT_LOOP_01).
6 loop2 string Animation file bound to anim id 694 (ANIM_WORKOUT_LOOP_02).
7 loop3 string Animation file bound to anim id 695 (ANIM_WORKOUT_LOOP_03).

Returns nothing.

Starts a workout: binds the five clips, makes equipment the human's target and sets its state code (record +0x14) to 0x1b. On its next update the human, if within the start clip's reach of the equipment, turns to it, plays the start clip into a blended loop of the workout clips, sets the working-out flag (0x20000000000 of its state) with a blend of 1 (+0x670) and calls the start callback; out of reach the state code goes back to 0. A player then pumps the effort with one button (blend rises per press by a per-phase table, decays otherwise) and quits with another; an AI's blend comes from HuSetWorkoutBlend.

Notes. All five clips must load or the workout never starts; the loop node also names ids 696-697, which this binding does not bind; the button commands are 0x12 (pump) and 10 (quit) from the player's input record; which pad buttons they are is not traced.

  • Evidence: confirmed (code) at 0x00238bd8, 0x00255540; detail: traced
  • Wrapper 0x0035c8f0 (registered by RegisterBindings); calls 0x00238bd8 Human_StartWorkout, 0x00255540 Human_UpdateWorkout
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level95 (the hub)
  • Coney: implemented

IsAHuman

IsAHuman(handle) -> boolean
# Argument Read as Meaning
1 handle number, truncated to an unsigned integer Any handle.

Returns boolean (1 for true, nil for false): true when the handle resolves to a live entry of the handle table, nil otherwise (NilHandle, a freed or stale handle).

Tests whether a handle still refers to something alive. Despite its name it does not check the kind: it resolves the handle through the shared handle table (0x006ebd38, serial must match; a serial-0 handle is first looked up as an object-manager spawn id) and answers whether anything came back. The one script use checks a human handle.

Notes. A live world object's handle also gives true (the table holds humans and objects alike; characters.md#the-human-object). -1 gives nil.

  • Evidence: confirmed (code) at 0x00385b90, 0x00390180; detail: traced
  • Wrapper 0x0036cb70 (registered by RegisterBindings); calls 0x00385b90 IsHumanHandle, 0x00390180 Handle_Resolve
  • Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 1 of 28 levels, first level92 (flashback 2)
  • Coney: implemented

IssueWarriorCommand

IssueWarriorCommand(command, forced)
# Argument Read as Meaning
1 command number, truncated to an integer Warrior command number: 0 follow, 1 attack, 2 defend, 3 hold, 4 scatter, 5 wreck, 6 none (Commands).
2 forced boolean (nil or 0 is false) true restarts the command even if it is the current one; false behaves as the menu does (giving the current command again only repeats the chief's line).

Returns nothing.

Issues a Warrior command as player 1's war chief: player 1's human (handle at game state +0x228) is passed with the command to the dispatcher 0x0041c4e0, the same path as WCIssueCommand and the command menu. Unless refused, the crew's gang tactic is replaced by the command's tactic, the chief says the command's line, and the WCSetCallback function is called.

Notes. 0x0041c2d0 → GameState_IssueWarriorCommandFor 0x0041dc80 → 0x0041c4e0. Refused while a scene camera (type 4) is player 1's, while commands are locked (+0x411), the player's menu is locked (+0x42e), the command is disabled (WCEnableCommand) or the human is not a war chief. The command number is not range-checked. What each command starts: AI.

  • Evidence: confirmed (code) at 0x0041c2d0; detail: traced
  • Wrapper 0x003747b8 (registered by RegisterBindings); calls 0x0041c2d0 GameState_IssueWarriorCommand
  • Used by 7 of 467 script chunks (15 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 4 of 28 levels, first level80 (mission 2)
  • Coney: implemented

KillHumans

KillHumans(seconds)
# Argument Read as Meaning
1 seconds number (single precision) Read as a number but ignored.

Returns nothing.

Does nothing in this build: the function it calls (0x0016d5c0) returns at once. global.lua still calls it with 5.

  • Evidence: confirmed (code) at 0x0016d5c0; detail: traced
  • Wrapper 0x0036d990 (registered by RegisterBindings); calls 0x0016d5c0 KillHumans_Stub
  • Used by 4 of 467 script chunks (4 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level2 (mission 5)
  • Coney: implemented

LoadBumAnims

LoadBumAnims(on)
# Argument Read as Meaning
1 on boolean (nil or 0 is false) true requests the bum animations; false (or nil) releases them.

Returns nothing.

Requests or releases, as one set, the thirteen dynamic animations that bums running GoalBumLogic play (a pointer table at 0x00510ff8 starting with puke_fidget.anm): each goes through ResourceManager_SetDynamicAnimation, as with SetDynamicAnimation, so the 64-entry dynamic-animation list gains or loses those files. Level scripts call it before placing bums.

Notes. The table, in order: puke_fidget.anm, puke_idle.anm, puke_hit_react.anm, puke_hit_die.anm, puke_hit_dead.anm, puke_big.anm, puke_hit_react.anm again, bm_sleep_itch.anm, bm_sleep_idle.anm, bm_hit_grd_idle.anm, bum_beg_itch.anm, bum_beg_idle.anm, bum_beg_hit.anm (12 files, one requested twice). GoalBumLogic's set-up (0x002ac000) binds them into the bum's dynamic animation slots (human +0x3c8, 7 × 0x28: name, clip +0x20, anim id +0x24) by its type: type 0 (puke) the first seven as ids 668, 320, 321, 322, 323, 669, 324; type 1 (sleeping) the bm_ three as 668, 196, 195; type 2 (begging) the bum_beg_ three as 668, 196, 195. 668 is the fidget (itch) the goal plays every 10 s with a player near, 669 the big puke, 196 and 195 the knocked-down pose and the hit while down (Combat), so a sleeping or begging bum lies or sits in its own clips; 320-324 being the arrested state's idle, hit, dying, dead and second hit is inferred (a type-0 bum is put in the arrested state). AI: GoalBumLogic. Requesting fills 13 of the 64 dynamic-animation list entries. Releasing also drops files another script requested separately by the same name. Confirmed (code) unless marked.

  • Evidence: confirmed (code) at 0x002abe98; detail: traced
  • Wrapper 0x00363500 (registered by RegisterBindings); calls 0x002abe98 LoadBumAnims
  • Used by 8 of 467 script chunks (9 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 4 of 28 levels, first level87 (mission 3)
  • Coney: implemented

ResetCommands

ResetCommands()

No arguments.

Returns nothing.

Empties the nine player command lists that AddCommand fills (12-byte entries at 0x005ddd10 onwards, counts at 0x0050b740-0x0050b760), so no scripted button command is left. Called on the boot-to-menu path.

  • Evidence: confirmed (code) at 0x001461e0; detail: traced
  • Wrapper 0x003695e0 (registered by RegisterBindings); calls 0x001461e0 Commands_Reset
  • Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
  • Coney: not implemented

SetCharacterModel

SetCharacterModel(type, release)
# Argument Read as Meaning
1 type number, truncated to an integer Character type number, as given to HuCreate and CfgChar (for example 32 for Rembrandt); its class record is at 0x00684620 + type × 0x1ac.
2 release boolean (nil or 0 is false) false or nil asks for the type's model to be loaded and kept; true releases it.

Returns nothing.

Asks the resource manager to keep a character type's model loaded for the level, so humans of that type can be created later without a wait. The model id comes from the type's class record (+0x112, 16-bit) and goes into a 32-slot list (resource manager +0xb4, 8 bytes a slot); a model already listed is not added twice, and when the model is already resident its reference is taken at once. Releasing clears every slot holding that model and drops its reference.

Notes. With all 32 slots in use the request is silently ignored. Adding sets the manager's +0x1b4 (a reload-needed flag, inferred). Types sharing a model share a slot, so releasing one releases them all.

  • Evidence: confirmed (code) at 0x0040cda8, 0x0018ad40; detail: traced
  • Wrapper 0x0036e6c0 (registered by RegisterBindings); calls 0x0040cda8 ResourceManager_SetCharacterModel, 0x0018ad40
  • Used by 61 of 467 script chunks (294 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 21 of 28 levels, first level87 (mission 3)
  • Coney: implemented

SetDeathTimer

SetDeathTimer(a, b, c)
# Argument Read as Meaning
1 a number, truncated to an integer First time in milliseconds (config_preload2 passes 14000).
2 b number, truncated to an integer Second time in milliseconds (500; level84_end raises it to 35000).
3 c number, truncated to an integer Third time in milliseconds (500; level84_end raises it to 35000).

Returns nothing.

Stores three death-related times in globals: a in 0x00510794, b in 0x00510790, c in 0x0051078c. From the name and values, how long a downed character lies before it dies or vanishes.

Notes. The stores are confirmed (code) at 0x0023a4e0; what each time controls is inferred, and which reader uses which is not traced. The arguments are read as 16-bit values.

  • Evidence: confirmed (code) at 0x0023a4e0; detail: traced
  • Wrapper 0x0036da48 (registered by RegisterBindings); calls 0x0023a4e0 SetDeathTimer
  • Used by 2 of 467 script chunks (3 references); boot to menu: yes; mission 1: no; result used: no
  • Later in the story: 1 of 28 levels, first level84 (mission 18)
  • Coney: not implemented

SetDynamicAnimation

SetDynamicAnimation(anim, release)
# Argument Read as Meaning
1 anim string Animation file name such as gen_tagging_cycle.anm.
2 release boolean (nil or 0 is false) false or nil requests the file; true releases it.

Returns nothing.

Adds an animation file to the level's list of dynamic animations (64 entries) so the resource manager loads it; when the list is full, the largest loaded entry is replaced. With release true the entry is removed. HuUseAnim and HuUseAnyAnim can only use files requested this way.

Notes. See characters.md#creation for how dynamic animations are loaded later.

  • Evidence: confirmed (code) at 0x0040cd78; detail: traced
  • Wrapper 0x0036e668 (registered by RegisterBindings); calls 0x0040cd78 ResourceManager_SetDynamicAnimation
  • Used by 88 of 467 script chunks (381 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 22 of 28 levels, first level80 (mission 2)
  • Coney: implemented

SwapPlayerControl

SwapPlayerControl(from, to)
# Argument Read as Meaning
1 from number, truncated to an unsigned integer Handle of the human the player controls now.
2 to number, truncated to an unsigned integer Handle of the human to give the pad to.

Returns nothing.

Moves a player's pad, player index and camera target from one human to another. No script calls it.

  • Evidence: inferred; detail: brief
  • Wrapper 0x00358678 (registered by RegisterBindings); calls 0x00233f60 Human_SwapPlayerControl
  • Used by no script on the disc
  • Coney: not implemented

Teleport

Teleport(object, pos, heading)
# Argument Read as Meaning
1 object number, truncated to an unsigned integer Handle of any world object: a human, a car, a prop or an effect; a bad handle does nothing.
2 pos table of 3 numbers (t[1]..t[3]) Destination {x, y, z} in metres, game axes (z up); written back unchanged.
3 heading number, truncated to an integer; default -1 New heading in whole degrees about the z axis; -1 (the default) keeps the current rotation.

Returns nothing.

Moves an object: reads its transform (vtable +0xac), replaces the position (w = 1) and, unless the heading is -1, the rotation with one about z, and hands it back through the object's set-transform slot (+0x6c). For a human that slot (0x0023d440) casts a short ray down from the point (0.5) and lowers it onto what it hits, marks the human moved, points its brain's move heading the new way and drops a move action in progress. Before that it breaks any grab, mount, mugging or throw link the human is in (Human_BreakPair, 0x00258a88): the other human plays a reaction clip and stands free, the moved one is free at once.

Notes. Other object kinds take the transform as given; a human in a scene (+0x280 set to the scene id) is not lowered; this corrects 'neither snaps to the ground' on Characters for the 0.5 ray only (the ray's units are not checked). The partner's clips by link are on Combat (Breaking a pair).

  • Evidence: confirmed (code) at 0x00385bb8, 0x0023d440; detail: traced
  • Wrapper 0x0036cbc0 (registered by RegisterBindings); calls 0x00385bb8 Object_Teleport, 0x0023d440 Human_SetTransform
  • Used by 54 of 467 script chunks (140 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 10 of 28 levels, first level95 (the hub)
  • Coney: implemented

TeleportToFlag

TeleportToFlag(object, flag, heading)
# Argument Read as Meaning
1 object number, truncated to an unsigned integer Handle of any world object, usually a human.
2 flag number, truncated to an unsigned integer Handle of the flag (a placed marker from the level's flags).
3 heading number, truncated to an integer; default -1 Heading in whole degrees; -1 (the default) uses the flag's own heading.

Returns nothing.

Moves an object to a flag's position and turns it to the flag's heading (or the one given). A human goes through the same set-transform slot as Teleport, so it is lowered onto the ground below and any grab, mount or mugging it is in is broken (the other human plays a reaction clip and stands free); it also resets its movement state (virtual slot +0x14c) so it does not carry on its old move. The most used placement binding in the scripts.

  • Evidence: confirmed (code) at 0x00385db0, 0x0023d440; detail: traced
  • Wrapper 0x0036cdc0 (registered by RegisterBindings); calls 0x00385db0 Object_TeleportToFlag, 0x0023d440 Human_SetTransform
  • Used by 162 of 467 script chunks (1471 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 28 of 28 levels, first level80 (mission 2)
  • Coney: implemented

TurnWarriorCommands

TurnWarriorCommands(on)
# Argument Read as Meaning
1 on number, truncated to an integer Non-zero enables all Warrior commands, 0 disables them.

Returns nothing.

Same as WCEnableAllCommands(on ~= 0).

  • Evidence: confirmed (code) at 0x0041c2b0; detail: brief
  • Wrapper 0x00374780 (registered by RegisterBindings); calls 0x0041c2b0 GameState_TurnWarriorCommands
  • Used by 2 of 467 script chunks (2 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

WalkingDistance

WalkingDistance(from, to) -> number
# Argument Read as Meaning
1 from number, truncated to an unsigned integer Handle of the first entity (a human, an object or a flag); its position is used.
2 to number, truncated to an unsigned integer Handle of the second entity.

Returns number: The walking distance in metres, or -1000000000 when either handle is invalid, either position is off the navigation mesh, or no route joins them.

Measures how far one entity would have to walk to reach another. When a straight walk between the two positions stays on the navigation mesh, the result is the straight-line 3D distance; otherwise a route is found through the navigation regions and its length (start, each route point, end) is summed. Scripts compare it with a range to decide, for example, whether an enemy is close enough to join in.

Notes. Positions come from each entity's position method (vtable +0xac). The straight-walk test is 0x0024fbf8, the route 0x002511c8, its length 0x0024e608. Two different regions where either has no links (+0x2 = 0) fail without a route search.

  • Evidence: confirmed (code) at 0x00385f60, 0x0024e478; detail: traced
  • Wrapper 0x0036cf00 (registered by RegisterBindings); calls 0x00385f60 WalkingDistance, 0x0024e478 Nav_GetWalkingDistance
  • Used by 5 of 467 script chunks (8 references); boot to menu: no; mission 1: no; result used: yes
  • Later in the story: 3 of 28 levels, first level87 (mission 3)
  • Coney: implemented

WCEnableAllCommands

WCEnableAllCommands(on)
# Argument Read as Meaning
1 on boolean (nil or 0 is false) true enables every Warrior command, false (or nil) disables them all.

Returns nothing.

Enables or disables all seven Warrior commands for each player who is a war chief (7 bytes per player at game state +0x41e) and updates that player's command HUD. The tutorial turns them off until it teaches them.

  • Evidence: confirmed (code) at 0x0041db08; detail: traced
  • Wrapper 0x00374820 (registered by RegisterBindings); calls 0x0041db08 GameState_EnableAllWarriorCommands
  • Used by 20 of 467 script chunks (30 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 12 of 28 levels, first level80 (mission 2)
  • Coney: implemented

WCEnableAutomaticSwitching

WCEnableAutomaticSwitching(on)
# Argument Read as Meaning
1 on boolean (nil or 0 is false); default true True (also when the argument is absent) turns the automatic commands on; stored at game state +0x431.

Returns nothing.

Turns the war chief's automatic commands on or off (AI): while the byte is set, the chief's brain orders his crew to fight or follow by what he does. InitLevel sets it; only the Rumble arenas (brawl, kinghill, royal, survival, tagbt) turn it off.

  • Evidence: confirmed (code) at 0x0041dd68; detail: traced
  • Wrapper 0x00374a00 (registered by RegisterBindings); calls 0x0041dd68 GameState_SetAutoSwitch
  • Used by 5 of 467 script chunks (6 references); boot to menu: no; mission 1: no; result used: no
  • Coney: implemented

WCEnableCommand

WCEnableCommand(player, command, on)
# Argument Read as Meaning
1 player number, truncated to an unsigned integer Handle of a player's human (the war chief).
2 command number, truncated to an integer Warrior command number 0-6 (0 follow, 1 attack, 2 defend, 3 hold, 4 scatter, 5 wreck).
3 on boolean (nil or 0 is false) true enables the command, false disables it.

Returns nothing.

Enables or disables one Warrior command for the player who controls player: the byte at game state +0x41e + player × 7 + command, which the dispatcher checks before it starts a command from the menu, WCIssueCommand or IssueWarriorCommand. Enabling also tells that player's command HUD (WarCommandDisplay_SetAllowed) so the entry shows as available.

Notes. Every command is enabled again at a level reset (0x00418c68). Disabling does not touch the HUD. A non-player human (+0x1b0 = -1) or an out-of-range command writes outside the table.

  • Evidence: confirmed (code) at 0x0041dbe8; detail: traced
  • Wrapper 0x00374850 (registered by RegisterBindings); calls 0x0041dbe8 GameState_EnableWarriorCommand
  • Used by 25 of 467 script chunks (133 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 11 of 28 levels, first level80 (mission 2)
  • Coney: implemented

WCIssueCommand

WCIssueCommand(player, command, on)
# Argument Read as Meaning
1 player number, truncated to an unsigned integer Handle of the war chief (a player human).
2 command number, truncated to an integer Warrior command number 0-6.
3 on boolean (nil or 0 is false) true issues the command (the scripts always pass true).

Returns nothing.

Issues a Warrior command for a player, as if the player had chosen it from the command menu (dispatcher 0x0041c4e0). Nothing happens while commands are locked (game state +0x411), when the human is not a player, or when that command is disabled for the player; otherwise the command is recorded as the player's last one and the crew's gang tactic is changed to match.

Notes. Command numbers 0-6 are the seven entries of the command menu; which tactic each starts is in the dispatcher's switch and is described by name only (inferred). The third argument is passed through as the dispatcher's 'forced' flag; the scripts always pass true.

  • Evidence: confirmed (code) at 0x0041dc80; detail: traced
  • Wrapper 0x003748e0 (registered by RegisterBindings); calls 0x0041dc80 GameState_IssueWarriorCommandFor
  • Used by 25 of 467 script chunks (45 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 15 of 28 levels, first level80 (mission 2)
  • Coney: implemented

WCLockCommands

WCLockCommands(player, locked)
# Argument Read as Meaning
1 player number, truncated to an unsigned integer Handle of a player's human (the war chief).
2 locked boolean (nil or 0 is false) true sets the byte (the crew no longer turns on its chief); false clears it.

Returns nothing.

Writes the byte at game state +0x418 + the player's index. Its only reader is the Warrior brain's reaction to being hit by its chief (0x00306190): while the byte is clear, a Warrior hit by the chief four times within 10 s turns on him for 20 s, his current command is forced back to follow and his command menu is locked (+0x42e). Setting the byte switches that reaction off; it does not itself lock the command menu.

Notes. The name suggests a menu lock, but no code reads the byte for the menu. Cleared at a level reset (0x00418c68). The 20 s retaliation is 0x002aeda0 (inferred: a fight goal against the chief). A non-player handle writes outside the two bytes. The second hit is enough when the chief's brain byte +0x2e4 is set; a Warrior already fighting ignores the hits.

  • Evidence: confirmed (code) at 0x0041dcf0; detail: traced
  • Wrapper 0x00374970 (registered by RegisterBindings); calls 0x0041dcf0 GameState_LockWarriorCommands
  • Used by 10 of 467 script chunks (16 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 3 of 28 levels, first level80 (mission 2)
  • Coney: implemented

WCSetCallback

WCSetCallback(callback)
# Argument Read as Meaning
1 callback string Name of a global Lua function (at most 31 characters kept), or nil to clear it.

Returns nothing.

Stores the name of a Lua function (game state +0x2fc) that the command dispatcher calls after every Warrior command it starts, from the menu or a script: the function gets the chief's handle and the command number (0x0041b5e0). Level scripts use it to react when the player orders the crew.

Notes. Not called for a refused command or when an unforced repeat only repeats the line. Nothing happens if no such global function exists. Cleared at a level reset (0x00418c68). One callback for both players.

  • Evidence: confirmed (code) at 0x0041dd40; detail: traced
  • Wrapper 0x003749d0 (registered by RegisterBindings); calls 0x0041dd40 GameState_SetWarriorCommandCallback
  • Used by 4 of 467 script chunks (12 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 2 of 28 levels, first level80 (mission 2)
  • Coney: implemented