TransWikia.com

How can I make the UI bigger in Half Life 1?

Arqade Asked on February 5, 2021

I started playing Half Life 1 on 1366×768, and I feel that every user interface item is too small (weapon selector, ammo, health & HEV suit energy, pause menu and others).

How can I make the UI in Half-Life 1 (or any GoldSrc game) bigger?

One Answer

The only thing you can do is change the HUD sprites.

In the folder 'steamsteamappscommonhalf-lifevalvesprites' you can find both the .spr files that contain the graphics, and .txt files that are used to tell the game how to use these 'spritesheets'.
By increasing the size of the HUD graphics and editing the .txt files to correspond with those changes, you can adjust the HUD to your liking.

You can open the .spr files with SprView, export them as .bmp files, edit them in your favourite image editing program (your least favourite will also do), and import them into Sprite Wizard to convert them back to .spr files.
Make sure that the graphic files are saved in 256 colours and have dimensions that are a power of two (up to 256 px, which doesn't give a lot of room for enlargement). Sprite Wizard will warn you otherwise.
You'll want to change the 640hud#.spr files (the 320hud#.spr files are for screen width resolutions lower than 640 px), containing all the weapon graphics, and crosshairs.spr, containing all the ..crosshairs.

Now to the more tedious task of tackling the changed coordinates.

The .txt files are called hud.txt and weapon_[x].txt, and contain the coordinates of all the HUD elements, listed as strings like the following:

number_0 640 640hud7 0 0 20 24

number_0 is the icon to be displayed.

640: all resolutions of 640x480 or above will use these directions. Lower resolutions use the 320 instructions.
640hud7: the name of the sprite that is to be used
0: X-coordinate on the sprite where the game image should begin
0: Y-coordinate on the sprite where the game image should begin
20: Width of the sprite that should be used, in pixels
24: Height of the sprite that should be used, in pixels (source)

If, for example, you just scaled the images to twice their size, you can just multiply all numbers by 2.

As proof, I changed the crosshair sprite and the coordinates of the 9mm handgun from this:

enter image description here

To this:

enter image description here

I also created a new and larger icon for the crowbar, while I was getting acquainted with the process (the second image shows a comparison between the enlarged icon for the Beretta 92FS (with the original sized selection brackets) and the original icon for the Colt Python):

enter image description here

This will work for all Goldsource games (except, of course, that the folder paths will differ slightly).


See also this related answer.

Answered by Joachim on February 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP