hud.txt and weapon_*.txt Last edited 1 year ago2023-03-16 08:45:41 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
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:
#FieldDescription
1<object>Identifies the sprite's role.
2<res>The base resolution (320 or 640), it will use 320 on resolutions lower than 640x480 and 640 on that resolution and higher.
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.