Skip to content

five-on-it / packages/ai/src/profiles / BehaviourProfile

Interface: BehaviourProfile ​

Defined in: packages/ai/src/profiles.ts:24

How an NPC is tuned.

Properties ​

aggression ​

aggression: number

Defined in: packages/ai/src/profiles.ts:28

0..1: how hard the chase is pressed; shortens the reaction, allows ramming and boosting at the top.


aimError ​

aimError: number

Defined in: packages/ai/src/profiles.ts:79

Aim jitter drawn once per burst (rad).


approachDistance ​

approachDistance: number

Defined in: packages/ai/src/profiles.ts:57

How near it comes (m): on foot it stops there; in a car it is the gap kept when tailing.


backOff ​

backOff: boolean

Defined in: packages/ai/src/profiles.ts:65

Steps back when the target comes nearer than the approach distance.


boosts ​

boosts: boolean

Defined in: packages/ai/src/profiles.ts:102

Boosts on straights.


boxIn ​

boxIn: boolean

Defined in: packages/ai/src/profiles.ts:98

Boxes a target's car in once it has (nearly) stopped: each car of the kind takes a side of it (ahead, behind, left, right) instead of keeping its gap, so it cannot drive off.


burstTicks ​

burstTicks: number

Defined in: packages/ai/src/profiles.ts:77

Ticks the trigger is held per burst; it rests twice as long between bursts.


climbs ​

climbs: boolean

Defined in: packages/ai/src/profiles.ts:55

Takes the navigation's links on foot (steer-climb.ts): up and down ladders, onto lifts, off a roof's edge, a hop onto a low roof, narrow stairs; without, it walks only.


crew ​

crew: number

Defined in: packages/ai/src/profiles.ts:89

How many ride in its car when it is spawned in one, the driver included (clamped to the seats).


dismounts ​

dismounts: boolean

Defined in: packages/ai/src/profiles.ts:87

Pulled up near the target with the car nearly stopped, the whole crew gets out and fights on foot.


downSeconds ​

downSeconds: number

Defined in: packages/ai/src/profiles.ts:108

Seconds it tumbles when knocked down but alive (a car that was too slow to kill, a hit that made it fall).


entersCars ​

entersCars: boolean

Defined in: packages/ai/src/profiles.ts:81

On foot, takes a free car nearby to keep up with a target that drives away.


fallsOnAnyHit ​

fallsOnAnyHit: boolean

Defined in: packages/ai/src/profiles.ts:106

Falls on any hit, like a pedestrian, instead of at zero like a player.


fire ​

fire: boolean

Defined in: packages/ai/src/profiles.ts:71

Shoots at its target.


fireRange ​

fireRange: number

Defined in: packages/ai/src/profiles.ts:75

How far it shoots from (m).


flankOffset ​

flankOffset: number

Defined in: packages/ai/src/profiles.ts:67

Offset of its goal to the target's side (m), so that several chasers spread out; 0 = straight at it.


fleeSeconds ​

fleeSeconds: number

Defined in: packages/ai/src/profiles.ts:115

Seconds it runs from whoever carjacked its car (pulled it out, or put it out as a passenger), counted from when it is on its feet; then it goes after them.


giveUp ​

giveUp: "idle" | "return"

Defined in: packages/ai/src/profiles.ts:44

After a fruitless search: walk home, or stand where it is.


handbrakeTurns ​

handbrakeTurns: boolean

Defined in: packages/ai/src/profiles.ts:100

Uses the handbrake in sharp turns.


health ​

health: number

Defined in: packages/ai/src/profiles.ts:104

Hit points, 1 to 255.


hearingRange ​

hearingRange: number

Defined in: packages/ai/src/profiles.ts:36

How far it hears shots and blasts (m).


holdsPost ​

holdsPost: boolean

Defined in: packages/ai/src/profiles.ts:63

Holds its post on foot (an officer behind a roadblock's cars, police-roadblocks.ts): it faces and shoots its target from where it stands, never walks after it, and looks around where it is when it loses it.


jumps ​

jumps: boolean

Defined in: packages/ai/src/profiles.ts:50

Jumps when it finds itself stuck.


leavesCar ​

leavesCar: boolean

Defined in: packages/ai/src/profiles.ts:83

Gets out of a car that cannot follow (wrecked, or stuck for good).


loseSightSeconds ​

loseSightSeconds: number

Defined in: packages/ai/src/profiles.ts:40

Seconds a target may be out of sight before the chase turns into a search.


name ​

name: string

Defined in: packages/ai/src/profiles.ts:26

The profile's name.


pit ​

pit: boolean

Defined in: packages/ai/src/profiles.ts:93

Aims the ram at the target's rear quarter to spin it (a PIT manoeuvre).


ram ​

ram: boolean

Defined in: packages/ai/src/profiles.ts:91

Rams the target's car.


reactionSeconds ​

reactionSeconds: number

Defined in: packages/ai/src/profiles.ts:38

Seconds between noticing something and moving.


repathTicks ​

repathTicks: number

Defined in: packages/ai/src/profiles.ts:69

Ticks between two plans of its path.


respawn ​

respawn: boolean

Defined in: packages/ai/src/profiles.ts:110

Comes back at its home after dying; otherwise it is removed once it has fallen.


runs ​

runs: boolean

Defined in: packages/ai/src/profiles.ts:48

Runs on foot while far from its target.


searchSeconds ​

searchSeconds: number

Defined in: packages/ai/src/profiles.ts:42

Seconds spent looking around where the target was last seen before giving up.


shootsFromCar ​

shootsFromCar: boolean

Defined in: packages/ai/src/profiles.ts:85

The crew shoots the pistol out of the car (the driver forward, the passengers too).


sightHalfAngle ​

sightHalfAngle: number

Defined in: packages/ai/src/profiles.ts:34

Half the angle of its view cone (rad).


sightRange ​

sightRange: number

Defined in: packages/ai/src/profiles.ts:32

How far it sees (m).


speedShare ​

speedShare: number

Defined in: packages/ai/src/profiles.ts:46

Share of the top speed used (on foot, of the walk or the run).


staysIn? ​

optional staysIn?: boolean

Defined in: packages/ai/src/profiles.ts:121

Stays in its car whatever its target does (the APC's and the water cannon's crews, police-heavy.ts): it never gets out to make an arrest or to fight; a car on fire it still leaves.


tracks ​

tracks: boolean

Defined in: packages/ai/src/profiles.ts:30

Knows where its assigned target is without seeing it (a test chaser, a police radio); a guard does not.


weapon ​

weapon: number

Defined in: packages/ai/src/profiles.ts:73

The weapon it shoots with: an index into the weapon table.