Skip to content

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

Interface: AiWorld ​

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

The AI's side of a server.

Properties ​

budget ​

budget: AiBudget

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

How much planning a tick may do.


carGraph ​

carGraph: SearchGraph

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

The car grid as a search graph.


carGrid ​

carGrid: NavGrid

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

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


crowd ​

crowd: CrowdState

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

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


footGraph ​

footGraph: SearchGraph

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

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


footGrid ​

footGrid: NavGrid

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

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

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

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


npcs ​

npcs: NpcState[]

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

The NPCs, in ascending entity order.


plansThisTick ​

plansThisTick: number

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

Plans granted so far this tick.


police ​

police: PoliceBook

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

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


restricted ​

restricted: RestrictedState

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

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


rng ​

rng: () => number

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

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

The road graph as a search graph.


roads ​

roads: RoadGraph

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

The level's roads as a graph of lanes.


scratch ​

scratch: AstarScratch

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

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


sim ​

sim: SimWorld

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

The simulation the NPCs live in.


standIns ​

standIns: object[]

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

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

Running counts.


stealth ​

stealth: StealthState

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

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

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