Skip to content

five-on-it / packages/ai/src/system / AiWorld

Interface: AiWorld ​

Defined in: packages/ai/src/system.ts:268

The AI's side of a server.

Properties ​

budget ​

budget: AiBudget

Defined in: packages/ai/src/system.ts:298

How much planning a tick may do.


carGraph ​

carGraph: SearchGraph

Defined in: packages/ai/src/system.ts:286

The car grid as a search graph.


carGrid ​

carGrid: NavGrid

Defined in: packages/ai/src/system.ts:278

The ground as a car drives it (1.6 m of clearance).


climbGraph ​

climbGraph: SearchGraph

Defined in: packages/ai/src/system.ts:282

The same with the navigation's links (ladders, lifts, drops, hops, narrow stairs), for the profiles that climb.


crowd ​

crowd: CrowdState

Defined in: packages/ai/src/system.ts:308

The crowd of pedestrians (off until the server sets a number of people).


footGraph ​

footGraph: SearchGraph

Defined in: packages/ai/src/system.ts:280

The foot layers as a search graph, with the penalties of the stuck recoveries: walking alone.


footGrid ​

footGrid: NavGrid

Defined in: packages/ai/src/system.ts:274

The ground as a person walks it (half a metre of clearance): the ground of AiWorld.footLayers.


footLayers ​

footLayers: NavLayers

Defined in: packages/ai/src/system.ts:276

The ground and the floors over it as a person walks them: stairs, upper storeys, decks.


footPenalty ​

footPenalty: Uint32Array

Defined in: packages/ai/src/system.ts:292

Until which tick each foot node is dear (0 = not).


linkPenalty ​

linkPenalty: Uint32Array

Defined in: packages/ai/src/system.ts:284

Until which tick each link is dear (it failed someone; 0 = not), by its index.


npcs ​

npcs: NpcState[]

Defined in: packages/ai/src/system.ts:294

The NPCs, in ascending entity order.


plansThisTick ​

plansThisTick: number

Defined in: packages/ai/src/system.ts:300

Plans granted so far this tick.


police ​

police: PoliceBook

Defined in: packages/ai/src/system.ts:304

The police's book: the players' Wanted levels and the units out (police.ts).


restricted ​

restricted: RestrictedState

Defined in: packages/ai/src/system.ts:312

The game's restricted zones and who stands in them (restricted.ts).


rng ​

rng: () => number

Defined in: packages/ai/src/system.ts:296

The AI's own random stream (aim jitter), apart from the simulation's.

Returns ​

number


roadGraph ​

roadGraph: SearchGraph

Defined in: packages/ai/src/system.ts:288

The road graph as a search graph.


roads ​

roads: RoadGraph

Defined in: packages/ai/src/system.ts:272

The level's roads as a graph of lanes.


scratch ​

scratch: AstarScratch

Defined in: packages/ai/src/system.ts:290

A* scratch, sized for the largest of the three.


sim ​

sim: SimWorld

Defined in: packages/ai/src/system.ts:270

The simulation the NPCs live in.


standIns ​

standIns: object[]

Defined in: packages/ai/src/system.ts:320

Stand-ins for the players while nobody is in the room: the traffic and the crowd are kept around them as around the players (traffic.ts' viewersOf), so a room warming up before its first player (the server's GameServer.warmUp) fills its streets where that player comes in, at the players' first spawn point. None by default: an empty room keeps nothing.

x ​

x: number

z ​

z: number


stats ​

stats: AiStats

Defined in: packages/ai/src/system.ts:302

Running counts.


stealth ​

stealth: StealthState

Defined in: packages/ai/src/system.ts:310

The room's book of stealth: cameras, bodies, the alert, the players' counts (stealth.ts).


traffic ​

traffic: TrafficState

Defined in: packages/ai/src/system.ts:306

The ambient traffic (off until the server sets a number of cars).