From 566c87c7c2d5b3b2e069401c2a316937dc811f5d Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 27 Feb 2026 23:52:14 -0500 Subject: [PATCH] Translate learn sounds entries and sync libstorm-nvgt --- AGENTS.md | 97 +++++++++++++++++++++++------------------ libstorm-nvgt | 2 +- src/sound_settings.nvgt | 49 +++++++++++++++++++++ 3 files changed, 104 insertions(+), 44 deletions(-) create mode 100644 src/sound_settings.nvgt diff --git a/AGENTS.md b/AGENTS.md index 49632a2..e089cba 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,54 +1,50 @@ # Draugnorak Project Guidelines -## Engine Reference +## NVGT Workflow -- If unsure about NVGT behavior or API details, consult the engine source in `nvgt-git/`. +- Use the `nvgt-engine-dev` skill for NVGT API behavior, include/module decisions, and engine-source verification. +- If API behavior is uncertain, verify against primary sources in `nvgt/` (engine source) and `docs/nvgt/` before coding. +- Reuse shared helpers in `libstorm-nvgt/` before creating project-local replacements. -## Asset Usage +## libstorm-nvgt Workflow -**CRITICAL**: The `bloodshed/` directory is for reference only. DO NOT use any assets from the bloodshed directory in this game. It exists solely to help with coding examples and understanding patterns, but none of its files should be included or referenced in the actual game code. +- Treat `~/git/libstorm-nvgt` as the canonical repository for shared library changes. +- Do not make canonical library changes directly inside this repo's `libstorm-nvgt/` copy first. +- Hard stop: do not implement shared-library edits in this repo's `libstorm-nvgt/` submodule copy. Make the change in `~/git/libstorm-nvgt`, commit it there, then update the submodule pointer here. +- When shared helper behavior must change: + - Implement and commit the change in `~/git/libstorm-nvgt`. + - Update this repo to the new `libstorm-nvgt` submodule commit. + - Verify Draugnorak still compiles with `./nvgt -c draugnorak.nvgt` after updating the pointer. + +## AGENTS.md Maintenance + +- Keep this file aligned with the real repository layout and active workflows. +- Update `AGENTS.md` in the same PR/commit when any of the following change: + - Core directories/modules (for example new systems under `src/`, `scripts/`, or `docs/`). + - Required build/test/validation commands. + - Localization workflow expectations. + - Canonical engine/library source locations or skill usage expectations. +- If a section is uncertain or outdated, replace it with a short verified statement instead of leaving stale instructions. ## Project Structure -- `src/` - Game source code modules - - `constants.nvgt` - Game configuration and constants - - `player.nvgt` - Player state and global timers - - `world_state.nvgt` - World object orchestration (legacy coordinator, modules are in `src/world/` and `src/enemies/`) - - `item_registry.nvgt` - Item definitions and inventory arrays - - `inventory_items.nvgt` - Equipment, quick slots, stack limits - - `inventory_menus.nvgt` - Menu orchestrator for inventory/storage/equipment/actions - - `crafting.nvgt` - Crafting orchestrator - - `quest_system.nvgt` - Quest queue + mini-game menu - - `bosses/adventure_system.nvgt` - Adventure menu + boss routing - - `inventory.nvgt` - Inventory system orchestrator (item registry, menus, crafting, runes) - - `environment.nvgt` - Trees, climbing, falling damage, rope climbing, and environmental interactions - - `combat.nvgt` - Combat system (spear/axe/sling) - - `time_system.nvgt` - Time, day/night, invasions, expansions, blessings, weather ticks - - `weather.nvgt` - Wind/rain/thunder ambience system - - `save_system.nvgt` - Save/load (AES encrypted, versioned) - - `base_system.nvgt` - Base automation (residents, food, defense, collection) - - `ui.nvgt` - UI helpers, terrain lookup - - `audio_utils.nvgt` - Audio helper functions - - `creature_audio.nvgt` - Creature voice/footstep/attack audio helpers - - `notify.nvgt` - Notification system (queue + history) - - `speech_history.nvgt` - Screen reader message history (comma/period navigation) - - `text_reader.nvgt` - Accessible text reader window -- `src/world/` - World objects - - `world_fires.nvgt`, `world_snares.nvgt`, `world_drops.nvgt` - - `world_buildings.nvgt` - Firepit, Herb Garden, Storage, Pasture, Stable, Altar - - `world_streams.nvgt` - Streams + water audio - - `mountains.nvgt` - Mountain ranges, elevation, streams - - `barricade.nvgt` - Base barricade health and reinforcement -- `src/enemies/` - Enemies and creatures - - `undead.nvgt` (zombies), `bandit.nvgt` (invasions/wandering), `ground_game.nvgt` (boars), `flying_creatures.nvgt` (geese) -- `src/crafting/` - Crafting categories and recipes - - `crafting_core.nvgt`, `craft_weapons.nvgt`, `craft_tools.nvgt`, `craft_materials.nvgt`, `craft_clothing.nvgt`, `craft_buildings.nvgt`, `craft_barricade.nvgt`, `craft_runes.nvgt` -- `src/menus/` - Menu subsystems (inventory, storage, equipment, action, base info, altar, character info) -- `src/runes/` - Rune data + effects -- `src/quests/` - Quest mini-games -- `src/bosses/` - Adventure/boss encounters -- `sounds/` - Game audio assets -- `draugnorak.nvgt` - Main game file +Key paths (focused, not exhaustive): +- `draugnorak.nvgt` - Main game entry point. +- `src/` - Core gameplay systems. + - `constants.nvgt`, `player.nvgt`, `time_system.nvgt` - Global state and timing. + - `world_state.nvgt`, `src/world/` - World object orchestration and world systems. + - `src/enemies/`, `combat.nvgt`, `creature_*` - Enemy and combat behavior. + - `inventory.nvgt`, `inventory_items.nvgt`, `inventory_menus.nvgt`, `item_registry.nvgt` - Inventory/equipment/items. + - `crafting.nvgt`, `src/crafting/` - Crafting orchestration and recipe categories. + - `quest_system.nvgt`, `src/quests/`, `src/bosses/` - Quests, adventures, and boss content. + - `base_system.nvgt`, `environment.nvgt`, `weather.nvgt`, `fishing.nvgt`, `pet_system.nvgt`, `fylgja_system.nvgt` - Survival systems. + - `i18n.nvgt` - Translation loading and lookup wrappers. + - `save_system.nvgt` - Save/load behavior. +- `lang/` - Localization catalogs (`en.ini`, `en.template.ini`, and per-language files such as `es.ini`). +- `scripts/` - Build and i18n tooling (`generate_i18n_catalog.py`, `validate_i18n_catalog.py`, `audit_untranslated_strings.py`). +- `docs/` - Implementation references (`patterns.md`, `rune_system.md`, `localization.md`). +- `libstorm-nvgt/` - Shared NVGT helpers reused by this project. +- `sounds/` - Game audio assets. ## Game Mechanics @@ -207,6 +203,21 @@ Organized into categories: - Always run `./nvgt -c draugnorak.nvgt` after code changes - This compiles without opening the game window and prevents it from taking over the terminal +- If user-facing text changed, also run: + - `python3 scripts/generate_i18n_catalog.py` + - `python3 scripts/validate_i18n_catalog.py` + - `python3 scripts/audit_untranslated_strings.py` + +## Localization Workflow + +- Any new or changed user-facing string must be localizable; avoid hardcoded UI/gameplay text in NVGT files. +- Update the English catalogs in the same change as text changes by running `python3 scripts/generate_i18n_catalog.py`. +- Keep `lang/en.ini` and `lang/en.template.ini` in sync with code changes. +- Validate all translation catalogs with `python3 scripts/validate_i18n_catalog.py` and fix missing keys/placeholders before merging. +- Run `python3 scripts/audit_untranslated_strings.py` after text-heavy changes; keep `scripts/i18n_audit_allowlist.txt` small and commented. +- Preserve placeholders exactly as written (for example `{arg1}`, `{language}`) and keep escapes such as `\n` and `\t` intact. +- For new translations, copy `lang/en.template.ini` to `lang/.ini`, then update `[meta]` (`code`, `name`, `native_name`) to match the file. +- Translator-facing instructions live in `translate.md`; developer-level localization details live in `docs/localization.md`. ## Code Standards diff --git a/libstorm-nvgt b/libstorm-nvgt index 59f2880..c658bb6 160000 --- a/libstorm-nvgt +++ b/libstorm-nvgt @@ -1 +1 @@ -Subproject commit 59f288049826e86c33f597e9db77c094a2435ecb +Subproject commit c658bb6cd7fcdf701f03d4ab35b7f88e337e1a89 diff --git a/src/sound_settings.nvgt b/src/sound_settings.nvgt new file mode 100644 index 0000000..a8d8ed4 --- /dev/null +++ b/src/sound_settings.nvgt @@ -0,0 +1,49 @@ +// Project-local learn sounds configuration. +// Keep this file in src/ so libstorm-nvgt can stay untouched. + +void configure_project_learn_sounds() { + learn_sounds_reset_configuration(); + + // Skip entries can be full file paths or directories ending with "/". + learn_sounds_add_skip_entry("sounds/quests/bone1.ogg"); + learn_sounds_add_skip_entry("sounds/quests/bone2.ogg"); + learn_sounds_add_skip_entry("sounds/quests/bone3.ogg"); + learn_sounds_add_skip_entry("sounds/quests/bone4.ogg"); + learn_sounds_add_skip_entry("sounds/quests/bone5.ogg"); + learn_sounds_add_skip_entry("sounds/quests/bone6.ogg"); + learn_sounds_add_skip_entry("sounds/quests/bone7.ogg"); + learn_sounds_add_skip_entry("sounds/quests/bone8.ogg"); + learn_sounds_add_skip_entry("sounds/actions/fishpole.ogg"); + learn_sounds_add_skip_entry("sounds/actions/hit_ground.ogg"); + learn_sounds_add_skip_entry("sounds/menu/"); + learn_sounds_add_skip_entry("sounds/nature/"); + learn_sounds_add_skip_entry("sounds/pets/"); + learn_sounds_add_skip_entry("sounds/quests/"); + + learn_sounds_add_description( + "sounds/actions/bad_cast.ogg", + i18n_text("Your cast missed the water and landed in nearby foliage where it is unlikely to attract fish.")); + learn_sounds_add_description( + "sounds/actions/cast_strength.ogg", + i18n_text("When casting release control when over water. When catching release when sound is over player.")); + learn_sounds_add_description("sounds/enemies/enter_range.ogg", + i18n_text("An enemy is in range of your currently wielded weapon.")); + learn_sounds_add_description("sounds/enemies/exit_range.ogg", + i18n_text("An enemy is no longer in range of your currently wielded weapon.")); + learn_sounds_add_description("sounds/actions/falling.ogg", i18n_text("Lowers in pitch as the fall progresses.")); + learn_sounds_add_description("sounds/enemies/invasion.ogg", i18n_text("The war drums pound! Prepare for combat!")); + learn_sounds_add_description("sounds/items/miscellaneous.ogg", + i18n_text("You picked up an item for which there is no specific sound.")); + learn_sounds_add_description("sounds/enemies/goblin1.ogg", i18n_text("Inhabits mountainous regions.")); + learn_sounds_add_description("sounds/enemies/undead_resident1.ogg", + i18n_text("Not quite a zombie nor a vampyr. These undead remember they used to have a home, and " + "maybe there's food there...")); + learn_sounds_add_description("sounds/enemies/wight1.ogg", + i18n_text("More powerful undead. They do not lose track of you when you are in the base.")); + learn_sounds_add_description("sounds/enemies/vampyr1.ogg", i18n_text("Ever hungry, they feed upon your residents.")); + learn_sounds_add_description("sounds/enemies/vampyr2.ogg", i18n_text("Ever hungry, they feed upon your residents.")); + learn_sounds_add_description("sounds/enemies/vampyr3.ogg", i18n_text("Ever hungry, they feed upon your residents.")); + learn_sounds_add_description("sounds/enemies/vampyr4.ogg", i18n_text("Ever hungry, they feed upon your residents.")); + learn_sounds_add_description("sounds/enemies/yeti1.ogg", i18n_text("Inhabits snowy regions.")); + learn_sounds_add_description("sounds/enemies/zombie1.ogg", i18n_text("Basic undead.")); +}