Need help with my HUD
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Need help with my HUD
I am not comming back yet, I just need help implimenting my own hud. I have all the graphics ready, and the alphas to go with them, but I cant get them to display. I am using 072 to test the hud because of the ready to use guns and ammo(you'll see why I wanted this later) I swapped the zoom bitmap and alpha and the small hud peice takes up the whole screen. I need someone to explain how to get the hud to display my own bitmaps and custom elements. I searched the docs and found nothing except how to impliment the ones given in RF.
Also, just to make it known, I am not using my own 3D content in RF yet. I am only testing the HUD. The content will come later.
Also, just to make it known, I am not using my own 3D content in RF yet. I am only testing the HUD. The content will come later.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Ok, I switched to 075 and using the picture display HUD option I can display the HUD elements, but they are in the upper left hand corner. How can I tell it where to place the picture on screen?
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
i believe you use negative numbers to start them in the lower right corner. ie your window is 800 x 600, you put the hud element at -20 -20, it puts it at 780 580.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Ok, that will help. However, I followed Muzzers old health bar tut and it wont display. Also, I gave the [picture0] and [picture1] the attributes bitmapx = 20 and bitmapy = 20 and nothing happed. The pictures stayed in the upper left hand corner. Im cunfused. Shouldnt that have worked? I guess I'll keep trial and error as my way to get this working, but its kinda frustrating...
EDIT: BTW, I am using the 075 basic level. The nice empty box.
EDIT: BTW, I am using the 075 basic level. The nice empty box.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
http://terrymorgan.net/asylum.rar
I don't think I locked up the HUD bitmaps
Also search http://terrymorgan.net/download.htm for 'hud'
;
; HUD.INI - Heads-Up Display Configuration File
;
; Lines that start with a SEMICOLON are comments, blank lines are ignored
; compassfrm2.bmp is 60 wide and 48 tall -needs trimming..make sure you put all hudstuff in \bitmaps
; either in the actual directory or in the pack.vfs!
;frame and frame alpha is the NAME of the attribute, like mana, health
;indicator is the bar, horizontal, vertical, or the NUMBER
[compass]
frame = compassfrm2.bmp
framealpha = compassfrm2alpha.bmp
indicator = compass2.bmp
indicatoralpha = a_compass.bmp
framex = 0
framey = -80
indicatoroffsetx = 13
indicatoroffsety = 7
;all bitmaps are the same size as stamina's
[mana]
type = verticle
frame = manahud.bmp
framealpha = manaalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 320
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
;stamina.bmp is 32x32, bar.bmp is 16 across 64 high
[stamina]
type = verticle
frame = stamina.bmp
framealpha = staminaalpha.bmp
indicator = staminabar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 262
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
; health as a verticle bar
;[health]
;type = verticle
;frame = healthhud.bmp
;framealpha = healthalpha.bmp
;indicator = boltsbar.bmp
;indicatoralpha = staminabaralpha.bmp
;framex = 378
;framey = -40
;indicatoroffsetx = 34
;indicatoroffsety = -22
;indicatorheight = 64
;health as a number, same location as bar
[health]
type = numeric
frame = healthhud.bmp
framealpha = healthalpha.bmp
;indicator = goldbar.bmp
;indicatoralpha = staminabaralpha.bmp
framex = 378
framey = -40
indicatoroffsetx = 34
;indicatoroffsety = -22
;indicatorheight = 64
font=9
width=3
;note hud elements are separated by 58 on the x axis
[bolts]
type = verticle
frame = boltshud.bmp
framealpha = boltsalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 436
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
;the numeric display is just above the bar graph by 20 pixels, probably should be below, bar could go up past number
;the tilde ~ means the bolts are going to be numeric
[~bolts]
type = numeric
;frame = bolts.bmp
;framealpha = boltsalpha.bmp
;indicator = boltsbar.bmp
;indicatoralpha = staminabaralpha.bmp
;framex = 431
;framey = -40
indicatoroffsetx = 34
indicatoroffsety = -62
indicatorheight = 64
font=10
width=3
[bullet]
type = verticle
frame = bulletshud.bmp
framealpha = bulletshudalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 494
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
[oxygen]
type = verticle
frame = oxygenhud.bmp
framealpha = oxygenhudalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 554
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
[arrows]
type = verticle
frame = arrowshud.bmp
framealpha = arrowsalpha.bmp
indicator = arrowsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 204
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
[armor]
type = verticle
frame = armorhud.bmp
framealpha = armoralpha.bmp
indicator = armorbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 146
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
[gold]
type = numeric
frame = goldhud.bmp
framealpha = goldalpha.bmp
;indicator = goldbar.bmp
;indicatoralpha = staminabaralpha.bmp
framex = 96
framey = -40
indicatoroffsetx = 34
;indicatoroffsety = -22
;indicatorheight = 64
font=9
width=3
[countdown]
type = numeric
frame = timerhud.bmp
framealpha = timerhudalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 610
framey = -40
indicatoroffsetx = 34
indicatoroffsety = 8
font=16
width=3
active=modify
modifydirection=both
displaytime=1
; entry in hud.ini
;note the 64x48 onscreen hud
; elements go in /bitmaps, the 128x96
; inventory bmaps go in /bitmaps/inventory
;yes they have the same name.
[Officekey]
type = verticle
frame = keyoffice.bmp
framealpha = a_keyoffice.bmp
framex = -64
framey = 170
active = false
[Liftbelt]
type = verticle
frame = liftbelts.bmp
framealpha = liftbeltalphas.bmp
framex = -128
framey = 220
active = false
[healthpotion]
type = verticle
frame = healthinvs.bmp
framealpha = healthinvsalpha.bmp
framex = -64
framey = 170
active = false
[manapotion]
type = verticle
frame = manainvs.bmp
framealpha = manainvsalpha.bmp
framex = -64
framey = 170
active = false
[lockpick]
type = verticle
frame = lockpick1648.bmp
framealpha = lockpick1648alpha.bmp
framex = -64
framey = 170
active = false
[grenade]
type = verticle
frame = grenadehud.bmp
framealpha = grenadehudalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 614
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
I don't think I locked up the HUD bitmaps
Also search http://terrymorgan.net/download.htm for 'hud'
;
; HUD.INI - Heads-Up Display Configuration File
;
; Lines that start with a SEMICOLON are comments, blank lines are ignored
; compassfrm2.bmp is 60 wide and 48 tall -needs trimming..make sure you put all hudstuff in \bitmaps
; either in the actual directory or in the pack.vfs!
;frame and frame alpha is the NAME of the attribute, like mana, health
;indicator is the bar, horizontal, vertical, or the NUMBER
[compass]
frame = compassfrm2.bmp
framealpha = compassfrm2alpha.bmp
indicator = compass2.bmp
indicatoralpha = a_compass.bmp
framex = 0
framey = -80
indicatoroffsetx = 13
indicatoroffsety = 7
;all bitmaps are the same size as stamina's
[mana]
type = verticle
frame = manahud.bmp
framealpha = manaalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 320
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
;stamina.bmp is 32x32, bar.bmp is 16 across 64 high
[stamina]
type = verticle
frame = stamina.bmp
framealpha = staminaalpha.bmp
indicator = staminabar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 262
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
; health as a verticle bar
;[health]
;type = verticle
;frame = healthhud.bmp
;framealpha = healthalpha.bmp
;indicator = boltsbar.bmp
;indicatoralpha = staminabaralpha.bmp
;framex = 378
;framey = -40
;indicatoroffsetx = 34
;indicatoroffsety = -22
;indicatorheight = 64
;health as a number, same location as bar
[health]
type = numeric
frame = healthhud.bmp
framealpha = healthalpha.bmp
;indicator = goldbar.bmp
;indicatoralpha = staminabaralpha.bmp
framex = 378
framey = -40
indicatoroffsetx = 34
;indicatoroffsety = -22
;indicatorheight = 64
font=9
width=3
;note hud elements are separated by 58 on the x axis
[bolts]
type = verticle
frame = boltshud.bmp
framealpha = boltsalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 436
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
;the numeric display is just above the bar graph by 20 pixels, probably should be below, bar could go up past number
;the tilde ~ means the bolts are going to be numeric
[~bolts]
type = numeric
;frame = bolts.bmp
;framealpha = boltsalpha.bmp
;indicator = boltsbar.bmp
;indicatoralpha = staminabaralpha.bmp
;framex = 431
;framey = -40
indicatoroffsetx = 34
indicatoroffsety = -62
indicatorheight = 64
font=10
width=3
[bullet]
type = verticle
frame = bulletshud.bmp
framealpha = bulletshudalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 494
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
[oxygen]
type = verticle
frame = oxygenhud.bmp
framealpha = oxygenhudalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 554
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
[arrows]
type = verticle
frame = arrowshud.bmp
framealpha = arrowsalpha.bmp
indicator = arrowsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 204
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
[armor]
type = verticle
frame = armorhud.bmp
framealpha = armoralpha.bmp
indicator = armorbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 146
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
[gold]
type = numeric
frame = goldhud.bmp
framealpha = goldalpha.bmp
;indicator = goldbar.bmp
;indicatoralpha = staminabaralpha.bmp
framex = 96
framey = -40
indicatoroffsetx = 34
;indicatoroffsety = -22
;indicatorheight = 64
font=9
width=3
[countdown]
type = numeric
frame = timerhud.bmp
framealpha = timerhudalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 610
framey = -40
indicatoroffsetx = 34
indicatoroffsety = 8
font=16
width=3
active=modify
modifydirection=both
displaytime=1
; entry in hud.ini
;note the 64x48 onscreen hud
; elements go in /bitmaps, the 128x96
; inventory bmaps go in /bitmaps/inventory
;yes they have the same name.
[Officekey]
type = verticle
frame = keyoffice.bmp
framealpha = a_keyoffice.bmp
framex = -64
framey = 170
active = false
[Liftbelt]
type = verticle
frame = liftbelts.bmp
framealpha = liftbeltalphas.bmp
framex = -128
framey = 220
active = false
[healthpotion]
type = verticle
frame = healthinvs.bmp
framealpha = healthinvsalpha.bmp
framex = -64
framey = 170
active = false
[manapotion]
type = verticle
frame = manainvs.bmp
framealpha = manainvsalpha.bmp
framex = -64
framey = 170
active = false
[lockpick]
type = verticle
frame = lockpick1648.bmp
framealpha = lockpick1648alpha.bmp
framex = -64
framey = 170
active = false
[grenade]
type = verticle
frame = grenadehud.bmp
framealpha = grenadehudalpha.bmp
indicator = boltsbar.bmp
indicatoralpha = staminabaralpha.bmp
framex = 614
framey = -40
indicatoroffsetx = 34
indicatoroffsety = -22
indicatorheight = 64
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Odd...the frame will now move but I cant seem to see my indicator. do I need to define indicatorheight = 40 (the height that its supposed to be.)
EDIT:my Hud code
EDIT:my Hud code
Code: Select all
[Health]
type = verticle
frame = hud\white_frame_center.bmp
framealpha = hud\a_white_frame_center.bmp
indicator = hud\center_black.bmp
indicatoralpha = hud\a_center_black2.bmp
framex = 169
framey = -55
indicatoroffsetx = 0
indicatoroffsety = 0
indicatorheight = 40
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
Yes, you need to define indicatorheight.
I can only think of two reasons why the indicator won't show.
1) It's transparent. I think you're smart enough not to create a totally black alphamap, though...
2) Your attribute, in this case "Health", is at the lowest possible value (defined in player.ini).
I can only think of two reasons why the indicator won't show.
1) It's transparent. I think you're smart enough not to create a totally black alphamap, though...
2) Your attribute, in this case "Health", is at the lowest possible value (defined in player.ini).
Pain is only psychological.
One other possible reason, albeit an outside one, is the fact that you have an offset of zero for both the indicator x and y. This offset is taken from the edge of the frame, so unless the indicator is exactly the same size as the frame, then it may be hidden under the edge of the frame.
Steve Dilworth - Resisting change since 1965!
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Code: Select all
[health]
initial = 100
low = 0
high = 100
The Alpha is not fully black its acctually a nice light grey. (RGB value of: 192,192,192) and shows up if I do two picture bitmaps.
And here is the HUD file again because I think I changed some things.
Code: Select all
[health]
type = verticle
frame = hud\white_frame_center.bmp
framealpha = hud\a_white_frame_center.bmp
indicator = hud\center_black.bmp
indicatoralpha = hud\a_center_black2.bmp
framex = 169
framey = -55
indicatoroffsetx = 0
indicatoroffsety = 0
indicatorheight = 40
indicatorwidth = 300
active = true
EDIT: The width of the indicator is 300pixels, the frame is 311pixels(yeah I know its a weird number). However if you look at my aplha map of the frame, youll see that the frame is only a transparent white line to go around the health indicator. Also, I want to note that yes the health bar is wider than tall. This is for a reason, and that is to display important messages to the player. Get near a weapon tells you what keys to press to pick up the weapon etc...
EDIT EDIT: In case it matters, I am using the basic level in 075, the box. I know I said it earlier in the post but I said it again just so you dont have to search for it .
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Hmm... That makes sense about the power of two, so does that mean divisable by two? or an exponant of two? Because the 311x50 pixel frame does display... Its the 300x40 center that wont. So it has to be an exponant of two? Like 256 would work? So it would be a glitch that has the frame displaying?
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.