From 039c310e3a77e3d368fefd3fded62927c9e03ced Mon Sep 17 00:00:00 2001 From: M3RT1N99 <132858289+M3RT1N99@users.noreply.github.com> Date: Sat, 11 Apr 2026 00:50:08 +0200 Subject: [PATCH] Add 'Show Lifebars Only When Damaged' option Adds a new HUD setting that hides lifebars on units at full HP. Bars only appear once a unit has taken damage. Provides a noticeable FPS gain in dense crowds where most units are undamaged. Requires the matching binary patch (FAForever/FA-Binary-Patches#151) which exposes the ui_LifebarOnlyDamaged ConVar this option drives via ConExecute. Without that patch the option toggle is a no-op (the ConVar is unrecognised). - lua/options/options.lua: new toggle in the HUD section - lua/ui/help/tooltips.lua: tooltip entry options_gui_lifebar_only_damaged - loc/US/strings_db.lua: OPTIONS_0287 / OPTIONS_0288 strings Co-Authored-By: Claude Opus 4.6 (1M context) --- loc/US/strings_db.lua | 2 ++ lua/options/options.lua | 16 ++++++++++++++++ lua/ui/help/tooltips.lua | 4 ++++ 3 files changed, 22 insertions(+) diff --git a/loc/US/strings_db.lua b/loc/US/strings_db.lua index 4b94cb9dcc9..1f1de6e6dcb 100644 --- a/loc/US/strings_db.lua +++ b/loc/US/strings_db.lua @@ -7619,6 +7619,8 @@ OPTIONS_0283="UI Scale" OPTIONS_0284="Changes the size of all UI elements. (requires game restart)" OPTIONS_0285="Automatic Extractor Selection" OPTIONS_0286="After selecting an engineer, hover the mouse over a mass extractor spot to auto preselect a mass extractor for building" +OPTIONS_0287="Show Lifebars Only When Damaged" +OPTIONS_0288="When on, lifebars only appear once a unit takes damage. Hides them on full-HP units. Provides an FPS gain in dense crowds." lobui_0414 = "%d Build Restrictions" lobui_0415 = "1 Build Restriction" diff --git a/lua/options/options.lua b/lua/options/options.lua index 330f8751d95..3818e30e3de 100644 --- a/lua/options/options.lua +++ b/lua/options/options.lua @@ -990,6 +990,22 @@ options = { }, }, + { + title = "Show Lifebars Only When Damaged", + key = 'gui_lifebar_only_damaged', + type = 'toggle', + default = 0, + set = function(key, value, startup) + ConExecute("ui_LifebarOnlyDamaged " .. tostring(value)) + end, + custom = { + states = { + { text = "", key = 0 }, + { text = "", key = 1 }, + }, + }, + }, + { title = "Show Player Names", key = 'options_show_player_names', diff --git a/lua/ui/help/tooltips.lua b/lua/ui/help/tooltips.lua index a6877f33a2d..221fc022c3c 100644 --- a/lua/ui/help/tooltips.lua +++ b/lua/ui/help/tooltips.lua @@ -951,6 +951,10 @@ Tooltips = { title = "Show Lifebars of Attached Units", description = "Toggles the visibility of lifebars of on screen units (lifebars will still show in tooltip information)", }, + options_gui_lifebar_only_damaged = { + title = "Show Lifebars Only When Damaged", + description = "When on, lifebars only appear once a unit takes damage. Hides them on full-HP units. Provides an FPS gain in dense crowds.", + }, options_skin_change_on_start = { title = "Use Factional UI Skin", description = "When on, the UI skin will change to match the faction you are playing",