This tutorial will show you how to edit Half-Life's HUD for your mod.
To do this, you will need a sprite editor. There's a couple of em' out there, though I'd suggest using
Sprite Explorer. It's a very useful program for viewing, editing and exporting sprites to other formats.
The HUD (Heads Up Display) is one of the most important things in first-person shooters. It shows the player the main info about his current resources in the game. The HUD usually shows the player's health, armor level, the weapons and amount of ammo he has. It also works as a damage indicator, showing the player the direction he is being shot from.
Your HUD has to be simple enough to let the player be aware of his resources/status without distracting from any other actions he may be doing.
In Half-Life, the HUD is saved in a set of sprites (.spr format). All of them can be located in your sprites folder.
Low-res HUD sprites:
- 320_hud
- 320_pain
- 320_train
- 320_hud1
- 320_hud2
- 320_hud3
- 320_hud4
High-res HUD sprites:
- 640_pain
- 640_train
- 640hud1
- 640hud2
- 640hud3
- 640hud4
- 640hud5
- 640hud6
- 640hud7
- 640hud8
- 640hud9
The low-res sprites are used only in 400x300 and 512x380 resolutions. They're just smaller copies of their counterparts. Most people use 1024x768 or higher resolutions these days anyway, so you'll most likely only need to bother changing the high-res array of HUD sprites.
Editing the sprites
Now let's try modifying us some HUD! Launch Sprite Explorer. Select
File -> Load Sprite, go to the sprites folder and open any HUD sprite. I opened
640hud1.
You should see something like this:
Sprite Explorer Now select the frame, right click on it, press
Single selection -> Save to bitmap and save it somewhere. Now open the image in any image editing program. Mspaint will do, but you might want to get
GIMP. It's free and has plenty of features to better enhance your image.
Apply any changes you want and save the image. In this example - I replaced our good old 9mm Pistol with a badass Desert Eagle .50.
Edited sprite
Creating the new sprite
Now go back to Sprite Explorer. Go to
File -> New Sprite.
A wizard will pop up.
This is what you do:
- Select Create New Sprite and click Next.
- Add the bitmap of the new sprite, you edited and click Next.
- Save the sprite in the sprites folder with the name of the sprite you extracted the bitmap from.
- Now select Additive in the Texture format section. Change the sprite type to vp_parallel if it's not default, and set the active frame to 0.
- Click next once more and wait until your sprite compiles. Then click Finish.
Now try opening the new sprite in Sprite Explorer. If it opens without any errors, it should work ingame as well.
New sprite in-game And that's it. If you want your old default HUD back, just open
pak0.pak file with Sprite Explorer or some other application suited for that and extract the HUD sprites listed above to your sprites folder.
You also might want to check out
Tutorial: Customising the HUD colour for custom HUD colors.
Good luck modding!
(Nevermind, fixed the issue)