Altering vanilla HUD elements without modifying HUDVitals.cs?

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

Altering vanilla HUD elements without modifying HUDVitals.cs?

Post by IAmTheClayman »

So a mod I am working on would require changes to the way the health, stamina and magicka are displayed onscreen. I know that this is governed by HUDVitals.cs, but I get the feeling that publishing a mod that directly edits this file is not going to be the best way to handle things (especially if I want the mod to be compatible with any other mods that alter the HUD).

What are best practices for accomplishing what I have in mind? The goal would be to:
  1. Capture and prevent the default rendering of health, stamina and magicka
  2. Draw my own HUD for these elements in its place, or else modify the code used to alter size, position, etc.
  3. Do all of this in a separate .cs file so I'm not directly editing HUDVitals

User avatar
Magicono43
Posts: 1153
Joined: Tue Nov 06, 2018 7:06 am

Re: Altering vanilla HUD elements without modifying HUDVitals.cs?

Post by Magicono43 »

For the hiding of the vanilla bars part, I'd take a look at this mod for an example atleast: https://github.com/magicono43/DFU-Mod_H ... oneMain.cs

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

Re: Altering vanilla HUD elements without modifying HUDVitals.cs?

Post by IAmTheClayman »

Thank you so much to linking to this! Makes a lot of sense looking at it, but unfortunately I can't get any mods working in the Editor. Made another post about it if you happen to have some insight
Magicono43 wrote: Mon Nov 11, 2024 9:01 pm For the hiding of the vanilla bars part, I'd take a look at this mod for an example atleast: https://github.com/magicono43/DFU-Mod_H ... oneMain.cs

Post Reply