Skip to content

bug(ConfigLoader): convenience getters ignore JSON section structure, causing silent fallbacks #245

@niyazmft

Description

@niyazmft

Summary

ConfigLoader.getInt(), getFloat(), and getString() only accept a single key argument and perform a flat lookup against DEFAULTS — they do not support the 2-arg getValue(section, key, fallback) namespace API. Every call site that uses these convenience getters silently falls through to hard-coded fallback values instead of reading from the actual JSON config sections.

Location

  • scripts/autoload/config_loader.gd:126-147 — convenience getters
  • scripts/autoload/config_loader.gd:17-50DEFAULTS is flat (section-less)
  • scripts/combat/room_loader.gd:38 — calls getString("enemy_types") (flattened key that may not exist in sectioned JSON)
  • scripts/combat/combat_formula.gd:176,178 — calls config_int("ability_min", ...) where key does not exist in DEFAULTS

Impact

  • All config reads via convenience getters return hard-coded fallbacks instead of JSON values
  • Tunable values in config/game_config.json are silently ignored
  • Balance changes require code changes instead of config edits
  • Estimated: 5–8 call sites affected

Priority: P1 · Size: M · Status: Ready

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjulesGating label for Google Jules offload

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions