Simple HUD Add-ons [Updated February 3, 2024]

For high-res texture/sprite projects, sprite-fix patches, music add-ons, music randomizers, and other graphic/sound-only projects.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Tekish
Posts: 150
Joined: Tue Jun 28, 2016 6:31 pm

Re: Simple UI Add-ons [Updated November 26, 2018]

Post by Tekish »

I did you one better and changed the abbreviation setting to allow for 1-8 characters in both AmmoInfo and LevelInfo. I also made minor under the hood changes to all of the add-ons in an effort to further prevent them from clashing with other mods (though this probably won't address DabbingSquidward's issue).
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: Simple UI Add-ons [Updated November 26, 2018]

Post by StroggVorbis »

I've headed to bed rn, so I can't check until tomorrow. From what I remember, the Parkour chaingun called an ACS script each time it looped the ready or fire state I think, but as you said, you only use numbered scripts. Anyway, the chaingun would not stop firing if I let go of the button, only stopping once I ran out of ammo. And synthfire with the pistols and SSGs was broken for some reason. The right weapon or altfire could only be commenced once, necessating a weapon switch. Everything else should have worked as intended, weird. Would you mind trying it out for yourself in the meantime? If the new update didn't fix this, I can guarantee you should be able to reproduce this with the all-in-one version. If it helps, I loaded it before Parkour, as I stuck it in my autoload. :)
Tekish
Posts: 150
Joined: Tue Jun 28, 2016 6:31 pm

Re: Simple UI Add-ons [Updated November 26, 2018]

Post by Tekish »

You probably meant named scripts, and yeah, all I did was change them to be a bit more add-on specific (one of them was "levelenter" which was probably too broad).

EDIT: I've finally been able to replicate the issue you're talking about but it only seems to happen with AmmoInfo (or the all-in-one package), and only when it is loaded before the mod.

MORE: I spent a decent amount of time narrowing down why this happens, and it has something to do with GetActorClass and an if/then that compares that data within a specific function. As to why this only happens in AmmoInfo and not LevelInfo (which does the same comparison), I couldn't tell you. Since the problem doesn't occur when AmmoInfo loads after Parkour, that'd be my suggested fix for this.
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: Simple UI Add-ons [Updated November 26, 2018]

Post by StroggVorbis »

Hm, still isn't fixed, I'm running out of ideas. I don't know if this helps, but here's the source for the Parkour synthfire script:

Code: Select all

// Synthetic-Fire system. Uses ACS and GetPlayerInput to 'simulate' the use of
// fire buttons. This effectively allows for true dual-wielded weapons. Nifty!

// Left (primary) weapon.
script 891 (void)
{
	while(checkinventory("SynthFireActive")>0)
	{
		if(getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK)
		{
			giveinventory("SynthFireLeft",1);
			while(checkinventory("SynthFireLeft">0) || getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK) { delay(1); }
			takeinventory("SynthFireLeft",1);
		}
		delay(1);
	}
}

// Right (secondary) weapon.
script 892 (void)
{
	while(CheckInventory("SynthFireActive")>0)
	{
		if(GetPlayerInput(-1, INPUT_BUTTONS) & BT_ALTATTACK)
		{
			GiveInventory("SynthFireRight",1);
			while(GetPlayerInput(-1, INPUT_BUTTONS) & BT_ALTATTACK) { delay(1); }
			TakeInventory("SynthFireRight",1);
		}
		delay(1);
	}
}
EDIT: I finally found out where the problem lies!
Normally, when the chaingun is in the ready state, you are given the "SynthFireActive" item. When you press the attack button (left mouse button), you are given the SynthFireLeft item, which makes the chaingun go into the fire state. Normally, when you let go of the button, the "SynthFireActive" item is removed from the player's inventory, but ammoinfo causes it to remain there. That's why letting go of the mouse button doesn't do anything and it gets stuck.
Tekish
Posts: 150
Joined: Tue Jun 28, 2016 6:31 pm

Re: Simple UI Add-ons [Updated November 26, 2018]

Post by Tekish »

Like I said, the code in AmmoInfo that causes this is the standard bit that detects the player class. It doesn't matter what the result is, the comparison alone (even when moved around or rewritten) is causing this conflict. LevelInfo makes the same comparison in the same manner and it works fine. It's behavior that makes no sense and I'm assuming is an undocumented ACS quirk/bug. The only way I've found to make this work with Parkour is ensure it's loaded after the mod.
User avatar
Get Phobo
Posts: 113
Joined: Fri Sep 07, 2018 8:30 am

Re: Simple UI Add-ons [Updated November 26, 2018]

Post by Get Phobo »

Tekish wrote:I did you one better and changed the abbreviation setting to allow for 1-8 characters in both AmmoInfo and LevelInfo.
Man, this is wonderful. Thanks a lot.
User avatar
PRIMEVAL
Posts: 167
Joined: Fri Jan 13, 2012 12:58 pm
Location: Cleveland
Contact:

