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:66
Aim jitter drawn once per burst (rad).
approachDistance
approachDistance:
number
Defined in: packages/ai/src/profiles.ts:50
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:52
Steps back when the target comes nearer than the approach distance.
boosts
boosts:
boolean
Defined in: packages/ai/src/profiles.ts:89
Boosts on straights.
boxIn
boxIn:
boolean
Defined in: packages/ai/src/profiles.ts:85
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:64
Ticks the trigger is held per burst; it rests twice as long between bursts.
crew
crew:
number
Defined in: packages/ai/src/profiles.ts:76
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:74
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:95
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:68
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:93
Falls on any hit, like a pedestrian, instead of at zero like a player.
fire
fire:
boolean
Defined in: packages/ai/src/profiles.ts:58
Shoots at its target.
fireRange
fireRange:
number
Defined in: packages/ai/src/profiles.ts:62
How far it shoots from (m).
flankOffset
flankOffset:
number
Defined in: packages/ai/src/profiles.ts:54
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:102
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:
"return"|"idle"
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:87
Uses the handbrake in sharp turns.
health
health:
number
Defined in: packages/ai/src/profiles.ts:91
Hit points, 1 to 255.
hearingRange
hearingRange:
number
Defined in: packages/ai/src/profiles.ts:34
How far it hears shots and blasts (m).
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:70
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:80
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:78
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:56
Ticks between two plans of its path.
respawn
respawn:
boolean
Defined in: packages/ai/src/profiles.ts:97
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:72
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).
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:60
The weapon it shoots with: an index into the weapon table.