Inventory bar and SBARINFO

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Inventory bar and SBARINFO

Postby NightFright » Mon Jul 09, 2018 4:45 am

I have modified statusbars for Heretic and Hexen via SBARINFO, but apparently there is a problem with fullscreen inventory bars: Any modification applied to those is not recognized by GZDoom.

My modified SBARINFO code looks like this, the ZDoom fullscreen inventory bar is supposed to be displayed above/on top of the statusbar:
Code: Select allExpand view
statusbar inventoryfullscreen, fullscreenoffsets
{
   drawinventorybar Heretic, translucent, 7, INDEXFONT_RAVEN, -110+center, -75, -83+center, -53, untranslated;
}

GZDoom does not recognize the changed coordinates, regardless what I enter there. How can it be done now in most recent GZDoom version (3.4.1) if it does not work via SBARINFO any longer?
User avatar
NightFright
 
Joined: 02 May 2008
Location: Germany

Re: Inventory bar and SBARINFO

Postby Nicholas Sizzleneck » Wed Aug 08, 2018 3:50 pm

Nobody came up with a solution for this until now? This info would surely be useful for more than one person, I believe...
Nicholas Sizzleneck
 

Re: Inventory bar and SBARINFO

Postby Graf Zahl » Thu Aug 09, 2018 6:29 am

Nicholas Sizzleneck wrote:Nobody came up with a solution for this until now?



How? There's nothing to test here which an interested person could download and check for themselves. Most people seeing a thread like this with some question will just walk away without saying a word because they'd have to construct the test case themselves.

In general, if you have a problem and need help, provide something that can be tested as-is. That very much increases the likelihood of constructive feedback.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Inventory bar and SBARINFO

Postby Blue Shadow » Fri Aug 10, 2018 3:57 am

User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010

Re: Inventory bar and SBARINFO

Postby Graf Zahl » Fri Aug 10, 2018 4:21 am

Yes, me. FYI, this was my response:
Please continue this discussion in the forum. You may need input by other users.


So the issue still stands:
If you want help, provide a minimal testable example. Those willing to help won't and often cannot do that themselves.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Inventory bar and SBARINFO

Postby Blue Shadow » Fri Aug 10, 2018 8:05 am

Using the file from here, which suffers from the problem, I was able to figure out what's wrong. In line 96 of filter/game-heretic/sbarinfo.txt and line 216 of filter/game-hexen/sbarinfo.txt, there's an extra closing curly brace which seems to throw GZDoom off. Removing it fixes the problem.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010

Re: Inventory bar and SBARINFO

Postby Graf Zahl » Fri Aug 10, 2018 8:39 am

You mean inside the mod? I'd never have expected that the parser cannot detect structural errors... :?

And thanks for confirming that posting something to check made all the difference!
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Inventory bar and SBARINFO

Postby Rachael » Fri Aug 10, 2018 8:48 am

Graf Zahl wrote:And thanks for confirming that posting something to check made all the difference!

Echoing this.

Mainly because it's so annoying when someone asks for help but they just can't be convinced to help you help them.

Yeah, if I am even going to help anyone, and they provide such little information and detail, I rarely even ask for it nowadays, I just walk away.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: Inventory bar and SBARINFO

Postby NightFright » Fri Aug 10, 2018 10:35 am

Well, I had hoped that the code I copied would be enough. I was about to link to the thread with the statusbar mod, but since it has already been done now, I don't need to do that again. Great that the reason for the issue has been found, though.

I will remove those extra brackets then and hopefully get this fixed for good (if it's really inside the mod and not the native GZD files). Thanks a lot for the assistance!
User avatar
NightFright
 
Joined: 02 May 2008
Location: Germany

Re: Inventory bar and SBARINFO

Postby Blue Shadow » Sat Aug 11, 2018 4:54 am

Yes, the issue is with the HUD mod itself, not GZDoom (well, GZDoom is to be partially blamed for not erroring out, I'd say).

NightFright wrote:Well, I had hoped that the code I copied would be enough.

The thing is, that piece of code doesn't show the problem, since it's almost a copy of the one in gzdoom.pk3, so the problem must lie elsewhere, which it does.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010

Re: Inventory bar and SBARINFO

Postby Graf Zahl » Sat Aug 11, 2018 2:29 pm

Blue Shadow wrote:Yes, the issue is with the HUD mod itself, not GZDoom (well, GZDoom is to be partially blamed for not erroring out, I'd say).


Well, I had my reasons to declare SBARINFO deprecated. There are just too many problems with its implementation that could never be fixed without breaking the thing, and this is obviously one of them.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest