# V2 NPC Schedule Editor

`NPCScheduleEditor.V2` is a V2Editor `TimelineVisualizer` surface for editing an
NPC's daily schedule as deterministic row models. It exposes a visual timeline
per NPC, drag-drop activity block moves, and location assignment while keeping
all editor state machine-checkable.

## Runtime Surface

- `FV2NPCScheduleEditorWidgetSpec` targets the `TimelineVisualizer` surface and
  declares the NPC selector, visual timeline, drag-drop block support, and
  location palette.
- `FV2NPCScheduleEditorViewportSpec` defines visible minute range, horizontal
  zoom, header width, row height, and timeline width.
- `FV2NPCScheduleEditorRequest` carries one optional edit action: `MoveBlock` or
  `AssignLocation`.
- `FV2NPCScheduleEditorModel` returns the updated schedule, row layout, selected
  block, playhead position, and validation issues.

## Editor Rules

1. The model builds one stable row per schedule block for the selected NPC.
2. Drag-drop moves rewrite the target block start and end minutes without
   inventing unrelated schedule data.
3. Location assignment rewrites only the target block location id.
4. Offscreen rows clamp to the timeline bounds so the layout remains stable.
5. Overlapping blocks, invalid drag ranges, missing blocks, invalid locations,
   invalid source schedules, and invalid viewports produce blocking issues.
6. The editor module checker includes this spec so the schedule editor remains
   part of the V2Editor automation surface.

## Validation Commands

Run these targeted checks when touching the NPC schedule editor:

```bash
python3 V2/ue/Tools/check-v2-npc-schedule-editor.py
python3 V2/ue/Tools/check-v2-editor-module.py
python3 V2/ue/Tools/check-v2-npc-schedule-debug-visualization.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/Editor/NPCScheduleEditor/NPCScheduleEditor_V2_Contract.json
python3 -m py_compile V2/ue/Tools/check-v2-npc-schedule-editor.py V2/ue/Tools/check-v2-editor-module.py
```
