Kingdom Come: Deliverance

File information

Last updated

Original upload

Created by

Mrozak

Uploaded by

5133p39

Virus scan

Safe to use

Tags for this mod

About this mod

Automatically hides HP and Stamina bars if not injured and not in combat, and compass (optional) after it was shown for few seconds.

Permissions and credits
Changelogs
This mod only automatically hides the HP and Stamina bars, and optionally the Compass, when they are not needed.
It does NOT alter the HUD in any other way, unless you use any of the Miscelaneous files.

It uses the wh_ui_ShowStats cvar to show/hide HP and Stamina bars depending on your health or combat state.
- when in combat, the HP and Stamina bars are always displayed.
- when not in combat, the HP and Stamina bars are hidden, except if you are injured (HP < 95%)

It also hides the compass using wh_ui_ShowCompass cvar to hide the compass few seconds after it detects it being visible.
You will need to bind some key to "wh_ui_ShowCompass 1" in order to display the compass.
When you press that key, the compass will be displayed, and automatically hidden after 3 seconds.

Use console command "mors" to show list of current settings:
(note: to change the settings, replace the dot with underscore - eg. use "mors_timescale 1" instead of "mors.timescale 1")

  • mors.timescale
    To change the timescale to 1:1, use "mors_timescale 1".To revert to default value, use "mors_timescale 15".WARNING: You absolutely MUST revert to default before sleeping or waiting, otherwise the game may end up in neverending sleep/wait cycle.
  • mors.regen_health, mors.regen_stamina
    These are cheats that when active, keeps regenerating your health and stamina.I use them for testing and left them in for convenience (or because i was lazy to remove them).If you don't want to cheat, just dont use them, pretend its not there.To activate them, use "mors_regen_health 1" and/or "mors_regen_stamina 1" (set them to zero to deactivate).
  • mors.autohide_stats
    Set to 1 if you want the status bars to automatically hide when not injured and out of combat (set to zero to deactivate).
  • mors.autohide_compass
    Set to 1 if you want the compass to automatically hide after being shown for few seconds (set to zero to disable hiding the compass).
  • mors.autohide_compass_timer_id
    DO NOT CHANGE!!! This is not a setting, but variable to hold the timer to hide the compass after it has been shown.
  • mors.autohide_compass_timer_period
    This is the delay in miliseconds after which to hide the compass once it has been shown.For example, set to 3000 to make the compass hide after 3 seconds.


Note:
You may not be able to see your stamina when running (unless in combat or injured), but it shouldn't be an issue, because the game gives you plenty of other audible and visual hints to indicate your current stamina level.
Same when you are out hunting with your bow - not in combat and unless injured, the bars will stay hidden, but you can use the same audible/visual hints to know how is your stamina doing while drawing the bow.
Similarly with your horse - you dont need to see its stamina at all, you can tell how he is by listening to his noises and observing his behaviour.


Known "issue"
Not really an "issue", but... if you overeat (you get the pig icon), the HP/Stamina bars might be shown even at full health.
It may depend on how much you ate - if you overeat just a little, the bars may be still hidden as they should.
Just dont overeat, or wait until the pig icon is gone and then the auto-hiding will work again as intended.

Compatibility
This mod relies on a custom script "Scripts\Startup\main.lua".
If some other mod does the same, it will conflict with this one (in which case it should be fairly straightforward to merge the two scripts/mods, so it shouldn't be a big deal).

Installation
Same as with any other mod - unpack the downloaded archive into your Mods folder (create it if it does not exist).
For the optional version that also hides the compass, you need to have "user.cfg" in the game folder, where you bind some key to "wh_ui_ShowCompass 1" like this:

bind 7 wh_ui_showCompass 1

...change 7 to the key you want to use.


The Miscelaneous files
You do not need to use them, they are purely optional, not required for the auto-hiding feature to work.

  • Cursor is removed
  • Attack direction indicator shows only the current direction
  • HP and Stamina bars have a different, simple look
    The "black" variants are inverted - red/yellow parts indicate the HP/Stamina you lost, so full health/stamina is all black, and when you get hurt you start seeing some red.