hud.txt and weapon_*.txt Last edited 4 months ago2023-11-26 14:06:10 UTC

The files hud.txt as well as weapon_*.txt, located in the sprites/ folder of a game/mod, tells the GoldSrc engine how to load sprites for the HUD as well as the weapons.

Syntax

The file is formatted as follows:
<num_of_entries>
<entry1>
<entry2>
⁞
<entryN>
Where an entry is formatted as follows:
<object> <resolution> <filename> <offset_x> <offset_y> <size_w> <size_h>
Description of each field of an entry is as follows:
# Field Description
1 <object> Identifies the sprite's role.
2 <resolution> The base resolution (320 or 640), it will use 320 on resolutions lower than 640x480 and 640 on that resolution and higher.
Half-Life's 25th Anniversary Update adds two more base resolutions: 1280 and 2560.
3 <filename> The SPR file to load.
4 <offset_x> The offset of this sprite object into the SPR file in the horizontal X axis.
5 <offset_y> The offset of this sprite object into the SPR file in the vertical Y axis.
6 <size_w> The width of the sprite object.
7 <size_h> The height of the sprite object.

Remarks

References

Comments

You must log in to post a comment. You can login or register a new account.