Skyrim-Style HUD?

Discuss modding questions and implementation details.
Post Reply
IAmTheClayman
Posts: 9
Joined: Fri Dec 07, 2018 7:31 am

Skyrim-Style HUD?

Post by IAmTheClayman » Thu Nov 07, 2019 6:08 pm

Is it currently possible to create a Skyrim-style HUD for Heatlth, Stamina and Magicka? What I'd love for MVP is for the bars to display horizontally and be screen-centered, with stretch goals to have the UI show current level for each bar out of the total (visually, not via text although that could be an even stretchier goal lol)

I know this is feasible in Unity, I just don't know if it's currently doable in the DFU framework. Anyone have tips?

User avatar
pango
Posts: 1614
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Skyrim-Style HUD?

Post by pango » Thu Nov 07, 2019 11:48 pm

Hi,
This is handled by HUDVitals.cs, that uses VerticalProgress.cs and VerticalProgressSmoother.cs. I haven't seen horizontal counterparts, but it shouldn't be too hard to adapt them :)

I'm a noob when it comes to modding, but HUDVitals doesn't do much more than displaying gauges, so I guess it would be fine for a mod to override then entire class...
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

IAmTheClayman
Posts: 9
Joined: Fri Dec 07, 2018 7:31 am

Re: Skyrim-Style HUD?

Post by IAmTheClayman » Fri Nov 08, 2019 12:12 am

pango wrote:
Thu Nov 07, 2019 11:48 pm
Hi,
This is handled by HUDVitals.cs, that uses VerticalProgress.cs and VerticalProgressSmoother.cs. I haven't seen horizontal counterparts, but it shouldn't be too hard to adapt them :)

I'm a noob when it comes to modding, but HUDVitals doesn't do much more than displaying gauges, so I guess it would be fine for a mod to override then entire class...
Thanks for the starting point! Seems like VerticalProgress inherits from BaseScreenComponent, VerticalProgressSmooter inherits from VerticalProgress, and HUDVitals has several VerticalProgressSmoother objects, three each for each vitals bar. Interesting that, for example, base health is treated as a separate bar from health gain and health loss.

I think the best way to attack this is to create two new classes: HorizontalProgress and HorizontalProgressSmoother, which mimic the respective "Vertical" versions, and then overwrite HUDVitals to use HorizontalProgress bars in place of VerticalProgress bars. Someone stop me if that seems like a ridiculous solution

IAmTheClayman
Posts: 9
Joined: Fri Dec 07, 2018 7:31 am

Re: Skyrim-Style HUD?

Post by IAmTheClayman » Fri Nov 08, 2019 7:49 am

Quick update after Day 1. Made more progress than I expected. Figured out how the Alignment enums work, how to move the Vitals bars around the screen and how their containing Rect can be resized. End result is the following:
Render 1.png
Render 1.png (1.65 MiB) Viewed 163 times
Transparent white background is just to make sure that the bars line up with the container. The end goal is to have a UI that looks more or less like this:
End Goal.png
End Goal.png (1.65 MiB) Viewed 163 times
I want the bar textures and frames to be customizable, and for there to be a vertical offset option that will allow, as examples, all three bars to be at the same height, or the Magicka and Fatigue bars to be below the Health bar. Adding the interaction mode text would be an optional .dfmod, and is mainly there to take up some of the dead space left behind after moving the vitals bars.

Would love to know what you all think

Ommamar
Posts: 447
Joined: Thu Jul 18, 2019 3:08 am

Re: Skyrim-Style HUD?

Post by Ommamar » Fri Nov 08, 2019 5:52 pm

I think the bars would look better running across the bottom of the screen. Other then that looks like a good implementation of what you are wanting.

Firebrand
Posts: 237
Joined: Thu Jul 18, 2019 6:07 pm

Re: Skyrim-Style HUD?

Post by Firebrand » Fri Nov 08, 2019 6:48 pm

Ommamar wrote:
Fri Nov 08, 2019 5:52 pm
I think the bars would look better running across the bottom of the screen. Other then that looks like a good implementation of what you are wanting.
I agree.

IAmTheClayman
Posts: 9
Joined: Fri Dec 07, 2018 7:31 am

Re: Skyrim-Style HUD?

Post by IAmTheClayman » Fri Nov 08, 2019 9:41 pm

Ommamar wrote:
Fri Nov 08, 2019 5:52 pm
I think the bars would look better running across the bottom of the screen. Other then that looks like a good implementation of what you are wanting.
Firebrand wrote:
Fri Nov 08, 2019 6:48 pm
I agree.
Fair enough. I plan to make it customizable enough where you can have the bars at the very top of the screen, the very bottom, or anywhere in between. Right now in testing I'm noticing that the text that pops up when you change interaction modes gets covered by the bars, so I may have to write a bit of code to handle that corner case

Narf the Mouse
Posts: 836
Joined: Mon Nov 30, 2015 6:32 pm

Re: Skyrim-Style HUD?

Post by Narf the Mouse » Sun Nov 10, 2019 1:51 am

...Enemy health bars wen? :D

Seriously, though, although Skyrim's GUI in general is bleh (IMO), I like the modern positioning and invisibile-when-full of Skyrim's Health/Magicka/Fatigue bars. Enemy health bars would be cool, but take your time.
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

User avatar
pango
Posts: 1614
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Skyrim-Style HUD?

Post by pango » Sun Nov 10, 2019 2:35 am

Invisible-when-full seems to make sense only in games where your vitals constantly regen, so that full gauges is the norm...
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Narf the Mouse
Posts: 836
Joined: Mon Nov 30, 2015 6:32 pm

Re: Skyrim-Style HUD?

Post by Narf the Mouse » Sun Nov 10, 2019 2:45 am

pango wrote:
Sun Nov 10, 2019 2:35 am
Invisible-when-full seems to make sense only in games where your vitals constantly regen, so that full gauges is the norm...
Mod options are a thing, and I've recently recreated my Magicka Regeneration mod.
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

Post Reply