Jump to content

Making a HUD Status Bar for my "True" HP


Tristamid

Recommended Posts

I'm using this Mod: https://www.nexusmods.com/oblivion/mods/46330
It's my favorite alternative death mod because it always works. But it does so by increasing the player's HP by 1000 and saving them if their HP goes below 1000. While genius and consistent, it means I can't trust the default HP bar to tell me where I'm really at, since it'll look like it's 95% full and I'll be on death's door.

I'm looking to make a second, "true" health bar using HUD Status Bar in order to tell me my HP -1000, and have it display above the current HP/MP/Stamina bars. Any help would be appreciated.

 

Link to comment
Share on other sites

Making your own status bars with this mod is actually rather easy. I made a bunch of them myself in the past, but it's already been a while and I'll have to refresh my knowledge of the details some.

 

If it's not possible to have the calculation inside the status bars config directly, then at the most it'll need a little quest script with new variables to be displayed instead in a mod of your own.

 

I'll try to unearth my old setup and come back when I know more again.

Link to comment
Share on other sites

Hmm, seems like Hud Status Bars made this yet even easier than I thought. The formula to substract the 1000 from the current health can directly be entered into the value field of the new bar.
I'm just not 100% sure about how the placement has to be made, as this strongly depends on your current status bar setup. But getting the placement right with Hud Status Bars also is no rocket science.
But let's start small and do one after the other.

You know where your "Hud Status Bars.ini" is located and are ready to edit it?
Can you locate the default health bar inside it (it's usually well documented with remarks)?
Let's first add another bar directly after it and see that we get the displayed value right.

The next stuff depends some on both your current setup, especially your choice of bar visuals, and your intended visuals of the new bar, but let's stick to the default and see where we get.
Add this into your INI at the place I mentioned above:

set tnoHSB.hud_type to HUDbarHorizontal
set tnoHSB.hud_color to sv_Construct "HUDcolorHealth + 4*(GetDisease > 0)" ; Change to brown when you have a disease
set tnoHSB.hud_val to sv_Construct "(Player.GetAV Health) - 1000"
set tnoHSB.hud_max to sv_Construct "(Player.GetBaseAV Health) - 1000"
set tnoHSB.hud_x to HUDprevBar
set tnoHSB.hud_y to HUDprevBarAbove
SetStage tnoHSB 10

And let's see what this will bring us now.

 

If anything's not working, yet, give me a full printout of your then-current "Hud Status Bars.ini", or maybe only the relevant part (the bar definition above and below the new bar you added with this).

 

edit: Added the color definition, as I don't know if it keeps the previous setup or not. Better safe than sorry.

Link to comment
Share on other sites

This worked. Thank you SO much.

Turns out the issue was that the original ini I had used an odd formula to find my health. Seen here:

 

; Health orb
set tnoHSB.hud_val to sv_Construct "GetMenuFloatValue %qhudmain_background\hudmain_statusbars\hudmain_health_empty\hudmain_health_full\user0%q 1004"
set tnoHSB.hud_color to sv_Construct "HUDcolorHealth + 4*(GetDisease > 0)" ; Change to brown when you have a disease
set tnoHSB.hud_type to HUDbarVertical
set tnoHSB.hud_y to HUDprevBar
set tnoHSB.hud_x to HUDbarsLeft ; To the left of the centered fatigue bar. This works because the fatigue bar had hud_store_pos set
set tnoHSB.hud_custom to sv_Construct "orb\orb"
set tnoHSB.hud_custom_edge to sv_Construct "-"
set tnoHSB.hud_custom_back to sv_Construct "-"
set tnoHSB.hud_custom_front to sv_Construct "orb\orb_cower"
set tnoHSB.hud_custom_w to 114
set tnoHSB.hud_custom_h to 114
set tnoHSB.hud_custom_x to 7
set tnoHSB.hud_custom_y to 7
set tnoHSB.hud_custom_bw to 128
set tnoHSB.hud_custom_bh to 128
set tnoHSB.hud_alpha to 255
SetStage tnoHSB 10

So subtracting anything using your values of:

set tnoHSB.hud_val to sv_Construct "(Player.GetAV Health) - 1000"
set tnoHSB.hud_max to sv_Construct "(Player.GetBaseAV Health) - 1000"

only caused my HP to show as empty. Even when testing on my own, I only tried all the incorrect combinations like using

set tnoHSB.hud_max

set tnoHSB.hud_min

and various other things. So I was on the right path but just didn't know the proper keywords. You're a life saver, and I appreciate you.

 

EDIT: This is my custom version for the ORB variation that I use. Now, if someone can show me why my circular compass doesn't show in the lower right and I instead get the vanilla Oblivion compass, I'll be great. I'm installing through MO2, despite the vague warnings I get not to use it, and went through the normal BAIN setup. Tried various combinations and the rest of the ORB features work just fine, but not the compass.

 

; Health orb
set tnoHSB.hud_val to sv_Construct "(Player.GetAV Health) - 1000"
set tnoHSB.hud_max to sv_Construct "(Player.GetBaseAV Health) - 1000"
set tnoHSB.hud_color to sv_Construct "HUDcolorHealth + 4*(GetDisease > 0)" ; Change to brown when you have a disease
set tnoHSB.hud_type to HUDbarVertical
set tnoHSB.hud_y to HUDprevBar
set tnoHSB.hud_x to HUDbarsLeft ; To the left of the centered fatigue bar. This works because the fatigue bar had hud_store_pos set
set tnoHSB.hud_custom to sv_Construct "orb\orb"
set tnoHSB.hud_custom_edge to sv_Construct "-"
set tnoHSB.hud_custom_back to sv_Construct "-"
set tnoHSB.hud_custom_front to sv_Construct "orb\orb_cower"
set tnoHSB.hud_custom_w to 114
set tnoHSB.hud_custom_h to 114
set tnoHSB.hud_custom_x to 7
set tnoHSB.hud_custom_y to 7
set tnoHSB.hud_custom_bw to 128
set tnoHSB.hud_custom_bh to 128
set tnoHSB.hud_alpha to 255
SetStage tnoHSB 10

Link to comment
Share on other sites

Ah, yeah, the original bars use some pre-defined GetMenuFloatValue variables the mod provides and fills in the background. These cannot be calculated with, so I used the normal means we have in scripts to get the health. Maybe it's not "perfectly" correct at all times, can't say. But it should do the trick under most known conditions.

 

Hmm, funny that, I use the orb variant, too, and I also have a problem with the compass no longer being the orb'ed one for a while. It was originally, then I must've done something wrong. Didn't yet get the time to take a closer look in order to fix it though. Wasn't playing my game or play-testing my mods in years.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...