From e02d39e7f18433ff80c1bf0231f3ae18998d67db Mon Sep 17 00:00:00 2001 From: is-this-c <87069698+is-this-c@users.noreply.github.com> Date: Tue, 6 Oct 2026 21:33:14 +1300 Subject: [PATCH 1/3] Add `bighud_health` and `bighud_ammo` console variables --- docs/CHANGELOG.md | 1 + game_patch/hud/hud.cpp | 46 +++++++++++++++++++++++++++-- game_patch/misc/alpine_settings.cpp | 10 +++++++ game_patch/misc/alpine_settings.h | 2 ++ 4 files changed, 57 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 73271d2b3..5b40dd63a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -98,6 +98,7 @@ Version 1.5.0 (Trillium): Not yet released - Load levels with very large face counts or many level sounds much faster [@is-this-c](https://github.com/is-this-c) +- Add `bighud_health` and `bighud_ammo` console variables to disable `bighud` for health and ammo, which is useful for mods incompatible with `bighud` - Support TrueType fonts in 3D text rendering - Render world HUD text (player labels, damage numbers, ping labels, countdowns) in 3D for smooth sub-pixel motion - Allow TrueType fonts to be rendered into bitmaps with mipmaps (D3D11 only) diff --git a/game_patch/hud/hud.cpp b/game_patch/hud/hud.cpp index a11cbb030..e0c38b032 100644 --- a/game_patch/hud/hud.cpp +++ b/game_patch/hud/hud.cpp @@ -157,7 +157,7 @@ static bool is_screen_resolution_too_low_for_big_hud() void set_big_hud(bool is_big) { - hud_status_set_big(is_big); + hud_status_set_big(is_big && g_alpine_game_config.big_hud_health); multi_hud_chat_set_big(is_big); hud_personas_set_big(is_big); weapon_select_set_big(is_big); @@ -167,7 +167,7 @@ void set_big_hud(bool is_big) g_target_player_name_font = hud_get_default_font(); hud_setup_positions(rf::gr::screen_width()); - hud_weapons_set_big(is_big); + hud_weapons_set_big(is_big && g_alpine_game_config.big_hud_ammo); set_big_countdown_counter(is_big); // TODO: Message Log - Note: it remembers text height in save files so method of recalculation is needed @@ -189,6 +189,46 @@ ConsoleCommand2 bighud_cmd{ "bighud", }; +ConsoleCommand2 bighud_health_cmd{ + "bighud_health", + [] { + g_alpine_game_config.big_hud_health = !g_alpine_game_config.big_hud_health; + set_big_hud(g_alpine_game_config.big_hud); + if (!g_alpine_game_config.big_hud && g_alpine_game_config.big_hud_health) { + rf::console::print( + "Big HUD health is enabled but ignored, because Big HUD is disabled" + ); + } else { + rf::console::print( + "Big HUD health is {}", + g_alpine_game_config.big_hud_health ? "enabled" : "disabled" + ); + } + }, + "Toggle big HUD for health", + "bighud_health", +}; + +ConsoleCommand2 bighud_ammo_cmd{ + "bighud_ammo", + [] { + g_alpine_game_config.big_hud_ammo = !g_alpine_game_config.big_hud_ammo; + set_big_hud(g_alpine_game_config.big_hud); + if (!g_alpine_game_config.big_hud && g_alpine_game_config.big_hud_ammo) { + rf::console::print( + "Big HUD ammo is enabled but ignored, because Big HUD is disabled" + ); + } else { + rf::console::print( + "Big HUD ammo is {}", + g_alpine_game_config.big_hud_ammo ? "enabled" : "disabled" + ); + } + }, + "Toggle big HUD for ammo", + "bighud_ammo", +}; + ConsoleCommand2 ui_realarmor_cmd{ "ui_realarmor", []() { @@ -462,6 +502,8 @@ void hud_apply_patches() // Other commands bighud_cmd.register_cmd(); + bighud_health_cmd.register_cmd(); + bighud_ammo_cmd.register_cmd(); ui_realarmor_cmd.register_cmd(); #ifndef NDEBUG hud_coords_cmd.register_cmd(); diff --git a/game_patch/misc/alpine_settings.cpp b/game_patch/misc/alpine_settings.cpp index d2607b350..1fd2b20ff 100644 --- a/game_patch/misc/alpine_settings.cpp +++ b/game_patch/misc/alpine_settings.cpp @@ -734,6 +734,14 @@ bool alpine_player_settings_load(rf::Player* player) } // Load UI settings + if (settings.count("BigHUDHealth")) { + g_alpine_game_config.big_hud_health = std::stoi(settings["BigHUDHealth"]); + processed_keys.insert("BigHUDHealth"); + } + if (settings.count("BigHUDAmmo")) { + g_alpine_game_config.big_hud_ammo = std::stoi(settings["BigHUDAmmo"]); + processed_keys.insert("BigHUDAmmo"); + } if (settings.count("BigHUD")) { g_alpine_game_config.big_hud = std::stoi(settings["BigHUD"]); set_big_hud(g_alpine_game_config.big_hud); @@ -1638,6 +1646,8 @@ void alpine_player_settings_save(rf::Player* player) // UI file << "\n[UISettings]\n"; file << "BigHUD=" << g_alpine_game_config.big_hud << "\n"; + file << "BigHUDHealth=" << g_alpine_game_config.big_hud_health << "\n"; + file << "BigHUDAmmo=" << g_alpine_game_config.big_hud_ammo << "\n"; if (g_alpine_game_config.sniper_scope_color_override) { file << "SniperScopeColor=" << format_hex_color_string(*g_alpine_game_config.sniper_scope_color_override) << "\n"; } diff --git a/game_patch/misc/alpine_settings.h b/game_patch/misc/alpine_settings.h index 20f82515b..7902e8db3 100644 --- a/game_patch/misc/alpine_settings.h +++ b/game_patch/misc/alpine_settings.h @@ -85,6 +85,8 @@ struct AlpineGameSettings bool mouse_linear_pitch = true; int mouse_scale = 0; // 0=Classic (RF native), 1=Raw (pure degrees), 2=Modern (id Tech/Source 0.022 deg/pixel) bool big_hud = false; + bool big_hud_health = true; + bool big_hud_ammo = true; int skip_cutscene_bind_alias = -1; bool try_disable_weapon_shake = false; bool try_fullbright_characters = false; From af03000c4377ca525ff96835e5683eef10653430 Mon Sep 17 00:00:00 2001 From: is-this-c <87069698+is-this-c@users.noreply.github.com> Date: Wed, 7 Oct 2026 02:22:14 +1300 Subject: [PATCH 2/3] Update hud.cpp --- game_patch/hud/hud.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game_patch/hud/hud.cpp b/game_patch/hud/hud.cpp index e0c38b032..c24ca08e3 100644 --- a/game_patch/hud/hud.cpp +++ b/game_patch/hud/hud.cpp @@ -196,7 +196,7 @@ ConsoleCommand2 bighud_health_cmd{ set_big_hud(g_alpine_game_config.big_hud); if (!g_alpine_game_config.big_hud && g_alpine_game_config.big_hud_health) { rf::console::print( - "Big HUD health is enabled but ignored, because Big HUD is disabled" + "Big HUD health is enabled but ignored, because big HUD is disabled" ); } else { rf::console::print( @@ -216,7 +216,7 @@ ConsoleCommand2 bighud_ammo_cmd{ set_big_hud(g_alpine_game_config.big_hud); if (!g_alpine_game_config.big_hud && g_alpine_game_config.big_hud_ammo) { rf::console::print( - "Big HUD ammo is enabled but ignored, because Big HUD is disabled" + "Big HUD ammo is enabled but ignored, because big HUD is disabled" ); } else { rf::console::print( From 9485d0fbc9ad3b1feb9f3152a5f2bbd6ac8c12fa Mon Sep 17 00:00:00 2001 From: is-this-c <87069698+is-this-c@users.noreply.github.com> Date: Wed, 7 Oct 2026 02:29:53 +1300 Subject: [PATCH 3/3] Update hud.cpp --- game_patch/hud/hud.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/game_patch/hud/hud.cpp b/game_patch/hud/hud.cpp index c24ca08e3..b8f00b872 100644 --- a/game_patch/hud/hud.cpp +++ b/game_patch/hud/hud.cpp @@ -191,8 +191,9 @@ ConsoleCommand2 bighud_cmd{ ConsoleCommand2 bighud_health_cmd{ "bighud_health", - [] { - g_alpine_game_config.big_hud_health = !g_alpine_game_config.big_hud_health; + [] (const std::optional enabled) { + g_alpine_game_config.big_hud_health = + enabled.value_or(!g_alpine_game_config.big_hud_health); set_big_hud(g_alpine_game_config.big_hud); if (!g_alpine_game_config.big_hud && g_alpine_game_config.big_hud_health) { rf::console::print( @@ -211,8 +212,9 @@ ConsoleCommand2 bighud_health_cmd{ ConsoleCommand2 bighud_ammo_cmd{ "bighud_ammo", - [] { - g_alpine_game_config.big_hud_ammo = !g_alpine_game_config.big_hud_ammo; + [] (const std::optional enabled) { + g_alpine_game_config.big_hud_ammo = + enabled.value_or(!g_alpine_game_config.big_hud_ammo); set_big_hud(g_alpine_game_config.big_hud); if (!g_alpine_game_config.big_hud && g_alpine_game_config.big_hud_ammo) { rf::console::print(