The schedule system allows Citizen NPCs to follow time-based routines that mirror a day-in-the-life pattern. A blacksmith might work at the forge in the morning, wander around the market at midday, and stand guard at the inn at night. Schedules are defined as a list of time-windowed entries on each Citizen, with each entry specifying where to go, what to do on arrival, and how to travel there.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ElectroGamesDev/HyCitizens/llms.txt
Use this file to discover all available pages before exploring further.
How Schedules Work
Each Citizen has ascheduleConfig block. When scheduleConfig.enabled is true, HyCitizens evaluates the list of entries every tick against the current in-game time. The active entry (the one with the highest priority whose time window contains the current time) dictates the Citizen’s behavior.
Time values use a 24-hour float format:
8.0= 8:00 AM12.5= 12:30 PM17.75= 5:45 PM0.0= midnight
fallbackMode.
ScheduleEntry Fields
Each item inscheduleConfig.entries has the following fields:
| Field | Type | Default | Description |
|---|---|---|---|
id | string | required | Unique identifier for this entry within the Citizen’s schedule. |
name | string | "" | Human-readable display name shown in the schedule debug UI. |
enabled | bool | true | Set to false to temporarily disable this entry without deleting it. |
startTime24 | double | 8.0 | When the entry activates (24-hour float). Clamped to 0–24. |
endTime24 | double | 17.0 | When the entry deactivates (24-hour float). If endTime24 < startTime24, the window wraps midnight. |
locationId | string | "" | References a ScheduleLocation by its id. The Citizen travels here on activation. |
activityType | enum | IDLE | What the Citizen does after arriving. See activity types below. |
arrivalRadius | float | 1.5 | How close (blocks) the Citizen must get before the travel phase is considered complete. Minimum 0.25. |
travelSpeed | float | 10.0 | Movement speed used while traveling to the target location. Minimum 1.0. |
wanderRadius | float | 5.0 | Wander radius used when activityType is WANDER. Minimum 1.0. |
patrolPathName | string | "" | Name of the patrol path used when activityType is PATROL. |
followCitizenId | string | "" | Citizen ID to follow when activityType is FOLLOW_CITIZEN. |
followDistance | float | 2.0 | Follow distance when activityType is FOLLOW_CITIZEN. Minimum 0.1. |
arrivalAnimationName | string | "" | Animation played once when the Citizen arrives at the location. |
arrivalAnimationSlot | int | 0 | Animation slot index for the arrival animation. |
priority | int | 0 | When multiple entries overlap in time, the entry with the highest value is used. |
Activity Types
| Value | Behavior after arrival |
|---|---|
IDLE | Citizen stands still at the target location. |
WANDER | Citizen wanders within wanderRadius of the target location. |
PATROL | Citizen follows the patrol path named in patrolPathName. |
FOLLOW_CITIZEN | Citizen follows the Citizen identified by followCitizenId. |
ScheduleLocation Fields
Locations are defined inscheduleConfig.locations and referenced by their id from schedule entries.
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier referenced by ScheduleEntry.locationId. |
name | string | Human-readable label for the location. |
worldUUID | UUID | The world in which this location exists. |
position | Vector3d | X/Y/Z world coordinates. |
rotation | Vector3f | X/Y/Z Euler rotation applied on arrival. |
Fallback Mode
Determines what the Citizen does when no schedule entry is active:
USE_BASE_BEHAVIOR— the Citizen reverts to its normalmovementBehaviorand base role configuration.GO_TO_DEFAULT_LOCATION_IDLE— the Citizen travels to the location referenced bydefaultLocationIdand stands idle there.HOLD_LAST_SCHEDULE_STATE— the Citizen remains in the state from the most recently active schedule entry rather than reverting.
When
fallbackMode is active and this field is set, the Citizen travels to this location ID before resuming its base behavior.Example Schedule Setup
The following walkthrough creates a simple two-entry schedule for a blacksmith NPC who works at the forge by day and rests at the inn at night.Create the schedule entries
Add two entries to Note that the
scheduleConfig.entries:rest entry spans midnight because endTime24 (7.0) < startTime24 (18.0).