Re: Simple UI Add-ons [Updated November 26, 2018]

Post by PRIMEVAL »

I'll just go ahead and add this to my Auto Load...
Tekish
Posts: 150
Joined: Tue Jun 28, 2016 6:31 pm

Re: Simple UI Add-ons [Updated November 26, 2018]

Post by Tekish »

As always, I'm glad you guys find these add-ons useful.

@DabbingSquidward: Blue Shadow figured out the root of this problem, and a potential fix. It's because of this line in Parkour (line 112 in parkolib.acs):

Code: Select all

while(checkinventory("SynthFireLeft">0) || getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK) { delay(1); }
It was likely intended to be:

Code: Select all

while(checkinventory("SynthFireLeft")>0 || getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK) { delay(1); }
However, that doesn't solve the problem since SynthFireLeft doesn't change while firing the chaingun. Removing the check entirely seems to fix it:

Code: Select all

while(getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK) { delay(1); }
But that check might be needed for the other weapons, so this could break them. In my admittedly limited testing though, they seem to work fine.
JBro
Posts: 3
Joined: Tue Dec 18, 2018 12:37 pm

Re: Simple UI Add-ons [Updated December 10, 2018]

Post by JBro »

Any way to add an option for Doomguy's face next to the health?
Tekish
Posts: 150
Joined: Tue Jun 28, 2016 6:31 pm

Re: Simple UI Add-ons [Updated December 18, 2018]

Post by Tekish »

I just released an update for all of the add-ons. Outside of a bit of menu and code housekeeping, I've added some new features to LevelInfo and AmmoInfo.

LevelInfo and AmmoInfo both now have an option to highlight values/ammo counts, which will cause them to colorize depending on a certain factors. Kills, items, and secrets will highlight when they reach 100%. The timer will also light up when it's below par time. You can toggle the display of completion percentages, as well. Ammo counts will highlight based on your totals. At 100% they turn green, at 25% or lower they're yellow, and at 0% they're red. A bug in LevelInfo was also fixed, which could cause display problems when a power-up had a negative timer.

I now consider these add-ons to be complete. Barring bug fixes or simple requests, I don't plan on updating them as frequently as I have been.
JBro wrote:Any way to add an option for Doomguy's face next to the health?
I'm afraid that's beyond the scope of these add-ons. You may want to consider getting a HUD that has a style you want (and includes a Doomguy mugshot). These will work with whatever HUD you choose.
Kzer-Za
Posts: 509
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: Simple UI Add-ons [Updated December 18, 2018]

Post by Kzer-Za »

It's a great mod! But in Heretic it does not display HP of monsters with "ghost" property (https://doomwiki.org/wiki/Ghosts_(Heretic)). Any chance that this will be fixed?
Tekish
Posts: 150
Joined: Tue Jun 28, 2016 6:31 pm

Re: Simple UI Add-ons [Updated December 18, 2018]

Post by Tekish »

Unfortunately, this is due to the behavior of PickActor, the ACS function used to get monster information in CrosshairHP. This is fixable by switching to ZScript, but as I've mentioned previously, I've been avoiding that for a variety of reasons. I may eventually go and rewrite the code to address this and numerous other issues, but right now I don't have the time or desire to do so.
Tekish
Posts: 150
Joined: Tue Jun 28, 2016 6:31 pm

Re: Simple UI Add-ons [Updated January 22, 2019]

Post by Tekish »

Kzer-Za wrote:It's a great mod! But in Heretic it does not display HP of monsters with "ghost" property (https://doomwiki.org/wiki/Ghosts_(Heretic)). Any chance that this will be fixed?
So instead of rewriting everything, I just redid the part that detects monsters in ZScript. This is now fixed in the latest version. An additional sizing option has also been included for those who want to make things even bigger. With these changes, CrosshairHP and the all-in-one package now require GZDoom 3.6 or newer.
User avatar
ShockwaveS08
Posts: 193
Joined: Thu Jul 07, 2016 7:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Android 10
Location: Manhattan, IL
Contact:

Re: Simple UI Add-ons [Updated January 22, 2019]

Post by ShockwaveS08 »

I can't seem to get either the All-In-One or the Crosshair HP addons working, as they both say that there were "3 errors parsing DECORATE scripts" when I boot up GZDoom. The GZD version I have is v3.7.1_Legacy, as that's what Delta Touch currently supports.
Tekish
Posts: 150
Joined: Tue Jun 28, 2016 6:31 pm

Re: Simple UI Add-ons [Updated January 22, 2019]

Post by Tekish »

I tested with 3.7.1 legacy on windows and I'm not getting any errors. I don't have an android device so I can't test Delta Touch, so could you try and see if its conflicting with something else in your autoload, and if so what specifically? Any other specific error information would also be useful.
Post Reply

Return to “Graphic/Audio Patches”