Script bindings: AI¶
Verified against: SLUS_212.15 (NTSC-U, SHA1 e9cb2cc49aa046b9e494313dce2f5038ed17b2f4).
Bindings for goals, actions, brains and gang tactics that drive non-player characters: 146 in all. Conventions, the other categories and how to read an entry are on the masterlist.
| Binding | Returns | Scripts | Boot | Mission 1 | Evidence |
|---|---|---|---|---|---|
ActExecuteAttack |
- | 0 | no | no | inferred |
ActGiveWay |
- | 1 | no | no | inferred |
ActLookAt |
- | 37 | no | yes | confirmed (code) |
ActMoveTo |
- | 0 | no | no | inferred |
ActTurn |
- | 0 | no | no | inferred |
ActTurnTo |
- | 1 | no | no | confirmed (code) |
ActTurnToDir |
- | 3 | no | no | confirmed (code) |
BrCanUseWorldFlags |
- | 6 | yes | no | confirmed (code) |
BrClearBackoff |
- | 1 | yes | yes | confirmed (code) |
BrDead |
- | 120 | yes | yes | confirmed (code) |
BrEnable |
- | 0 | no | no | inferred |
BrFlush |
- | 124 | yes | yes | confirmed (code) |
BrFlushActions |
- | 34 | no | no | confirmed (code) |
BrFlushGoals |
- | 40 | no | no | confirmed (code) |
BrGetPedType |
number | 0 | no | no | confirmed (code) |
BrHasAttackers |
boolean | 1 | no | no | confirmed (code) |
BrHasEnemies |
boolean | 4 | no | no | confirmed (code) |
BrHasGoals |
boolean | 1 | no | no | confirmed (code) |
BrPopGoal |
- | 2 | no | no | confirmed (code) |
BrProcessGoal |
- | 4 | no | no | confirmed (code) |
BrSetAttackWeight |
- | 2 | no | no | inferred |
BrSetDamageResponse |
- | 4 | no | no | inferred |
BrSetFollowSlot |
- | 2 | yes | yes | confirmed (code) |
BrSetFollowSlotSet |
- | 1 | no | yes | confirmed (code) |
BrSetFOV |
- | 19 | no | no | confirmed (code) |
BrSetInvestigateResponse |
- | 29 | yes | no | confirmed (code) |
BrSetMeleeRange |
- | 0 | no | no | inferred |
BrSetNumAttackSlots |
- | 0 | no | no | inferred |
BrSetNumFollowSlots |
- | 3 | yes | yes | confirmed (code) |
BrSetPedType |
- | 12 | no | no | confirmed (code) |
BrSetPlayerResponse |
- | 2 | no | no | confirmed (code) |
BrSetReactToViolence |
- | 33 | yes | no | confirmed (code) |
BrSetThreatResponse |
- | 43 | no | no | confirmed (code) |
BrSetThugWantsHat |
- | 1 | no | no | confirmed (code) |
BrSetThugWantsWeapon |
- | 37 | yes | yes | confirmed (code) |
BrSetType |
- | 8 | no | no | confirmed (code) |
BrSuspend |
- | 11 | no | yes | confirmed (code) |
GoalAddressPerson |
- | 9 | no | yes | confirmed (code) |
GoalAreaWalker |
- | 13 | no | no | confirmed (code) |
GoalArrestHuman |
- | 1 | no | no | inferred |
GoalAvoidEnemies |
- | 2 | no | no | confirmed (code) |
GoalBackoff |
- | 8 | yes | yes | confirmed (code) |
GoalBigBrawler |
- | 0 | no | no | speculative |
GoalBigFighter |
- | 0 | no | no | speculative |
GoalBigLedgeThrower |
- | 1 | no | no | confirmed (code) |
GoalBigThrower |
- | 0 | no | no | speculative |
GoalBossDiego |
- | 0 | no | no | speculative |
GoalBossLizzies |
- | 0 | no | no | speculative |
GoalBoxer |
- | 2 | no | no | confirmed (code) |
GoalBumLogic |
- | 26 | no | yes | confirmed (code) |
GoalBumLogicTrigger |
- | 2 | no | no | confirmed (code) |
GoalCallGang |
- | 1 | no | no | confirmed (code) |
GoalCallPolice |
- | 2 | no | no | confirmed (code) |
GoalCopperGuard |
- | 0 | no | no | speculative |
GoalCopperPatrol |
- | 2 | no | no | confirmed (code) |
GoalCopperRespond |
- | 0 | no | no | speculative |
GoalCopRespond |
- | 0 | no | no | inferred |
GoalCower |
- | 4 | no | no | confirmed (code) |
GoalDealer |
- | 21 | no | yes | confirmed (code) |
GoalDevilRun |
- | 6 | no | no | confirmed (code) |
GoalEngageEnemy |
- | 4 | no | no | confirmed (code) |
GoalFight |
- | 15 | no | yes | confirmed (code) |
GoalFollowFormation |
- | 1 | no | no | confirmed (code) |
GoalFollowObject |
- | 2 | no | no | confirmed (code) |
GoalFollowPlayer |
- | 3 | yes | no | confirmed (code) |
GoalGetItem |
- | 2 | no | no | confirmed (code) |
GoalGrabTarget |
- | 2 | no | no | confirmed (code) |
GoalGuardFlag |
- | 4 | no | no | confirmed (code) |
GoalHoldPosition |
- | 1 | no | no | confirmed (code) |
GoalHooker |
- | 0 | no | no | speculative |
GoalJoinAnimation |
- | 2 | yes | yes | confirmed (code) |
GoalJoinCinematic |
- | 7 | yes | yes | confirmed (code) |
GoalJoinFixedScene |
- | 2 | yes | yes | confirmed (code) |
GoalJoinScene |
- | 0 | no | no | inferred |
GoalLeadChase |
- | 1 | no | no | confirmed (code) |
GoalLutherShooter |
- | 1 | no | no | confirmed (code) |
GoalManWeaponPile |
- | 3 | no | no | confirmed (code) |
GoalMark |
- | 1 | no | no | confirmed (code) |
GoalMelee |
- | 1 | no | no | confirmed (code) |
GoalMoveToExitFlag |
- | 10 | no | no | confirmed (code) |
GoalMoveToFlag |
- | 84 | no | yes | confirmed (code) |
GoalMoveToHuman |
- | 3 | no | no | confirmed (code) |
GoalMoveToUseFlag |
- | 28 | no | yes | confirmed (code) |
GoalObjectThrower |
- | 4 | no | no | confirmed (code) |
GoalPathBlocker |
- | 0 | no | no | inferred |
GoalPeddler |
- | 4 | no | no | confirmed (code) |
GoalPedestrianFlag |
- | 0 | no | no | inferred |
GoalPedestrianPath |
- | 0 | no | no | inferred |
GoalPlayAnimation |
- | 0 | no | no | inferred |
GoalPlayDynAnimation |
- | 22 | no | yes | confirmed (code) |
GoalPlayDynIdle |
- | 21 | no | no | confirmed (code) |
GoalPlayGenAnim |
- | 4 | no | no | confirmed (code) |
GoalRiot |
- | 8 | no | no | confirmed (code) |
GoalRunCarrotRun |
- | 4 | no | no | confirmed (code) |
GoalShopkeeper |
- | 4 | no | no | confirmed (code) |
GoalStandIdle |
- | 0 | no | no | inferred |
GoalStartParlay |
boolean | 0 | no | no | speculative |
GoalStationaryThrower |
- | 5 | no | no | confirmed (code) |
GoalTag |
- | 4 | no | no | confirmed (code) |
GoalTagEx |
- | 0 | no | no | inferred |
GoalThrowObject |
- | 3 | no | no | confirmed (code) |
GoalTrackHuman |
- | 1 | no | yes | confirmed (code) |
GoalTravelPath |
- | 6 | no | no | confirmed (code) |
GoalTravelPath2 |
- | 1 | no | no | confirmed (code) |
SetGlobalPedRules |
- | 1 | yes | no | confirmed (code) |
SetInterrogateParam |
- | 1 | no | yes | confirmed (code) |
TacticAddress |
- | 0 | no | no | speculative |
TacticAttack |
- | 54 | no | no | confirmed (code) |
TacticAvoidEnemies |
- | 25 | no | no | confirmed (code) |
TacticBoss |
- | 0 | no | no | speculative |
TacticBossScenarioA |
- | 1 | no | no | confirmed (code) |
TacticBossScenarioB |
- | 2 | no | no | confirmed (code) |
TacticBossScenarioC |
- | 1 | no | no | confirmed (code) |
TacticBossScenarioD |
- | 1 | no | no | confirmed (code) |
TacticBossScenarioE |
- | 1 | no | no | confirmed (code) |
TacticBossScenarioF |
- | 1 | no | no | confirmed (code) |
TacticBossScenarioG |
- | 1 | no | no | confirmed (code) |
TacticBossScenarioH |
- | 1 | no | no | confirmed (code) |
TacticClear |
- | 92 | yes | yes | confirmed (code) |
TacticConfront |
- | 26 | no | no | confirmed (code) |
TacticCrowd |
- | 31 | no | yes | confirmed (code) |
TacticDefend |
- | 23 | no | no | confirmed (code) |
TacticDomination |
- | 3 | no | no | confirmed (code) |
TacticGetString |
string | 0 | no | no | confirmed (code) |
TacticHanginOut |
- | 28 | no | no | confirmed (code) |
TacticHoldTheLine |
- | 18 | no | no | confirmed (code) |
TacticIdle |
- | 21 | no | no | confirmed (code) |
TacticInfo |
- | 0 | no | no | speculative |
TacticManWeaponPile |
- | 20 | no | no | confirmed (code) |
TacticMoveToFlag |
- | 28 | no | no | confirmed (code) |
TacticPathScout |
- | 3 | no | no | confirmed (code) |
TacticPursue |
- | 22 | no | no | confirmed (code) |
TacticRing |
- | 0 | no | no | speculative |
TacticRiotCop |
- | 0 | no | no | speculative |
TacticScout |
- | 7 | no | no | confirmed (code) |
TacticShadow |
- | 0 | no | no | speculative |
TacticStandGround |
- | 1 | no | no | confirmed (code) |
TacticSteal |
- | 19 | no | no | confirmed (code) |
TacticTaunt |
- | 0 | no | no | speculative |
TacticTravelPath |
- | 20 | no | no | confirmed (code) |
TacticTrigger |
- | 3 | no | no | confirmed (code) |
TacticUseFlag |
- | 21 | no | no | confirmed (code) |
TacticVandalize |
- | 20 | no | no | confirmed (code) |
TacticVandalizeCars |
- | 1 | no | no | confirmed (code) |
TacticWalkinTall |
- | 18 | no | no | confirmed (code) |
TacticWander |
- | 19 | no | no | confirmed (code) |
ActExecuteAttack¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the attacker. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human to attack. |
| 3 | attack |
number, truncated to an integer | Attack or move id (inferred). |
| 4 | value |
number, truncated to an integer; default -1 | A number; -1 by default. |
Returns nothing.
Queues an action that performs one attack on a target. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00364a70(registered byRegisterBindings); calls0x002fa878Action_ExecuteAttack - Used by no script on the disc
- Coney: not implemented
ActGiveWay¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human that steps aside. |
| 2 | other |
number, truncated to an unsigned integer | Handle of the human to let past. |
Returns nothing.
Queues an action that makes a human step out of another's way.
- Evidence: inferred; detail: brief
- Wrapper
0x003648a0(registered byRegisterBindings); calls0x002fe4b0Action_GiveWay - Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
- Coney: implemented
ActLookAt¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human who turns. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the object or human to face (any valid handle; only the first must be a human). |
| 3 | turnSpeed |
number (single precision) | A turn value stored in the action (+0x10); its update does not read it, and what does is not traced. Scripts use 0.1 to 1. |
| 4 | timeMs |
number, truncated to an integer; default -1 | The action's start delay in ms (action +0x04); -1 (the default, in all scripts) is a random 0-500 ms. |
Returns nothing.
Queues an action that turns the human towards another object or human until it faces it within 15 degrees (or 3 s pass), then ends; it does not keep facing it. Scripts use it to make extras look at the player while they talk.
Notes. Wrapper 0x002fe0c8, action set-up 0x002fe160 (a turn action, 0x002fdc28, with the target kept at +0x1c,
vtable 0x005430a0); update 0x002fe1b0 / 0x002fdd08 writes the heading to the target into brain +0x110 each update.
Behaviour: AI.
- Evidence: confirmed (code) at
0x002fe0c8; detail: traced - Wrapper
0x003647d8(registered byRegisterBindings); calls0x002fe0c8Action_LookAt - Used by 37 of 467 script chunks (112 references); boot to menu: no; mission 1: yes; result used: no
- Later in the story: 17 of 28 levels, first
level87(mission 3) - Coney: implemented
ActMoveTo¶
| # | 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]) | Table {x, y, z}: the point to move to, in metres; written back. |
| 3 | gait |
number, truncated to an integer | Gait id: 2 walk ... 5 sprint. |
| 4 | radius |
number (single precision) | Arrival radius in metres (inferred). |
| 5 | timeMs |
number, truncated to an integer; default -1 | A time limit in milliseconds; -1 (the default) for none (inferred). |
Returns nothing.
Queues an action that moves the human straight to a point. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00364918(registered byRegisterBindings); calls0x002fb918Action_MoveTo - Used by no script on the disc
- Coney: not implemented
ActTurn¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | degrees |
number, truncated to an integer | Angle to turn by, in degrees (inferred: relative to the current heading). |
| 3 | turnSpeed |
number (single precision) | Largest turn per update (scripts use 0.1-1 for the other turn actions; inferred: radians per update). |
| 4 | timeMs |
number, truncated to an integer; default -1 | A time limit in milliseconds; -1 (the default) for none (inferred). |
Returns nothing.
Queues an action that turns the human by an angle. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00364578(registered byRegisterBindings); calls0x002fdde8Action_Turn - Used by no script on the disc
- Coney: not implemented
ActTurnTo¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human who turns; a bad handle does nothing. |
| 2 | target |
userdata (only read when given) | The point to face, a vector userdata (its four floats are copied into the action at +0x20); read only when more than one argument is passed. |
| 3 | turnSpeed |
number (single precision) | A turn value stored in the action (+0x10), as in ActLookAt; its update does not read it. The one call passes 0.1. |
| 4 | timeMs |
number, truncated to an integer; default -1 | The action's start delay in ms (action +0x04); -1 (the default) is a random 0-500 ms, as in ActLookAt. |
Returns nothing.
Queues a turn action on the human's brain that, when it starts, takes the heading from the human to the given point and
then writes it to the brain's wanted heading (+0x110) each update until the human faces it within 15 degrees (or 3 s
pass); then it ends. It is ActLookAt with a fixed world point instead of an object.
Notes. The heading is taken once at the start (0x002fe058), so a point is not tracked if the human is pushed. Update 0x002fdd08 is shared with ActLookAt; the start is refused (action ends at once) when the human rejects message 0x01c16a40 (0x002fdc68).
- Evidence: confirmed (code) at
0x002fdf70,0x002fe000,0x002fe058; detail: traced - Wrapper
0x00364640(registered byRegisterBindings); calls0x002fdf70Action_TurnToTarget,0x002fe000TurnToPointAction_Init,0x002fe058TurnToPointAction_Begin - 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
level5(mission 7) - Coney: implemented
ActTurnToDir¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
| 2 | heading |
number, truncated to an integer | World heading to face, whole degrees (kept as 16 bits; scripts use values such as 250 and 270). |
| 3 | turnSpeed |
number (single precision) | Stored at action +0x10 and never read (scripts use 0.1 and 1). |
| 4 | delayMs |
number, truncated to an integer; default -1 | Start delay in milliseconds (action +0x04); -1 (the default) for a random 0-500 ms. |
Returns nothing.
Queues a turn action on the human's brain towards a world heading (converted to radians, action +0x0c). After the
delay the human turns, through brain +0x110, until it faces the heading within 15°, then the action ends; it gives up
after 3 s (AI: turning).
Notes. The base turn action (vtable 0x00543160: Start 0x002fdc68, Update 0x002fdd08). It is an action, not a goal,
so it runs after any actions already queued; a human busy in some states (record +0x08 has any of 0x1c16a40) skips it.
- Evidence: confirmed (code) at
0x002fdb90,0x002fdc28; detail: traced - Wrapper
0x00364708(registered byRegisterBindings); calls0x002fdb90Action_TurnToHeading,0x002fdc28TurnAction_Init - Used by 3 of 467 script chunks (5 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
BrCanUseWorldFlags¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | allowed |
boolean (nil or 0 is false); default true | true (the default) lets the human use world flags (benches, trash cans, phones and other usable spots placed in the level); false stops it. |
| 3 | chance |
number, truncated to an unsigned integer; default 10 | Likelihood of using a flag, as a percentage (default 10; scripts use 50-100). Forced to 0 when allowed is false. |
Returns nothing.
Lets an idle human wander over to and use the level's world flags, with the given likelihood (brain +0x2d1 allowed,
+0x2d2 chance). global.lua's human set-up calls it with true and 100.
Notes. Storage confirmed (code) at 0x00292c10; that the chance is a percentage is inferred from the values the scripts pass.
- Evidence: confirmed (code) at
0x00292c10; detail: traced - Wrapper
0x0035efc0(registered byRegisterBindings); calls0x00292c10Brain_SetWorldFlagUse - Used by 6 of 467 script chunks (15 references); boot to menu: yes; mission 1: no; result used: no
- Later in the story: 9 of 28 levels, first
level95(the hub) - Coney: implemented
BrClearBackoff¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
Returns nothing.
If the human's current goal is a back-off goal (goal type 0x9b, the one GoalBackoff gives), pops it so the human stops
backing away; otherwise does nothing. global.lua uses it in its fight helpers.
- Evidence: confirmed (code) at
0x00292cf0; detail: traced - Wrapper
0x0035f0f0(registered byRegisterBindings); calls0x00292cf0Brain_ClearBackoff - Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: yes; result used: no
- Later in the story: 26 of 28 levels, first
level80(mission 2) - Coney: implemented
BrDead¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human (from HuCreate or a level's human list). |
| 2 | dead |
boolean (nil or 0 is false); default true | true (the default when omitted) switches the brain off; false switches it back on. |
Returns nothing.
Switches a human's brain off or on. It first clears the brain's queued actions, then stores the flag (brain +0x09) and
rebuilds the brain's three behaviour handlers: when off, fixed do-nothing handlers; when on, the handlers of the brain's
type (see BrSetType). For a player brain (type 0) switching it off also takes the pad away, so the player cannot move
the character, and switching it on gives the pad back; scripts use BrDead(player, true) around scripted moments and
BrDead(player, false) to hand control back.
Notes. Brain refresh at 0x0028c1a8: off installs the handlers 0x0028fbb0/0x004edd40/0x004edd48 and, for type 0, clears the player record's control byte (+0x1b); on reads the handlers from the per-type tables at 0x00715530/0x00715568/0x007155a0 (seven types) and, for type 0, sets control again.
- Evidence: confirmed (code) at
0x00292330; detail: traced - Wrapper
0x0035eb78(registered byRegisterBindings); calls0x00292330Brain_SetDead - Used by 120 of 467 script chunks (894 references); boot to menu: yes; mission 1: yes; result used: no
- Later in the story: 28 of 28 levels, first
level80(mission 2) - Coney: implemented
BrEnable¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | enabled |
boolean (nil or 0 is false) | true to enable the brain, false to disable it. |
Returns nothing.
Sets the brain's enabled byte (+0x08). No script calls it; BrDead and BrSuspend are what the levels use.
Notes. Storage confirmed (code) at 0x002924e8; the effect of the byte is not traced.
- Evidence: inferred; detail: brief
- Wrapper
0x0035ed80(registered byRegisterBindings); calls0x002924e8Brain_SetEnabled - Used by no script on the disc
- Coney: not implemented
BrFlush¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
Returns nothing.
Clears everything a human's brain was doing: it pops every goal off the goal stack (ending each one) and then empties the action queue. Scripts call it before giving a human a new goal so the new goal starts from a clean state.
Notes. Goals: 0x0028d910 pops until the stack index (+0x2c) is -1. Actions: 0x0028db20 removes the up to eight
queued actions (+0x2e count, ring at +0x68).
- Evidence: confirmed (code) at
0x00292530; detail: traced - Wrapper
0x0035ede0(registered byRegisterBindings); calls0x00292530Brain_FlushAll - Used by 124 of 467 script chunks (520 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
BrFlushActions¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
Returns nothing.
Empties a human's queue of low-level actions (turns, moves, attacks, the Act* bindings) through Brain_ClearActions
and leaves its goals in place, so the current goal plans again on its next update. Unlike BrFlush it ends no goal and
runs no goal callback.
Notes. Clearing stops at an action that refuses to abort (an attack in progress), so that one and those behind it stay (AI: actions).
- Evidence: confirmed (code) at
0x00292590; detail: traced - Wrapper
0x0035ee18(registered byRegisterBindings); calls0x00292590Brain_FlushActions - Used by 34 of 467 script chunks (67 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
BrFlushGoals¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle or one that is not a human does nothing. |
Returns nothing.
Pops every goal off the human's goal stack (top index brain +0x2c down to -1, then +0x2d = -1), ending each one, so
each goal's script callback fires with "completed" 0. Unlike BrFlush it leaves the queued actions to finish.
Notes. With no goal left the brain falls back to its idle behaviour (AI).
- Evidence: confirmed (code) at
0x00292618,0x0028d910; detail: traced - Wrapper
0x0035eea0(registered byRegisterBindings); calls0x00292618Brain_FlushGoals,0x0028d910Brain_ClearGoals - Used by 40 of 467 script chunks (84 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 4 of 28 levels, first
level5(mission 7) - Coney: implemented
BrGetPedType¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
Returns number: The pedestrian type set by BrSetPedType (brain +0x26c), or 4294967295 (-1 as unsigned) for a bad
handle.
Reads the pedestrian type of a human's brain. No script calls it.
- Evidence: confirmed (code) at
0x002924a8; detail: brief - Wrapper
0x0035ed28(registered byRegisterBindings); calls0x002924a8Brain_GetPedType - Used by no script on the disc
- Coney: not implemented
BrHasAttackers¶
| # | 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 anyone holds one of the human's attack slots (brain
+0x1a4); false when none do or the handle is not a human.
Tells whether anyone is currently attacking the human: attackers claim one of the target's attack slots before they
close in (Brain_ClaimAttackSlot, 0x0028df30; at most +0x1e4, set by BrSetNumAttackSlots), and this tests whether the
slot list is non-empty (AI). One script calls it.
- Evidence: confirmed (code) at
0x00292ca8; detail: traced - Wrapper
0x0035f0a0(registered byRegisterBindings); calls0x00292ca8Brain_HasAttackers - 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
level54(mission 16) - Coney: not implemented
BrHasEnemies¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human, in practice the player. |
Returns boolean (1 for true, nil for false): true (1) when at least one AI human has this human on its enemy list
(brain byte +0x152); false (nil) otherwise or for a bad handle.
Tells whether anyone is after the human: the player's brain update counts, every 300 brain updates, the non-player
members of all 32 gangs whose enemy list (brain +0x164, 16 slots) holds this human, and stores the count at brain
+0x152; this returns whether it is non-zero. The camera uses the same byte to pick its sprint view.
Notes. Only the player brain (type 0) refreshes the count, so for an AI human it stays 0 (false); it can lag up to
300 brain updates (counter at brain +0x34) behind the enemy lists.
- Evidence: confirmed (code) at
0x00292c68,0x003035d8; detail: traced - Wrapper
0x0035f050(registered byRegisterBindings); calls0x00292c68Brain_HasEnemies,0x003035d8PlayerBrain_Update - Used by 4 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
level95(the hub) - Coney: implemented
BrHasGoals¶
| # | 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) if the human's goal stack is not empty; false (nil) if it is empty or the handle is bad.
Tells whether a human still has any goal to pursue.
- Evidence: confirmed (code) at
0x002925d0; detail: brief - Wrapper
0x0035ee50(registered byRegisterBindings); calls0x002925d0Brain_HasGoals - Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: yes
- Coney: not implemented
BrPopGoal¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
Returns nothing.
Ends the human's current (top) goal and resumes the one below it, if any; does nothing when the stack is empty. When the last goal goes, the brain sends its owner an idle message.
- Evidence: confirmed (code) at
0x00292658; detail: brief - Wrapper
0x0035eed8(registered byRegisterBindings); calls0x00292658Brain_PopGoal - Used by 2 of 467 script chunks (3 references); boot to menu: no; mission 1: no; result used: no
- Coney: not implemented
BrProcessGoal¶
| # | 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. |
Returns nothing.
Runs one update of the goal on top of the human's goal stack (brain +0x40 + top index +0x2c × 4) at once instead of
waiting for the next brain update, so a goal just given takes effect in the same frame: Goal_Process starts or resumes
it if needed and then calls its Process, unless its time limit has passed or the human has no model (AI: goal
stack).
Notes. The result is discarded: a goal that reports done (2) stays on the stack until the brain's own update pops it. With an empty stack a null goal is passed and not checked (crash).
- Evidence: confirmed (code) at
0x002926a8,0x0029eed8; detail: traced - Wrapper
0x0035ef10(registered byRegisterBindings); calls0x002926a8Brain_ProcessTopGoal,0x0029eed8Goal_Process - Used by 4 of 467 script chunks (13 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 1 of 28 levels, first
level54(mission 16) - Coney: not implemented
BrSetAttackWeight¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | attack |
number, truncated to an integer | Attack or move id (an index into a per-brain byte table at +0x298); the Rumble modes use 38, 39 and 41. |
| 3 | weight |
number, truncated to an unsigned integer | How likely the human is to choose that attack (0 never; the scripts use 50). |
Returns nothing.
Sets how often an AI fighter picks a given attack, used by the Rumble modes to bias or forbid moves.
- Evidence: inferred; detail: brief
- Wrapper
0x0035fbe0(registered byRegisterBindings); calls0x002929f8Brain_SetAttackWeight - Used by 2 of 467 script chunks (5 references); boot to menu: no; mission 1: no; result used: no
- Coney: implemented
BrSetDamageResponse¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
| 2 | response |
number, truncated to an integer | Damage response mode, kept as a 16-bit signed value in brain +0x220 (1 when a brain is made); scripts use 0, 3 and 4. |
Returns nothing.
Stores a damage-response mode in the human's brain (+0x220, an int, 1 by default from the brain constructor
0x0028a570). From the name, the mode chooses how the AI reacts to being hit; scripts set it on story characters who must
not react normally.
Notes. The store and default are confirmed (code); no instruction reading brain +0x220 directly was found (it may
be reached through an embedded-brain offset), so what each mode does is open. GoalManWeaponPile, GoalObjectThrower, the
lead-chase goal (0x002e0bf0) and a boss tactic (0x00309840) also set it to 0, beside threat response 0.
- Evidence: inferred; detail: traced
- Wrapper
0x0035f278(registered byRegisterBindings); calls0x00292758Brain_SetDamageResponse - Used by 4 of 467 script chunks (5 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
BrSetFollowSlot¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | leader |
number, truncated to an unsigned integer | Handle of the leader. |
| 2 | slot |
number, truncated to an integer | Slot index within the set, from 0. |
| 3 | offset |
table of 2 numbers (t[1]..t[2]) | Table {x, y}: the slot's offset from the leader in metres, on the ground plane (mission 1 places four slots at 1 m, then 2 m, in front, to the sides and behind: {0, 1}, {1, 0}, {0, -1}, {-1, 0}). The values are written back into the table. |
| 4 | set |
number, truncated to an integer | The slot set to edit; the current set is restored afterwards. |
Returns nothing.
Places one follower slot of a leader's formation. Followers using that slot stand at that offset from the leader. Offsets are kept in fixed point with a sixteenth of a metre as the unit.
Notes. Confirmed (code) at 0x00292b10 and 0x00295ec8 (nine slots of 12 bytes per set). Whether +y is the leader's forward direction is inferred.
- Evidence: confirmed (code) at
0x00292b10; detail: traced - Wrapper
0x0035fd90(registered byRegisterBindings); calls0x00292b10Follow_SetSlotOffset - Used by 2 of 467 script chunks (12 references); boot to menu: yes; mission 1: yes; result used: no
- Later in the story: 21 of 28 levels, first
level87(mission 3) - Coney: implemented
BrSetFollowSlotSet¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | leader |
number, truncated to an unsigned integer | Handle of the leader. |
| 2 | set |
number, truncated to an integer | Index of the slot set (formation layout) to use; mission 1 uses 0. |
Returns nothing.
Chooses which of the leader's formation layouts the followers take up, and makes them recompute their places.
- Evidence: confirmed (code) at
0x00292ac0; detail: traced - Wrapper
0x0035fd18(registered byRegisterBindings); calls0x00292ac0Follow_SelectSlotSet - Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: yes; result used: no
- Coney: implemented
BrSetFOV¶
| # | 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 | degrees |
number (single precision) | Full width of the human's view cone in degrees, stored in radians (× 0.0174533); 360 lets it see all around it, scripts also use 45-270. No clamp. |
Returns nothing.
Sets how wide a cone a human can see in (brain +0x12c, radians). The spotting checks use it to decide whether the
human notices the player, so a narrow cone lets the player sneak past from the side or behind in stealth sections.
Notes. The store is confirmed at 0x002928d8; that the spotting code reads +0x12c as a full (not half) angle is
inferred from the 360 value scripts use for all-round sight.
- Evidence: confirmed (code) at
0x002928d8; detail: traced - Wrapper
0x0035fa50(registered byRegisterBindings); calls0x002928d8Brain_SetFieldOfView - Used by 19 of 467 script chunks (114 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 9 of 28 levels, first
level87(mission 3) - Coney: implemented
BrSetInvestigateResponse¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | response |
number, truncated to an integer | Investigate response mode (brain +0x224): 0 stops the human from going to look at disturbances (scripts use it for vendors, bartenders and set-piece extras); 1 lets it. |
Returns nothing.
Sets whether and how a human goes to investigate noises and fights it notices. global.lua sets 0 in its set-up
helpers.
Notes. Storage confirmed (code) at 0x002927a8; the meaning of 0 and 1 is inferred from the scripts' use.
- Evidence: confirmed (code) at
0x002927a8; detail: traced - Wrapper
0x0035f370(registered byRegisterBindings); calls0x002927a8Brain_SetInvestigateResponse - Used by 29 of 467 script chunks (74 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
BrSetMeleeRange¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | near |
number (single precision) | First range in metres (brain +0x13c; inferred: the closest melee distance). |
| 3 | far |
number (single precision) | Second range in metres (brain +0x140; inferred: the farthest melee distance). |
Returns nothing.
Sets the two distances the brain uses for melee fighting. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x0035fac8(registered byRegisterBindings); calls0x00292938Brain_SetMeleeRange - Used by no script on the disc
- Coney: not implemented
BrSetNumAttackSlots¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human being attacked. |
| 2 | count |
number, truncated to an unsigned integer | How many attackers may engage this human at once (up to 16). |
Returns nothing.
Limits how many enemies can attack the human at the same time; shrinking the number drops the attackers beyond it. No script calls it.
Notes. Confirmed (code) at 0x0028db88 that it trims the brain's slot list and stores the count at +0x1e4; the
gameplay meaning is inferred.
- Evidence: inferred; detail: brief
- Wrapper
0x0035fb68(registered byRegisterBindings); calls0x002929a8Brain_SetAttackSlotCount - Used by no script on the disc
- Coney: not implemented
BrSetNumFollowSlots¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | leader |
number, truncated to an unsigned integer | Handle of the human others follow (in mission 1, the player). |
| 2 | count |
number, truncated to an integer | Number of follow slots around the leader (mission 1 uses 4). |
| 3 | count2 |
number, truncated to an integer; default -1 | A second slot count; -1 (the default) uses count for it too. |
Returns nothing.
Sets how many formation slots a leader has for followers such as the player's gang. The slots belong to the leader's
follow formation, made on first use (human +0x1a4, not the brain's).
Notes. Confirmed (code) at 0x00295dd8: count is the number of slots (+0x271), count2 how many followers may
take one (+0x272); the rest queue behind them. Behaviour: AI.
- Evidence: confirmed (code) at
0x00292a60; detail: traced - Wrapper
0x0035fc80(registered byRegisterBindings); calls0x00292a60Follow_SetSlotCount - Used by 3 of 467 script chunks (4 references); boot to menu: yes; mission 1: yes; result used: no
- Later in the story: 21 of 28 levels, first
level87(mission 3) - Coney: implemented
BrSetPedType¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
| 2 | pedType |
number, truncated to an unsigned integer | Pedestrian type, kept as its low 16 bits (0 when a brain is made). 3 makes a civilian stand up to attackers (bouncers, vendors); 5 marks a rich mugging victim; scripts also use 1 (market shoppers) and 2. |
Returns nothing.
Sets the pedestrian type of the human's brain (+0x26c), which changes how a civilian reacts to trouble. A civilian of
type 3 fights whoever attacks it instead of taking the usual ped-reaction goal (107, fleeing or cowering), and turns
hostile (goal 114) rather than reacting when a player comes near (CivilianBrain_OnEvent 0x002ffb30, 0x002ff898;
CivilianBrain_Think 0x002ff148). Mugging a victim of type 5 gives 1.5 times the money (Player_UpdateMugging 0x0028625c).
Notes. No reader treats types 1 and 2 differently from 0 in the civilian brain (inferred: labels for the scripts);
other readers of brain +0x26c (0x002d2600, 0x002a9ec0, 0x0029bf98) are not traced. BrGetPedType reads it back.
- Evidence: confirmed (code) at
0x00292460; detail: traced - Wrapper
0x0035ecb0(registered byRegisterBindings); calls0x00292460Brain_SetPedType - Used by 12 of 467 script chunks (26 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 6 of 28 levels, first
level34(mission 4) - Coney: implemented
BrSetPlayerResponse¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of a civilian (brain kind 4); a bad handle does nothing. |
| 2 | response |
number, truncated to an integer | Byte stored at brain +0x228: 1 makes the civilian react to a nearby player on its own; 0 (the scripts' other value) turns that off. |
Returns nothing.
Sets whether a civilian reacts to the player by itself. With 1, each think (0x002fef40) where the civilian is free (no
timer at +0x2c8, not busy with a reaction, flee or fight goal) and the nearest player is within 10 m, in view and not
in combat, it pushes a reaction: ped type 3 (brain +0x26c) a goal 0x72 with 10, any other a PedReaction goal (0x6b)
with reaction 0xaf toward that player.
Notes. Only the civilian think reads +0x228; other brain kinds ignore it. Skipped when the human's character flag
+0x11b is 6 or the player's brain +0x2d5 is set. What reaction 0xaf looks like is not traced
(AI).
- Evidence: confirmed (code) at
0x002927f8,0x002fef40; detail: traced - Wrapper
0x0035f468(registered byRegisterBindings); calls0x002927f8Brain_SetPlayerResponse,0x002fef40CivilianBrain_Think - 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
level92(flashback 2) - Coney: not implemented
BrSetReactToViolence¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | reacts |
boolean (nil or 0 is false); default true | true (the default) makes the human react to fights it sees (flee, cower or join in); false (or nil) makes it ignore them. |
Returns nothing.
Sets whether a human reacts to violence nearby (brain +0x267). global.lua passes nil (false) in its set-up helpers.
Notes. Storage confirmed (code) at 0x00292bc8; the reactions themselves are inferred.
- Evidence: confirmed (code) at
0x00292bc8; detail: traced - Wrapper
0x0035feb8(registered byRegisterBindings); calls0x00292bc8Brain_SetReactsToViolence - Used by 33 of 467 script chunks (85 references); boot to menu: yes; mission 1: no; result used: no
- Later in the story: 13 of 28 levels, first
level87(mission 3) - Coney: implemented
BrSetThreatResponse¶
| # | 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 | response |
number, truncated to an integer | Threat response (brain +0x21c, truncated to 16 bits and sign-extended): 0 means the human never fights back; any other value lets it fight. Scripts use 0, 2 and 3; no reader seen tells the non-zero values apart. |
Returns nothing.
Sets whether a human answers threats (brain +0x21c). With 0 it never starts a fight: Brain_Fight refuses, the
brains' threat handler (0x00291960) ignores attackers, and a melee goal gives up once its target is gone, as for
shopkeepers and scripted extras. With a non-zero value an attacked human fights back, and a gang soldier with enemies on
its list and no fight goal starts one (GangBrain_Think 0x003046e8).
Notes. Civilian, dealer and type-6 civilian brains (0x002fef40, DealerBrain_Think 0x00302cf0, 0x00303f28) reset it
to 0 as soon as they have no fight goal (types 8 or 0x3f, Brain_HasFightGoal 0x00290348), so on them it lasts one
fight; the readers checked test only zero / non-zero (values 2 and 3 may matter to an untraced reader among the ~40 that
load +0x21c). Gang-wide: GangSetThreatResponse.
- Evidence: confirmed (code) at
0x00292708; detail: traced - Wrapper
0x0035ef48(registered byRegisterBindings); calls0x00292708Brain_SetThreatResponse - Used by 43 of 467 script chunks (116 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 17 of 28 levels, first
level87(mission 3) - Coney: implemented
BrSetThugWantsHat¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the thug; a bad handle or a human without a brain does nothing. |
| 2 | wants |
boolean (nil or 0 is false) | true lets the thug go after a dropped hat, false stops it. |
Returns nothing.
Sets whether a thug picks up hats (brain byte +0x266, 1 for every new brain). Every 12th think of a gang brain
(GangBrain_Think 0x00304608), a thug with the flag set, not already wearing a hat (human +0x364 empty), of human
type 0x82-0x86, and not busy with goal types 0xb, 0x2c or 0x3f, looks within 10 m for the hat its human type wears (type
table 0x00684620, entry +0x14c); if one is found and the current goal's priority allows, it is given a get-item goal
for it (Goal_GetItem, mode 4) and puts it back on.
Notes. Used in level 62 to stop thugs from grabbing hats knocked off in fights. The type range 0x82-0x86 is taken
from the check; which gangs those types are is not traced. A further check on the brain's current action (+0x20c
+0x40) can also veto the search.
- Evidence: confirmed (code) at
0x00292890,0x0028bfa8; detail: traced - Wrapper
0x0035f9f0(registered byRegisterBindings); calls0x00292890Brain_SetWantsHat,0x0028bfa8Brain_CanSeekHat - Used by 1 of 467 script chunks (12 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 1 of 28 levels, first
level62(Armies of the Night 3) - Coney: not implemented
BrSetThugWantsWeapon¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | wants |
boolean (nil or 0 is false) | true (or 1) lets the human go and pick up weapons; false (or 0) stops it. |
Returns nothing.
Sets whether a thug looks for and picks up weapons lying in the level (brain +0x265). global.lua turns it off in its
set-up helpers; GoalManWeaponPile sets it too.
Notes. Storage confirmed (code) at 0x00292848; the behaviour behind the byte is inferred from the name.
- Evidence: confirmed (code) at
0x00292848; detail: traced - Wrapper
0x0035f990(registered byRegisterBindings); calls0x00292848Brain_SetWantsWeapon - Used by 37 of 467 script chunks (78 references); boot to menu: yes; mission 1: yes; result used: no
- Later in the story: 17 of 28 levels, first
level80(mission 2) - Coney: implemented
BrSetType¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
| 2 | brainType |
number, truncated to an integer | Brain type 0-6 (AI types: 0 player, 1 cop, 2 gang soldier, 3 Warrior, 4 civilian or bum, 5 dealer, 6 the civl_co_di kind); scripts use 2 and 4. Not range-checked. |
Returns nothing.
Changes the kind of brain a human has (brain +0x04) and reinstalls its update, think and event handlers from that
type's tables (0x00715530, 0x00715568, 0x007155a0), so the human behaves like a cop, gang soldier, Warrior,
civilian and so on from its next update. Type 0 also hands the human's player record the pad (record +0x1b = 1) and
resets its player-side bookkeeping.
Notes. A brain made dead with BrDead keeps the script-only handlers (the type is stored but only used when BrDead is lifted); a value above 6 indexes past the tables; type 0 is only meaningful for a human that has a player slot; the goals already on the stack are kept.
- Evidence: confirmed (code) at
0x00292410,0x0028ceb8,0x0028c1a8; detail: traced - Wrapper
0x0035ec38(registered byRegisterBindings); calls0x00292410Brain_SetType,0x0028ceb8Brain_StoreType,0x0028c1a8Brain_InstallHandlers - Used by 8 of 467 script chunks (17 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
BrSuspend¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | suspended |
boolean (nil or 0 is false); default true | true (the default) suspends the brain; false resumes it. |
Returns nothing.
Pauses or resumes a human's brain without changing its type: it clears the queued actions and sets the brain's suspended
byte (+0x0a). The mission-1 scripts use it to hold the AI partner (player2) still during tutorial steps and release
him afterwards.
Notes. Unlike BrDead it does not swap the brain's handlers or touch the pad.
- Evidence: confirmed (code) at
0x002923a0; detail: traced - Wrapper
0x0035ebd8(registered byRegisterBindings); calls0x002923a0Brain_SetSuspended - Used by 11 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
level95(the hub) - Coney: implemented
GoalAddressPerson¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human who speaks. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human addressed (usually the player). |
| 3 | approach |
number (single precision) | Metres: the speech starts once the target is this close (the human never walks to it). |
| 4 | range |
number (single precision) | Metres: within this the human keeps turning its head and body to the target. |
| 5 | speech |
number, truncated to an integer; default -1 | A scene id played (goal 0x21) when the target comes within approach; negative for none, and the goal then only faces the target until removed. |
| 6 | callback |
string | Name of a Lua function to call when the goal ends, or nil. |
Returns nothing.
Makes a human face another human, typically the player, and play a scene when it comes close enough, then call back the script. The human turns but never walks.
Notes. Constructor 0x002cc408 interns the callback name through the script system (slot +0xcc). It resolves the speaker without checking it is a human. Process 0x002cc588. Behaviour: AI.
- Evidence: confirmed (code) at
0x002cc348; detail: traced - Wrapper
0x003603a8(registered byRegisterBindings); calls0x002cc348Goal_AddressPerson - Used by 9 of 467 script chunks (15 references); boot to menu: no; mission 1: yes; result used: no
- Later in the story: 6 of 28 levels, first
level87(mission 3) - Coney: implemented
GoalAreaWalker¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag at the centre of the area; NilHandle for where the human stands. |
| 3 | radius |
number, truncated to an integer | Radius of the area in metres; the goal picks points within half of it (below 1: stand still). |
| 4 | mode |
number, truncated to an integer | Behaviour mode; 3 makes a police searcher (idles at stops, follows the CrimeScene flag). |
| 5 | durationSeconds |
number, truncated to an unsigned integer | Seconds until the goal ends; 0 for ever. |
| 6 | pauseSeconds |
number, truncated to an integer | Longest pause at each point in seconds (a random 0 to this). |
Returns nothing.
Pushes an AreaWalker goal (type 71): the human strolls round a centre, walking (gait 2) to random reachable points
within half of radius and pausing up to pauseSeconds at each, until durationSeconds pass; with a radius below 1 it
just stands at the centre facing its first heading. Mode 3 (police) also idles at each stop and follows the CrimeScene
flag, running there when the scene moved more than 5 m.
Notes. Wrapper 0x00361fa0, constructor 0x002a4dc8 (vtable 0x0053fa90), Process 0x002a4eb0. With flag NilHandle the
centre is the human's own position. Mode 3's idles: anim 0x29c, or 0x29e at 25 %.
- Evidence: confirmed (code) at
0x002a4cb8; detail: traced - Wrapper
0x00361fa0(registered byRegisterBindings); calls0x002a4cb8Goal_AreaWalker - Used by 13 of 467 script chunks (33 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
GoalArrestHuman¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the arresting human (a cop). |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human to arrest. |
Returns nothing.
Makes a human (a cop) go and arrest another human.
- Evidence: inferred; detail: brief
- Wrapper
0x00361030(registered byRegisterBindings); calls0x002c0f58Goal_ArrestHuman - Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: no; result used: no
- Coney: not implemented
GoalAvoidEnemies¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
| 2 | useThrowables |
boolean (nil or 0 is false) | true lets it fetch a non-weapon throwable within 40 m (checked every 30 updates) and throw it at the enemy when in range (goal +0x41). |
| 3 | minRange |
number (single precision); default 7 | Flee distance in metres, multiplied by the enemy's class (+0x1a8, clamped 2-5): closer than that, it runs (goal +0x28). Default 7. |
| 4 | maxRange |
number (single precision); default 14 | Second distance for the flee-point search (goal +0x2c; inferred: how far to flee). Default 14. |
| 5 | range3 |
number (single precision) | Distance kept at goal +0x34, as TacticAvoidEnemies' minAllyRange; its reader is not traced. |
| 6 | range4 |
number (single precision) | Distance kept at goal +0x38, as TacticAvoidEnemies' maxAllyRange; its reader is not traced. |
| 7 | durationMs |
number, truncated to an unsigned integer | The goal ends this many ms after it is pushed (goal +0x20); 0 for no limit. |
| 8 | gait |
number, truncated to an unsigned integer | Gait id to flee at (goal +0x3c); 0 lets the goal choose 5, or 4 when stamina is under 50. Scripts use 3. |
Returns nothing.
Pushes an AvoidEnemies goal (type 32) on one human, the single-human form of TacticAvoidEnemies: every 1.5 s it picks
the nearest enemy it can see (front-facing sight, unlike the tactic's all-round), and runs from it when the enemy comes
within minRange × the enemy's class or stares straight at it, turning to face it otherwise. It shouts every 8 s while
doing so and, with useThrowables, fights back with thrown objects. It ends after durationMs, or never when that is
0.
Notes. Unlike the tactic it does not drop the threat response or keep near a gang leader (goal +0x30 = 0). Flee
point search 0x002e3588 is not traced; the shout command depends on the character (0x20, 9 or 0x48).
- Evidence: confirmed (code) at
0x002e3090,0x002e3180,0x002e3630; detail: traced - Wrapper
0x00362c00(registered byRegisterBindings); calls0x002e3090Goal_AvoidEnemies,0x002e3180AvoidEnemiesGoal_Init,0x002e3630AvoidEnemiesGoal_Process - 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
level86(mission 9) - Coney: not implemented
GoalBackoff¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human who backs off. |
| 2 | from |
number, truncated to an unsigned integer | Handle of the human to back away from. |
| 3 | distance |
number (single precision) | Distance in metres to keep (scripts use 1-15). |
| 4 | timeMs |
number, truncated to an integer; default -1 | The goal's time field: how long to keep backing off in milliseconds; -1 (the default) for no limit. |
| 5 | option |
boolean (nil or 0 is false); default true | A flag (default true); forced true for human kinds the brain checks at 0x00228340 / 0x00228228 (inferred: player-side characters). |
Returns nothing.
Makes a human back away from another and keep its distance, for a time or until BrClearBackoff or BrFlush ends it
(goal type 0x9b). global.lua's fight helpers use it.
Notes. Constructor 0x002d92e8. The flag's meaning is inferred.
- Evidence: confirmed (code) at
0x002d9238; detail: traced - Wrapper
0x00363d70(registered byRegisterBindings); calls0x002d9238Goal_Backoff - Used by 8 of 467 script chunks (23 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
GoalBigBrawler¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the brawler. |
| 2 | target |
number, truncated to an unsigned integer | A handle (inferred: the opponent). |
| 3 | pos1 |
table of 3 numbers (t[1]..t[3]) | Table {x, y, z} in metres; written back. |
| 4 | pos2 |
table of 3 numbers (t[1]..t[3]) | Table {x, y, z} in metres; written back. |
| 5 | pos3 |
table of 3 numbers (t[1]..t[3]) | Table {x, y, z} in metres; written back. |
| 6 | callback |
string | A name (inferred: a callback). |
Returns nothing.
A big brawler boss behaviour. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x00364070(registered byRegisterBindings); calls0x002e81b8Goal_BigBrawler - Used by no script on the disc
- Coney: not implemented
GoalBigFighter¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the fighter. |
Returns nothing.
A big fighter behaviour. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x003642f0(registered byRegisterBindings); calls0x002e9c60Goal_BigFighter - Used by no script on the disc
- Coney: not implemented
GoalBigLedgeThrower¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the thrower; a bad handle does nothing. |
| 2 | targets |
table of 3 numbers (t[1]..t[3]) | Up to three flag handles to throw at (NilHandle for unused; non-flags are skipped); written back unchanged. |
| 3 | objects |
table of 8 numbers (t[1]..t[8]) | Eight object type ids (16-bit, -1 for unused) stored at goal +0x10; written back unchanged. |
| 4 | cycles |
number, truncated to an unsigned integer | Throws per round (one byte, goal +0x46) before the pause. |
| 5 | delayMs |
number, truncated to an unsigned integer | Wait after each throw in milliseconds (16-bit, goal +0x44). |
| 6 | taunt |
boolean (nil or 0 is false) | true starts with a taunt (speech 0x57, face the starting heading, anim 0x283); false starts throwing at once. |
| 7 | anim |
string | Animation name that replaces the human's anim slot 0x256 (0x0010bc38 on +0x3c8) when not empty; not a Lua callback. |
Returns nothing.
Pushes a big-ledge-thrower goal (type 138), the balcony boss: it keeps to the spot where it stood (moving back when more
than 0.5 m away), picks up an object (anim 0x225, or 0x29d for character type 178) and throws it, at a random one of the
target flags when the held object is of class 8, else at the nearest enemy, then waits delayMs. After cycles throws
it waits for its speech to end, turns on the nearest player with reaction 0x11 (0x002ee3d0) and starts a new round.
Notes. States at goal +0x40: 0 taunt, 1 return, 2 pick up, 3 throw, 4 pause; throw counter +0x47. Character type
178 only walks back every other round (runs beyond 1.5 m) and runs to a random spot 3-5 m away after each throw.
0x002ee3d0 and where the object list is read are not traced.
- Evidence: confirmed (code) at
0x002edf20,0x002edff8,0x002ee7b0; detail: traced - Wrapper
0x00363b38(registered byRegisterBindings); calls0x002edf20Goal_BigLedgeThrower,0x002edff8BigLedgeThrowerGoal_Init,0x002ee7b0BigLedgeThrowerGoal_Process - Used by 1 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
level3(mission 6) - Coney: implemented
GoalBigThrower¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the thrower. |
| 2 | value1 |
number, truncated to an unsigned integer | A handle or number. |
| 3 | value2 |
number, truncated to an unsigned integer | A handle or number. |
| 4 | value3 |
number, truncated to an unsigned integer | A handle or number. |
| 5 | value4 |
number, truncated to an unsigned integer | A handle or number. |
| 6 | objects |
table of 8 numbers (t[1]..t[8]) | Table of eight object ids; written back. |
Returns nothing.
A big thrower boss behaviour. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x00364328(registered byRegisterBindings); calls0x002ecfe8Goal_BigThrower - Used by no script on the disc
- Coney: not implemented
GoalBossDiego¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the boss. |
| 2 | value1 |
number, truncated to an unsigned integer | A handle or number (meaning not traced). |
| 3 | value2 |
number, truncated to an unsigned integer | A handle or number (meaning not traced). |
| 4 | value3 |
number, truncated to an unsigned integer | A handle or number (meaning not traced). |
| 5 | value4 |
number, truncated to an unsigned integer | A handle or number (meaning not traced). |
Returns nothing.
The boss behaviour for Diego. No script calls it (the fight uses TacticBossScenarioA).
- Evidence: speculative; detail: brief
- Wrapper
0x00362600(registered byRegisterBindings); calls0x002a1aa8Goal_BossDiego - Used by no script on the disc
- Coney: not implemented
GoalBossLizzies¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the boss. |
| 2 | value |
number, truncated to an unsigned integer | A handle or number (meaning not traced). |
Returns nothing.
The Lizzies' boss behaviour. No script calls it (the fight uses TacticBossScenarioB).
- Evidence: speculative; detail: brief
- Wrapper
0x003626f0(registered byRegisterBindings); calls0x0029fba8Goal_BossLizzies - Used by no script on the disc
- Coney: not implemented
GoalBoxer¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the boxer; a bad handle does nothing. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human to box (read as a human: the goal targets and attacks it); while it is not a valid target the goal waits. |
Returns nothing.
Pushes the Boxer goal (type 158) onto the human's brain: he goes into fight stance, makes target his target and keeps
throwing attacks at it, picked with a boxing attack-weight table (0x00511120, set at brain +0x208 while the goal
runs) and closing in when out of reach. Between attacks he dances (combat_fidget_boxersdance, bound to anim id 603),
holds a block (606, 609 or 611) or pauses 0.5-1.5 s; out of reach he waits 2 s (three times in four) or walks up to it.
Notes. The goal never ends by itself; the attacks are ordinary attacks, so they hit whatever the target is; the 'heavy bag' reading of the target is from the hub's scripts and is not checked here.
- Evidence: confirmed (code) at
0x002d97c0,0x002d9848,0x002d9870,0x002d98f8,0x002d98b0; detail: traced - Wrapper
0x00363ff8(registered byRegisterBindings); calls0x002d97c0Goal_Boxer,0x002d9848BoxerGoal_Init,0x002d9870BoxerGoal_Start,0x002d98f8BoxerGoal_Process,0x002d98b0BoxerGoal_End - 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
level95(the hub) - Coney: implemented
GoalBumLogic¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the bum. |
| 2 | bumType |
number, truncated to an unsigned integer | Behaviour type 0, 1 or 2 (scripts give each bum of a group a different one; type 2 calls come with a chance and an extra number). |
| 3 | option |
boolean (nil or 0 is false); default true | Adds the dealer's radar icon at the greeting (default true). |
| 4 | chance |
number, truncated to an unsigned integer | A percentage, clamped to 100 (scripts use 75; inferred: the chance to beg or react). |
| 5 | value |
number, truncated to an integer; default 3 | A number (default 3). |
| 6 | callback |
string | Name of a Lua function called by the goal, or nil. |
| 7 | option2 |
boolean (nil or 0 is false); default true | A flag (default true). |
Returns nothing.
Gives a homeless human its ambient behaviour (begging, rummaging, sleeping by type), with an optional Lua callback.
global.lua sets bums up with it.
Notes. Constructor 0x002abef8 (clamps the chance to 100, interns the callback). What each type does is inferred.
- Evidence: confirmed (code) at
0x002abd38; detail: traced - Wrapper
0x003633a8(registered byRegisterBindings); calls0x002abd38Goal_Bum - Used by 26 of 467 script chunks (71 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
GoalBumLogicTrigger¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of a bum whose current goal is GoalBumLogic's (type 79); otherwise nothing happens. |
Returns nothing.
Makes a bum play its reaction animation now, from the bum animations LoadBumAnims loads: a bum of type 1 or 2 plays
dynamic animation 668 (when its two animation slots at human +0x3e8 / +0x410 agree), a type-0 bum plays 669 (when
slot +0x4b0 is loaded and it is not busy). Both blend in over 0.3 s.
Notes. Types are the bumType of GoalBumLogic (goal +0x31); the same two plays (0x002ac900, 0x002ac970) run from
the goal's own process when the player is near. 668 is the type's fidget (puke_fidget, bm_sleep_itch or
bum_beg_itch), 669 puke_big (LoadBumAnims); confirmed (code) at 0x002ac000.
- Evidence: confirmed (code) at
0x002abe08,0x002ac410; detail: traced - Wrapper
0x003634c8(registered byRegisterBindings); calls0x002abe08Goal_BumTrigger,0x002ac410BumGoal_Trigger - 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
level87(mission 3) - Coney: implemented
GoalCallGang¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the caller (a lookout); a bad handle does nothing. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human being reported (the player); the call goes to where the caller last saw it, or the caller's own position if it is not seen. |
| 3 | count |
number, truncated to an integer | How many gang members the call spawns (kept as a byte; scripts 1). 0 sends nobody. |
| 4 | delaySec |
number, truncated to an integer | Seconds before the called members are spawned (byte; scripts 0). |
| 5 | runOff |
number (single precision) | Distance in metres the caller first runs aside (left, right or back, away from walls, less 2 m) before calling; scripts 0. |
| 6 | hurry |
boolean (nil or 0 is false); default true | true: the call plays l54_hurry_up09 and shouts at once; false: a gen_whistle and the shout one pass later. |
Returns nothing.
Pushes a call-gang goal: the caller shouts that it spotted the target (speech 0xa9), shows a spinning icon above its
head and plays gen_spot, runs to a call spot when runOff allows, then plays the hurry-up or whistle animation with
speech 0x16 and queues a call on the nearest gang spawner (kinds 9 or 10) to send count members after delaySec to
the spot. The target's gang gets its second wanted timer (gang +0x5f0, 0x001698c8) set to 10 s. A civilian caller
(brain kind 4) then loses the icon and flees to the nearest exit flag (activity 8) or cowers; the goal ends.
Notes. Signature fixed: arg 2 is a target handle, not a gang. While running it marks the human (+0x19e = 4, flag
+0xe0 2) and the HUD (0x001b2990, 0x001b32e0). For a civilian with game state +0x56e2 set the first call shows hint
0x17 once. A gang tactic of type 0x27 is told of the call (0x0031af68).
- Evidence: confirmed (code) at
0x002d5c28,0x002d5cf0,0x002d5db8,0x002d6638,0x002d6228,0x0016e0f0,0x0016dc70; detail: traced - Wrapper
0x003638b8(registered byRegisterBindings); calls0x002d5c28Goal_CallGang,0x002d5cf0CallGangGoal_Init,0x002d5db8CallGangGoal_Start,0x002d6638CallGangGoal_Process,0x002d6228CallGangGoal_FindCallSpot,0x0016e0f0Responders_QueueGangCall,0x0016dc70Spawner_QueueCall - 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
level20(flashback 4) - Coney: not implemented
GoalCallPolice¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the witness; a handle that is not a human does nothing. |
| 2 | crime |
number, truncated to an integer | Crime type reported at the end (Crime types); scripts use 0 and 13. Kept as 16 bits. |
| 3 | pos |
table of 3 numbers (t[1]..t[3]) | Table {x, y, z}: where the crime happened, in metres (the witness runs there when he has no phone); written back. |
| 4 | victim |
number, truncated to an unsigned integer | Handle passed as the report's victim, or NilHandle. Was listed as the offender. |
| 5 | offender |
number, truncated to an unsigned integer | Handle of the offender: the witness turns to him, and the report is made only while he resolves. Was listed as 'other'. |
Returns nothing.
Pushes a call-the-police goal (vtable 0x0053f7f0) on the witness. He turns to the offender, points (anim 0x29c) and says
rat (speech command 33), then gets a spinning icon and a radar blip and runs (gait 4) to a phone flag, queueing behind
anyone using it (hurryup), or toward the crime scene. He phones for 6 s saying phone_cop (84), then reports the
crime (crime report with mode 1, so police responders come, AI: crimes), loses the
icon and blip, and flees to the nearest exit flag (screaming if he was attacked) or cowers.
Notes. Interrupting him (brain +0x284, as when he is hit) skips to the end without a report. The report is also
skipped when the offender no longer resolves. 0x0041cfe8 records the current caller on the game state at start and
clears it at end.
- Evidence: confirmed (code) at
0x002a7d08,0x002a7e20,0x002a7e98,0x002a83f8,0x002a7f70,0x0041b8b0; detail: traced - Wrapper
0x00362ec0(registered byRegisterBindings); calls0x002a7d08Goal_CallPolice,0x002a7e20,0x002a7e98,0x002a83f8,0x002a7f70,0x0041b8b0 - 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
level14(mission 12) - Coney: not implemented
GoalCopperGuard¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the cop. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag to guard. |
| 3 | value1 |
number, truncated to an integer | A number (meaning not traced). |
| 4 | value2 |
number, truncated to an integer | A number (meaning not traced). |
Returns nothing.
A cop guarding a spot. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x003618d8(registered byRegisterBindings); calls0x002c0910Goal_CopGuard - Used by no script on the disc
- Coney: not implemented
GoalCopperPatrol¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the cop (not checked to be a human). |
| 2 | path |
userdata (only read when given) | The patrol path object returned by AddPath (read only when a second argument is given). |
| 3 | mode |
number, truncated to an integer | What happens at the end of the path, as in GoalTravelPath: 0 stop, 1 loop, 2 walk it back (ping-pong). Scripts use 2. |
| 4 | value1 |
number, truncated to an integer | Stored as a 16-bit value at goal +0x48; no reader found (scripts use 0). |
| 5 | value2 |
number, truncated to an integer | Stored as a 16-bit value at goal +0x4a; no reader found (scripts use 0). |
Returns nothing.
Pushes a cop patrol goal: a TravelPath goal (vtable 0x00540b70) that walks the cop from the path's first point along
its points at walking pace, arriving within 2 m of each (GoalCopPatrol_Process, 0x002c11d8), with the given end mode. It
also sets the cop's brain +0x21c to 4 and +0x220 to 5 and byte +0x28d to 1.
Notes. The third argument was listed as a gait; it is the end mode (the gait is fixed at 2, walk). The meaning of
brain +0x21c / +0x220 (the latter also written by GangSetDamageResponse) and +0x28d was not traced.
- Evidence: confirmed (code) at
0x002c1060,0x002c1110; detail: traced - Wrapper
0x00361ea0(registered byRegisterBindings); calls0x002c1060Goal_CopPatrol,0x002c1110GoalCopPatrol_Init - 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
level52(mission 15) - Coney: not implemented
GoalCopperRespond¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the cop. |
| 2 | value1 |
number, truncated to an integer | A number (meaning not traced). |
| 3 | value2 |
number, truncated to an integer | A number (meaning not traced). |
Returns nothing.
A cop responding to a crime. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x003619a8(registered byRegisterBindings); calls0x002c0c20Goal_CopRespondSimple - Used by no script on the disc
- Coney: not implemented
GoalCopRespond¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the cop. |
| 2 | crime |
number, truncated to an integer | A crime type number (inferred). |
| 3 | pos |
table of 3 numbers (t[1]..t[3]) | Table {x, y, z}: where the crime happened, in metres; written back. |
| 4 | criminal |
number, truncated to an unsigned integer | Handle of the offender, or NilHandle. |
| 5 | victim |
number, truncated to an unsigned integer | Handle of the victim (inferred). |
Returns nothing.
Sends a cop to respond to a crime at a place. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00362d68(registered byRegisterBindings); calls0x002c2d38Goal_CopRespond - Used by no script on the disc
- Coney: not implemented
GoalCower¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
| 2 | despawn |
boolean (nil or 0 is false) | true: every 90 updates, if the human's byte +0x333 is set and it is more than 30 m from the camera, the human is deleted (goal +0x14). Scripts pass false. |
Returns nothing.
Pushes a Cower goal (type 17): every 45 updates the human picks the nearest threat and glances at it for 2 s. While the
threat is closer than the brain's fear distance (+0x13c) plus the threat's class minus 1, it runs away (gait 5, or 4
when stamina is under 50) and screams half the time (speech command 9); otherwise it turns to face the threat and plays
the special idle clip (anim 671, ANIM_SPECIAL_IDLE) as its cowering pose. The goal never ends by itself; it does nothing
while the human is down or busy.
Notes. Threat choice 0x002d4f40 and the flee-point test 0x002d4fc0 are not traced. Byte +0x333 is the same one
route following uses (ai.md); why the despawn needs it is open.
- Evidence: confirmed (code) at
0x002d4c38,0x002d4cb8,0x002d4fe8; detail: traced - Wrapper
0x003644a0(registered byRegisterBindings); calls0x002d4c38Goal_Cower,0x002d4cb8CowerGoal_Init,0x002d4fe8CowerGoal_Process - Used by 4 of 467 script chunks (11 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
GoalDealer¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the dealer. |
| 2 | dealerType |
number, truncated to an integer | Dealer type 0, 1 or 2; overridden by the human's character class when it is one of the dealer classes (0x1aa-0x1ae give 0, 0x1af-0x1b3 give 2, 0x1b4-0x1b8 give 1). |
| 3 | range |
number (single precision); default 10 | Metres within which the dealer greets the nearest player and offers the deal (default 10). |
| 4 | runChance |
number, truncated to an unsigned integer; default 50 | Percentage chance (0-100, default 50) that the dealer flees rather than fights when attacked; scripts call it chance2Run. |
| 5 | dirtyChance |
number, truncated to an unsigned integer | Percentage chance (0-100) that this dealer is dirty: the goal rolls it once when made; scripts call it chance2BDirty. |
| 6 | option |
boolean (nil or 0 is false); default true | Adds the dealer's radar icon at the greeting (default true). |
Returns nothing.
Makes a human act as a street dealer the player can buy flash from; whether this dealer is dirty is decided by a random
roll against dirtyChance when the goal is made. Levels use it for the flash dealers, including the mission-1 area.
Notes. Wrapper 0x002c6c88 remaps the type by class; constructor 0x002c6d90 rolls random(100) < dirtyChance into
+0x41. The goal's behaviour is on the AI page (GoalDealer).
- Evidence: confirmed (code) at
0x002c6c88; detail: traced - Wrapper
0x00363018(registered byRegisterBindings); calls0x002c6c88Goal_Dealer - Used by 21 of 467 script chunks (27 references); boot to menu: no; mission 1: yes; result used: no
- Later in the story: 17 of 28 levels, first
level87(mission 3) - Coney: implemented
GoalDevilRun¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the runner; a bad handle does nothing. |
| 2 | path |
userdata (only read when given) | The path the chase runs along (read only when a second argument is given). |
| 3 | gang |
number, truncated to an integer | Gang id (16-bit) the runner paces itself against (scripts pass the Warriors' gang); its hindmost live member along the path is the chaser. |
| 4 | gait |
number, truncated to an integer | Base gait id (16-bit): its speed (Human_SpeedForGait) is the runner's slowest speed; scripts use constants such as 5. |
| 5 | attackDistance |
number (single precision) | Hostile runner only: metres (measured along the path) at which it turns to attack a running chaser (goal +0x1c). |
| 6 | paceDistance |
number (single precision) | Metres over which the speed is blended (goal +0x20): the distance to the chaser divided by this gives the 0-1 blend factor. |
| 7 | maxSpeed |
number (single precision) | Speed in m/s reached at a blend factor of 1 (scripts use 10-13). |
| 8 | urgency |
number (single precision) | Multiplied by the blend factor and added to a brain byte (0x0028cdf8; scripts use 0.5-3). Meaning not traced. |
| 9 | hostile |
boolean (nil or 0 is false) | true: a pursuer that speeds up the farther it falls behind and attacks when close; false: a runner that speeds up the closer the chaser gets. |
Returns nothing.
Pushes a devil-run goal (type 152), the rooftop and street chases: the runner moves straight for the path's last point
(a move action that plans its own route) while pacing itself against the gang. Every 7 updates it measures the distance
along the path to its chaser (the gang member farthest back along the path, re-chosen every 29 updates) and sets its
speed between the gait's and maxSpeed by that distance over paceDistance; a hostile runner attacks a chaser that
catches it. It ends when the gang has no member or no live member left.
Notes. Hostile attack test (0x002e1e10): a running chaser (+0x1a8 above 2) within attackDistance, or a slower one
within (1.1 × runner +0x140)² (a squared reach against metres); it then sets threat response 2 and pushes goals
0x002ade10 (2000, 2000) and, in the first case, an engage-enemy goal (0x47). Chaser choice: 0x002e1c18; hindmost
segment: 0x002e1b60. Start / Resume / End save and restore the threat response, the field of view (2Ï€ while it runs) and
a brain byte. Full behaviour: AI: GoalDevilRun.
- Evidence: confirmed (code) at
0x002e1760,0x002e1850,0x002e2230; detail: traced - Wrapper
0x00360d98(registered byRegisterBindings); calls0x002e1760Goal_DevilRun,0x002e1850DevilRunGoal_Init,0x002e2230DevilRunGoal_Process - Used by 6 of 467 script chunks (33 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
GoalEngageEnemy¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human who attacks; a bad handle does nothing. |
| 2 | enemy |
number, truncated to an unsigned integer | Handle of the human to fight (not checked here). |
Returns nothing.
Pushes an EngageEnemy goal (type 11) on the human's brain against the enemy: it walks up to the enemy and fights it
with the usual fight sub-goal until the enemy is out of range or gone, or a newer goal replaces it. The one-human form
of GangEngageEnemy.
Notes. Constructor 0x002af5b0 (vtable 0x00540330, Process 0x002afa48); a flag at goal +0x34 is set only when the
human's +0x1a8 is below 3 and 0x00223e20 is false, not traced. Fight behaviour: AI.
- Evidence: confirmed (code) at
0x002af528,0x002af5b0; detail: traced - Wrapper
0x00360550(registered byRegisterBindings); calls0x002af528Goal_EngageEnemy,0x002af5b0EngageEnemyGoal_Init - Used by 4 of 467 script chunks (5 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 2 of 28 levels, first
level81(mission 8) - Coney: implemented
GoalFight¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human who fights. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human to fight. |
| 3 | unused |
number, truncated to an unsigned integer; default 4294967295 | Read (default NilHandle) but not used by the code. |
Returns nothing.
Makes a human attack another human at once: its queued actions are cleared and the brain takes the target as its enemy.
Not a goal on the stack despite its name. It does nothing when the human's threat response is 0 (see
BrSetThreatResponse).
Notes. 0x002b2b90 calls 0x0028d2e8, which returns at once when brain +0x21c is 0.
- Evidence: confirmed (code) at
0x002b2b90; detail: traced - Wrapper
0x003610a8(registered byRegisterBindings); calls0x002b2b90Brain_StartFight - Used by 15 of 467 script chunks (33 references); boot to menu: no; mission 1: yes; result used: no
- Later in the story: 9 of 28 levels, first
level80(mission 2) - Coney: implemented
GoalFollowFormation¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the follower; a bad handle does nothing. |
| 2 | leader |
number, truncated to an unsigned integer | Handle of the leader whose formation it joins; a bad handle does nothing. |
Returns nothing.
Pushes a follow goal (vtable 0x00541c50): the follower joins the leader's formation (made on first use) and, about once a second, walks or runs to its slot's world point (arrival 0.75 m), or queues 2.5 m behind the follower ahead when it has no slot, matching its gait to the distance and the leader's pace. The goal ends when the leader is no longer seen or alive, or a move fails.
Notes. Fixed values from the binding: distance 0.75 m, no turn-to-leader mode. On a player-type brain (kind 3) it sets human flags 0x300 while it runs (no stun, weaker reactions). Every 15 updates without a route it may look for another target (0x0029d5f0). Formations: AI.
- Evidence: confirmed (code) at
0x002dfb00,0x002dfba8,0x002dfcd0,0x002e0088; detail: traced - Wrapper
0x003607f8(registered byRegisterBindings); calls0x002dfb00Goal_FollowFormation,0x002dfba8FollowFormationGoal_Init,0x002dfcd0FollowFormationGoal_Start,0x002e0088FollowFormationGoal_Process - 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
level11(flashback 5) - Coney: not implemented
GoalFollowObject¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the follower; a bad handle does nothing. |
| 2 | object |
number, truncated to an unsigned integer | Handle of the object (or human) to follow; the goal ends once it no longer resolves. |
| 3 | distance |
number (single precision) | Distance in metres the follower may lag before it speeds up (goal +0x24); scripts use 0-1, and 0 makes any gap give full speed. |
| 4 | interval |
number, truncated to an unsigned integer | Re-plans every this many brain updates (goal +0x2c); scripts use 1 and 2. 0 divides by zero. |
Returns nothing.
Pushes a FollowObject goal (type 49) on the human: each update it reads the object's position and speed, and every
interval brain updates sets a move action to the object's position (0.25 m radius) at a matched speed: the object's
own speed, raised by 1 + (gap - distance) / (1.5 × distance) when the gap is larger than distance (more when the
object is slow), never above 1.25 × the follower's sprint speed. Used for scripted chases.
Notes. The goal has no arrival end: it runs until the object is gone or another goal replaces it. While the brain already runs a move action of the right kind, only its target and speed are updated.
- Evidence: confirmed (code) at
0x002df6c0,0x002df760,0x002df908,0x002df7a0; detail: traced - Wrapper
0x00360730(registered byRegisterBindings); calls0x002df6c0Goal_FollowObject,0x002df760FollowObjectGoal_Init,0x002df908FollowObjectGoal_Process,0x002df7a0FollowObjectGoal_PickSpeed - Used by 2 of 467 script chunks (5 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
GoalFollowPlayer¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the follower. |
| 2 | leader |
number, truncated to an unsigned integer | Handle of the human to follow (usually the player). |
| 3 | distance |
number (single precision) | Follow distance in metres (stored squared); scripts use 2-5. |
| 4 | mode |
number, truncated to an integer | A follow mode number stored with the goal (scripts use 0 and 1). |
Returns nothing.
Makes a human follow a leader, keeping within the given distance and taking a slot in the leader's follow formation (see
BrSetFollowSlot). global.lua's gang helpers use it to have Warriors follow the player.
Notes. Constructor 0x002de380; its start (0x002de498) widens the follower's field of view and joins the leader's
formation (0x00296028). The meaning of mode is inferred.
- Evidence: confirmed (code) at
0x002de2c8; detail: traced - Wrapper
0x003605c8(registered byRegisterBindings); calls0x002de2c8Goal_FollowPlayer - Used by 3 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
level86(mission 9) - Coney: not implemented
GoalGetItem¶
| # | 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 | gait |
number, truncated to an integer | Gait id for the approach while more than 3 m from the object (scripts use 5, sprint); closer it uses gait 3. |
| 3 | object |
number, truncated to an unsigned integer | Handle of the world object to fetch (a level object such as a guitar). |
Returns nothing.
Pushes a get-item goal (vtable 0x00541ef0) on the human's brain: he drops what he is holding, looks at the object and
runs to a point beside it (offset by the object type's size), then queues the pick-up action and finishes once he holds
it. On the way he hits back at an attacker within 1 m; if someone else picks the object up first he targets that human
and fights or engages him unless they are allies. It raises the brain's urgency byte (+0x0b) by one while it runs.
Notes. The goal ends with nothing after 11 pick-up attempts, when the object is gone, or when no approach point is found. It waits while the object has flag bit 0x4000000 (inferred: being thrown). The pick-up action is 0x002faf98 with kind 0x21.
- Evidence: confirmed (code) at
0x002dc708,0x002dc7a0,0x002dc7f8,0x002dc8b0,0x002dc9f8,0x002dc9d8; detail: traced - Wrapper
0x003604b0(registered byRegisterBindings); calls0x002dc708Goal_GetItem,0x002dc7a0,0x002dc7f8,0x002dc8b0,0x002dc9f8,0x002dc9d8 - 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
level31(mission 11) - Coney: not implemented
GoalGrabTarget¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the grabber; a bad handle does nothing. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human to grab and hold; the goal ends when it no longer resolves to a valid target. |
Returns nothing.
Pushes the GrabTarget goal (type 31): the grabber walks up to the target, grabs it (fighting it first with a short Fight
goal, or an EngageEnemy goal when out of reach, when the grab is not possible) and then holds it, dealing the hold
damage (global 0x00510acc) every 30 brain updates; the held victim screams (speech command 9) now and then, and the
grabber turns to face the nearest player when more than 45 degrees off. While it runs the grabber cannot be attacked
(brain +0x120 = 0), will not fight on his own (threat response 0) and uses the grab attack weights (0x00511098).
Notes. The goal never lets go by itself; it ends only when the target becomes invalid or the goal is popped or flushed; End restores the brain's targetable flag, two brain bytes (+0x0b, +0x0c) and the target's brain +0x11f, but not the saved threat response (kept in the goal).
- Evidence: confirmed (code) at
0x002bb3d0,0x002bb458,0x002bb4c0,0x002bb858,0x002bb598; detail: traced - Wrapper
0x00364500(registered byRegisterBindings); calls0x002bb3d0Goal_GrabTarget,0x002bb458GrabTargetGoal_Init,0x002bb4c0GrabTargetGoal_Start,0x002bb858GrabTargetGoal_Process,0x002bb598GrabTargetGoal_End - Used by 2 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
GoalGuardFlag¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the guard; a bad handle, or a flag handle that does not resolve, does nothing. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag to guard. |
| 3 | radius |
number (single precision) | Metres: the guard walks back to the flag whenever it is farther than this (also its arrival radius; scripts use 0.5-1). |
| 4 | heading |
number, truncated to an integer | World heading in degrees (16-bit) to face while on station, re-applied every 30 updates; -1 for none. |
| 5 | callback |
string | Name of a Lua function called (handle, completed) when the goal ends, or nil. |
| 6 | timeMs |
number, truncated to an integer; default -1 | Written to the goal's time word (+0x08, 16-bit value); -1 (the default) for none (inferred: a time limit). |
Returns nothing.
Pushes a guard-flag goal (type 43): the human walks (gait 2) back to the flag whenever it strays more than radius from
it and, on station, turns to heading. It ends when the flag no longer exists. An event that reaches the goal makes it
push goal 63 (LeftTurf, back to the brain's home +0x230) on top.
Notes. Event handler 0x002b7bc0 pushes LeftTurf (0x002f8c90) for any event it gets. The callback follows the shared
rule of AI: scripted goals. How the base goal uses +0x08 is not traced
here.
- Evidence: confirmed (code) at
0x002b79b8,0x002b7a90,0x002b7c18; detail: traced - Wrapper
0x00360f28(registered byRegisterBindings); calls0x002b79b8Goal_GuardFlag,0x002b7a90GuardFlagGoal_Init,0x002b7c18GuardFlagGoal_Process - Used by 4 of 467 script chunks (14 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
GoalHoldPosition¶
| # | 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 | pos |
table of 3 numbers (t[1]..t[3]) | Table {x, y, z}: the position to hold, in metres; written back. |
| 3 | radius |
number (single precision) | Radius in metres around the position he may stand or fight in (the only call passes 2). |
| 4 | callback |
string | Read but ignored: Goal_HoldPosition never uses it. |
Returns nothing.
Pushes a hold-position goal (vtable 0x00540510) on the human's brain that never ends by itself. Inside the radius with no enemy he stands, playing an idle action 30 % of the time every 3 s; outside it he walks back (gait 2). When an enemy targets him he fights while both stay inside the radius (a fight goal of 4 s, or a step in), and once he is pushed outside he drops the target and walks back facing the enemy; an enemy out of reach is only watched for 2 s.
Notes. Process is 0x002be818; it waits while brain +0x2e is positive. Clear it with the usual goal-clearing
bindings.
- Evidence: confirmed (code) at
0x002be590,0x002be640,0x002be818; detail: traced - Wrapper
0x003624e0(registered byRegisterBindings); calls0x002be590Goal_HoldPosition,0x002be640,0x002be818 - 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
level31(mission 11) - Coney: not implemented
GoalHooker¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag to work from (inferred). |
Returns nothing.
Street-walker ambient behaviour around a flag. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x003616b8(registered byRegisterBindings); calls0x002a5360Goal_Hooker - Used by no script on the disc
- Coney: not implemented
GoalJoinAnimation¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | scene |
number, truncated to an unsigned integer | Handle of the animation scene (from ScenePreload). |
| 3 | role |
number, truncated to an unsigned integer | Role index in the scene, from 0. |
| 4 | gait |
number, truncated to an integer | Gait id for walking into place. |
| 5 | processNow |
boolean (nil or 0 is false); default true | Read (default true) but, unlike the other GoalJoin* bindings, not used. |
Returns nothing.
Gives a human the goal of taking part in an animation scene in the given role, registering it with the scene at once.
global.lua's scene helpers use it for animation-type scenes.
Notes. Constructor 0x002e56f0; 0x002e5650 never runs the first update.
- Evidence: confirmed (code) at
0x002e5650; detail: traced - Wrapper
0x003615d8(registered byRegisterBindings); calls0x002e5650Goal_JoinAnimation - Used by 2 of 467 script chunks (2 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
GoalJoinCinematic¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human (the player's characters too). |
| 2 | scene |
number, truncated to an unsigned integer | Handle of the cinematic scene (from ScenePreload). |
| 3 | role |
number, truncated to an unsigned integer | Role index in the scene, from 0. |
| 4 | gait |
number, truncated to an integer | Gait id for walking into place (scripts use 2, walk). |
| 5 | processNow |
boolean (nil or 0 is false); default true | true (the default) runs the goal's first update immediately. |
Returns nothing.
Gives a human the goal of taking part in a cinematic scene in the given role. If the human is pad-controlled (brain type
0) its brain is switched off first, as BrDead(human, true) does, so the player cannot move during the cinematic.
Notes. Constructor 0x002e53e0.
- Evidence: confirmed (code) at
0x002e5300; detail: traced - Wrapper
0x003614f8(registered byRegisterBindings); calls0x002e5300Goal_JoinCinematic - Used by 7 of 467 script chunks (22 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
GoalJoinFixedScene¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | scene |
number, truncated to an unsigned integer | Handle of the scene (from ScenePreload). |
| 3 | role |
number, truncated to an unsigned integer | Role index of the human in the scene, from 0 (the helpers pass their loop index minus 1). |
| 4 | gait |
number, truncated to an integer | Gait id used to walk to the scene's start mark (the scene table's Speed). |
| 5 | processNow |
boolean (nil or 0 is false); default true | true (the default) runs the new goal's first update immediately. |
Returns nothing.
Gives a human the goal of taking part in a fixed-position scene in the given role; the scene is told about the human and
its role at once. global.lua's scene helpers call it for each human of a scene table.
Notes. Constructor 0x002e5128 registers (scene, human, role) with the scene through 0x003541a0.
- Evidence: confirmed (code) at
0x002e5048; detail: traced - Wrapper
0x00361418(registered byRegisterBindings); calls0x002e5048Goal_JoinFixedScene - Used by 2 of 467 script chunks (2 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
GoalJoinScene¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | scene |
number, truncated to an unsigned integer | Handle of the scene (from ScenePreload). |
| 3 | role |
number, truncated to an unsigned integer | Role index of the human in the scene, from 0. |
| 4 | pos |
table of 3 numbers (t[1]..t[3]) | Table {x, y, z}: a position in metres; written back. |
| 5 | heading |
number (single precision) | Heading in degrees (inferred). |
| 6 | gait |
number, truncated to an integer | Gait id for walking into place. |
| 7 | processNow |
boolean (nil or 0 is false); default true | true (the default) to run the goal's first update at once. |
Returns nothing.
Puts a human into a scene at a role, walking it to a given position first (inferred). No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00361280(registered byRegisterBindings); calls0x002e4cf0Goal_JoinScene - Used by no script on the disc
- Coney: not implemented
GoalLeadChase¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the runner; a bad handle does nothing. |
| 2 | path |
userdata (only read when given) | The path the runner follows from its first point (read only when a second argument is given). |
| 3 | chaser |
number, truncated to an unsigned integer | Handle of the chaser; read but ignored: the goal picks its own chaser. |
| 4 | distance1 |
number (single precision) | Metres: while the chaser is closer than this the runner runs on along the path; farther away it stops and waits (the only call passes 30). |
| 5 | distance2 |
number (single precision) | Metres, stored squared at goal +0x44; not read by the goal's process (the call passes 50). |
| 6 | distance3 |
number (single precision) | Metres, stored squared at goal +0x48; not read by the process (70). |
| 7 | distance4 |
number (single precision) | Metres, stored squared at goal +0x4c; not read by the process (90). |
Returns nothing.
Pushes a lead-chase goal (type 73, a path-travel goal): every 10 updates the runner takes as its chaser the nearest
living enemy within 50 m. While that chaser is within distance1 it runs along the path, sprinting while its power
meter is above 60% and dropping back to a run at 20% or less; otherwise it stops and turns to face the chaser (when more
than 15° off). The goal ends at the path's last point.
Notes. Process: 0x002e0dc8. The init passes 0 instead of the chaser to GoalTravelPath_Init (0x002e0b48 clears a3),
so the argument has no effect. A path linked to a next path (+0x34) continues onto it. The runner's threat and damage
responses are set to 0 (brain +0x21c, +0x220), so it does not fight back.
- Evidence: confirmed (code) at
0x002e0a78,0x002e0b48; detail: traced - Wrapper
0x00360ac8(registered byRegisterBindings); calls0x002e0a78Goal_LeadChase,0x002e0b48LeadChaseGoal_Init - 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
level2(mission 5) - Coney: implemented
GoalLutherShooter¶
GoalLutherShooter(human, shots, spreadYaw, spreadPitch, shotDelayMs, damage, callback, speech1, speech2, speech3)
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of Luther (the gun boss); the goal is pushed on his brain. |
| 2 | shots |
number, truncated to an unsigned integer; default 6 | Rounds per clip (default 6); after the last one he plays the reload animations. |
| 3 | spreadYaw |
number (single precision); default 10 | Random horizontal aim error per shot, in degrees (default 10). |
| 4 | spreadPitch |
number (single precision); default 10 | Random vertical aim error per shot, in degrees (default 10). |
| 5 | shotDelayMs |
number, truncated to an unsigned integer; default 100 | Minimum pause between shots in milliseconds (default 100); each pause is random between this and this + 1000. |
| 6 | damage |
number, truncated to an integer; default 500 | Damage per hit (default 500); a tenth of it against a raging human. |
| 7 | callback |
string | Name of a Lua function called with no arguments after each taunt (every 3rd update without a target), or nil. |
| 8 | speech1 |
string | Name of a speech line he taunts with while no player is in sight, or nil. |
| 9 | speech2 |
string | Second taunt line, or nil. |
| 10 | speech3 |
string | Third taunt line, or nil. |
Returns nothing.
Gives Luther his gunfight behaviour for the final level (goal type 0x8e, vtable 0x00542670). Each update he picks the
nearest player he can see within range (0x002f33e8, from the player list at game state +0x228), turns to them and
fires a 30 m ray per shot with the given spread and damage, pausing between shots; after shots rounds he reloads (anim
0x29d, then 0x29e, which refills the clip). With no target he cycles through the taunt lines and calls the callback.
Notes. Taunt names are loaded into the human's speech slots (human +0x3c8 + i * 0x28, ids 0x256 + i). Shots left
are counted in goal bytes +0x46/+0x47; the callback name is interned at goal +0x50. A raging target is one with
human flag +0xe0 0x80000. He also reloads when a target is seen but the line of fire is blocked (0x00222288 fails).
Process returns 1 once per reload, on entering the refill state; whether the brain treats that as finished is not
traced.
- Evidence: confirmed (code) at
0x002f3118,0x002f3220,0x002f13a8,0x002f3600,0x002f19d8; detail: traced - Wrapper
0x00363e50(registered byRegisterBindings); calls0x002f3118Goal_LutherShooter,0x002f3220LutherShooterGoal_Init,0x002f13a8ShooterGoal_Init,0x002f3600LutherShooterGoal_Process,0x002f19d8ShooterGoal_Fire - 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
GoalManWeaponPile¶
GoalManWeaponPile(human, maxThrows, pickupRadius, throwRange, pauseS, style, closeRange, wantsWeapon, checkLine, callback, delayMs)
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the thrower; a bad handle does nothing. |
| 2 | maxThrows |
number, truncated to an integer | Throws before the goal may end (goal +0x36); -1, what the scripts pass, for no limit. |
| 3 | pickupRadius |
number (single precision) | Radius in metres around the thrower searched for a throwable to pick up (goal +0x24); scripts use 2. |
| 4 | throwRange |
number (single precision) | Range in metres: the target is picked within it every 10 updates, and a target farther away is only looked at, not thrown at (goal +0x28); scripts use 40. |
| 5 | pauseS |
number, truncated to an integer | Seconds to wait after each throw before fetching the next object (goal +0x30); scripts use 12-14. |
| 6 | style |
number, truncated to an integer | 0 plain; 1-5 also give the thrower an object in hand when it has none (1 dyn_brick, 2 dyn_molotv, 3 dyn_manqheadred, 4 a porcelain object, 5 dyn_beerbottle) and make it target the player half the time; for character 135 (the Hi-Hats boss), 1 and 2 pick two sets of taunts said on a throw (goal +0x3a). Scripts use 1 and 5. |
| 7 | closeRange |
number, truncated to an integer | Metres (kept squared, goal +0x3c): a target closer than this lets the goal end after the pause even before maxThrows. Scripts use 1. |
| 8 | wantsWeapon |
boolean (nil or 0 is false) | Sets the brain's wants-weapon byte (+0x265, as BrSetThugWantsWeapon). |
| 9 | checkLine |
boolean (nil or 0 is false); default true | true: before each throw the thrower checks it can hit the target (0x00222288) and goes back to fetching if not (goal +0x4c). |
| 10 | callback |
string | Name of a Lua function registered with the goal (+0x20), or nil; when it is called is not traced. |
| 11 | delayMs |
number, truncated to an unsigned integer; default 500 | Delay in ms from holding an object to the first throw (goal +0x48, default 500). |
Returns nothing.
Pushes a ManWeaponPile goal (type 82) after clearing the human's current action and setting its threat and damage
responses to 0. The thrower picks up a throwable within pickupRadius (a GetItem goal), waits delayMs, turns to its
target (re-picked every 10 updates within throwRange), throws (command 0x10) when the target is in range or else just
looks at it, then waits pauseS seconds and fetches again. It ends when no throwable is found after 21 tries, or after
the pause once maxThrows is reached or the target is within closeRange, unless the gang's tactic keeps it going.
Notes. The end checks also look at the gang tactic's state (brain +0x20c → +0x40, ends only with none or kind
9), not traced further. The taunts are speech lines, rotated through a counter shared by all throwers.
TacticManWeaponPile gives every member this goal.
Overload (registered first; the wrapper above checks its argument types and calls this one when they do not match):
The 7-argument form (0x00361a50): style 0, line check on, delay 500 ms, and closeRange taken from wantsWeapon. The
11-argument form is used when arguments 1-7 are numbers, 8 is a bool (tolua type), 9 an optional bool, 10 an optional
string, 11 an optional number and there is no 12th; any other call falls back to this form.
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the thrower. |
| 2 | maxThrows |
number, truncated to an integer | As in the long form (-1 for no limit). |
| 3 | pickupRadius |
number (single precision) | As in the long form. |
| 4 | throwRange |
number (single precision) | As in the long form. |
| 5 | pauseS |
number, truncated to an integer | As in the long form. |
| 6 | wantsWeapon |
boolean (nil or 0 is false) | Sets the wants-weapon byte; it is also passed as closeRange (0 or 1 m). |
| 7 | callback |
string | Name of a Lua function, or nil. |
Returns nothing.
Wrapper 0x00361a50; calls 0x002a30e8 Goal_ManWeaponPileSimple.
- Evidence: confirmed (code) at
0x002a31f0,0x002a3320,0x002a3498; detail: traced - Wrapper
0x00361b80(registered byRegisterBindings); calls0x002a31f0Goal_ManWeaponPile,0x002a3320ManWeaponPileGoal_Init,0x002a3498ManWeaponPileGoal_Process - Used by 3 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
level81(mission 8) - Coney: not implemented
GoalMark¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag to stand at; a handle that is not a flag leaves the goal without a spot (it only reacts). |
| 3 | radius |
number (single precision) | Reaction radius in metres round the spot where the goal started (scripts 0 and 10); 0 turns the reactions off. |
Returns nothing.
Pushes a 'mark' goal (an idle stand-in at a spot): the human walks (gait 2) to the flag, turns to the flag's heading
(within 15 degrees) and sends the flag message 8 once (the flag's activity, inferred: an idle pose there). With a
radius, when it is shoved (brain +0x34 & 3) farther than radius from its start it alternates two reactions (a
startled animation 0x29d, or a 2 s look round), and when it has drifted beyond a fifth of the radius while free it may
chat with a wandering pedestrian within 5 m (anim 0x253, both look at each other 1.5 s).
Notes. Used for the marketplace mission's (level 20) loiterers. The goal never ends by itself. Reaction details
(0x002d89e0, counters at goal +0x2e, 15/30/45 updates) and the flag's message 8 handler are not fully traced; the
shove reaction also needs human +0x410 set.
- Evidence: confirmed (code) at
0x002d87b0,0x002d8848,0x002d88d8,0x002d8ee0,0x002d8b10,0x002d8db0; detail: traced - Wrapper
0x003639c8(registered byRegisterBindings); calls0x002d87b0Goal_Mark,0x002d8848MarkGoal_Init,0x002d88d8MarkGoal_Start,0x002d8ee0MarkGoal_Process,0x002d8b10MarkGoal_React,0x002d8db0MarkGoal_FindChatPartner - Used by 1 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
level20(flashback 4) - Coney: not implemented
GoalMelee¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; nothing happens if it is not a human or is in either of the incapacitated states tested by 0x00223b70 / 0x00227dd8 (record flags 0x20000 / 0x40000). |
| 2 | target |
number, truncated to an unsigned integer; default 4294967295 | Handle of the opponent to fight; NilHandle (the default) lets the human pick whoever it finds. |
Returns nothing.
Makes a human brawl. Two goals are pushed: a FindEnemy goal (type 65, search values 90 and 30, a byte 10 from
0x00510adb) and above it a Melee goal (type 8) with the target and a 4000 ms value; the Melee goal fights the target
while it has one, and when it ends the FindEnemy goal looks for an enemy and starts a fight with it (Brain_Fight). If
the human's gang is not yet alert (gang +0x40 = 0) its alert state becomes 1.
Notes. Goal types read from the vtables 0x00540a50 (65) and 0x00540450 (8). Melee's process (0x002aebf8) with a threat response of 0 only keeps fighting a target that already holds an attack slot. The meaning of 90, 30, 10 and 4000 (search angle, radius, timing) is not traced. No callback.
- Evidence: confirmed (code) at
0x002add08; detail: traced - Wrapper
0x00361150(registered byRegisterBindings); calls0x002add08Goal_Melee - 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
level87(mission 3) - Coney: implemented
GoalMoveToExitFlag¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human (a pedestrian, vendor or extra leaving the scene). |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the exit flag to head for (a flag with activity 8); the goal may switch to another exit flag on the way. |
| 3 | gait |
number, truncated to an integer | Gait id: 2 walk, 3 jog, 4 run, 5 sprint (Characters). |
| 4 | angle |
number (single precision) | Direction in degrees of an offset from the flag's point; used only when it or distance is above 0. |
| 5 | distance |
number (single precision) | Length of the offset in metres (0 for the flag itself). |
| 6 | radius |
number (single precision) | Arrival radius in metres (scripts use 0.3). |
Returns nothing.
Sends a human off the scene through an exit flag. Unless its brain is of type 1 (a player) the brain's off flag is set
first (brain +9, as BrDead does), then a MoveToExitFlag goal (type 2) walks it to the flag (or the offset point)
at gait. If the way to the flag is blocked, or the human reaches it while a player camera can see it or within 8 m of
one, it picks the nearest other exit flag it can reach and goes on; once it arrives unseen it is removed. If, at a check
every 8 seconds, it is more than 60 m from every player camera and off screen, it is instead killed out of sight (as
HuKill) and the goal ends.
Notes. Constructor 0x002da8f8 (vtable 0x005420d0; it also sets brain +0x2d7, cleared when the goal ends), Start
0x002da960 (offset point by angle and distance, 0x003376c0), Process 0x002dacf8, end 0x002daa20 (posts gang event 8 when
the human left). Exit flags are found by 0x004177d8 (nearest flag of an activity, with a line-of-sight test). The
removal at an exit flag (activity 8) is 0x00416b18, World flags; the out-of-sight
kill is 0x002302a8 (the body of HuKill). A pedestrian (brain type 4 or 5) seen at the flag may first wait 1.5 s (3 s
for one kind) before it gives up the flag. A panicking human (brain +0x2e above 0) may switch to sprint when more than
15 m away. HuExitWorld finds the flag itself.
- Evidence: confirmed (code) at
0x002da810; detail: traced - Wrapper
0x00360090(registered byRegisterBindings); calls0x002da810Goal_MoveToExitFlag - Used by 10 of 467 script chunks (26 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 8 of 28 levels, first
level80(mission 2) - Coney: implemented
GoalMoveToFlag¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human to move. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the destination flag (a named point placed in the level, found with FindFlag or a level's flag table). |
| 3 | gait |
number, truncated to an integer | How fast to go: the gait id, 2 walk, 3 jog, 4 run, 5 sprint (Characters). |
| 4 | angle |
number (single precision) | Direction in degrees of an offset from the flag's point (0 with distance 0 means the flag itself). |
| 5 | distance |
number (single precision) | Length of that offset in metres: the human goes to the point distance metres from the flag in direction angle. |
| 6 | radius |
number (single precision) | Arrival radius in metres; the goal is reached within this distance (scripts use 0.3-0.5). |
| 7 | intervalMs |
number, truncated to an unsigned integer | If non-zero, every this many milliseconds on the way the human, when the brain's check at 0x00291ed0 says so, plays a short reaction (inferred: a shout to followers); 0 for none. |
| 8 | faceFlag |
boolean (nil or 0 is false) | true: on arrival the human also turns to the flag's own heading if it is more than 15 degrees off. |
| 9 | option |
boolean (nil or 0 is false) | A flag handed to the move action (inferred: whether the human may break into a faster pace or path round obstacles); scripts leave it nil. |
Returns nothing.
Gives the human a goal to walk or run to a flag (or a point offset from it) and stop within the arrival radius, optionally turning to the flag's heading. When it arrives the flag is notified (message 8, so a usable flag can start its use), and the goal ends.
Notes. Constructor 0x002da3b0, start 0x002da408 (offset point by angle and distance, 0x003376c0), update 0x002da588. The meaning of the last argument is inferred.
- Evidence: confirmed (code) at
0x002da2c0; detail: traced - Wrapper
0x0035ff18(registered byRegisterBindings); calls0x002da2c0Goal_MoveToFlag - Used by 84 of 467 script chunks (304 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
GoalMoveToHuman¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human that moves; a bad handle does nothing. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human to go to (goal +0x20). |
| 3 | gait |
number, truncated to an integer | Gait id: 2 walk ... 5 sprint (scripts use 5) (goal +0x24). |
| 4 | radius |
number (single precision) | Arrival distance in metres (scripts use 1-3) (goal +0x28). |
Returns nothing.
Pushes a MoveToHuman goal (type 6): the human leaves its fight stance and runs move actions toward the target's current
position at gait, dropping and re-issuing them every second so it follows a moving target. The goal ends once within
radius of the target, when the target is no longer valid to it (0x0028d4b0), or when the mover is itself down. A
failed route is retried after 30 updates.
Notes. Distance is full 3D. What 0x0028d4b0 accepts as a valid target (alive, not removed) is not traced in detail.
- Evidence: confirmed (code) at
0x002dc458,0x002dc4f8,0x002dc578; detail: traced - Wrapper
0x003602e0(registered byRegisterBindings); calls0x002dc458Goal_MoveToHuman,0x002dc4f8MoveToHumanGoal_Init,0x002dc578MoveToHumanGoal_Process - Used by 3 of 467 script chunks (11 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
GoalMoveToUseFlag¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of a usable world flag (a phone, a chair, a trash can, a strip pole ...). |
| 3 | gait |
number, truncated to an integer | Gait id: 2 walk, 3 jog, 4 run, 5 sprint. |
| 4 | delay |
number (single precision) | A float stored with the goal (scripts pass 0). |
| 5 | duration |
number (single precision) | A float stored with the goal (scripts pass 0 or 0.5; inferred: how long to use the flag, or a random spread). |
| 6 | radius |
number (single precision) | Arrival radius in metres (scripts use 0.5). |
| 7 | reserve |
boolean (nil or 0 is false) | true when the scripts want the human to keep using the flag (inferred); scripts pass true or nothing. |
Returns nothing.
Sends a human to a usable world flag and has it use the flag (sit, phone, rummage) when it gets there. The flag is reserved for the human when the goal is made.
Notes. Constructor 0x002db768 (reserves the flag through 0x004161b0). Mission-1 scripts use it to seat and position extras. The roles of the two floats and the flag are inferred.
- Evidence: confirmed (code) at
0x002db6b0; detail: traced - Wrapper
0x003601a8(registered byRegisterBindings); calls0x002db6b0Goal_MoveToUseFlag - Used by 28 of 467 script chunks (97 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
GoalObjectThrower¶
GoalObjectThrower(human, maxThrows, pickupRadius, delayS, enemyRange, target1, target2, target3, callback)
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the thrower; a bad handle does nothing. |
| 2 | maxThrows |
number, truncated to an integer | Throws after which the goal ends (goal +0x29, one byte); -1 or 0 for no limit. |
| 3 | pickupRadius |
number, truncated to an integer | Radius in whole metres searched every 5 updates for a throwable to fetch (goal +0x20); scripts use 1-4. |
| 4 | delayS |
number, truncated to an integer | Each throw is queued with a random delay of delayS × 0.5 to delayS seconds (goal +0x28); scripts use 1-5. |
| 5 | enemyRange |
number, truncated to an integer | Read as a whole number of metres (goal +0x24): every 15 updates, an enemy closer than this ends the goal. The scripts' 0.1-1 truncate to 0 or 1. |
| 6 | target1 |
number, truncated to an unsigned integer | Handle of a flag to throw at (resolved with 0x00417a60; an invalid one is skipped). |
| 7 | target2 |
number, truncated to an unsigned integer | Handle of a second target flag, or NilHandle. |
| 8 | target3 |
number, truncated to an unsigned integer | Handle of a third target flag, or NilHandle. |
| 9 | callback |
string | Name of a Lua function registered with the goal (+0x1c), or nil; when it is called is not traced. |
Returns nothing.
Pushes an ObjectThrower goal (type 78) after setting the human's threat and damage responses to 0. The thrower stays in
its fight stance; while it holds a throwable it turns to one of the target flags at random, aims there and queues a
throw, and otherwise every 5 updates it fetches a throwable within pickupRadius. From the second throw on, every third
throw has an even chance of a taunt: it turns toward the camera and plays an action. The goal ends after maxThrows
throws or when an enemy comes within enemyRange.
Notes. Every 45 updates it also looks for 2 s at a human from the brain's list (brain +0x164, 0x0029a000). Targets
are flags only, not humans. The taunt action is 0x002fb0f0(3, 0, 0x10), not traced.
- Evidence: confirmed (code) at
0x002a3e50,0x002a3f50,0x002a4230; detail: traced - Wrapper
0x003620c0(registered byRegisterBindings); calls0x002a3e50Goal_ObjectThrower,0x002a3f50ObjectThrowerGoal_Init,0x002a4230ObjectThrowerGoal_Process - 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
level86(mission 9) - Coney: not implemented
GoalPathBlocker¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | value1 |
number, truncated to an integer | A number (meaning not traced). |
| 3 | value2 |
number, truncated to an integer | A number (meaning not traced). |
| 4 | value3 |
number, truncated to an integer | A number (meaning not traced). |
| 5 | callback |
string | Name of a Lua function, or nil. |
Returns nothing.
Makes a human block a path, optionally at a flag. No script calls either form.
Notes. Both forms build the same goal (0x002a5958), the 5-argument one with no flag.
Overload (registered first; the wrapper above checks its argument types and calls this one when they do not match): The form with a flag (0x00362250). The 5-argument form is used when arguments 1-4 are numbers, 5 a string and there is no 6th; anything else falls back to this one.
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of a flag to block at. |
| 3 | value1 |
number, truncated to an integer | A number (meaning not traced). |
| 4 | value2 |
number, truncated to an integer | A number (meaning not traced). |
| 5 | value3 |
number, truncated to an integer | A number (meaning not traced). |
| 6 | callback |
string | Name of a Lua function, or nil. |
Returns nothing.
Wrapper 0x00362250; calls 0x002a57e8.
- Evidence: inferred; detail: brief
- Wrapper
0x00362360(registered byRegisterBindings); calls0x002a58a8Goal_PathBlocker - Used by no script on the disc
- Coney: not implemented
GoalPeddler¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the vendor; a bad handle does nothing. |
| 2 | range |
number (single precision) | Beckoning range in metres (scripts use 5): a passer-by within it is greeted; the vendor keeps watching the nearest player out to 1.1 times it. |
| 3 | reacts |
boolean (nil or 0 is false) | true makes a civilian-brained vendor who is attacked push a pedestrian reaction goal (type 0x6b) against the attacker; false leaves him standing. |
| 4 | greetAnim |
string | Animation file (.anm) bound to anim id 604 (ANIM_FIDGET_IDLE) on this human and played as the beckon. |
| 5 | idleAnim |
string | Animation file (.anm) bound to anim id 388 (ANIM_NORMAL_IDLE) on this human, his standing idle. |
Returns nothing.
Pushes the Peddler goal (type 80) onto the human's brain: the vendor holds the spot and heading he had when it was given
(walking back beyond 0.3 m, turning back beyond 15 degrees) and sets his threat response to 0 (never fights). Every 20
brain updates he picks a passer-by within range; he beckons him once with the greet animation and beckon_player (a
player, always) or beckon (anyone else, half the time) and looks at him for the clip's length.
Notes. The two animations are bound (human +0x418, +0x440, flag 0x20000000) only when both names are non-empty, and
the vendor beckons only when both clips loaded; the threat response is saved in the goal (+0x2e) and restored when it
ends (0x002ad530); the brain event that pushes the reaction is the civilian type's (0x002ff898).
- Evidence: confirmed (code) at
0x002ad2c0,0x002ad378,0x002ad6c0,0x002ad5a8; detail: traced - Wrapper
0x00363a68(registered byRegisterBindings); calls0x002ad2c0Goal_Peddler,0x002ad378PeddlerGoal_Init,0x002ad6c0PeddlerGoal_Process,0x002ad5a8PeddlerGoal_OnAttacked - Used by 4 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
level95(the hub) - Coney: implemented
GoalPedestrianFlag¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the pedestrian. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of a flag. |
| 3 | gait |
number, truncated to an integer | Gait id (inferred). |
| 4 | value |
number, truncated to an integer | A number (inferred: a wait time). |
Returns nothing.
Ambient pedestrian walking to a flag. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00361808(registered byRegisterBindings); calls0x002a66c0Goal_PedestrianFlag - Used by no script on the disc
- Coney: not implemented
GoalPedestrianPath¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the pedestrian. |
| 2 | path |
userdata (only read when given) | The path object. |
| 3 | start |
number, truncated to an integer | Starting point index (inferred). |
| 4 | gait |
number, truncated to an integer | Gait id (inferred). |
Returns nothing.
Ambient pedestrian walking along a path. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00361730(registered byRegisterBindings); calls0x002a60e0Goal_PedestrianPath - Used by no script on the disc
- Coney: not implemented
GoalPlayAnimation¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | anim |
number, truncated to an unsigned integer | Animation id (an anim id from the character's data). |
| 3 | loop |
boolean (nil or 0 is false) | true to loop it (inferred). |
| 4 | callback |
string | Name of a Lua function called when it ends, or nil. |
Returns nothing.
Plays one of the character's own animations by id as a goal. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x003611d0(registered byRegisterBindings); calls0x002e48e8Goal_PlayAnimation - Used by no script on the disc
- Coney: not implemented
GoalPlayDynAnimation¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | anim |
string | File name of a dynamic animation (.anm), loaded for the level with SetDynamicAnimation. An empty or missing name makes the binding do nothing. |
| 3 | callback |
string | Name of a Lua function to call when the animation goal ends, or nil. |
| 4 | option |
boolean (nil or 0 is false); default true | A flag stored with the goal (default true; inferred: return to normal behaviour afterwards). |
Returns nothing.
Plays a dynamic (level-loaded) animation on a human as a goal and calls the script back when it ends. The name is copied
into the human (+0x468) for the animation system to pick up. Mission 1 uses it for the tutorial's demonstration moves.
Notes. Constructor 0x002d2eb0. The flag's effect is inferred.
- Evidence: confirmed (code) at
0x002d2df8; detail: traced - Wrapper
0x00363530(registered byRegisterBindings); calls0x002d2df8Goal_PlayDynamicAnimation - Used by 22 of 467 script chunks (49 references); boot to menu: no; mission 1: yes; result used: no
- Later in the story: 10 of 28 levels, first
level87(mission 3) - Coney: implemented
GoalPlayDynIdle¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag to idle at (it walks there first). |
| 3 | startAnim |
string | Start animation file name (.anm), or nil. |
| 4 | loopAnim |
string | Looping idle animation file name. |
| 5 | endAnim |
string | End animation file name, or nil. |
| 6 | timeMs |
number, truncated to an integer; default -1 | How long the loop plays in milliseconds; -1 (the default) for ever. |
Returns nothing.
Pushes a PlayDynIdle goal (type 35): the human walks to the flag (gait 2) until within 1 m, turns to the flag's
heading (within 15 degrees), plays the start anim and then the loop, and after timeMs the end anim; nothing is pushed
when loopAnim is nil or empty.
Notes. Constructor 0x002d3a18 (the three names go to dynamic anim slots read back at human +0x488, +0x4b0, +0x4d8),
Process 0x002d3d58: states 0 start (anim 0x29f), 1 loop (until the time, -1 for ever), 2 end (anim 0x2a1 when there is
one), 3 done. With no flag it plays where it stands. TacticIdle's dynIdle option ends it early.
- Evidence: confirmed (code) at
0x002d3940; detail: traced - Wrapper
0x003635d0(registered byRegisterBindings); calls0x002d3940Goal_PlayDynamicIdle - Used by 21 of 467 script chunks (99 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 13 of 28 levels, first
level87(mission 3) - Coney: implemented
GoalPlayGenAnim¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human; a bad handle does nothing. |
| 2 | anim |
number, truncated to an unsigned integer | Which generic animation: 0 the shoulder charge (anim id 0, ANIM_RUNNING_ATTACK_CHARGE), 1 using the camera flash (anim id 665, ANIM_SPECIAL_FLASH); any other value plays nothing. |
| 3 | callback |
string | Name of a Lua function called with the human's handle 33 ms after the goal ends, or nil (or an empty string) for none. |
Returns nothing.
Pushes the PlayGenAnim goal (type 38) onto the human's brain: once the human has no queued actions and its current move is not one of the busy states (move-state flags other than bit 30), it queues one play-animation action for the chosen anim id with 0.1 s blends, and ends once that action has left the queue. Ending, also when cut short, schedules the callback.
Notes. Only two animations are reachable (scripts use 0 and 1); an unknown number ends the goal at once without playing anything; the callback gets only the handle, no completed flag.
- Evidence: confirmed (code) at
0x002d4628,0x002d46b8,0x002d47d0,0x002d4748; detail: traced - Wrapper
0x003636c8(registered byRegisterBindings); calls0x002d4628Goal_PlayGenericAnimation,0x002d46b8PlayGenAnimGoal_Init,0x002d47d0PlayGenAnimGoal_Process,0x002d4748PlayGenAnimGoal_End - 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
level95(the hub) - Coney: implemented
GoalRiot¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the rioter; a bad handle does nothing. |
| 2 | radius |
number (single precision); default 15 | Distance in metres to the nearest player inside which the rioter starts acting out (goal +0x2c). |
| 3 | actChance |
number, truncated to an unsigned integer; default 30 | Percentage chance, at each decision, to smash something or loot (goal +0x32, one byte). |
| 4 | acts |
number, truncated to an unsigned integer; default 1 | How many smash-or-loot acts before the rioter leaves (goal +0x33, counted down). |
| 5 | fightChance |
number, truncated to an unsigned integer; default 20 | Percentage chance, at each decision, to pick a fight with a nearby human (goal +0x34); scripts use 0 and 75. |
| 6 | gangFightChance |
number, truncated to an unsigned integer; default 10 | Percentage chance, rolled once per fight attempt, that a human a player controls may be picked as the opponent too (goal +0x35; otherwise only humans no player controls); scripts use 0 and 25. |
| 7 | shout |
boolean (nil or 0 is false); default true | true: the rioter shouts (speech command 0x59) every 4-4.5 s while roaming and when leaving (goal +0x3a). |
Returns nothing.
Pushes a riot goal (type 84) on the human: it wanders inside its gang's turf, and when a decision comes (the nearest
player within radius, every 60th update, about half the time) it may pick a fight with a human within 15 m (8 s,
speech 0x11), smash a vandalisable object within 20 m or loot an item from a store within 20 m; a decision that does
neither, a started fight, acts acts or the nearest player leaving the gang's turf sends it to the nearest exit flag
(activity 8) to leave. A rioter starts with a 51% chance to smash or loot straight away.
Notes. States at goal +0x36: 0 roam, 1 smash, 2 loot, 3 leave (RiotGoal_Process 0x002d1c38). Fight choice:
RiotGoal_TryPickFight 0x002d1288 (only for a gang-soldier brain, type 2). The gate 0x0028ff58 is whether the nearest
player stands in the rioter's gang's turf. Roaming, targets and the fight's end: AI:
GoalRiot.
- Evidence: confirmed (code) at
0x002d0e98,0x002d0f68; detail: traced - Wrapper
0x00363268(registered byRegisterBindings); calls0x002d0e98Goal_Riot,0x002d0f68RiotGoal_Init - Used by 8 of 467 script chunks (14 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 5 of 28 levels, first
level34(mission 4) - Coney: implemented
GoalRunCarrotRun¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the runner; a bad handle does nothing. |
| 2 | path |
userdata (only read when given) | The path to run (a Path_... value); read only when more than one argument is passed. |
| 3 | mode |
number, truncated to an integer | What happens at the end of the path, exactly as GoalTravelPath's third argument: 0 stop (the goal ends), 1 loop, 2 walk it back. It is stored in the TravelPath sub-goal's +0x14, which GoalTravelPath_NextPoint reads. |
| 4 | reverse |
boolean (nil or 0 is false) | true starts at the last point and runs the path backwards, as in GoalTravelPath (the same sub-goal field +0x18). |
| 5 | gait |
number, truncated to an integer | Base gait id (scripts use 4 run or 5 sprint); its speed is the floor of the runner's speed. |
| 6 | radius |
number (single precision) | Arrival radius at each path point in metres. |
| 7 | chasers |
number, truncated to an integer | Gang id of the chasers (scripts pass the Warriors' gang); the nearest of its up to 16 members is measured. |
| 8 | distance |
number (single precision) | Reference distance in metres (scripts use 4-25): without keepAhead, the runner speeds up as the nearest chaser comes inside it. |
| 9 | keepAhead |
boolean (nil or 0 is false) | true flips the rule: the runner speeds up the farther the nearest chaser is beyond distance (full boost 5 m past it). Scripts leave it unset. |
Returns nothing.
Pushes a run-carrot goal on the human: it runs the path point to point like GoalTravelPath (a TravelPath sub-goal plus a
move-to-point goal per point) and, with mode 0, ends when the path runs out. Each update it finds the nearest member of
the chasing gang and sets its speed to the gait's speed plus up to 6 m/s: by default the boost is 1 - d/distance when
that chaser is closer than distance (so a caught-up carrot sprints away), with keepAhead it is min((d - distance) *
0.2, 1). It also raises a brain byte (+0x0b, 0/2/3 for boosts of 0, up to 0.5, above 0.5) that is restored when the
goal ends: the brain's turn boost, so the runner turns 3 or 4 times as fast while a chaser is close.
Notes. Speed is recomputed only every fourth update (brain +0x34 & 3 clear). Brain +0x0b (Brain_SetTurnBoost
0x0028cdf8) multiplies an AI human's turn limit by (b + 1); see the AI page (Brain bytes). No chaser alive: speed stays
the gait's. Arguments 2-6 go unchanged to GoalTravelPath_Init (0x002e0748) through RunCarrotGoal_Init (0x002e1230), in
the same registers as GoalTravelPath's binding passes them, so the third is the end mode, not a start index (confirmed
(code) at the wrapper 0x00360c10 and 0x002e12b8-0x002e12dc).
- Evidence: confirmed (code) at
0x002e1140,0x002e1230,0x002e13c0,0x002e15e8; detail: traced - Wrapper
0x00360c10(registered byRegisterBindings); calls0x002e1140Goal_RunCarrot,0x002e1230RunCarrotGoal_Init,0x002e13c0RunCarrotGoal_UpdateSpeed,0x002e15e8RunCarrotGoal_Process - 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
level5(mission 7) - Coney: implemented
GoalShopkeeper¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the shopkeeper; a bad handle does nothing. |
| 2 | store |
number, truncated to an unsigned integer | Handle of the store's volume (a VolumeBox the level defines); the shopkeeper stays and wanders inside it and reacts to the player entering it. |
| 3 | kind |
number, truncated to an integer | How the shopkeeper reacts to trouble: 1 phones his gang, 2 fights the intruder (with a switchblade), 3 cowers, 4 cowers and never pleads; 0 picks 2 (70%) or 3 (30%) at start. Scripts use 1 and 3. |
| 4 | broom |
boolean (nil or 0 is false) | true puts a broom (dyn_broom) in his hand to sweep with; ignored (cleared) for kind 1. |
| 5 | range |
number (single precision); default 9 | Distance in metres: he greets the player within half of it (at least 4 m), walks back into the store beyond it and gives up on the player beyond twice it (at least 30 m). |
| 6 | onDisturbed |
string | Name of a Lua function called the first time a crime happens in the store, or nil. |
| 7 | onPhone |
string | Name of a Lua function called when a kind-1 shopkeeper phones for help, instead of the game's own break-and-enter crime report; or nil. |
| 8 | pleads |
boolean (nil or 0 is false); default true | true lets a cowering shopkeeper (kind 3) give in once beaten below 40% health. |
Returns nothing.
Pushes the Shopkeeper goal (type 130) onto the human's brain and makes it a type-6 brain that never starts a fight on
its own: he idles at the counter (phone_idle for kind 1, push_broom otherwise), wanders to flags inside the store
every 3-5 s, greets the player with store_greet when he comes close and chats (store_chat) every 10-20 s. When a
crime happens in the store (the type-6 brain's event handler 0x00304070), he reacts by kind: phones (phone_gang,
then a crime report type 1 or the onPhone callback), attacks the offender (dead_meat), or cowers (cower).
Notes. Animations are fixed by kind, not by the string arguments (6 and 7 are Lua callback names interned by the
script system); a beaten pleading shopkeeper says mug_grunt and offers a kind-5 context action (prompt GSTRING.HUD
8); a later state hands his money (+0x370) to the player with collect_resp, inferred to follow that action; an
offender friendly to him is only faced, not fought.
- Evidence: confirmed (code) at
0x002e5a00,0x002e5ae0,0x002e6668,0x002e5fa0,0x002e65b0; detail: traced - Wrapper
0x00363128(registered byRegisterBindings); calls0x002e5a00Goal_Shopkeeper,0x002e5ae0ShopkeeperGoal_Init,0x002e6668ShopkeeperGoal_Process,0x002e5fa0ShopkeeperGoal_OnDisturbed,0x002e65b0ShopkeeperGoal_Reset - Used by 4 of 467 script chunks (5 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
GoalStandIdle¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | callback |
string | A name (inferred: a callback). |
Returns nothing.
Makes a human stand idle. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00363758(registered byRegisterBindings); calls0x002d48a0Goal_StandIdle - Used by no script on the disc
- Coney: not implemented
GoalStartParlay¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human starting the parley. |
| 2 | other |
number, truncated to an unsigned integer | Handle of the other party. |
| 3 | anim1 |
string | A name (inferred: an animation or a callback). |
| 4 | anim2 |
string | A name (inferred). |
| 5 | anim3 |
string | A name (inferred). |
| 6 | option |
boolean (nil or 0 is false) | A flag. |
Returns boolean (1 for true, nil for false): true (1) if the parley goal was started, false (nil) otherwise (inferred).
Starts a parley (a stand-off talk) between two humans. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x00362868(registered byRegisterBindings); calls0x00299248Goal_StartParlay - Used by no script on the disc
- Coney: not implemented
GoalStationaryThrower¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the thrower; a bad handle does nothing. |
| 2 | delay |
number, truncated to an unsigned integer | Seconds to wait after each throw: the pause is a random 1000×delay to 1000×delay + 1000 ms (one byte, goal +0x34); scripts use 5-13. |
| 3 | objects |
table of 8 numbers (t[1]..t[8]) | Eight object type ids (16-bit each, as ObjGetIndex returns) the thrower may throw, stored at goal +0x24; written back unchanged. |
Returns nothing.
Pushes a stationary-thrower goal (type 140): the human keeps returning to the spot where it stood when the goal was
given (within 0.5 m), picks the nearest enemy within three quarters of its sight range, faces it and plays the throw
animation (0x225), then waits delay to delay + 1 s before the next throw. Used for bartenders and shopkeepers
throwing bottles.
Notes. Process: StationaryThrowerGoal_Process 0x002ef2c0 (state at goal +0x20: 0 return to spot, 1 throw, 2 wait).
Where the object list is read (the thrown object's creation) is not traced. One wait in five is a different idle action
(0x002fb0f0).
- Evidence: confirmed (code) at
0x002eee50,0x002eeee0; detail: traced - Wrapper
0x003637b8(registered byRegisterBindings); calls0x002eee50Goal_StationaryThrower,0x002eeee0StationaryThrowerGoal_Init - Used by 5 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
level34(mission 4) - Coney: implemented
GoalTag¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human who sprays; a bad handle does nothing. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag to spray from; the goal claims it (its user). |
| 3 | tag |
number, truncated to an unsigned integer | Handle of the tag object (the wall graffiti) the spray action works on. |
| 4 | extra |
number, truncated to an unsigned integer | Handle of another tag object sent message 0x19 (with 4) when spraying starts, as ProcessTag does; usually NilHandle. |
Returns nothing.
Pushes a tag goal (type 90): the human runs (gait 4) to the flag, and if it arrives within 1.5 m queues the spray action (vtable 0x00542da0) on the tag; the goal ends when the spraying state is over. It also ends at once if the flag is gone, another human holds the flag, the human is down, or it stopped more than 1.5 m short.
Notes. States at goal +0x24: 0 move, 1 arrive and start, 2 spray (done when record +0x14 is not 0x17 and state
flag 0x2000000 is clear). The message to extra goes once (goal +0x28). Tagging rules: Crimes:
tagging.
- Evidence: confirmed (code) at
0x002cce88,0x002ccfe0,0x002cd258; detail: traced - Wrapper
0x00362960(registered byRegisterBindings); calls0x002cce88Goal_Tag,0x002ccfe0TagGoal_Init,0x002cd258TagGoal_Process - Used by 4 of 467 script chunks (6 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
GoalTagEx¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human who sprays. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag to stand at. |
| 3 | tag |
number, truncated to an unsigned integer | Handle of the tag object. |
| 4 | extra |
number, truncated to an unsigned integer | A handle. |
| 5 | extra2 |
number, truncated to an unsigned integer | A handle or number. |
Returns nothing.
As GoalTag with one more argument. No script calls it.
- Evidence: inferred; detail: brief
- Wrapper
0x00362a28(registered byRegisterBindings); calls0x002ccf30Goal_TagEx - Used by no script on the disc
- Coney: not implemented
GoalThrowObject¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the thrower; it must already hold a throwable object (a molotov, a bottle, a chair). |
| 2 | target |
number, truncated to an unsigned integer | Handle of the flag, object or human to throw at. |
| 3 | range |
number (single precision); default 16 | Throwing range in metres (default 16): farther than this the human first moves toward the target until within it. |
| 4 | gait |
number, truncated to an integer; default 2 | Gait of that approach, as for GoalMoveToFlag (2 walk, the default; 3 jog, 4 run, 5 sprint). |
| 5 | callback |
string | Name of a Lua function called when the goal ends (with the thrower's handle and whether it completed), or nil. |
Returns nothing.
Pushes a ThrowObject goal (type 93): while the target is farther than range the human moves toward it; within range it
turns to face it (if more than 15° off), then sets the target as its aim (brain +0x128) and queues the throw attack
(kind 0x21). The goal ends once the human no longer carries anything, so one call is one throw.
Notes. Process 0x002cf690: ends at once (and calls back) if the human holds nothing or the target handle is gone; waits while the human is busy (0x002286a0); the throw is re-queued every 30 updates until it happens.
- Evidence: confirmed (code) at
0x002cf480,0x002cf690; detail: traced - Wrapper
0x00362b18(registered byRegisterBindings); calls0x002cf480Goal_ThrowObject,0x002cf690 - 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
level87(mission 3) - Coney: implemented
GoalTrackHuman¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human that tracks. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the human tracked (in mission 1, the player). |
| 3 | distance |
number (single precision) | How far, in metres, the human may drift from its place before walking back to it (the tutorial passes 0.5). |
Returns nothing.
Makes a human stay with another human and keep facing it: it takes a slot in the target's follow formation (see
BrSetFollowSlot), walks back to that slot whenever it is more than distance metres away, and otherwise turns to face
the target when it is more than 15 degrees off. Without a slot it stays where it is and only turns. The goal ends when
the target is gone. The mission-1 combat tutorial uses it for a sparring partner.
Notes. Constructor 0x002df250, start 0x002df288 (joins the formation), update 0x002df3c0 (walks at gait 2; also refreshes its actions every 40 updates). Behaviour: AI.
- Evidence: confirmed (code) at
0x002df1a8; detail: traced - Wrapper
0x00360690(registered byRegisterBindings); calls0x002df1a8Goal_TrackHuman - Used by 1 of 467 script chunks (1 reference); boot to menu: no; mission 1: yes; result used: no
- Coney: implemented
GoalTravelPath¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | path |
userdata (only read when given) | The path object returned by AddPath (read only when a second argument is given; nil leaves the goal with no path). |
| 3 | mode |
number, truncated to an integer | What happens at the end of the path: 0 stop (or carry on along a linked path), 1 loop back to the first point, 2 turn round and walk it back (ping-pong). Scripts use 0 and 1. |
| 4 | reverse |
boolean (nil or 0 is false) | true starts at the last point and walks the path backwards; false starts at the first point. |
| 5 | gait |
number, truncated to an integer | Gait id: 2 walk, 3 jog, 4 run, 5 sprint. |
| 6 | radius |
number (single precision) | Arrival radius at each point in metres (scripts use 0.5-1). |
Returns nothing.
Pushes a TravelPath goal (type 56) that walks the human along a path's flags in order: for each point it pushes a
MoveToFlag goal at gait and radius, and when that is reached it takes the next point. With mode 0 the goal ends
after the last point; with 1 or 2 it runs until replaced.
Notes. Constructor 0x002e0748 (vtable 0x00541bf0; current point -1, no wait), Process 0x002e0968, next point
0x002e07d0. Points advance only while the brain has no pending sub-goal (brain +0x2e below 1). Mode 0 follows the
path's next-path link (+0x34), which AddPath leaves empty. The third argument was listed as a start index before; it
is the end mode, as TacticTravelPath's loop sets it. A nil path is not checked (crash).
- Evidence: confirmed (code) at
0x002e05a8; detail: traced - Wrapper
0x00360870(registered byRegisterBindings); calls0x002e05a8Goal_TravelPath - Used by 6 of 467 script chunks (16 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
GoalTravelPath2¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | human |
number, truncated to an unsigned integer | Handle of the human. |
| 2 | path |
userdata (only read when given) | The path object returned by AddPath (read only when a second argument is given). |
| 3 | mode |
number, truncated to an integer | What happens at the end of the path, as in GoalTravelPath: 0 stop (or carry on along a linked path), 1 loop, 2 ping-pong. |
| 4 | reverse |
boolean (nil or 0 is false) | true walks the path backwards (towards point 0); false forwards. |
| 5 | gait |
number, truncated to an integer | Gait id: 2 walk, 3 jog, 4 run, 5 sprint. |
| 6 | radius |
number (single precision) | Arrival radius at each point in metres. |
| 7 | fromPoint |
number, truncated to an integer | Index of the path point the human is taken to be at; the walk begins with the next point in the travel direction. -1 starts at the path's first point (last when reversed), as GoalTravelPath does. |
Returns nothing.
Pushes the same TravelPath goal (type 56) as GoalTravelPath, but resumes part-way along the path: the goal's current
point is set to fromPoint, so the first MoveToFlag sub-goal is for the point after it (before it when reversed),
then it carries on to the end as mode says.
Notes. The index is stored as a 16-bit value and sign-extended; it is not range-checked, but the end-of-path test runs on the stepped index, so one past the end makes mode 0 end at once and mode 1 wrap. The third and seventh arguments were listed as a start index and an end point before; they are the end mode and the point to resume after.
- Evidence: confirmed (code) at
0x002e0670,0x002e0748,0x002e07d0; detail: traced - Wrapper
0x00360988(registered byRegisterBindings); calls0x002e0670Goal_TravelPath2,0x002e0748GoalTravelPath_Init,0x002e07d0GoalTravelPath_NextPoint - 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
level93(mission 10) - Coney: not implemented
SetGlobalPedRules¶
SetGlobalPedRules(rule1A, rule1Range, rule1B, rule2A, rule2Range, rule2B, rule3A, rule3Range, rule3B, rule4A, rule4Range, rule4B)
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | rule1A |
number, truncated to an integer | Rule 1, first value (stored as is). global.lua passes 1. |
| 2 | rule1Range |
number, truncated to an integer | Rule 1 range in metres (stored squared, so it is compared with squared distances). global.lua passes 1. |
| 3 | rule1B |
number, truncated to an integer | Rule 1, third value. global.lua passes 1. |
| 4 | rule2A |
number, truncated to an integer | Rule 2, first value. global.lua passes 1. |
| 5 | rule2Range |
number, truncated to an integer | Rule 2 range in metres (stored squared). global.lua passes 1. |
| 6 | rule2B |
number, truncated to an integer | Rule 2, third value. global.lua passes 2. |
| 7 | rule3A |
number, truncated to an integer | Rule 3, first value. global.lua passes 1. |
| 8 | rule3Range |
number, truncated to an integer | Rule 3 range in metres (stored squared). global.lua passes 1. |
| 9 | rule3B |
number, truncated to an integer | Rule 3, third value. global.lua passes 3. |
| 10 | rule4A |
number, truncated to an integer | Rule 4, first value. global.lua passes 1. |
| 11 | rule4Range |
number, truncated to an integer | Rule 4 range in metres (stored squared). global.lua passes 1. |
| 12 | rule4B |
number, truncated to an integer | Rule 4, third value. global.lua passes 4. |
Returns nothing.
Sets four global pedestrian rules, each a triple (value, range, value) stored as 16-bit numbers at 0x006ea188-0x006ea19e
with the range squared. global.lua calls it once for every level with (1,1,1, 1,1,2, 1,1,3, 1,1,4).
Notes. Storage confirmed (code) at 0x002feeb0; which pedestrian behaviour reads these rules is not traced (inferred: how pedestrians keep their distance or react to each other).
- Evidence: confirmed (code) at
0x002feeb0; detail: traced - Wrapper
0x0035d9e0(registered byRegisterBindings); calls0x002feeb0Peds_SetGlobalRules - Used by 1 of 467 script chunks (1 reference); boot to menu: yes; mission 1: no; result used: no
- Coney: not implemented
SetInterrogateParam¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | valueA |
number, truncated to an unsigned integer | Byte +0x00 of the mugging record (0-255); the game's defaults put 160 here, as does the tutorial. No reader found. |
| 2 | valueB |
number, truncated to an unsigned integer | Byte +0x01 (0-255); default 75. No reader found. |
| 3 | valueC |
number, truncated to an unsigned integer | Byte +0x02: the pad rumble while the stick is on target (default 255). |
| 4 | timeA |
number, truncated to an unsigned integer | +0x04: the time on target that makes the mugging succeed, ms (the tutorial passes 5000). Doubles as the switch: 0 turns the override off and the game uses its per-class values. |
| 5 | timeB |
number, truncated to an unsigned integer | +0x08: every this much time on target the target angle moves, ms (the tutorial passes 2500). |
| 6 | timeC |
number, truncated to an unsigned integer | +0x0c: the total time off target allowed before the mugging fails, ms (the tutorial passes 20000; the game's own values are 50000). |
| 7 | angleA |
number (single precision) | +0x10: the on-target tolerance, degrees, stored in radians (the tutorial passes 40). |
| 8 | angleB |
number (single precision) | +0x14: a new target angle lies more than this plus 20 degrees from the old one, degrees, stored in radians (the tutorial passes 60). |
| 9 | timeD |
number, truncated to an unsigned integer | +0x18, ms (the tutorial passes 20000; the game's defaults range from 4500 to 13000 by the victim's class); not read by the mugging update. |
| 10 | flag |
number, truncated to an unsigned integer | Byte +0x1c: the pad rumble while off target (the tutorial passes 0). |
| 11 | set |
number, truncated to an unsigned integer | Which override set to write: 0-2 the first set (used by the routine at 0x00284ca0), 3-5 the second (0x002853a8, a player victim); 6 or more is ignored. |
Returns nothing.
Overrides the tuning of the mugging's stick game (every mugging, interrogations included): three bytes, four times in
milliseconds, two angles in degrees and a byte, stored in one of two global override sets (0x00510a18, 0x00510a38).
While a set's timeA is non-zero every mugging uses it instead of the per-class values; calling again with all zeros
restores them, which is what the mission-1 tutorial (level99_lesson1) does after its mugging lesson (Combat:
mugging). It does not make anyone interrogable: that is HuSetInterrogation's
field +0x5a0 (Crimes: interrogation).
Notes. Storage and the default/override switch are confirmed (code) at 0x002854b0, 0x00284ca0 and 0x002853a8; the fields' uses at 0x002856b8 (Player_UpdateMugging). Bytes +0x00 and +0x01 have no reader found.
- Evidence: confirmed (code) at
0x002854b0; detail: traced - Wrapper
0x0035d808(registered byRegisterBindings); calls0x002854b0Brain_SetInterrogateOverride - Used by 1 of 467 script chunks (2 references); boot to menu: no; mission 1: yes; result used: no
- Coney: implemented
TacticAddress¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | value |
number, truncated to an integer | A number. |
| 3 | name1 |
string | A name. |
| 4 | approach |
number, truncated to an unsigned integer; default 3 | A distance (default 3). |
| 5 | range |
number, truncated to an unsigned integer; default 6 | A distance (default 6). |
| 6 | option |
boolean (nil or 0 is false); default true | Adds the dealer's radar icon at the greeting (default true). |
| 7 | target |
number, truncated to an unsigned integer | A handle. |
| 8 | callback |
string | Name of the Lua function that receives the tactic's events, or nil. |
| 9 | option2 |
boolean (nil or 0 is false); default true | A flag (default true). |
Returns nothing.
Has a gang address a target as a group. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x003754d8(registered byRegisterBindings); calls0x00316350Tactic_Address - Used by no script on the disc
- Coney: not implemented
TacticAttack¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Sets a gang's tactic to attacking (type 0): every member that is not a player gets threat response 2 and a melee goal,
idle members are sent toward the farthest busy member every 3 s, and the callback gets 9 TacNoEnemies once no member
has an enemy (checked each second) and 13 TacMemberDied when a member dies.
Notes. Constructor 0x003075c8 (vtable 0x00543320): Start 0x00307fe0, Process 0x003081a8, event 0x00308478. A gang
with +0xd9 set also starts one of seven coordinated sub-tactics every 7 s (0x00307a10). Behaviour:
AI, Gang fights.
- Evidence: confirmed (code) at
0x00307548; detail: traced - Wrapper
0x00375370(registered byRegisterBindings); calls0x00307548Tactic_Attack - Used by 54 of 467 script chunks (184 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 27 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticAvoidEnemies¶
TacticAvoidEnemies(gang, callback, useThrowables, minRange, maxRange, minAllyRange, maxAllyRange, gait)
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 3 | useThrowables |
boolean (nil or 0 is false) | true lets members fetch an item within 40 m and throw it at an enemy in range. |
| 4 | minRange |
number (single precision); default 7 | Flee distance in metres, scaled by the enemy's class (default 7). |
| 5 | maxRange |
number (single precision); default 14 | Second distance passed to the goal's flee-point search (default 14; inferred: how far to flee). |
| 6 | minAllyRange |
number (single precision) | Distance passed to the goal (+0x34; not traced). |
| 7 | maxAllyRange |
number (single precision) | Distance passed to the goal (+0x38; not traced). |
| 8 | gait |
number, truncated to an unsigned integer | Gait id to flee at; 0 lets the goal choose (5, or 4 when tired). |
Returns nothing.
Has a gang keep away from its enemies (type 0x20): each member gets an AvoidEnemies goal that sees all round, drops
its threat response to 0, runs from the nearest enemy that comes close or faces it, and with useThrowables picks up
and throws things at him.
Notes. Constructor 0x003085d8 (vtable 0x00543380): Start 0x00308790 (0x00308698), event 0x003087c0 (hit 5, attack
6); Process always 0. The goal (vtable 0x005419b0, Process 0x002e3630) re-picks the nearest enemy every 1.5 s and flees
at gait 5 (4 when the human is tired) unless gait is given. Behaviour: AI.
- Evidence: confirmed (code) at
0x00316988; detail: traced - Wrapper
0x00375d98(registered byRegisterBindings); calls0x00316988Tactic_AvoidEnemies - Used by 25 of 467 script chunks (32 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 18 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticBoss¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | boss |
number, truncated to an unsigned integer | Handle of the boss (inferred). |
| 3 | other |
number, truncated to an unsigned integer | A handle. |
| 4 | callback |
string | Name of the Lua function that receives the tactic's events, or nil. |
Returns nothing.
A generic boss tactic. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x00376350(registered byRegisterBindings); calls0x00308870Tactic_Boss - Used by no script on the disc
- Coney: not implemented
TacticBossScenarioA¶
TacticBossScenarioA(gang, stage, flags, vargasObjects, minionObjects, diegoFatigue, vargasFatigue, diegoDamage, vargasDamage, diegoProne, vargasProne, diegoCycles, vargasCycles, callback)
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (the Hurricanes); -1 or a gang with no members does nothing. |
| 2 | stage |
number, truncated to an unsigned integer | Fight stage 1-3 (tactic +0x68): 1 Diego alone, 2 Vargas throws from flags[1], 3 Vargas fights too. |
| 3 | flags |
table of 2 numbers (t[1]..t[2]) | Two flag handles (tactic +0x20): Vargas's throwing spot in stage 2 and his spot in stage 3; a flag that stops resolving is cleared to the null handle. |
| 4 | vargasObjects |
table of 8 numbers (t[1]..t[8]) | Eight object type ids (kept as 16 bits, +0x30) Vargas picks up and throws. |
| 5 | minionObjects |
table of 8 numbers (t[1]..t[8]) | Eight object type ids (+0x40) the other gang members throw from a stationary-thrower goal. |
| 6 | diegoFatigue |
table of 3 numbers (t[1]..t[3]) | Diego's tired time in seconds, per stage (+0x50). |
| 7 | vargasFatigue |
table of 3 numbers (t[1]..t[3]) | Vargas's tired time in seconds, per stage (+0x53). |
| 8 | diegoDamage |
table of 3 numbers (t[1]..t[3]) | Percent of Diego's maximum health the players may take while he is tired, per stage (+0x56). |
| 9 | vargasDamage |
table of 3 numbers (t[1]..t[3]) | Percent of Vargas's maximum health the players may take while he is tired, per stage (+0x59). |
| 10 | diegoProne |
table of 3 numbers (t[1]..t[3]) | Three bytes (+0x5c) stored in Diego's goal and never read. |
| 11 | vargasProne |
table of 3 numbers (t[1]..t[3]) | Three bytes (+0x5f) stored in Vargas's stage-3 goal and never read. |
| 12 | diegoCycles |
table of 3 numbers (t[1]..t[3]) | Three bytes (+0x62); Diego's goal stores the stage's one and never reads it. |
| 13 | vargasCycles |
table of 3 numbers (t[1]..t[3]) | Throws before Vargas tires in stage 2 (+0x65; the stage-3 goal stores but ignores its own). |
| 14 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Sets the Hurricanes' tactic for the Diego and Vargas fight (level 5). Each member gets a goal by character: Diego
(character 120) a BigBrawler goal (type 132) built from his tables and the stage; Vargas (119) in stage 2 a
BigThrower-style goal at flags[1] with vargasObjects, in stage 3 a BigBrawler goal at flags[2]; everyone else a
stationary-thrower goal with minionObjects. Diego's health is capped per stage (at 66 % in stage 1, 33 % in stage 2):
on reaching it he plays a break animation and the callback gets 18 TacAnimStart, or 1 TacFinished when his goal
reports the break done; in stage 3 it reports 1 once neither boss is still standing.
Notes. The wrapper writes every table back unchanged. Fatigue is the seconds a tired boss stays stunned, damage the
percent of his maximum health that ends it early, cycles Vargas's throws before he tires (stage 2); prone, and the
BigBrawler's cycles, are stored but never read (AI page, The Diego and Vargas fight). Members are re-assigned goals on
events 19 and 22 (OnEvent 0x0030a798); Vargas's stage-3 break count is tactic +0x69. Vtable 0x00543440.
- Evidence: confirmed (code) at
0x00309a40,0x00309b60,0x0030a6c0,0x0030a738,0x0030a798,0x00309ea0; detail: traced - Wrapper
0x003767f8(registered byRegisterBindings); calls0x00309a40Tactic_BossDiegoVargas,0x00309b60BossDiegoVargasTactic_Init,0x0030a6c0BossDiegoVargasTactic_Start,0x0030a738BossDiegoVargasTactic_Process,0x0030a798BossDiegoVargasTactic_OnEvent,0x00309ea0BossDiegoVargasTactic_AssignGoal - Used by 1 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
level5(mission 7) - Coney: implemented
TacticBossScenarioB¶
TacticBossScenarioB(gang, maxBullets, criticalRange, hSpread, vSpread, fireRate, shotDamage, reloadTime, trackTime, warnTime, callback, mark)
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (the Lizzies'); -1 or a gang not in use does nothing. |
| 2 | maxBullets |
number, truncated to an unsigned integer; default 6 | Bullets per clip for each gunner (byte; default 6). |
| 3 | criticalRange |
number (single precision); default 5 | Range in metres within which a gunner fires at once instead of first tracking the target (default 5). |
| 4 | hSpread |
number (single precision); default 20 | Horizontal shot spread in degrees (default 20; the goal halves it into radians). |
| 5 | vSpread |
number (single precision); default 10 | Vertical shot spread in degrees (default 10). |
| 6 | fireRate |
number, truncated to an unsigned integer; default 250 | Shot timing for the fire state (16-bit, default 250; inferred: ms between shots). |
| 7 | shotDamage |
number, truncated to an integer; default 100 | Damage per shot (16-bit, default 100). |
| 8 | reloadTime |
number, truncated to an unsigned integer; default 5 | Seconds a gunner spends reloading (byte, default 5). |
| 9 | trackTime |
number, truncated to an unsigned integer; default 4 | Seconds a gunner tracks a target beyond the critical range before firing (byte, default 4). |
| 10 | warnTime |
number, truncated to an unsigned integer; default 3 | Seconds of the pause state after firing, with its animation and line (byte, default 3). |
| 11 | callback |
string | Name of the Lua function that receives the tactic's events, or nil. |
| 12 | mark |
number, truncated to an unsigned integer; default -1 | A handle stored at tactic +0x20; -1 (the default) for none. No reader was found. |
Returns nothing.
Sets the Lizzies' gunfight tactic on the gang (vtable 0x005434a0). On start every live, uncuffed member of character
type 0xed gets a gunner goal (vtable 0x00542760) with these values: reload, find the nearest target, fire at once
within the critical range or else track it for trackTime seconds first, fire, pause warnTime seconds, and reload
when the clip is empty. While play is normal (no scene, not the death camera) each player carries a target marker object
(dyn_lizziestarget) that the tracking gunner turns red for the tracking time.
Notes. The fire state (0x002f0a50) was not followed, so fireRate's unit is inferred. Members who respawn (events 0x13, 0x16) get the goal again; events 1 and 0x14 end the tactic's event handling (0x0030ae10).
- Evidence: confirmed (code) at
0x0030a878,0x0030a9a0,0x0030ab58,0x002ef7a8,0x002f0ec0; detail: traced - Wrapper
0x00376e78(registered byRegisterBindings); calls0x0030a878Tactic_BossLizzies,0x0030a9a0,0x0030ab58,0x002ef7a8,0x002f0ec0 - 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
level55(mission 17) - Coney: not implemented
TacticBossScenarioC¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (Moe's); -1 or a gang with no members does nothing. |
| 2 | stage |
number, truncated to an unsigned integer | Fight stage 1-3 (tactic byte +0x20), handed to Moe's BigFighter goal; the tactic itself moves to the next stage when a break ends. |
| 3 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; codes are those of TacticGetString. |
Returns nothing.
Sets the gang's tactic for Moe's boss fight (level 11). Moe (character 128) gets a BigFighter goal (type 0x85) set to
the stage, and his human +0x3b0 becomes 0x8c; every other standing member gets goal 0x002f5b88. In stage 1 his health
cannot drop below 75 %, in stage 2 below 50 %: on reaching it he is set to exactly that, plays a break (the callback
gets 18 TacAnimStart), and when the break is over the stage goes up by one and the callback gets 1 TacFinished. In
stage 3 it reports 8 TacArrived when his goal signals (0x002ea9f0), and 1 once Moe is down.
Notes. The meanings of the BigFighter goal states (0x002ea6f0, 0x002ea840, 0x002ea8f8, 0x002ea9f0), goal 0x002f5b88
and human +0x3b0 are not traced. Members are re-assigned goals on events 0x13 and 0x16. Vtable 0x00543500.
- Evidence: confirmed (code) at
0x0030ae98,0x0030af30,0x0030b590,0x0030b050,0x0030b5d0,0x0030b168,0x0030b638; detail: traced - Wrapper
0x003770a0(registered byRegisterBindings); calls0x0030ae98Tactic_BossMoe,0x0030af30BossMoeTactic_Init,0x0030b590BossMoeTactic_Start,0x0030b050BossMoeTactic_AssignGoal,0x0030b5d0BossMoeTactic_Process,0x0030b168BossMoeTactic_CheckStage,0x0030b638BossMoeTactic_OnEvent - 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
level11(flashback 5) - Coney: not implemented
TacticBossScenarioD¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index of the two bosses; -1 or a gang with no members does nothing. |
| 2 | stage |
number, truncated to an unsigned integer; default 1 | Stored as a byte (tactic +0x24) but not read by the tactic's own functions. |
| 3 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; codes are those of TacticGetString. |
Returns nothing.
Sets the gang's tactic for the two-boss rooftop fight (level 82), built around characters 160 and 161. On start each
standing boss gets a paired boss goal while the other boss stands, or a solo fighting goal once alone; other members get
no goal from it. Every 7.5 s the first boss speaks a taunt (speech 0x90) and the second answers when it ends. When one
boss goes down (event 2) the other drops its actions, takes its solo goal and first runs to it (a 4 s goal with
animation 0x48/0x49). The callback gets 1 TacFinished once neither boss is standing.
Notes. Paired goals 0x002f60e8 (160) and 0x002f6878 (161), solo goals 0x002e3180 and 0x002f6e28, not traced. Event 0x10 on a boss in goal type 0x92 or 0x88 makes it target its attacker. Members are re-assigned goals on events 0x13 and 0x16. Vtable 0x00543560; which gang/characters 160 and 161 are is inferred from the level.
- Evidence: confirmed (code) at
0x0030b6f8,0x0030b790,0x0030c000,0x0030b948,0x0030c060,0x0030bc68,0x0030c0d0,0x0030be90; detail: traced - Wrapper
0x00377130(registered byRegisterBindings); calls0x0030b6f8Tactic_BossRoof,0x0030b790BossRoofTactic_Init,0x0030c000BossRoofTactic_Start,0x0030b948BossRoofTactic_AssignGoal,0x0030c060BossRoofTactic_Process,0x0030bc68BossRoofTactic_UpdateBanter,0x0030c0d0BossRoofTactic_OnEvent,0x0030be90BossRoofTactic_OnPartnerDown - 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
TacticBossScenarioE¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (Luther's Rogues); -1 or a gang with no members does nothing. |
| 2 | stage |
number, truncated to an unsigned integer; default 1 | Fight stage (tactic byte +0x31): in stage 1 Luther's health cannot drop below 50 % and reaching it ends the stage; any other stage fights to the end. |
| 3 | shots |
number, truncated to an unsigned integer; default 6 | Rounds per clip for Luther's gun (byte, goal +0x46); when they run out he reloads. |
| 4 | spreadYaw |
number (single precision); default 20 | Horizontal aim spread in degrees: each shot turns randomly up to half this either side of the aim line. |
| 5 | spreadPitch |
number (single precision); default 10 | Vertical aim spread in degrees, as spreadYaw. |
| 6 | shotDelayMs |
number, truncated to an unsigned integer; default 100 | Shortest pause between shots in ms; each pause is random in [shotDelayMs, shotDelayMs + 1000]. |
| 7 | damage |
number, truncated to an integer; default 500 | Hit points a bullet takes from a human it hits (a tenth, rounded, against a raging human: human flag +0xe0 0x80000). |
| 8 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; codes are those of TacticGetString. |
Returns nothing.
Sets the gang's tactic for Luther's gunfight (level 84). On start every standing member gets a goal: Luther (character
79) a shooter goal (type 142) that aims at the nearest visible player within reach, fires shots rounds on a 30 m line
with the given spread and pause, then reloads; everyone else a melee goal. Each update the tactic reports 1
TacFinished to the callback when Luther is gone or down, or, in stage 1, when his health falls below 50 % (it is then
set to exactly 50 %).
Notes. Signature fixed: args 4-7 are spreads, the shot pause and the damage, not counts/times. Event 0x10 on
Luther's goal with an object of class 11 starts a slow-motion beat (0x0030c8c8): the characters' step 0x005102cc goes to
1/60 s for 1 s, then 1/120 s for 4 s, then back to 1/30. Members are re-assigned goals on events 0x13 and 0x16. Vtable
0x005435c0; tactic fields +0x20 yaw, +0x24 pitch, +0x2c delay, +0x2e damage, +0x30 shots.
- Evidence: confirmed (code) at
0x0030c2a8,0x0030c398,0x0030c970,0x0030c510,0x0030c9c0,0x0030ca30,0x0030c8f8,0x002f13a8,0x002f19d8; detail: traced - Wrapper
0x003771c0(registered byRegisterBindings); calls0x0030c2a8Tactic_BossLuther,0x0030c398BossLutherTactic_Init,0x0030c970BossLutherTactic_Start,0x0030c510BossLutherTactic_AssignGoal,0x0030c9c0BossLutherTactic_Process,0x0030ca30BossLutherTactic_OnEvent,0x0030c8f8BossLutherTactic_UpdateSlowMotion,0x002f13a8ShooterGoal_Init,0x002f19d8ShooterGoal_Fire - 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
level84(mission 18) - Coney: not implemented
TacticBossScenarioF¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (Birdie's); -1 or a gang not in use does nothing. |
| 2 | stage |
number, truncated to an unsigned integer | Fight stage, kept as a byte (tactic +0x3d): 1 ends the tactic when Birdie is down to half health, 2 is the final stage that ends at a quarter. Was listed as the boss's handle. |
| 3 | positions |
table of 3 numbers (t[1]..t[3]) | Three flag handles (tactic +0x20) handed to Birdie's boss goal: the spots he shoots from (inferred); written back. |
| 4 | shots |
number, truncated to an unsigned integer; default 6 | Bullets per clip for Birdie's gun (byte; default 6). |
| 5 | hSpread |
number (single precision); default 20 | Horizontal spread of his shots in degrees (default 20; the goal halves it into radians). |
| 6 | vSpread |
number (single precision); default 10 | Vertical spread in degrees (default 10). |
| 7 | timeMs1 |
number, truncated to an unsigned integer; default 100 | A time in ms for the boss goal (default 100; inferred: between shots). |
| 8 | timeMs2 |
number, truncated to an integer; default 500 | A time in ms for the boss goal (default 500; inferred: aiming or reload). |
| 9 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; codes as TacticGetString. |
Returns nothing.
Sets Birdie's boss tactic on the gang (vtable 0x00543620). On start, Birdie (character type 0x62) gets the boss shooting
goal (type 0x8f, 0x002f3a20) with the positions, clip, spreads and times; every other member melees. When Birdie is hit
he says agony (speech command 34) and the callback gets code 5 (every second hit by a player). In stage 1 his health
is held at 50 % and the tactic ends (code 1) once he reaches it; in stage 2 at 25 % his goal switches to its last state
and code 0x12 is sent, then code 1 when a player finishes him. Every 8 s while he lives, a non-player member of player
1's gang shouts cheer2 (speech command 17; line 1, 4 or 7 at random, 0x001110a8).
Notes. What the boss goal does with the positions and the two times is not traced (0x002f3a20 stores them; vtable 0x00542610). The tactic also ends when Birdie is dead or gone. Members who respawn (events 0x13, 0x16) get their goal again.
- Evidence: confirmed (code) at
0x0030cbd8,0x0030ccd8,0x0030d1c8,0x0030d208,0x0030d3b8,0x0030ceb8,0x002f3a20; detail: traced - Wrapper
0x00377338(registered byRegisterBindings); calls0x0030cbd8Tactic_BossBirdie,0x0030ccd8,0x0030d1c8,0x0030d208,0x0030d3b8,0x0030ceb8,0x002f3a20 - 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
level31(mission 11) - Coney: not implemented
TacticBossScenarioG¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (the Destroyers); -1 or a gang with no members does nothing. |
| 2 | stage |
number, truncated to an unsigned integer | Fight stage, kept as a byte (tactic +0x24): 1 Virgil throws from his spot, 2 a HideAndSeek goal, any other value (scripts use 3) he fights up close. |
| 3 | flag |
number, truncated to an unsigned integer | Handle of a flag Virgil throws at when the tactic starts; a handle that is not a flag skips the opening throw. |
| 4 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Sets the Destroyers' tactic for Virgil's boss fight (character 178, level 93). Virgil is given voice set 138 (human
+0x3b0) and, by stage, a BigLedgeThrower goal (type 138) throwing dyn_molotv and dyn_beerbottle objects, a HideAndSeek
goal (type 156) or a BigFighter goal (type 133); if flag is a flag he is first handed a molotov (when empty-handed)
and throws it at the flag. Every other member gets a melee goal. His health is held at 83 % in stage 1 and 73 % in stage
2: on reaching it the callback gets 1 TacFinished (the cue for the next stage); it also gets 1 once he is down or
dead.
Notes. Vtable 0x00543680. The opening throw is Goal_ThrowObject with 20.0 and mode 2, pushed over the stage goal.
Events 1 and 16 are forwarded to the HideAndSeek or BigFighter goal; 19 re-assigns a member's goal, 22 does so for some
senders, 18 ends the tactic. "Down" is human state flags 0x180050000 (0x00227e60). The BigLedgeThrower count (6) is not
traced here, as in TacticBossScenarioH.
- Evidence: confirmed (code) at
0x0030d6f8,0x0030d7a0,0x0030d820,0x0030d960,0x0030dd28,0x0030daf8,0x0030dc28,0x0030dd90; detail: traced - Wrapper
0x00377590(registered byRegisterBindings); calls0x0030d6f8Tactic_BossVirgil,0x0030d7a0BossVirgilTactic_Init,0x0030d820BossVirgilTactic_Start,0x0030d960BossVirgilTactic_AssignGoal,0x0030dd28BossVirgilTactic_Process,0x0030daf8BossVirgilTactic_CheckHealth,0x0030dc28BossVirgilTactic_IsVirgilAlive,0x0030dd90BossVirgilTactic_OnEvent - 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
TacticBossScenarioH¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (the Hi-Hats); -1 or a gang with no members does nothing. |
| 2 | stage |
number, truncated to an unsigned integer; default 1 | Fight stage, kept as a byte (tactic +0x20): 1 the boss throws from where he stands, 2 he fights up close. Default 1. |
| 3 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Sets the Hi-Hats' tactic for their boss fight (level 81). The boss (character 135) is given voice set 137 (human
+0x3b0) and, in stage 1, a BigLedgeThrower goal (type 138) throwing dyn_molotv and dyn_cny_skullhead objects from his
spot, in stage 2 a BigFighterA goal (type 134); every other member gets a melee goal. In stage 1 the boss's health is
held at 75 %: on reaching it the callback gets 1 TacFinished (the cue to move to stage 2); in stage 2 it gets 1 once
the boss is down or dead.
Notes. Vtable 0x005436e0 (Start 0x0030e508, event 0x0030e5b0: members are re-assigned goals on events 19 and 22). The names of the two throwables are passed as type names (0x0056d380, 0x0056d390); the BigLedgeThrower count argument (6) is not traced here. The scenario's "Chatterbox" name is ours.
- Evidence: confirmed (code) at
0x0030e028,0x0030e0c0,0x0030e548,0x0030e1d8; detail: traced - Wrapper
0x00377648(registered byRegisterBindings); calls0x0030e028Tactic_BossChatterbox,0x0030e0c0BossChatterboxTactic_Init,0x0030e548BossChatterboxTactic_Process,0x0030e1d8BossChatterboxTactic_AssignGoal - 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
level81(mission 8) - Coney: not implemented
TacticClear¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (from GangCreate or a level's gang global). |
Returns nothing.
Ends the gang's current tactic, if it has one, and frees it, leaving the gang's members to their own goals. global.lua
calls it before giving a gang a new plan.
Notes. 0x001655e0 shuts the tactic down, returns it to the pool and clears gang +0x40; a status byte from the
tactic is kept at gang +0xdd.
- Evidence: confirmed (code) at
0x00315d70; detail: traced - Wrapper
0x00374a80(registered byRegisterBindings); calls0x00315d70Gang_ClearTactic - Used by 92 of 467 script chunks (208 references); boot to menu: yes; mission 1: yes; result used: no
- Later in the story: 28 of 28 levels, first
level80(mission 2) - Coney: implemented
TacticConfront¶
TacticConfront(gang, targetGang, approachRange, criticalRange, confrontation, slotSet, callback, anim1, anim2, anim3, anim4, anim5, spotLine)
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | targetGang |
number, truncated to an integer; default -1 | Gang index to confront; -1 (the default) takes the first member's current target gang, and with none the tactic does nothing. |
| 3 | approachRange |
number (single precision); default 10 | Distance in metres, added to both gangs' radii, inside which code 7 fires (default 10). |
| 4 | criticalRange |
number (single precision); default 2 | Distance in metres, added to both gangs' radii, inside which code 1 fires (default 2); also the members' Confront goal distance unless confrontation is non-zero. |
| 5 | confrontation |
number, truncated to an unsigned integer | Confrontation style: non-zero gives the members' goals approachRange instead of criticalRange; 2 also lets non-leader classes posture. |
| 6 | slotSet |
number, truncated to an integer; default -1 | Formation slot set for the members; -1 (the default) uses set 3 with one slot per member (up to 9). |
| 7 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 8 | anim1 |
string | Posture animation name substituted for anim 0x253, or nil (with anims 1-4 all nil, four defaults are used). |
| 9 | anim2 |
string | Confrontation animation name, or nil. |
| 10 | anim3 |
string | Confrontation animation name, or nil. |
| 11 | anim4 |
string | Confrontation animation name, or nil. |
| 12 | anim5 |
string | A last posture animation, kept apart from the random choice (inferred), or nil. |
| 13 | spotLine |
number, truncated to an unsigned integer; default 135 | Speech command the gang's spotter says on Start (default 135 shadow, which makes it say 136 shadow_spot; any other value says 22 spot) and members say when they face the other leader. |
Returns nothing.
Has a gang square up to another (type 0x23): the members form up behind their leader and approach with Confront goals,
posture with the given anims when facing the other leader, and the callback gets 7 TacInRange while the gangs are
within approachRange, 1 inside criticalRange, 2 when they part again and 9 when the other gang is gone.
Notes. Constructor 0x0030e670 (vtable 0x00543740): Start 0x0030ec20, Process 0x0030eec0 (every 250 ms; posture every 500 ms), event 0x0030f408. With no route between the leaders it returns 1 when the other leader is in view, else 9. Behaviour: AI.
- Evidence: confirmed (code) at
0x00316dd8; detail: traced - Wrapper
0x00376408(registered byRegisterBindings); calls0x00316dd8Tactic_Confront - Used by 26 of 467 script chunks (35 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
TacticCrowd¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index of the crowd. |
| 2 | callback |
string | Name of the Lua function that receives the tactic's events, or nil (all scripts pass nil). |
| 3 | option |
boolean (nil or 0 is false) | A flag stored with the tactic (scripts pass true; inferred: the crowd reacts / cheers). |
Returns nothing.
Turns a gang into a watching crowd, as around Rumble fights and street fights; TacticTrigger then switches its
reactions. The crowd tactic is type 0x1b.
Notes. Constructor 0x0030f4d0 (vtable 0x005437a0, a timer 2 s ahead).
- Evidence: confirmed (code) at
0x00316450; detail: traced - Wrapper
0x00375648(registered byRegisterBindings); calls0x00316450Tactic_Crowd - Used by 31 of 467 script chunks (50 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
TacticDefend¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | human |
number, truncated to an unsigned integer | Handle of the human (or object) to defend; must be a valid human for the tactic to be set. |
| 3 | range |
number (single precision); default 2.25 | Distance in metres the FollowAndDefend goals keep (default 2.25). |
| 4 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Has a gang guard a human (type 2): the members join his formation with FollowAndDefend goals (dogs keep away from
enemies instead), run to him when he is knocked out or arrested, and make enemies of anyone violent near him; the
callback gets 11 TacHumanToDefendDead when he dies and 9 TacNoEnemies when no member has an enemy.
Notes. Constructor 0x003101d8 (vtable 0x00543800): Start 0x00310618, Process 0x00310768 (every 1.5 s), event 0x00310a60. The formation uses set 3 with two slots per member (up to 9). Behaviour: AI.
- Evidence: confirmed (code) at
0x00315d98; detail: traced - Wrapper
0x00374c18(registered byRegisterBindings); calls0x00315d98Tactic_Defend - Used by 23 of 467 script chunks (25 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 18 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticDomination¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index; a gang that does not exist does nothing. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the flag to hold (the king-of-the-hill top). |
| 3 | range |
number (single precision); default 3 | Radius in metres around the flag: members fight only enemies inside it and walk (in fight stance) rather than run when inside it. |
| 4 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil. |
Returns nothing.
Has a gang take and hold the area round a flag (king of the hill, level 92). Every non-player member that is not down
gets a hold-flag goal: it runs to the flag (gait 5, or gait 2 in fight stance within range) until within 1 m, idles
there with a random taunt action every 3-6 s, and fights any enemy it targets inside range of the flag (a 1 s fight
goal); enemies outside the radius are refused as targets. The tactic never reports finishing.
Notes. Goals are handed out on start and again on events 0x13 and 0x16; the update (0x00310d70) returns 0. The goal
marks the human (record +0xe0 bit 2) and raises brain +0x0b while it runs. Vtables 0x00543860 (tactic), 0x0053fc10
(goal).
- Evidence: confirmed (code) at
0x00316b30,0x00310be0,0x00310c68,0x00310d78,0x002b9538,0x002b98f0,0x002b97c0,0x002b9730; detail: traced - Wrapper
0x00376008(registered byRegisterBindings); calls0x00316b30Tactic_Domination,0x00310be0DominationTactic_Init,0x00310c68DominationTactic_AssignGoals,0x00310d78DominationTactic_OnEvent,0x002b9538Goal_HoldFlag,0x002b98f0HoldFlagGoal_Process,0x002b97c0HoldFlagGoal_MoveToFlag,0x002b9730HoldFlagGoal_FilterTarget - Used by 3 of 467 script chunks (10 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
TacticGetString¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | event |
number, truncated to an integer | A tactic event code, 0-18. |
Returns string (nil for none): The event's name: 0 TacRunning, 1 TacFinished, 2 TacTimeOut, 3 TacSeeEnemy, 4
TacSeePlayer, 5 TacDamage, 6 TacAttacked, 7 TacInRange, 8 TacArrived, 9 TacNoEnemies, 10 TacError, 11
TacHumanToDefendDead, 12 TacBehindLine, 13 TacMemberDied, 14 TacObjectsThrown, 15 TacAnimDone, 16
TacObjectDestroyed, 17 TacSpeed, 18 TacAnimStart; unknown for any other number.
Turns a tactic event code (what a tactic's Lua callback receives) into its name, for debugging. No script calls it.
- Evidence: confirmed (code) at
0x00315c58; detail: traced - Wrapper
0x00374a30(registered byRegisterBindings); calls0x00315c58Tactic_EventName - Used by no script on the disc
- Coney: not implemented
TacticHanginOut¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the hang-out flag. |
| 3 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 4 | range |
number (single precision); default 6 | Radius in metres round the flag the members keep to (default 6). |
| 5 | banter |
boolean (nil or 0 is false); default true | true (the default) lets pairs of members talk (statement and response lines). |
| 6 | respond |
boolean (nil or 0 is false) | true sends free members to help when someone is violent to the gang nearby (up to the gang's respond percentage). |
| 7 | fullAware |
boolean (nil or 0 is false) | false (the default) narrows the members' view by 20 degrees and their sight range by a quarter while they hang out. |
| 8 | harass |
boolean (nil or 0 is false); default true | true (the default) lets the HangOut goals harass passers-by. |
Returns nothing.
Has a gang hang out round a flag (type 0x18): each member gets a HangOut goal within range of the flag, pairs of
members banter every 3 s, and the callback gets the shared hit, sighting and attack codes (5, 4, 3, 6).
Notes. Constructor 0x00311ad8 (vtable 0x00543920): Start 0x00312348, Process 0x00312518, event 0x00312580. Start also substitutes anim 0x25b with eight hang-out idles (0x00511480). Behaviour: AI.
- Evidence: confirmed (code) at
0x00315fc8; detail: traced - Wrapper
0x00374f00(registered byRegisterBindings); calls0x00315fc8Tactic_HanginOut - Used by 28 of 467 script chunks (72 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
TacticHoldTheLine¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | flag1 |
number, truncated to an unsigned integer | Handle of the flag at one end of the line (its height is the line's). |
| 3 | flag2 |
number, truncated to an unsigned integer | Handle of the flag at the other end. |
| 4 | flag3 |
number, truncated to an unsigned integer | Handle of the flag on the attackers' side, where the extra members wait. |
| 5 | hits |
number, truncated to an unsigned integer; default 5 | Hits on members (event 16 with +4 = 1) within window that fire code 14 (default 5). |
| 6 | window |
number, truncated to an unsigned integer; default 20 | Seconds over which hits are counted (default 20). |
| 7 | distance |
number (single precision); default 10 | An enemy past the line counts only when farther than this from flag3, in metres (default 10). |
| 8 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Has a gang hold a line (type 4): defenders (HTLDefense) are spaced along flag1-flag2 and the rest wait at flag3
(HTLOffense) to replace a fallen defender; the callback gets 12 TacBehindLine when an enemy gets past the line, 14
after hits hits on members within window seconds, 13 when a defender falls and 9 when no member has an enemy.
Notes. Constructor 0x00313f38 (vtable 0x00543a40): Start 0x00314038, Process 0x00314538 (every 1.75 s), event 0x003147a0. The defenders are min(line length in metres, 60 % of the members). Behaviour: AI.
- Evidence: confirmed (code) at
0x00313e30; detail: traced - Wrapper
0x00374ab8(registered byRegisterBindings); calls0x00313e30Tactic_HoldTheLine - Used by 18 of 467 script chunks (18 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 17 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticIdle¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | banter |
boolean (nil or 0 is false); default true | true (the default) lets members banter. |
| 3 | respond |
boolean (nil or 0 is false) | true sends free members to help when someone is violent to the gang nearby. |
| 4 | clearAnims |
boolean (nil or 0 is false) | Passed to each member's Idle goal (0x002caf78). |
| 5 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 6 | dynIdle |
boolean (nil or 0 is false) | true makes a hit, sighting or attack end the members' PlayDynIdle goals instead of calling back, then code 15. |
Returns nothing.
Has a gang stand idle where it is (type 0x24): each member gets an Idle goal; with dynIdle, a hit, sighting or
attack breaks the members off their idle animations and the callback gets 15 TacAnimDone once they are done, otherwise
it gets the shared codes.
Notes. Constructor 0x003149f0 (vtable 0x00543aa0): Start 0x00314f38, Process 0x003150c8, event 0x00315228. Behaviour: AI.
- Evidence: confirmed (code) at
0x00316ee8; detail: traced - Wrapper
0x00376718(registered byRegisterBindings); calls0x00316ee8Tactic_Idle - Used by 21 of 467 script chunks (22 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 19 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticInfo¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | value |
number, truncated to an integer | A number. |
| 3 | name1 |
string | A name. |
| 4 | name2 |
string | A name. |
| 5 | name3 |
string | A name. |
| 6 | name4 |
string | A name. |
| 7 | name5 |
string | A name. |
| 8 | value2 |
number (single precision); default 4 | A number (default 4). |
| 9 | callback |
string | Name of the Lua function that receives the tactic's events, or nil. |
Returns nothing.
An information-giving gang tactic. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x00375b48(registered byRegisterBindings); calls0x003167b8Tactic_Info - Used by no script on the disc
- Coney: not implemented
TacticManWeaponPile¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | range |
number (single precision) | Distance passed to the ManWeaponPile goals. |
| 3 | maxThrow |
number (single precision) | Second distance passed to the goals. |
| 4 | delay |
number, truncated to an integer | Number passed to the goals (16 bits). |
| 5 | value |
number, truncated to an integer | Number passed to the goals (16 bits). |
| 6 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Has a gang man a pile of throwables (type 6): each member gets a ManWeaponPile goal with the four values; the callback
gets 13 TacMemberDied when a member dies, and the hit and attack codes.
Notes. Constructor 0x00317050 (vtable 0x00543b60): Start 0x00317218 (0x00317108), event 0x00317350. The goal's own behaviour (0x002a3320, goal type 82) is not traced here. Behaviour: AI.
- Evidence: confirmed (code) at
0x00316a68; detail: traced - Wrapper
0x00375ef8(registered byRegisterBindings); calls0x00316a68Tactic_ManWeaponPile - Used by 20 of 467 script chunks (20 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 18 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticMoveToFlag¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the destination flag. |
| 3 | gait |
number, truncated to an integer; default 2 | Gait id (default 2). |
| 4 | slotSet |
number, truncated to an integer; default -1 | Formation slot set; -1 (the default) uses set 3 with one slot per member (up to 9). |
| 5 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 6 | banter |
boolean (nil or 0 is false) | true lets pairs of members talk on the way. |
Returns nothing.
Has a gang walk together to a flag (type 0x19): the leader gets a MoveToFlag goal and the others follow him in
formation 3 m apart; the callback gets 8 TacArrived when the leader arrives, and the shared hit and sighting codes.
Notes. Constructor 0x00317410 (vtable 0x00543bc0): Start 0x00317700 (0x003174e8), Process 0x00317ad0, event 0x00317b38. No time limit. Behaviour: AI.
- Evidence: confirmed (code) at
0x00316298; detail: traced - Wrapper
0x003753d0(registered byRegisterBindings); calls0x00316298Tactic_MoveToFlag - Used by 28 of 467 script chunks (69 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
TacticPathScout¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index; -1 or a gang not in use does nothing. |
| 2 | callCount |
number, truncated to an integer | How many reinforcements a member's call for help asks for (byte, tactic +0x50, handed to Goal_CallGang and on to Responders_QueueGangCall); scripts use 4. Was listed as a gait. |
| 3 | callDelaySec |
number, truncated to an integer | Seconds before those reinforcements are dispatched (byte, +0x51); scripts use 5. |
| 4 | range |
number (single precision) | Radius in metres of the call for help (+0x20); scripts use 15. Below 0, or with option set, twice the member's brain +0x140 is used. |
| 5 | flags |
table of 16 numbers (t[1]..t[16]) | Sixteen flag handles making the route (NilHandle for unused), stored as flag indices (+0x30); written back. |
| 6 | loop |
boolean (nil or 0 is false); default true | true (the default) to walk the route round and round (handed to each member's PathScout goal, +0x3f). |
| 7 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; codes as TacticGetString. |
| 8 | option |
boolean (nil or 0 is false) | Handed to each PathScout goal (+0x44, meaning not traced); it also makes the call radius twice the member's brain +0x140. |
Returns nothing.
The path form of TacticScout (type 0x27, vtable 0x00543da0, AI: tactic
kinds): every non-player member gets a PathScout goal (112) walking the flag
route, with anim 0x29c (scouting) substituted gang-wide. A member who is hit, attacks or spots an enemy fights him and,
when a gang-dispatch spawner exists, calls his gang: the call queues callCount responders due after callDelaySec
seconds at his position (as GangQueueResponders).
Notes. The call is skipped when the target's gang already has a wanted timer (+0x5f0) or the crime rules refuse
(0x0041d088). What option does inside the PathScout goal (vtable 0x00541050) is not traced.
- Evidence: confirmed (code) at
0x0031a340,0x0031a518,0x0031a728,0x002d7878,0x0031a818,0x002d5c28; detail: traced - Wrapper
0x00377810(registered byRegisterBindings); calls0x0031a340Tactic_PathScout,0x0031a518,0x0031a728,0x002d7878,0x0031a818,0x002d5c28Goal_CallGang - Used by 3 of 467 script chunks (6 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 3 of 28 levels, first
level14(mission 12) - Coney: not implemented
TacticPursue¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | targetGang |
number, truncated to an integer; default -1 | Gang index to chase; -1 (the default) picks one (0x00317e90). |
| 3 | range |
number (single precision); default 5 | Distance in metres within which a chaser that sees a target engages it (code 7; default 5). |
| 4 | gait |
number, truncated to an integer; default 2 | Gait id of the chase (default 2). |
| 5 | angle1 |
number (single precision); default 90 | Angle passed to the members' Chase goals (default 90). |
| 6 | angle2 |
number (single precision); default 45 | Second angle passed to the Chase goals (default 45). |
| 7 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 8 | searchMs |
number, truncated to an unsigned integer; default 30000 | How long in milliseconds the gang keeps searching once no chaser sees the target, before code 9 (default 30000). |
Returns nothing.
Has a gang chase another gang (type 0x14): each member gets a Chase goal after the target gang's leader, the callback
gets 7 TacInRange when a member sees a target within range (who becomes his enemy), and 9 TacNoEnemies when the
target gang is gone or the search after losing it runs out.
Notes. Constructor 0x00317c40 (vtable 0x00543c20): Start 0x00317f20, Process 0x003183b8 (every 150 ms), event
0x00318770. Hits by a player's gang do not fire TacDamage. Behaviour: AI.
- Evidence: confirmed (code) at
0x00315ee8; detail: traced - Wrapper
0x00374d90(registered byRegisterBindings); calls0x00315ee8Tactic_Pursue - Used by 22 of 467 script chunks (23 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
TacticRing¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | centre |
number, truncated to an unsigned integer | Handle of the centre human or flag. |
| 3 | radius |
number (single precision); default 15 | Ring radius (default 15). |
| 4 | target |
number, truncated to an unsigned integer | A handle. |
| 5 | value |
number (single precision) | A number. |
| 6 | callback |
string | Name of the Lua function that receives the tactic's events, or nil. |
| 7 | option |
boolean (nil or 0 is false) | A flag. |
Returns nothing.
Has a gang form a ring around a centre. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x003760c0(registered byRegisterBindings); calls0x00316bd0Tactic_Ring - Used by no script on the disc
- Coney: not implemented
TacticRiotCop¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index (of cops). |
| 2 | pos |
table of 3 numbers (t[1]..t[3]) | Table {x, y, z} in metres; written back. |
| 3 | callback |
string | Name of the Lua function that receives the tactic's events, or nil. |
Returns nothing.
Riot police behaviour around a point. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x00375ca0(registered byRegisterBindings); calls0x003168e8Tactic_RiotCop - Used by no script on the disc
- Coney: not implemented
TacticScout¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | callCount |
number, truncated to an integer | How many responders a member's call queues (byte, tactic +0x50, handed to Goal_CallGang and on to Responders_QueueGangCall); level87 passes 10; it must not be 0 for responders to come. |
| 3 | callDelaySec |
number, truncated to an integer | Seconds before those responders are dispatched (byte, +0x51); scripts use 0 and 15. |
| 4 | range |
number (single precision); default 40 | Radius in metres of the call (+0x20): the caller runs to the farthest phone flag within it. Below 0 twice the member's brain +0x140 is used and no phone is sought. |
| 5 | roamRadius |
number (single precision); default 10 | How far from his post each member wanders, in metres (+0x24, the Scout goal's radius); 0 keeps him at the post. |
| 6 | roamArc |
number (single precision); default 30 | Width in degrees of the arc about his post heading that he wanders in (+0x28). |
| 7 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Has a gang scout for enemies (type 0x27), as in the stealth sections: each member gets a Scout (or PathScout) goal;
a member hit, attacked or spotting someone fights him and calls his gang over, and the gang's alert state follows
whether any member is fighting (checked every 200 ms). No code is sent from Process.
Notes. Constructor 0x0031a430 (vtable 0x00543da0): Start 0x0031af98, Process 0x0031b030, event 0x0031b1b0 (0x0031a818). Behaviour: Stealth: scouts, AI.
- Evidence: confirmed (code) at
0x0031a268; detail: traced - Wrapper
0x003776d8(registered byRegisterBindings); calls0x0031a268Tactic_Scout - Used by 7 of 467 script chunks (16 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 5 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticShadow¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | targetGang |
number, truncated to an integer | Gang index to shadow (inferred). |
| 3 | range |
number (single precision); default 5 | A distance (default 5). |
| 4 | value |
number, truncated to an integer; default -1 | A number (default -1). |
| 5 | name1 |
string | A name. |
| 6 | callback |
string | Name of the Lua function that receives the tactic's events, or nil. |
| 7 | option |
boolean (nil or 0 is false) | A flag. |
Returns nothing.
Has a gang shadow (follow unseen) a target. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x00375a20(registered byRegisterBindings); calls0x003166e8Tactic_Shadow - Used by no script on the disc
- Coney: not implemented
TacticStandGround¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index; a gang that does not exist does nothing. |
| 2 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil. |
Returns nothing.
Has a gang hold where it stands: every non-player member gets a stand-ground goal at its current position (brain
+0x208 set to a stand-ground profile 0x005115b8). Each keeps within 0.25 m of its spot (walking back in fight stance),
faces the nearest enemy or its spot's front, attacks only enemies within 2 m, and every 10-20 s plays one of four
posture idles (the gang's anim 0x253, swapped for the set at 0x005115a8). The callback gets 5 TacDamage when a member
is hurt, 4 TacSeePlayer on a sighting and 14 when a member of this gang reports event 0x10.
Notes. The update (0x0031bf40) reports nothing, so the tactic never finishes by itself; goals are re-handed on events 0x13 and 0x16. Ending the tactic clears the profile and restores anim 0x253. A member out of fight stance for 3 s leaves it. Vtables 0x00543e60 (tactic), 0x0053fb50 (goal).
- Evidence: confirmed (code) at
0x00316d58,0x0031bcd0,0x0031be48,0x0031bd38,0x0031be88,0x0031bf48,0x002ba580,0x002ba878,0x002ba7a0; detail: traced - Wrapper
0x003762f0(registered byRegisterBindings); calls0x00316d58Tactic_StandGround,0x0031bcd0StandGroundTactic_Init,0x0031be48StandGroundTactic_Start,0x0031bd38StandGroundTactic_AssignGoals,0x0031be88StandGroundTactic_End,0x0031bf48StandGroundTactic_OnEvent,0x002ba580Goal_StandGround,0x002ba878StandGroundGoal_Process,0x002ba7a0StandGroundGoal_FilterTarget - 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
level11(flashback 5) - Coney: not implemented
TacticSteal¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | zone |
number, truncated to an unsigned integer | Object zone to loot (Object zones). |
| 3 | delayMs |
number, truncated to an unsigned integer; default 1000 | Milliseconds passed to each Steal goal (default 1000). |
| 4 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 5 | leaderRange |
number (single precision); default -1 | Distance in metres passed to the Steal goals; -1 (the default) for none. |
Returns nothing.
Has a gang loot a zone (type 0x1d): each member gets a Steal goal for the zone; the callback gets only the shared hit
and sighting codes.
Notes. Constructor 0x0031c030 (vtable 0x00543ec0): Start 0x0031c1d0 (0x0031c0e0), event 0x0031c258; Process always 0. Behaviour: AI.
- Evidence: confirmed (code) at
0x00316638; detail: traced - Wrapper
0x00375930(registered byRegisterBindings); calls0x00316638Tactic_Steal - Used by 19 of 467 script chunks (19 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 18 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticTaunt¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | range |
number (single precision); default 2 | A distance (default 2). |
| 3 | anim1 |
string | Taunt animation name. |
| 4 | anim2 |
string | Taunt animation name. |
| 5 | anim3 |
string | Taunt animation name. |
| 6 | anim4 |
string | Taunt animation name. |
| 7 | callback |
string | Name of the Lua function that receives the tactic's events, or nil. |
Returns nothing.
Has a gang taunt its enemies with animations. No script calls it.
- Evidence: speculative; detail: brief
- Wrapper
0x00376608(registered byRegisterBindings); calls0x0031c358Tactic_Taunt - Used by no script on the disc
- Coney: not implemented
TacticTravelPath¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | path |
userdata (only read when given) | The path object, or nil. |
| 3 | reverse |
boolean (nil or 0 is false) | true to travel it backwards. |
| 4 | gait |
number, truncated to an integer; default 2 | Gait id (default 2). |
| 5 | delay |
number, truncated to an unsigned integer | Seconds the leader's TravelPath goal is given (stored as milliseconds; inferred: a pause at points). |
| 6 | slotSet |
number, truncated to an integer; default -1 | Formation slot set; -1 (the default) uses set 3 with one slot per member (up to 9). |
| 7 | startPoint |
number, truncated to an integer; default -1 | Path point to start from; -1 (the default) lets the goal choose. |
| 8 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 9 | banter |
boolean (nil or 0 is false); default true | true (the default) lets members banter. |
| 10 | loop |
boolean (nil or 0 is false); default true | true (the default) gives the goal mode 1 (loop), false mode 2. |
Returns nothing.
Has a gang travel a path (type 0x17): the leader gets a TravelPath goal and the others follow 1 m apart in formation;
with no path the leader wanders the flag network (TravelFlagNet) instead. The callback gets only the shared hit and
sighting codes.
Notes. Constructor 0x0031cbc0 (vtable 0x00543f80): Start 0x0031cf80, Process 0x0031d460, event 0x0031d758. A free member near the leader may stop to use a nearby usable flag (inferred). Behaviour: AI.
- Evidence: confirmed (code) at
0x003161a0; detail: traced - Wrapper
0x003751d0(registered byRegisterBindings); calls0x003161a0Tactic_TravelPath - Used by 20 of 467 script chunks (38 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 19 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticTrigger¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index; -1, a gang not in use, or one without a tactic is ignored. |
| 2 | what |
number, truncated to an integer | 0 sets the crowd's periodic switch (tactic +0x2a); 1 makes the crowd react now; other values do nothing. |
| 3 | enabled |
number, truncated to an integer | Non-zero for on, 0 for off. It is read as a number; the game's scripts pass true, which global.lua defines as 1. |
Returns nothing.
Drives a gang running a crowd tactic (TacticCrowd, type 0x1b); does nothing for other tactics. With what 0 the
crowd's periodic switch makes every free member react on each cheer tick (every 2 s); with what 1 every free member
reacts once at once: a gesture clip (anim 0x8f, or 0xb1 when enabled is 0) after 0-750 ms, then one of three cheers
(AI: TacticCrowd).
Notes. The reaction is 0x0030fc48; with what 0 a reaction tick picks anim 0x10 instead of 0x8f half the time.
Members with queued actions are skipped.
- Evidence: confirmed (code) at
0x00316fa0,0x0030fe58,0x0030fc48; detail: traced - Wrapper
0x00377a10(registered byRegisterBindings); calls0x00316fa0Tactic_TriggerCrowd,0x0030fe58,0x0030fc48TacticCrowd_React - Used by 3 of 467 script chunks (15 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 2 of 28 levels, first
level2(mission 5) - Coney: implemented
TacticUseFlag¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | flag |
number, truncated to an unsigned integer | Handle of the usable flag (a hiding place, a world flag). |
| 3 | range |
number (single precision); default 4 | Distance in metres from the flag: members farther walk to it, and a player this close ends the use (default 4). |
| 4 | view |
number (single precision); default 10 | Sight range given to members using the flag (brain +0x130; default 10). |
| 5 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 6 | banter |
boolean (nil or 0 is false) | Stored with the tactic (+0x44); its use is not traced. |
Returns nothing.
Has a gang use a flag (type 0x21), such as a hiding place: members walk to it and use it (MoveToUseFlag), and once the
nearest player comes within range of the flag they leave it and the callback gets 7 TacInRange.
Notes. Constructor 0x0031d878 (vtable 0x00543fe0): Start 0x0031dc28, Process 0x0031e098 (every second), event 0x0031e280. Hits, sightings and attacks alert the members without calling back. Behaviour: AI.
- Evidence: confirmed (code) at
0x00316ca0; detail: traced - Wrapper
0x003761e8(registered byRegisterBindings); calls0x00316ca0Tactic_UseFlag - Used by 21 of 467 script chunks (23 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 18 of 28 levels, first
level80(mission 2) - Coney: implemented
TacticVandalize¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | zone |
number, truncated to an unsigned integer | Object zone to wreck (Object zones). |
| 3 | delayMs |
number, truncated to an unsigned integer; default 3000 | Milliseconds passed to each member's Destroy goal (default 3000; inferred: the pause between attacks). |
| 4 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 5 | leaderRange |
number (single precision); default -1 | Distance in metres passed to the Destroy goals; -1 (the default) for none (inferred: how far a member may stray). |
Returns nothing.
Has a gang wreck a zone (type 0x1c): each member gets a Destroy goal for the zone; the callback gets 16
TacObjectDestroyed the first time each zone object breaks, 1 TacFinished once the zone has nothing left to break
(checked every 3 s), and the shared hit and sighting codes.
Notes. Constructor 0x0031e3b8 (vtable 0x00544040): Start 0x0031e5f8, Process 0x0031ea00, event 0x0031eaf0. The constructor can also take up to four objects instead of a zone; the binding never passes any. Behaviour: AI.
- Evidence: confirmed (code) at
0x003164e0; detail: traced - Wrapper
0x003756c8(registered byRegisterBindings); calls0x003164e0Tactic_Vandalize - Used by 20 of 467 script chunks (31 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 18 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticVandalizeCars¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index; a gang that does not exist does nothing. |
| 2 | cars |
table of 4 numbers (t[1]..t[4]) | Four car handles to wreck (NilHandle for unused slots, which count as done); written back unchanged. |
| 3 | delayMs |
number, truncated to an unsigned integer; default 3000 | Milliseconds passed to each member's Destroy goal, as in TacticVandalize (default 3000; inferred: the pause between attacks). |
| 4 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Has a gang wreck up to four cars: the same Vandalize tactic (type 0x1c) as TacticVandalize, built with the cars in place
of a zone. At the start every non-player member who is not down gets a Destroy goal with the four cars (no leader
range) and brain byte +0x28d = 1. Every 3 s the tactic checks the cars, and once each is wrecked (0x0038dae0) or is
not a car, the callback gets 1 TacFinished.
Notes. Vtable 0x00544040, event 0x0031eaf0 (16 TacObjectDestroyed and the shared hit/sighting codes, as for
TacticVandalize). How the Destroy goal (0x002cd4f8) picks among the cars is not traced.
- Evidence: confirmed (code) at
0x00316590,0x0031e3b8,0x0031e4f0,0x0031ea00; detail: traced - Wrapper
0x003757b8(registered byRegisterBindings); calls0x00316590Tactic_VandalizeCars,0x0031e3b8VandalizeTactic_Init,0x0031e4f0VandalizeTactic_Start,0x0031ea00VandalizeTactic_Process - 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
TacticWalkinTall¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | target |
number, truncated to an unsigned integer | Handle of the flag to walk to. |
| 3 | range |
number (single precision) | Distance in metres to the nearest enemy gang member that fires code 7. |
| 4 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
Returns nothing.
Has a gang swagger to a flag (type 0x15): the leader walks there (MoveToFlag, gait 2) with the others 0.75 m behind in
formation, posture anims play when facing an enemy gang's leader, and the callback gets 7 TacInRange while the nearest
enemy gang is within range (checked each second) and 8 TacArrived.
Notes. Constructor 0x0031ec90 (vtable 0x005440a0): Start 0x0031ef28, Process 0x0031efb8, event 0x0031f268. Start
substitutes anim 0x253 with four swagger anims (0x00511620) and says the shadow_spot line. Behaviour:
AI.
- Evidence: confirmed (code) at
0x00315e48; detail: traced - Wrapper
0x00374cd0(registered byRegisterBindings); calls0x00315e48Tactic_WalkinTall - Used by 18 of 467 script chunks (36 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 17 of 28 levels, first
level87(mission 3) - Coney: implemented
TacticWander¶
| # | Argument | Read as | Meaning |
|---|---|---|---|
| 1 | gang |
number, truncated to an integer | The gang index. |
| 2 | gait |
number, truncated to an integer; default 2 | Gait id of the leader's Wander goal (default 2). |
| 3 | delay |
number, truncated to an unsigned integer | Number passed to the Wander goal. |
| 4 | callback |
string | Name of the Lua function the tactic calls with (gang id, code), or nil; the codes are those of TacticGetString. |
| 5 | buffer |
number (single precision); default 10 | Distance in metres passed to the Wander goal (default 10). |
| 6 | slotSet |
number, truncated to an integer; default -1 | Formation slot set; -1 (the default) uses set 3 with one slot per member (up to 9). |
| 7 | banter |
boolean (nil or 0 is false); default true | true (the default) lets members banter. |
| 8 | worldFlags |
boolean (nil or 0 is false); default true | true (the default) lets members use world flags. |
| 9 | vandal |
boolean (nil or 0 is false) | true to let them vandalise. |
| 10 | steal |
boolean (nil or 0 is false) | true to let them steal. |
Returns nothing.
Has a gang wander as a group (type 0x16): the leader gets a Wander goal and the others follow 4 m apart in formation;
every 3 s pairs banter and, when allowed, members use world flags, vandalise or steal on the way. The callback gets the
shared hit and sighting codes.
Notes. Constructor 0x0031f300 (vtable 0x00544100): Start 0x0031f638 (0x0031f410), Process 0x00320360 (world flags 0x0031fb80, vandalism 0x0031fdc0, theft 0x003200c8), event 0x00320410. Behaviour: AI.
- Evidence: confirmed (code) at
0x003160a8; detail: traced - Wrapper
0x00375038(registered byRegisterBindings); calls0x003160a8Tactic_Wander - Used by 19 of 467 script chunks (20 references); boot to menu: no; mission 1: no; result used: no
- Later in the story: 18 of 28 levels, first
level87(mission 3) - Coney: implemented