Inventory bar and SBARINFO

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
NightFright
Spotlight Team
Posts: 1343
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Inventory bar and SBARINFO

Post by NightFright »

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 all

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?
Guest

Re: Inventory bar and SBARINFO

Post by Guest »

Nobody came up with a solution for this until now? This info would surely be useful for more than one person, I believe...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Inventory bar and SBARINFO

Post by Graf Zahl »

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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Inventory bar and SBARINFO

Post by Blue Shadow »

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Inventory bar and SBARINFO

Post by Graf Zahl »

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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Inventory bar and SBARINFO

Post by Blue Shadow »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Inventory bar and SBARINFO

Post by Graf Zahl »

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
Rachael
Posts: 13562
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Inventory bar and SBARINFO

Post by Rachael »

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
NightFright
Spotlight Team
Posts: 1343
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

Re: Inventory bar and SBARINFO

Post by NightFright »

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!
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Inventory bar and SBARINFO

Post by Blue Shadow »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Inventory bar and SBARINFO

Post by Graf Zahl »

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.
Post Reply

Return to “Scripting”