five-on-it / packages/ai/src/poses
packages/ai/src/poses
Poses (GAME_DESIGN §5.4, §9): what an NPC is told to do where it stands, a mission's npcDo (smoke, sit, lie down, dance, look at its phone, put its hands up, point, lean on a wall) or an hour of its schedule spent so at a place (schedule.ts: dance, smoke, lie, lean, work). The pose is the simulation's to show (@foi/sim's Character.pose, the snapshots' act, the clients' clips); here it is decided who holds one now:
- an order (setNpcDoing) holds while it is in force (for so many seconds, or for good) and the NPC is calm: a sentry on its rounds (normal), a target or a witness not threatened, a VIP or a hostage with nobody to follow, a chaser idle; awake, on foot, in the world, nobody's captive. Its brain stands it still meanwhile (doingNow). The moment it is not calm the pose drops, and comes back once it is calm again, while the order lasts;
- a schedule's hour of a pose holds while the NPC stands at the hour's place, calm.
A sentry smoking, sitting, lying, dancing or at its phone is off guard (sentry.ts), as on a break: it sees less far and less wide. The orders are part of the AI's hash.