Skyrim-Style HUD?
-
- Posts: 9
- Joined: Fri Dec 07, 2018 7:31 am
Skyrim-Style HUD?
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?
I know this is feasible in Unity, I just don't know if it's currently doable in the DFU framework. Anyone have tips?
- pango
- Posts: 3358
- Joined: Wed Jul 18, 2018 6:14 pm
- Location: France
- Contact:
Re: Skyrim-Style HUD?
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...
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...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
-
- Posts: 9
- Joined: Fri Dec 07, 2018 7:31 am
Re: Skyrim-Style HUD?
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.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...
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
-
- Posts: 9
- Joined: Fri Dec 07, 2018 7:31 am
Re: Skyrim-Style HUD?
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:
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:
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
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:
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
-
- Posts: 541
- Joined: Thu Jul 18, 2019 3:08 am
-
- Posts: 281
- Joined: Thu Jul 18, 2019 6:07 pm
-
- Posts: 9
- Joined: Fri Dec 07, 2018 7:31 am
Re: Skyrim-Style HUD?
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
-
- Posts: 833
- Joined: Mon Nov 30, 2015 6:32 pm
Re: Skyrim-Style HUD?
...Enemy health bars wen?
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.
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.
- pango
- Posts: 3358
- Joined: Wed Jul 18, 2018 6:14 pm
- Location: France
- Contact:
Re: Skyrim-Style HUD?
Invisible-when-full seems to make sense only in games where your vitals constantly regen, so that full gauges is the norm...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart
-
- Posts: 833
- Joined: Mon Nov 30, 2015 6:32 pm
Re: Skyrim-Style HUD?
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.