Custom AltHud class

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Custom AltHud class

Re: Custom AltHud class

by _mental_ » Tue Nov 26, 2019 5:01 am

Well, for some horror standalone game making AltHUD empty (or very limited) is a viable option. For Doom mod it's a nonsense indeed. Ability to force internal AltHUD was added just for this case.

Re: Custom AltHud class

by Graf Zahl » Tue Nov 26, 2019 4:46 am

No concerns. It still needs some work for easier use but what's there is enough to get people started.

But one piece of warning to a certain type of modder: Should I see a single case of this being abused to render the AltHud useless I'll add an override switch.
The point here is to allow customization of the contents, not to do something completely dfifferent.

Re: Custom AltHud class

by _mental_ » Tue Nov 26, 2019 4:08 am

I pushed the changes to PR branch. If there will be no concerns, I'll merge it to master.

Re: Custom AltHud class

by Player701 » Tue Nov 26, 2019 3:14 am

Agreed. I will just have to add a reminder for those who want to use the custom AltHUD to disable the override CVAR.

Re: Custom AltHud class

by Nash » Tue Nov 26, 2019 3:12 am

Yes, that sounds like the most fair course of action to everyone concerned.

Re: Custom AltHud class

by _mental_ » Tue Nov 26, 2019 2:58 am

As this PR didn't receive any comments, I propose the following. I will merge it, make most of functions virtual, and add a CVAR that will force usage of internal AltHUD.
So, alternative HUD will be fully customizable, but it can be overridden with the default one if player wants to do it for some reason.

Re: Custom AltHud class

by Nash » Sat Nov 23, 2019 6:48 pm

mental: thanks for kickstarting this! Any kind of customizability would be appreciated at this point. :)

Re: Custom AltHud class

by _mental_ » Wed Nov 20, 2019 10:36 am

Here is what I made so far. It's up to Graf to leave/add/replace existing virtual functions, I didn't touch it intentionally except Init() method.

Re: Custom AltHud class

by Nash » Tue Nov 19, 2019 7:53 pm

To be specific, here are the two features of my current mod that make the default Alt Hud look not too useful:

1 - I am implementing a weapon system similar to the game Borderlands - in that game, weapons are uniquely generated, so you may not necessarily "have" the same weapons in your inventory all the time. The weapon drawer ideally should be dynamic.
2 - I am implementing a custom armor system where this is no single armor value - the player can equip 3 different armor pieces (helmet, body armor, boots) and I would like to draw the armor amount of the difference pieces. Also the armor icon should be dynamic, because there would be different kinds of armor pieces to find and equip.

Of course, it's up to you to decide how much customizability you'll want to allow. :)

Re: Custom AltHud class

by Graf Zahl » Tue Nov 19, 2019 4:21 pm

Correct, but the weapon problem needs a solution, I've seen too many mods where the weapon/ammo part is totally broken.
I'll have to see whether I actually allow overriding the drawers or merely the collection functions. Probably the latter.

Re: Custom AltHud class

by Blue Shadow » Tue Nov 19, 2019 3:41 pm

Correct me if I'm wrong, but I thought the idea behind the alt HUD is that it acts as a fall-back in case someone does silly things like removing the status bar and fullscreen HUD.

Re: Custom AltHud class

by Player701 » Tue Nov 19, 2019 1:43 pm

Graf Zahl wrote:for example customize the ammo display which in general is what's needed the most.
Hey, that's exactly what I could use right now. If it were possible to modify the alternative HUD, I could provide a lightweight replacement for the main HUD used in my project. It appears that the HUD system I've been developing recently may be just too much for older entry-level CPUs, but I can't use standard HUDs as fallback due to how the weapons are designed.

Also, just to clarify, do I understand it correctly that the OP's suggestion is not just that the AltHUD can be subclassed and modified, but also that it can be replaced so that enabling "Alternative HUD" in the options menu will enable the custom alternative HUD instead of the original one? That, of course, sounds reasonable, but I just wanted to be sure.

Re: Custom AltHud class

by Nash » Tue Nov 19, 2019 11:28 am

Agreed with Graf - when I made this thread, all I had in mind was to customize the ammo and weapon drawer... had no intention to touch anything else. So being able to select which of the several drawers to override/customize is preferable.

Re: Custom AltHud class

by Graf Zahl » Tue Nov 19, 2019 10:20 am

I'd make all sub-drawers virtual, so that mods can, for example customize the ammo display which in general is what's needed the most.

Re: Custom AltHud class

by _mental_ » Tue Nov 19, 2019 9:45 am

What kind of work? A base class for alternative HUDs? With exception of making Init virtual, and maybe Draw too, instead of DrawInGame and DrawAutomap, I could not imagine anything meaningful.

Top