# V2 NPC Schedule Activity Behavior

`NPCScheduleActivityBehavior.V2` turns a selected schedule block into concrete
activity steps. It sits above schedule execution and pathfinding: the NPC must
be at the scheduled location before work, eat, sleep, social, idle, travel, or
custom activity steps are issued.

## Runtime Surface

- `FV2NPCScheduleActivityBehaviorRequest` carries the authored schedule, current
  time, current location id, and command issuing flag.
- `FV2NPCScheduleActivityStep` carries a stable step id, action type,
  interaction tag, animation tag, duration, reservation requirement, and
  blocking flag.
- `FV2NPCScheduleActivityCommand` carries the active schedule block and the
  concrete steps issued to the activity/AI layer.
- `FV2NPCScheduleActivityBehaviorResult` reports readiness, navigation gating,
  active block metadata, execution/pathfinding evidence, activity steps, command
  payload, and validation issues.

## Activity Rules

1. The active schedule block is resolved through the schedule execution engine.
2. The current location is checked through schedule pathfinding. If the NPC is
   not at the active block's location, activity behavior blocks until navigation
   completes.
3. Activity blocks require an `InteractionTag` so seats, beds, counters, and
   workstations remain explicit.
4. Work blocks reserve the workstation, perform `WorkAtStation`, and play
   `Animation.Schedule.WorkLoop`.
5. Eat blocks reserve a seat, sit, and play `Animation.Schedule.Eat`.
6. Sleep blocks move to the bed, perform `SleepInBed`, and play
   `Animation.Schedule.SleepLoop`.
7. Visit/social, idle, travel, and custom activities also produce deterministic
   fallback steps for later behavior-tree integration.

## Validation Commands

Run these targeted checks when touching schedule activity behavior:

```bash
python3 V2/ue/Tools/check-v2-npc-schedule-activity-behavior.py
python3 V2/ue/Tools/check-v2-npc-schedule-pathfinding.py
python3 V2/ue/Tools/check-v2-npc-schedule-execution-engine.py
python3 V2/ue/Tools/check-v2-npc-schedule-data-format.py
python3 V2/ue/Tools/check-v2-ci-workflow.py
python3 -m json.tool V2/ue/Content/V2/Gameplay/NPC/NPCScheduleActivityBehavior_V2_Contract.json
python3 -m py_compile V2/ue/Tools/check-v2-npc-schedule-activity-behavior.py
```
