Enable Terrain3D collision_mode=1 so the sculpted landscape provides real physical ground for player and NPCs. Disable GreyboxGround collision (layer/mask = 0) -- it is no longer the active physical floor.
NpcVisual no longer flattens nav waypoint Y to its current elevation. It now follows 3D path points and uses gravity (30 m/s^2) like the player, settling to terrain surface via is_on_floor() + Terrain3D collision. The flat NavigationMesh_greybox still provides correct lateral guidance; physics handles vertical grounding on slopes.
This fixes the player-walking-through-slopes bug and makes NPC movement follow actual terrain elevation for the village area (gentle slopes, ~2.4m noise amplitude). All 10 scenarios pass.
A 60x60 circular dial drawn at the top-center of the screen shows the current position in the day/night cycle. A filled arc sweeps clockwise from the top; the color transitions from dark blue (night) through orange (dawn), gold (day), and pink (dusk). A small glow dot marks the leading tip; a phase label (Night/Dawn/Day/Dusk) sits below. Redraws only when the cycle fraction changes. References DayNightCycle via node_path so it stays in sync with the environment lighting.
DayNightCycle.gd smoothly rotates DirectionalLight3D and interpolates sky colors, ambient light, fog, and procedural sky material across a configurable 240-second cycle with warm sunset/sunrise peaks and deep night ambiance. No simulation dependency — purely visual.
JajceWorld.tscn now includes visible workplace structures replacing the invisible Marker3Ds: wooden pantry crate, guard tower post, study desk, and rest bench. Each has a distinct material color matching the profession palette.
The DayNightCycle node is added to JajceWorld.tscn with node_paths wired to DirectionalLight3D and WorldEnvironment. Script reference uses path-based ext_resource (uid generation deferred to editor first load).
- WaterBody.tscn, WaterfallBody.tscn: gdshader files were referenced
with type="Material" instead of type="Shader". Wrapped each
shader in a ShaderMaterial sub-resource so Godot can load them.
- ChimneySmoke.tscn: reordered sub-resources so StandardMaterial3D
is defined before QuadMesh that references it.
- WaterfallMist.tscn: fixed node type GpuParticles3D -> GPUParticles3D
(case-sensitive class name in Godot 4.7).
- jajce_world.gd: added explicit Vector3 type annotation to fix
'Cannot infer the type of pos variable' parse error.
- main.tscn.uid: created missing UID mapping file. The scene header
declared uid="uid://rs3hv73svbpa" but no .uid file existed,
causing Godot to reject the scene as unsupported format.
Auto-format all GDScript files using gdformat from gdtoolkit.
This is a baseline formatting pass to ensure consistent style:
- Normalizes indentation and spacing
- Wraps long lines to 100 characters
- Removes trailing whitespace
- Standardizes blank lines between functions
68 files reformatted, 8 files left unchanged (3rd-party addon files
with parse errors excluded).
- Add 3 Terrain3D texture assets (limestone, valley grass, warm soil)
- Sculpt initial Terrain3D heightmap with ridge, valley, waterfall drop
- Replace plain water with emissive-tinged material
- Add foam mesh, mist spheres, and procedural sky with valley fog
- Add 10 StylizedTree instances around village perimeter
- Enable directional light shadows with extended cascade range
- Add tree height snapping to terrain surface
- Add refined scaffold tests for material count, terrain height, foliage, sky, fog
- Add terrain texture PNGs and StylizedTree.tscn scene
- Add generate_jajce_terrain.gd tool
- NpcVisual emits position_changed signal during _physics_process
- SimulationManager.synchronize_npc_position() writes active position
into SimNPC state on movement, arrival, and navigation failure
- WorldViewManager forwards position_changed and syncs before
despawn/reload
- SimNPC stores travel_target_position and has_travel_target as
versioned state; NPCStateRecord v2 persists them with v1 migration
- WorldViewManager.spawn_npc_visual() resumes travel for traveling NPCs
via SimulationManager.request_current_travel()
- WorldViewManager.despawn_npc_visual() syncs position before removal
- WorldViewManager.reload_npc_visual() spawns a visual from persisted
state without rerolling target selection
- tests/npc_visual_lifecycle_test.gd proves unload/reload preserves
action, target, reservation, position, RNG state, and checksum
- simulation_state_serialization_test adds legacy v1 NPC migration test
that does not invent an active travel target
Replace implicit randomness with seeded per-NPC RandomNumberGenerator
streams so the same seed always produces the same scenario outcome.
- Add SimulationClock (RefCounted): explicit fixed-step clock that
converts frame delta into simulation ticks while preserving sub-tick
remainder; replaces raw _process tick_timer accumulation
- Add simulation_seed export (int=1337) to SimulationManager; drive
per-NPC RNG streams via seed + npc_id + stream_id derivation
(stream 0=init, stream 1=wander)
- Add get_wander_offset(npc_id) to SimulationManager so wander targets
are deterministic per seed; WorldViewManager calls it instead of
local randf_range()
- Add get_state_snapshot() and get_state_checksum() to SimulationManager
for headless verification and future save/load
- Convert SimNPC/SimVillage const DEBUG_LOGS to instance var debug_logs
so headless tests can silence output without recompilation
- Pass RandomNumberGenerator through SimNPC._init() instead of using
global randf_range() for hunger/energy/position/scoring noise
- Remove obsolete farm_zone and forest_zone exports from
WorldViewManager and their marker/tree scene children from main.tscn;
NPC gather tasks use ResourceNode exclusively
- Rename TaskZone container to ActivityMarkers in main.tscn and update
all scene paths (player, WVM, tests) to match
- Add headless deterministic_simulation_test.gd: verifies clock
accuracy, same-seed equality, different-seed divergence, and
24-tick scenario checksum without loading main.tscn
NpcVisual:
- Add navigation_failed(sim_id) signal distinct from arrived_at_target
so the simulation layer can distinguish genuine arrival from failure
- Replace integer stuck_counter with delta-based stuck_time and
exported stuck_timeout (1.5s) for frame-rate-independent detection
- Add path_request_id / path_pending mechanism to reject stale
async path results when a new target is set or NPC dies
- On empty path or stuck movement, emit navigation_failed instead
of arriving; only emit arrived_at_target when truly close to target
- Reduce arrival_distance back to 0.6 now that navigation_failure
is properly signalled (no longer needed as a workaround)
- clamp arrival_distance reference in apply_dead_visual_state
SimNPC:
- Remove retry_count (replaced by navigation_failed signal pathway)
- Move last_task assignment from set_task() to task completion in
SimulationManager so it reflects the task that actually finished
SimulationManager:
- Add notify_npc_navigation_failed(): release reservation, record
last_task, send NPC to wander for 2s, emit task_changed signal
- Add notify_npc_target_unavailable() as public alias of above
- Guard extraction with node.reserved_by == npc.id to prevent
stale/illegitimate extraction when reservation is lost
- Guard fallback zone task completion (apply_npc_task) so it only
fires for non-resource tasks (gather_food/wood with no target
silently skip instead of applying zone values)
- Remove retry_count safety net (fully replaced by signal pipeline)
WorldViewManager:
- Connect navigation_failed signal in spawn_npc_visual()
- Skip target assignment for empty/idle/dead task states
- When no resource node available for gather_food/wood, call
notify_npc_target_unavailable() so NPC wanders instead of idling
- Add _on_npc_visual_navigation_failed handler delegating to
SimulationManager.notify_npc_navigation_failed()
- Remove retry_count references
- Push error and disable node when duplicate node_id is registered
to prevent silent conflict during find_available()
- Use interaction_point.global_position instead of self.global_position
in find_available() so distance is measured to the marker NPCs
actually navigate toward
Phase 1-2 of the ResourceNode migration plan:
- Create ResourceNode class (world/resource_nodes/) with extraction,
reservation, nearest-available selection, and debug label
- Place 4 resource instances in main.tscn (2 berry bushes, 2 trees)
- Add target_id to SimNPC for tracking which node an NPC is using
- Add set_npc_target_id and release_npc_reservation to SimulationManager
with cleanup on task change, completion, and death
- Update WorldViewManager to query available ResourceNodes first,
falling back to zone markers with a logged warning