AI goal types¶
Every goal class a brain can have on its goal stack, by the type id the class reports, with the script bindings that push it (AI: goals, AI bindings). A goal binding's callback is called 33 ms after the goal ends with the human's handle and whether the goal completed (scripted goals).
What is complete
All 149 goal classes are listed, read from their vtables in the executable: type ids 0-158, with 10, 30, 76, 77, 81, 97, 98, 106, 139 and 151 unused. 67 have a binding that makes them (found by following each binding's code three calls deep); the others are pushed by the game's own AI. What a goal does is written only where the AI page traces it; the class names are the game's.
149 entries. Data: research/references/goal-types.yaml.
Entries¶
| Type | Goal | Vtable | Bindings | Calls | What |
|---|---|---|---|---|---|
| 0 | Idle |
0x005418f0 |
|||
| 1 | MoveToFlag |
0x00542130 |
GoalCallPolice, GoalMoveToFlag, GoalRunCarrotRun |
309 | Walk or run to a world flag (GoalMoveToFlag) |
| 2 | MoveToExitFlag |
0x005420d0 |
GangExitWorld, GoalCallGang, GoalCallPolice, GoalMoveToExitFlag, GoalShopkeeper, HuExitWorld |
163 | Go to a flag and leave the world there |
| 3 | MoveToFlagNetFlag |
0x00542070 |
|||
| 4 | MoveToUseFlag |
0x00542010 |
GoalMoveToUseFlag, GoalShopkeeper |
94 | |
| 5 | MoveToPosition |
0x00541fb0 |
|||
| 6 | MoveToHuman |
0x00541f50 |
GoalMoveToHuman |
11 | Go to a human |
| 7 | RunFromTrain |
0x00542ac0 |
|||
| 8 | Melee |
0x00540450 |
GangCanFlee, GoalDevilRun, GoalMelee, TacticBossScenarioE, TacticBossScenarioF, TacticBossScenarioG, TacticBossScenarioH, TacticPathScout |
63 | Under a fight goal: sends the fighter in (EngageEnemy) and pushes fight goals once in range (AI) |
| 9 | AttackTarget |
0x005403f0 |
|||
| 11 | EngageEnemy |
0x00540330 |
GangEngageEnemy, GoalDevilRun, GoalEngageEnemy, GoalGetItem, GoalGrabTarget |
63 | The run-in to a fight target, ending close by or with a charge (AI) |
| 12 | Chase |
0x0053fcd0 |
|||
| 13 | ChaseSupport |
0x0053fc70 |
|||
| 14 | Shadow |
0x00541a10 |
|||
| 15 | Fight |
0x005402d0 |
GangSetReactToViolence, GoalFight, GoalGetItem, GoalGrabTarget, GoalHoldPosition, GoalShopkeeper, TacticDomination |
60 | The fight goal (AI) |
| 16 | Spectate |
0x00540270 |
|||
| 17 | Cower |
0x005411d0 |
GoalCallGang, GoalCallPolice, GoalCower |
15 | |
| 18 | Grabbing |
0x00540150 |
Reaction: grabbing someone (reaction goals) | ||
| 19 | Mounting |
0x005400f0 |
Reaction: mounting a grounded human | ||
| 20 | Grabbed |
0x00540090 |
Reaction: being grabbed | ||
| 21 | Mounted |
0x00540030 |
Reaction: being mounted | ||
| 22 | Arrested |
0x0053ffd0 |
Reaction: being arrested | ||
| 23 | Grounded |
0x00540210 |
Reaction: knocked to the ground | ||
| 24 | Stunned |
0x005401b0 |
Reaction: stunned | ||
| 25 | OnFire |
0x0053ff70 |
Reaction: on fire | ||
| 26 | Wounded |
0x0053ff10 |
Reaction: wounded | ||
| 27 | Blocking |
0x0053feb0 |
GangSetReactToViolence |
3 | Blocking an attack (AI) |
| 28 | FightBackOff |
0x0053fdf0 |
|||
| 29 | HelpRespond |
0x0053fd90 |
|||
| 31 | GrabTarget |
0x00540390 |
GoalGrabTarget |
3 | Grab the target |
| 32 | AvoidEnemies |
0x005419b0 |
GoalAvoidEnemies, TacticBossScenarioD |
5 | |
| 33 | PlayAnimation |
0x00542370 |
GoalPlayAnimation |
Play a scene animation; pushed by GoalAddressPerson |
|
| 34 | PlayDynAnimation |
0x00541410 |
GoalPlayDynAnimation |
49 | Play an animation set by name (GoalPlayDynAnimation) |
| 35 | PlayDynIdle |
0x005413b0 |
GoalPlayDynIdle |
92 | |
| 36 | PlayParlayAnimation |
0x00542310 |
|||
| 37 | PlaySpecialIdle |
0x00541350 |
TacticBossScenarioD |
1 | |
| 38 | PlayGenAnim |
0x005412f0 |
GoalPlayGenAnim |
4 | |
| 39 | JoinScene |
0x005422b0 |
GoalJoinScene |
||
| 40 | JoinFixedScene |
0x00542250 |
GoalJoinFixedScene |
2 | |
| 41 | JoinCinematic |
0x005421f0 |
GoalJoinCinematic |
22 | Join a cinematic scene |
| 42 | JoinAnimation |
0x00542190 |
GoalJoinAnimation |
2 | |
| 43 | GuardFlag |
0x0053fe50 |
GoalGuardFlag |
14 | |
| 44 | GetItem |
0x00541ef0 |
GoalAvoidEnemies, GoalGetItem, GoalManWeaponPile, GoalObjectThrower |
25 | |
| 45 | DestroyItem |
0x00541e90 |
|||
| 46 | DestroyCar |
0x00541dd0 |
|||
| 47 | VandalizeItem |
0x00541e30 |
GoalFollowFormation |
1 | |
| 48 | TrackHuman |
0x00541d10 |
GoalTrackHuman |
1 | Track a human (formations) |
| 49 | FollowObject |
0x00541cb0 |
GoalFollowObject |
4 | |
| 50 | FollowPlayer |
0x00541d70 |
GoalFollowPlayer, HuSetArrested |
63 | |
| 51 | FollowFormation |
0x00541c50 |
GoalAvoidEnemies, GoalFollowFormation, HuSetWarChief, WCIssueCommand |
53 | |
| 52 | FollowAndAttack |
0x005405d0 |
|||
| 53 | FollowAndDefend |
0x00540570 |
|||
| 54 | HoldPosition |
0x00540510 |
GoalHoldPosition |
1 | Hold a position (tactics) |
| 55 | Scatter |
0x00541290 |
|||
| 56 | TravelPath |
0x00541bf0 |
GoalTravelPath, GoalTravelPath2 |
18 | |
| 57 | HookerLogic |
0x0053fa30 |
GoalHooker |
||
| 58 | Wander |
0x00541a70 |
|||
| 59 | HangOut |
0x00541650 |
|||
| 60 | Confront |
0x00541950 |
|||
| 61 | Harass |
0x00541470 |
|||
| 62 | StandIdle |
0x00541230 |
GoalStandIdle |
||
| 63 | LeftTurf |
0x00542a60 |
|||
| 64 | CopperGuard |
0x00540bd0 |
GoalCopperGuard |
||
| 65 | FindEnemy |
0x00540a50 |
GangCanFlee, GoalMelee, TacticBossScenarioE, TacticBossScenarioF, TacticBossScenarioG, TacticBossScenarioH, TacticPathScout |
30 | Under Melee: restarts the fight while the target is valid (AI) |
| 66 | CopperPatrol |
0x00540b70 |
GoalCopperPatrol |
4 | |
| 67 | GeneralParlay |
0x00541890 |
GoalStartParlay |
||
| 68 | PedLogicPath |
0x0053f970 |
GoalPedestrianPath |
||
| 69 | PedLogicFlag |
0x0053f910 |
GoalPedestrianFlag |
||
| 70 | TravelFlagNet |
0x0053f850 |
|||
| 71 | AreaWalker |
0x0053fa90 |
GoalAreaWalker |
33 | |
| 72 | BossDiego |
0x0053f3d0 |
GoalBossDiego |
||
| 73 | LeadChase |
0x00541b90 |
GoalLeadChase |
1 | |
| 74 | RunCarrotRun |
0x00541b30 |
GoalRunCarrotRun |
10 | |
| 75 | PathBlocker |
0x0053f9d0 |
GoalPathBlocker |
||
| 78 | ObjectThrower |
0x0053f310 |
GoalObjectThrower |
8 | |
| 79 | BumLogic |
0x0053f610 |
GoalBumLogic |
69 | A homeless man's behaviour |
| 80 | Peddler |
0x0053f5b0 |
GoalPeddler |
9 | |
| 82 | ManWeaponPile |
0x0053f370 |
GoalManWeaponPile |
8 | |
| 83 | PedSeesDanger |
0x0053f8b0 |
|||
| 84 | Riot |
0x005414d0 |
GoalRiot |
12 | |
| 85 | CopperRespond |
0x00540b10 |
GoalCopperRespond |
||
| 86 | CopperGuardArrested |
0x00540ab0 |
|||
| 87 | AddressPerson |
0x00541830 |
GoalAddressPerson, GoalCallPolice |
17 | Walk up to a human and talk (GoalAddressPerson) |
| 88 | Hide |
0x005417d0 |
|||
| 89 | ArrestHuman |
0x005409f0 |
GoalArrestHuman |
1 | |
| 90 | Tag |
0x00541770 |
GoalTag, GoalTagEx |
6 | |
| 91 | Destroy |
0x00541710 |
TacticVandalizeCars |
2 | |
| 92 | Steal |
0x005416b0 |
|||
| 93 | ThrowObject |
0x005415f0 |
GoalThrowObject, TacticBossScenarioG |
4 | |
| 94 | Investigate |
0x00541590 |
GangSetReactToViolence, TacticPathScout |
9 | |
| 95 | SaveHuman |
0x0053fd30 |
GangCanSaveAllys |
15 | |
| 96 | ObjectPile |
0x0053faf0 |
|||
| 99 | TauntPlayer |
0x00541530 |
BrHasEnemies |
8 | |
| 100 | HTLDefense |
0x00540e70 |
|||
| 101 | HTLDefenseFight |
0x00540e10 |
|||
| 102 | HTLOffense |
0x00540d50 |
|||
| 103 | HTLOffenseFight |
0x00540cf0 |
|||
| 104 | HTLGrabbing |
0x00540db0 |
|||
| 105 | Pedestrian |
0x0053f670 |
FlagNetTraverse |
60 | A pedestrian on the flag network (FlagNetTraverse) |
| 107 | PedReaction |
0x0053f6d0 |
BrSetPlayerResponse, GangCanFlee, GangSetReactToViolence, GoalPeddler |
31 | A civilian's reaction to the player, pushed by the civilian think |
| 108 | PedReactNoise |
0x0053f730 |
|||
| 109 | CallPolice |
0x0053f7f0 |
GangSetReactToViolence, GoalCallPolice |
5 | |
| 110 | CallGang |
0x00541110 |
GangSetReactToViolence, GoalCallGang, TacticPathScout |
11 | |
| 111 | Scout |
0x005410b0 |
TacticPathScout |
6 | |
| 112 | PathScout |
0x00541050 |
TacticPathScout |
6 | |
| 113 | Interact |
0x0053f790 |
CfgPedInteractDelay |
1 | |
| 114 | Hostile |
0x00541170 |
BrSetPlayerResponse |
3 | A civilian turning hostile, pushed by the civilian think |
| 115 | Patrol |
0x00540990 |
FlagNetTraverse |
60 | A patrol on the flag network (FlagNetTraverse) |
| 116 | Respond |
0x005408d0 |
GangRespond, GoalCopRespond |
3 | |
| 117 | ProcessBreakAndEnter |
0x00540930 |
|||
| 118 | ProcessDisturbance |
0x005406f0 |
|||
| 119 | RiotCop |
0x00540870 |
|||
| 120 | SpotCriminal |
0x00540810 |
|||
| 121 | CallForBackup |
0x005407b0 |
|||
| 122 | LeaveArea |
0x00540750 |
|||
| 123 | CopInteract |
0x00540690 |
|||
| 124 | IssueWarning |
0x00540630 |
|||
| 125 | Domination |
0x0053fc10 |
TacticDomination |
10 | |
| 126 | Ring |
0x0053fbb0 |
|||
| 127 | StandGround |
0x0053fb50 |
TacticStandGround |
1 | |
| 128 | Dealer |
0x00540c90 |
GoalDealer |
27 | A dealer selling to the player (GoalDealer) |
| 129 | DealerReaction |
0x00540c30 |
|||
| 130 | Shopkeeper |
0x005423d0 |
GoalShopkeeper |
5 | |
| 131 | WarriorVandalSteal |
0x005404b0 |
|||
| 132 | BigBrawler |
0x005429a0 |
GoalBigBrawler, TacticBossScenarioA |
3 | |
| 133 | BigFighter |
0x00542940 |
GoalBigFighter, TacticBossScenarioC, TacticBossScenarioG |
2 | A big fighter |
| 134 | BigFighterA |
0x005428e0 |
TacticBossScenarioH |
1 | |
| 135 | BigThrower |
0x00542880 |
GoalBigThrower, TacticBossScenarioA |
3 | |
| 136 | BigDefender |
0x005424f0 |
TacticBossScenarioD |
1 | |
| 137 | BigBull |
0x00542490 |
TacticBossScenarioD |
1 | |
| 138 | BigLedgeThrower |
0x00542820 |
GoalBigLedgeThrower, TacticBossScenarioG, TacticBossScenarioH |
9 | |
| 140 | StationaryThrower |
0x005427c0 |
GoalStationaryThrower, TacticBossScenarioA |
11 | |
| 141 | StationaryShooter |
0x00542760 |
TacticBossScenarioB |
2 | |
| 142 | StationaryShooterA |
0x005426e8 |
GoalLutherShooter, TacticBossScenarioE |
4 | |
| 143 | StationaryShooterB |
0x00542610 |
TacticBossScenarioF |
2 | |
| 144 | Fatigued |
0x00542a00 |
TacticBossScenarioA |
3 | |
| 145 | Mace |
0x005425b0 |
TacticBossScenarioC |
1 | |
| 146 | Grabber |
0x00542550 |
TacticBossScenarioD |
1 | |
| 147 | BossChatter |
0x0053f430 |
|||
| 148 | BossLizzies |
0x0053f550 |
GoalBossLizzies |
||
| 149 | BossLuther |
0x0053f4f0 |
|||
| 150 | BossBigMo |
0x0053f490 |
|||
| 152 | DevilRun |
0x00541ad0 |
GoalDevilRun |
33 | |
| 153 | ReactNoise |
0x00540ff0 |
GangSetReactToViolence |
3 | |
| 154 | Mark |
0x00540f90 |
GoalMark |
4 | |
| 155 | Backoff |
0x00540f30 |
GoalBackoff |
22 | Back off from a target |
| 156 | HideAndSeek |
0x00542430 |
TacticBossScenarioG |
1 | |
| 157 | LutherShooter |
0x00542670 |
GoalLutherShooter |
2 | |
| 158 | Boxer |
0x00540ed0 |
GoalBoxer |
6 |
Sources and evidence¶
Evidence levels used: confirmed-code.
- SLUS_212.15, goal vtables (type +0x0c, name +0x14) and the bindings' code
Fields¶
| Field | Type | Hand-written | Meaning |
|---|---|---|---|
id |
int | The goal type: what the class's type function returns (vtable +0x0c). |
|
name |
str | The class's own name (the string vtable +0x14 returns). |
|
vtable |
hex | The class's vtable. | |
process |
hex | Its Process function (vtable +0x44), run each brain update. |
|
event |
hex | Its own event handler (vtable +0x4c), when it has one. |
|
bindings |
list | The script bindings that make it (found by following their code). | |
calls |
int | Script calls of those bindings. | |
scripts |
list | The scripts that make those calls (at most six). | |
meaning |
str | yes | What the goal does, in our words. |
source |
str | yes | Where the entry comes from: a script and binding, an address, a chunk. |
evidence |
str | yes | How we know: confirmed-code, confirmed-runtime, inferred or speculative (evidence levels). |
notes |
str | yes | Our own short notes. |