Select Screen and Life Bar Size and Placement

tightninja

Member
Specifically, the mod I am working on is originally 2 player. I want to make it 4 player. However, placing P3 and P4 health bars is tough. By default it goes near the bottom of screen with have the graphics missing. The resolution is 256x224 but it is hard to calculate where to start and where to end.

I am curious if anyone has created a "mapping" chart of how OpenBOR handles HUD placement. Below is the current .txt file. Just trying to make sense of it all.


#-------Select screen positions

#p1smenu 63 224 500 500
p1smenu 0 224 500 500
#p2smenu 193 224 500 500
p2smenu 256 224 500 500

#-------lifebars & others

lbarsize 94 10 1 0 0 -300 -300 -9999 -9999 ##fourth number should prevent long bar?
mpbarsize 97 4 1 0 0 -300 -300 -9999 -9999 ##fourth number should prevent long bar?

p1life -999 -8
p1lifex 25 22 2
p1lifen 32 22 2
p1namej -10 -10 -10 -10 24 7
p1score -10 -10 -10 -10 84 22
p1mp 25 31
p1icon 1 8
e1life -999 -999
e1icon -999 -999
e1name -999 -999

p2life -157 -8
p2lifex 155 22 2
p2lifen 162 22 2
p2namej -10 -10 -10 -10 154 7
p2score -10 -10 -10 -10 215 22
p2mp 155 31
p2icon 131 8
e2life -999 -999
e2icon -999 -999
e2name -999 -999
#--------------------------
 
I have two things to mention first to solve this problem.
First, when I design lifebar size + position, I usually find game's resolution then divide it with number of players. Then the result is deducted with some value to give space between each lifebar. So for 256x224 resolution, that means the max length of bar a player could use is 256/4 = 64 pixels. If you want to give 4 pixels space between each lifebar, we could use 60 pixels size for bar (lifebar and mpbar).

We could apply this size to lbarsize command, HOWEVER, there's second thing below:

Second, I quoted this from your post:
Code:
p1life -999 -8
p2life -157 -8

These settings mean both player's lifebar are placed offscreen. IOW default lifebars are not shown. If you see lifebar on screen, it's most likely script based. I suggest that you find any script used by players in the game you're working on.
 
So all negative values are off screen.

x-axis = 0-255 would be the length of the screen (left to right)
y-axis = 0-223 would be height of (screen top to bottom)

Is this correct?

I will see if I can locate a "health bar script" that might be affecting this. I never thought about that, thanks!
 
I will see if I can locate a "health bar script" that might be affecting this. I never thought about that, thanks!

You won't. The native HUD is not accessible to script control. If there are extra elements or pieces that the settings don't seem to affect, either you are overlooking something, or the game in question is generating its own custom HUD elements purely from script.

DC
 
Back
Top Bottom