Page 4 of 8

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

PostPosted: Mon Nov 26, 2018 4:27 pm
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).

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

PostPosted: Mon Nov 26, 2018 4:46 pm
by DabbingSquidward
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. :)

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

PostPosted: Mon Nov 26, 2018 5:30 pm
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.

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

PostPosted: Tue Nov 27, 2018 12:21 pm
by DabbingSquidward
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 allExpand view
// 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.

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

PostPosted: Tue Nov 27, 2018 1:04 pm
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.

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

PostPosted: Thu Nov 29, 2018 9:24 am
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.

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

PostPosted: Thu Nov 29, 2018 4:42 pm
by PRIMEVAL
I'll just go ahead and add this to my Auto Load...

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

PostPosted: Thu Nov 29, 2018 6:54 pm
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 allExpand view
while(checkinventory("SynthFireLeft">0) || getplayerinput(-1, INPUT_BUTTONS) & BT_ATTACK) { delay(1); }

It was likely intended to be:
Code: Select allExpand view
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 allExpand view
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.

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

PostPosted: Tue Dec 18, 2018 1:38 pm
by JBro
Any way to add an option for Doomguy's face next to the health?

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

PostPosted: Tue Dec 18, 2018 7:46 pm
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.

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

PostPosted: Sat Jan 19, 2019 5:52 pm
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?

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

PostPosted: Sat Jan 19, 2019 7:35 pm
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.

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

PostPosted: Tue Jan 22, 2019 7:56 pm
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.

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

PostPosted: Thu Jan 24, 2019 9:28 am
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.

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

PostPosted: Thu Jan 24, 2019 9:44 am
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.