Star map (W1-W3, S3):
- _process visibility guard + dirty flag (no redraw when hidden/unchanged)
- _system_hash masked to 31-bit positive range
- Extracted _find_nearest_system() shared helper
game_state.gd (W4):
- Inline load() in apply_snapshot() replaces per-tick overhead; safe at
runtime because script is already in resource cache
Data pipeline (W5-W6):
- Script-relative path resolution via __file__
- --check mode + make check-star-map staleness target
Minor (S1-S2, S5):
- Removed redundant bone_idx assignment
- Simplified double-negative test assertion
- Documented autoload parse-order convention in CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Autoload scripts are parsed before regular scripts, so class_name
types (CharacterVisualDescriptor, TestHarness, YamlParser) are not
available at parse time. Replace type annotations with untyped vars
and use load() for in-body class references. Fixes all 14 headless
parse errors (9 pre-existing + 5 from Sprint 30 changes).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New StarMapRenderer: 301 systems in concentric hop-rings from player
location, sector-colored, click-to-select with info panel, pan/zoom.
Integrated into HUD (hidden by default), insert state propagation
wired in main.gd. Data enriched from systems.db + star-map.json via
tooling/generate-star-map-data.py regeneration script.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
encode_startup_message() now accepts optional CharacterVisualDescriptor
as third param, serialized via to_dict(). sim_bridge passes the
descriptor from GameState on new game start. apply_snapshot() restores
descriptor from server snapshot on save/load cycle.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Infrastructure for floating UI elements (status indicators, thought
bubbles, alert markers). Marker3D at Vector3(0, 0.3, 0) offset from
Head bone, exposed via get_overhead_anchor() public API.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test character model (test_raw.glb) with eye, hair, and body textures
for validation of the character compositor pipeline.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per-body-type texture maps (BaseColor, Normal, Roughness/ORM) for all
clothing items across all body types. Adds eyebrow variants, facial
hair (beard, moustache, mutton chops), hair styles (12 variants),
and head templates. Sprint 28 character visuals pipeline output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updated clothing models (boots_work, coveralls_basic, jacket_utility,
pants_cargo, shirt_henley) for average_m and reference variants.
Added segmented body textures (BaseColor, Normal, Roughness) for all
body types: average_f, average_m, child, heavy_f, heavy_m, muscular_f,
muscular_m, teen_f, teen_m. Sprint 28 character visuals work.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Body segments: face-based exclusive assignment for all 8 body types
(average/muscular/teen m/f, child) + hips segment
Hair: solidified 20mm, normals recalculated, white masks (was black)
Clothing: peasant tunic/pants/shoes solidified 25mm for all body types
Eye: iris mask from T_Eye_Split.png green channel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Segmentation:
- Face-based exclusive assignment (no overlap, no caps needed)
- Hips split from torso (pelvis as own segment)
- Torso_upper independent (spine_03 + clavicle, not a variant)
- Clavicle moved from arm_upper to torso_upper
Hair pipeline:
- Solidify modifier (20mm) for scalp hair volume
- Normal recalculation before solidify for consistent direction
- Eyebrows/facial hair NOT solidified
- Fixed mask generation (was outputting black, now white)
Clothing pipeline:
- Solidify modifier (25mm) for clothing thickness
- Peasant shoes added from Fantasy pack
Tooling:
- convert_outfit.py with solidify support
- inspect_glb.py, check_hair_symmetry.py for debugging
- Segment reference distribution locked
- Q-063 footsteps VFX filed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Major changes from runtime testing and iteration:
- Asset manifest (manifest.json) controls all available content —
replaces filesystem scanning, solves DirAccess/PCK export issue
- Dynamic tabs: only show tabs with manifest content
- Body segmentation: face-based exclusive assignment, hips split from
torso, torso_upper independent (not a variant)
- Eye color with iris-only mask from T_Eye_Split.png green channel
- Eyebrows tinted with hair color (from body segment, not separate GLB)
- Hair/clothing loaded as skinned meshes on shared skeleton
- Segment hiding disabled for clothing (solidify handles coverage)
- Gender-aware randomizer (no facial hair on female/teen)
- Clothing slots hidden when empty in manifest
- UI: color docks docked to bottom on all tabs, padding, flow layout
- Debug tab with per-segment visibility toggles
- Screenshot automation with test config JSON
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Writing ALPHA caused Godot to treat all meshes as transparent, breaking
per-pixel depth testing. Hair clipped through the head, clothing through
the body — all caused by object-level depth sorting instead of z-buffer.
Removing ALPHA makes everything opaque with correct depth behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TabContainer and its VBoxContainer parent vanish during scene
instantiation when loaded as a child of MainMenu in Godot 4.6.
Moving the entire tab panel construction to _ready() resolves
the issue — the .tscn now only defines the preview side and footer.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@onready path resolution fails when the scene is instantiated as a
child of MainMenu — the node path is valid in the .tscn but the
layout hierarchy breaks during child instantiation in Godot 4.6.
Using find_child() is more robust for scenes that are dynamically
added to another scene's tree.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Godot 4.6 TabContainer silently destroys children defined in .tscn
during scene instantiation ("Parent path has vanished"). Moving tab
shell creation to _ready() fixes the right-side settings panel.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Load UAL animation library onto the skeleton and play idle animation
after character assembly. Adds play_animation() and stop_animation()
public API. Searches all animation libraries for matching animation
name with common idle variant fallbacks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GDScript strict mode rejects type inference from Variant-returning
functions. JSON.parse_string() returns Variant — use explicit type
annotation to satisfy the parser.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dictionary.get() returns Variant, which fails GDScript's strict type
inference (warnings-as-errors). Add explicit type casts on all
dictionary access in clothing and accessory tab code.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove character_select.tscn and character_select.gd entirely
(Smuggler/Detective archetypes removed per v0.2 pivot)
- New Game goes straight to character creation
- Rename Randomise→Randomize throughout (US English convention)
- Add *.import and *.uid to client gitignore (import artifacts)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Stig's review fix caught the first reference (line 9) but missed the
class docstring at line 27. Both now say 18 segments per D-160.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 fixes from PR #99 review on #705 (character editor):
- #10/#11: Add _get_swatch_color() helper; fix stale closure in
_make_color_swatch (reads current color at click time, not
construction time); fix _on_modal_ok to use helper instead of
wrong get_child(0) traversal
- #12: Replace HSV palette with D-165 hardcoded hex values (6×9
rows, muted HSL per spec — reds/greens/blues/purples/browns/grays)
- #13: Fix fallback asset IDs to match actual files — hair: bald/
bob/buzzed/long; heads: head_001–004; facial hair: beard/moustache/
mutton_chops (stubble removed — no asset)
- #14: Remove invented "slot field" TODO comment; replace with
name-prefix convention note
- #15: Fix overhead camera pitch 0.0°→-80.0° (0° was horizontal,
not top-down as intended per D-158)
- #16: Make hair highlight swatch non-interactive (_make_display_swatch);
remove _on_hair_highlight_changed and _hair_highlight_auto flag
- #17: Remove no-op self-assignment in _on_hair_selected; remove
redundant assignment inside _hair_highlight_auto block
- #18: Store _clothing_dock_container/_accessory_dock_container as
instance vars — eliminates fragile get_child(3).get_child(0) chain
- #19: Fix test_r_key_triggers_randomise — replaces assert_bool(true)
with a real assertion checking body_type or skin_tone changed
- #20: Cache scan results in _cached_hair_ids/_cached_head_ids during
tab build; _on_randomise() reads cache (no re-scan per keypress)
- #21: Fix character_visual.gd docstring "21 segments" → "18 segments"
- #22: Fix _get_accessory_ids_for_slot — apply slot name-prefix
filtering instead of returning all accessories for every slot
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Warning fix:
- Remove torso_upper from hides in 3 coverage.json files
(coveralls_basic, jacket_utility, shirt_henley) and the generator
script — redundant when torso_variant is "full"
Suggestions addressed:
- Add pants_cargo authoring note about foot segment distinction
- Add pipeline_log.json provenance output to Surface Deform batch
pipeline (tracks method per variant: surface_deform/shrinkwrap/copy)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full character creation UI with 5-tab customisation panel (Body, Head,
Hair, Clothing, Accessories), live 3D compositor preview via SubViewport,
D-165 color picker modal, keyboard navigation, and game flow integration.
- CharacterCreation scene + script (~1440 lines) implementing wireframe spec
- SubViewport with Camera3D (frontal/dramatic/overhead presets per D-158)
- Cardinal rotation (Q/E) per D-155, randomise (R), Tab/Enter/Esc navigation
- Body type grid (11 types, D-159), skin tone dock (9 tones, shared state)
- Head template, hair, facial hair, eyebrow grids with DirAccess asset scanning
- Clothing slot selector with per-item Primary/Secondary/Accent tints
- Accessory slot selector with Primary/Secondary tints (Array[Color] descriptor)
- 54-swatch color picker modal (D-165) with hex input and recent colors
- Auto-derive flags for highlight, eyebrow tint, facial hair tint from hair primary
- Game flow: main_menu → archetype select → character creation → game start
- GameState.character_visual_descriptor field for gameplay consumption
- Updated accessory_tints from single Color to Array[Color] in descriptor + compositor
- 40+ GdUnit tests covering scene structure, signals, keyboard nav, color derivation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Five placeholder clothing items fitted to all 11 body types via the
Surface Deform batch pipeline (60 GLBs total):
- coveralls_basic, jacket_utility, pants_cargo, shirt_henley, boots_work
Each item includes reference.glb, reference_mask.png, coverage.json,
and 11 body-type variant GLBs. All Surface Deform binds succeeded
with no Shrinkwrap fallbacks needed (#711).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix stale 21→18 segment count in architecture doc, script docstrings,
and disk budget table (critical — both reviewers)
- Add average_m/README.md noting role as clothing reference body
- Add __main__ guards to diagnostic scripts
- Preflight-check all source paths in blender_process_bodies.py
- Document solid-white hair masks as v0.2 placeholder for multi-region
- Add fallback size comment for head mask generation
- Add bald_mask.png (1×1 black) for sidecar convention consistency
- Document child non-uniform scale rationale (Y=0.72 vs XZ=0.75)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add CharacterVisualDescriptor (11-variant BodyType enum, wire format
encode/decode, body_type_key mapping) and CharacterVisual compositor
(runtime 3D character assembler with slot architecture, BoneAttachment3D,
clothing coverage, recolor mask loading, skin tone tinting, bone
validation). Includes 64 unit tests and Blender utility scripts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Port proven shaders (toon, toon_masked, outline) and skin tone textures
from quaternius-aesthetic spike to production client. Import 65-bone
armature and Universal Animation Libraries (UAL1 + UAL2). Set
gltf/embedded_image_handling=3 in project.godot (critical import setting).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
W1/A2: add SimBridge.CONNECTED guard before send_input in toggle handler
W2/A1: assert PlatformInfo != null in HardwareDetector._ready();
add ordering comment in project.godot [autoload] section
W3: replace FileAccess.open() with get_file_as_string() in
read_benchmark_cache() — auto-closes, no leak
W4/A3: add _extract_bool_setting() helper in game_state.gd that handles
both {"Bool": true} and plain bool; push_warning on type mismatch
S5: sync _pre_battery_pref from GameState after load_ai_pref() in
HardwareDetector._ready() — closes race if system starts on battery
S6: separate "red" TPT status into its own arm with STATUS_RED dot and
label colour — three-colour mapping: green/yellow/red now distinct
A4: replace DebugConsole.PREFS_PATH compile-time dependency in
_save_ai_pref() with local SETTINGS_CFG_PATH constant
S7 (battery CI guard) already applied by Hoshe in test file.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
config_dir, benchmark_cache_path, executable_path, model_dir were
populated in _init_paths() but missing from the diagnostics dict.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Player autonomy wins: AI Dialogue toggle is only greyed out for RAM fail
(< 1.6 GB free). Battery suspend shows a warning label instead of
disabling the toggle — player can override the auto-suspend at any time.
Changes:
- settings_dialog: toggle disabled = hw_status == "fail" only
- settings_dialog: add _ai_battery_warning_label (STATUS_YELLOW) shown
when _ai_inference_suspended; hidden when plugged back in via
set_ai_inference_suspended()
- settings_dialog: is_ai_dialogue_toggle_enabled() no longer checks
_ai_inference_suspended
- settings_dialog: set_ai_inference_suspended() updates warning label
visibility, not toggle disabled state
- ui-strings: add settings.ai_battery_warning "High battery usage"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Platform abstraction:
- New PlatformInfo autoload (extends Node, registered first in project.godot).
Owns all OS queries: power state monitoring (30s poll), memory (on demand),
file path resolution (user_data_dir, config_dir, benchmark_cache_path,
install_dir, executable_path, cache_dir, model_dir).
- PowerProfile enum (FULL/BATTERY/POWER_SAVER), power_profile_changed signal.
Uses OS.callv("get_power_info") to defer resolution to runtime — avoids
compile errors on Godot 4.6 headless builds without power API.
HardwareDetector refactor:
- check_ram() now delegates to PlatformInfo.refresh_memory() + free_memory_mb.
All direct OS.get_memory_info() calls removed.
- classify_power_state(int) and should_suspend_inference(int) delegate to
PlatformInfo for single source of truth.
- check_power_state() → {power_state, classification, should_suspend}.
- Battery suspend/resume: on PowerProfile.BATTERY, stores pre-battery pref and
sends ChangeSettings(false) to server. On FULL restore, sends ChangeSettings
with saved pref if it was enabled. inference_suspended member tracks state.
Settings dialog:
- is_ai_inference_suspended() / set_ai_inference_suspended(bool) — testable API
per Hoshe's test contract. Reads HardwareDetector.inference_suspended on open.
- Toggle now disabled when battery-suspended OR hardware fails (not only fail).
- get_ai_dialogue_label_text() wired to UIStrings ("settings.ai_dialogue_toggle")
instead of hardcoded string.
Cleanup:
- Deleted ai_dialogue_detector.gd and .uid (orphaned duplicate, dead code).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements the full AI-Enhanced Dialogue feature for Sprint 26:
- HardwareDetector autoload (extends Node): three-layer detection —
Layer 1 RAM classification (pass/marginal/fail, thresholds 2GB/1.6GB),
Layer 2 TPT benchmark cache (green/yellow/red, thresholds 6/3 t/s),
Layer 3 degradation monitoring (>40% drop → yellow). load_ai_pref()
restores toggle state from user://settings.cfg on startup.
- Settings dialog AI section: toggle, colored status dot, status message
label, testable API (get_ai_dialogue_label_text, set_ai_dialogue_
hardware_status, is_ai_dialogue_toggle_enabled). Only RAM "fail" greys
out toggle — player always overrides yellow/red recommendations (D-138).
- GameState.ai_enhanced_dialogue_enabled (default true, opt-out model).
GameState.settings_response (v20 one-shot settings dump from server).
apply_snapshot() hydrates ai_enhanced_dialogue_enabled from full dump.
- Protocol v19→v20, settings_response decoding in decode_snapshot().
Protocol converted to extends Node autoload (enables test has_method).
encode_change_settings() helper for test inspection.
- InputMapper: CHANGE_SETTINGS, REQUEST_ALL_SETTINGS, DELETE_SETTING.
SimBridge: wire mappings for all three. RequestAllSettings queued after
handshake to hydrate client state from server SQLite on connect.
settings_response carry-forward in receive_bytes().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Per-player settings via rusqlite (bundled, zero runtime dep). Server
owns the settings DB; client sends ChangeSettings commands over IPC.
Extensible key-value with typed columns (String/Int/Float/Bool).
Protocol bumped to v20 with settings_response in ObserverSnapshot.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- protocol.gd: replace capitalize() with explicit match for archetype
string mapping, push_error on unknown input with Detective fallback
- main.gd: clear _known_triangle_ids in _teleport_transition() alongside
_known_recognition_ids so chime re-fires after room change
- news_ticker.gd: defer get_minimum_size() via call_deferred to run
after layout pass, fixing first-frame scroll distance
- 3 new tests: unknown archetype fallback, triangle dedup per-id,
independent triangle ID firing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 tests covering character select, triangle activation consumer,
news ticker, and protocol v19 bridge. Includes show/hide behavior
for ticker on null current_ticker.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sprint 24 Signal — three client tickets delivering the player-facing
storyteller feedback loop:
- #588: Character archetype select screen between New Game and session
start. Two-card UI (Smuggler/Detective), keyboard+mouse, ESC cancels.
GameState.character_archetype persisted and sent in StartupMessage.
PROTOCOL_VERSION bumped to 19.
- #590: Triangle crisis event consumer. Decodes triangle_crisis_events
from snapshot, fires sfx_monologue_chime_urgent once per triangle per
session via AudioManager.CHIME_ACTIVATION.
- #592: News ticker HUD element. Scrolling marquee on UILayer, visible
only when current_ticker is present in snapshot (Last Shift zone).
Zero-arg update_from_state reads from GameState.current_snapshot.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TestHarness: remove deprecated tiles/visible_positions keys, add tile
type (floor/wall/door) to visible_tiles, expand radius to 5. Bug report
dialog: capture viewport screenshot before showing overlay, save as
screenshot.png in report bundle. time_display: use maxf() instead of
max() to match float argument types.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add live server lifecycle to tests/run-visual (start/stop server per
scenario, parse LISTENING:{port}). Add MessagePack snapshot replay to
visual_capture.gd via Protocol.decode_snapshot() — exercises the full
client pipeline from wire bytes to rendered fog. Three replay scenarios
(hub_spawn, fog_theater, hub_after_movement) plus one live scenario
(fog_live_hub). Add gen_gauntlet_fixtures.rs to produce .msgpack fixtures
from the Gauntlet test world. Add max_diff_pct threshold to visual-diff.
Makefile: add fixtures-gauntlet target, fix build-client double-import,
preserve .godot cache in clean.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>