Skip to content

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

Interface: BehaviourProfile ​

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

How an NPC is tuned.

Properties ​

aggression ​

aggression: number

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

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:77

Aim jitter drawn once per burst (rad).


approachDistance ​

approachDistance: number

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

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:63

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


boosts ​

boosts: boolean

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

Boosts on straights.


boxIn ​

boxIn: boolean

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

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:75

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


climbs ​

climbs: boolean

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

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:87

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:85

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:106

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:79

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:104

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


fire ​

fire: boolean

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

Shoots at its target.


fireRange ​

fireRange: number

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

How far it shoots from (m).


flankOffset ​

flankOffset: number

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

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:113

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:42

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


handbrakeTurns ​

handbrakeTurns: boolean

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

Uses the handbrake in sharp turns.


health ​

health: number

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

Hit points, 1 to 255.


hearingRange ​

hearingRange: number

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

How far it hears shots and blasts (m).


holdsPost ​

holdsPost: boolean

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

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:48

Jumps when it finds itself stuck.


leavesCar ​

leavesCar: boolean

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

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


loseSightSeconds ​

loseSightSeconds: number

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

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:24

The profile's name.


pit ​

pit: boolean

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

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:89

Rams the target's car.


reactionSeconds ​

reactionSeconds: number

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

Seconds between noticing something and moving.


repathTicks ​

repathTicks: number

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

Ticks between two plans of its path.


respawn ​

respawn: boolean

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

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:46

Runs on foot while far from its target.


searchSeconds ​

searchSeconds: number

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

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


shootsFromCar ​

shootsFromCar: boolean

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

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:32

Half the angle of its view cone (rad).


sightRange ​

sightRange: number

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

How far it sees (m).


speedShare ​

speedShare: number

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

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:119

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:28

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:71

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