# V2 NPC Schedule Day Of Week

`NPCScheduleDayOfWeek.V2` selects a resolved schedule from an authored base
schedule, a calendar date, and enabled day-pattern replacements. It supports
weekday schedules, weekend schedules, and holiday overrides with priority-based
selection.

## Runtime Surface

- `FV2NPCScheduleCalendarDate` carries year, month, day, day of week, holiday
  flag, and holiday id.
- `FV2NPCScheduleDayPattern` binds a pattern id, pattern type, target weekday or
  holiday id, replacement schedule, priority, enabled state, and tags.
- `FV2NPCScheduleDayOfWeekRequest` carries the base schedule, date, apply
  toggle, and available patterns.
- `FV2NPCScheduleDayPatternSelection` records the pattern that won selection.
- `FV2NPCScheduleDayOfWeekResult` returns the resolved schedule and flags for
  weekday, weekend, and holiday override selection.

## Selection Rules

1. Holiday override patterns have enough priority to win over weekend or weekday
   patterns when the calendar date carries the matching holiday id.
2. Weekend patterns match Saturday and Sunday.
3. Weekday patterns match Monday through Friday.
4. Specific-day patterns can target a single authored day.
5. Suppressed day-pattern evaluation returns the base schedule unchanged.
6. Invalid calendar dates, pattern ids, replacement schedules, and missing
   holiday ids produce blocking issues before selection.

## Validation Commands

Run these targeted checks when touching schedule day-of-week selection:

```bash
python3 V2/ue/Tools/check-v2-npc-schedule-day-of-week.py
python3 V2/ue/Tools/check-v2-npc-schedule-variation.py
python3 V2/ue/Tools/check-v2-npc-schedule-interruption.py
python3 V2/ue/Tools/check-v2-npc-schedule-location-binding.py
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/NPCScheduleDayOfWeek_V2_Contract.json
python3 -m py_compile V2/ue/Tools/check-v2-npc-schedule-day-of-week.py
```
