Non-Playable Character Programming (Meta)

NPC refers to the programming of Story Characters, Pedestrians, Law Enforcement and Enemies.

Story Characters
Story Characters have 2 Programming features. First is 'Scripted, which means they will stay in one spot or do certain actions during cutscenes. Second is 'Follow' which means they will follow The Player when required. Story Characters will follow The Player on foot or ride with them if The Player has a 2+ Seater Vehicle.

PEDESTRIANS
Pedestrians have 3 Programming features. First is 'Random', which means they will walk where ever they can (Only on sidewalks and crossings, never into Traffic). Pedestrians can spawn in any location that isn't traffic. Second is 'Warned', which means if you fire near them, they will slowly move away from you and then resume 'Random' behaviour. Third is 'Scared', which means if you attack them, they will constantly be in 'Warned' mode until you kill them, you die or they despawn. Prior to the update, some Pedestrians have a chance of fighting back. Killing Pedestrians will sometimes drop Cash and Shields.

LAW ENFORCEMENT
Much like Pedestrians, Law Enforcement have the same modes as Pedestrians. Law Enforcement have 'Random' and 'Warned' modes, but have a 'Hostile' mode that activates when you attack a Cop or Pedestrian. When 'Hostile' mode is activated, all Cops will actively attempt to murder The Player. First they arrive via Cop Cars or Copsicle and attempt to run The Player over. If they hit The Player or miss, they will exit and attack on foot. As long as a Threat Meter is active, Cops will infinitely spawn. To get rid of 'Hostile' mode and reset it to 'Random' The Player can pick up a Cop Coin, change their Style or change their Vehicle's color. If The Player has a Dark Red Threat level, a Cop Coin will only remove part of it, but changing Style or Vehicle's color will completely remove it.

ENEMIES
Unlike the others, Enemies have only 1 mode, which is 'Hostile'. Much like Law Enforcement, Enemies will relentlessly pursue The Player. No Enemies can drive any vehicles, but can use weapons.