-
Notifications
You must be signed in to change notification settings - Fork 1
Tutorial The Clock
johnjohto edited this page Jul 26, 2026
·
1 revision
One optional file gives your project a sense of time -- data/clock.json:
{
"mode": "real",
"day_parts": [
{"name": "morn", "start": "04:00"},
{"name": "day", "start": "10:00"},
{"name": "nite", "start": "18:00"}
],
"seasons": {"1": "spring", "2": "summer", "3": "autumn", "4": "winter"}
}-
mode: "real"reads the player's OS clock -- the Gold/Silver feel, no set-the-clock ceremony.mode: "scaled"runs fan-game time instead:scalegame-seconds per real second from a fixedstart, saved with the game (turbo never accelerates it). -
Day-parts are yours to name -- any buckets over the 24h day, ascending
starts; the span before the first start belongs to the last part, so an
18:00
nitecovers midnight to dawn for free. -
Seasons map calendar months to names (Vermilion uses the Gen-5 monthly
rotation so players see all four in four months). Weekdays come free
(
sunday..saturday).
Event conditions read all of it with the same expressions they already use
for badges and flags -- time_part_nite, time_season_winter,
time_weekday_monday, time_hour:
{"trigger": {"kind": "interact", "object": "SPRITE_OAK",
"when": "time_part_nite and badge_count >= 1"}}A project without clock.json is exactly what it was before -- clockless,
untouched. Testers: --clock=2026-01-10T23:00 pins a frozen time for a run,
and automated runs pin themselves so replays stay deterministic.
Monworks: MIT code · CC0 samples · everything pictured is original content. The faithful Pokémon Red build derives from your own local pokered clone and is never distributed. Pokémon is © Nintendo/Creatures/GAME FREAK; this is an unaffiliated fan engineering project.
Play
Create
Tutorials
- Writing Text
- Battle Backdrops
- Colors and Palettes
- Display Filters and Shaders
- Widescreen and Scaling
- Quality-of-Life Knobs
- Overlays (Recipes)
- Abilities & Battle Hooks
- Modern Individuals
- Per-Individual Fields
- Item Field Scripts
- Field Effects
- The Modern Ruleset
- Per-Save Rulesets
- Six Stats
- The Clock
- Conditioned Bindings
- Day and Night
- Sprite Variants
- Overworld Spawns
- Language Packs
- Set-Piece Battles & Narration
- Run a Server
- Join a Server
Elsewhere