This article's documentation is for the "GoldSrc" engine. Click here for more information.

Menu Background

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

Creating a background manually

GoldSrc GoldSrc background images are split into TGA tiles.

Creating the tiles

The tile files are indexed by File.resource/BackgroundLayout.txt and File.resource/BackgroundLoadingLayout.txt. The files should usually have the same content, although there are some cases you could use different backgrounds. See Condition Zero Deleted Scenes Condition Zero Deleted Scenes for example vanilla usage.

Note.pngNote:Since the Half-Life Half-Life 25th Aniversary Update, the engine uses the files Fileresource/HD_BackgroundLayout.txt and Fileresource/HD_BackgroundLoadingLayout.txt if liblist.gam has hd_background "1".

Specifications

  • Dimensions: 256x256px
  • Origin: Bottom-left
  • RTE Compression: Supported for 24-bit images.
Note.pngNote:This reduces the file size.

Creating the layout file

For games running on Half-Life 25th Anniversary engine/SDK

Note.pngNote:liblist.gam must be set to hd_background "1" in order for this to work.
PlacementTip.pngExample:HD_BackgroundLayout.txt

resolution	3840	1600

resource/background/example_1_a_loading.tga	fit	0	0
resource/background/example_1_b_loading.tga	fit	256	0
resource/background/example_1_c_loading.tga	fit	512	0
resource/background/example_1_d_loading.tga	fit	768	0
resource/background/example_1_e_loading.tga	fit	1024	0
resource/background/example_1_f_loading.tga	fit	1280	0
resource/background/example_1_g_loading.tga	fit	1536	0
resource/background/example_1_h_loading.tga	fit	1792	0
resource/background/example_1_i_loading.tga	fit	2048	0
resource/background/example_1_j_loading.tga	fit	2304	0
resource/background/example_1_k_loading.tga	fit	2560	0
resource/background/example_1_l_loading.tga	fit	2816	0
resource/background/example_1_m_loading.tga	fit	3072	0
resource/background/example_1_n_loading.tga	fit	3328	0
resource/background/example_1_o_loading.tga	fit	3584	0
resource/background/example_2_a_loading.tga	fit	0	256
resource/background/example_2_b_loading.tga	fit	256	256
resource/background/example_2_c_loading.tga	fit	512	256
resource/background/example_2_d_loading.tga	fit	768	256
resource/background/example_2_e_loading.tga	fit	1024	256
resource/background/example_2_f_loading.tga	fit	1280	256
resource/background/example_2_g_loading.tga	fit	1536	256
resource/background/example_2_h_loading.tga	fit	1792	256
resource/background/example_2_i_loading.tga	fit	2048	256
resource/background/example_2_j_loading.tga	fit	2304	256
resource/background/example_2_k_loading.tga	fit	2560	256
resource/background/example_2_l_loading.tga	fit	2816	256
resource/background/example_2_m_loading.tga	fit	3072	256
resource/background/example_2_n_loading.tga	fit	3328	256
resource/background/example_2_o_loading.tga	fit	3584	256
resource/background/example_3_a_loading.tga	fit	0	512
resource/background/example_3_b_loading.tga	fit	256	512
resource/background/example_3_c_loading.tga	fit	512	512
resource/background/example_3_d_loading.tga	fit	768	512
resource/background/example_3_e_loading.tga	fit	1024	512
resource/background/example_3_f_loading.tga	fit	1280	512
resource/background/example_3_g_loading.tga	fit	1536	512
resource/background/example_3_h_loading.tga	fit	1792	512
resource/background/example_3_i_loading.tga	fit	2048	512
resource/background/example_3_j_loading.tga	fit	2304	512
resource/background/example_3_k_loading.tga	fit	2560	512
resource/background/example_3_l_loading.tga	fit	2816	512
resource/background/example_3_m_loading.tga	fit	3072	512
resource/background/example_3_n_loading.tga	fit	3328	512
resource/background/example_3_o_loading.tga	fit	3584	512
resource/background/example_4_a_loading.tga	fit	0	768
resource/background/example_4_b_loading.tga	fit	256	768
resource/background/example_4_c_loading.tga	fit	512	768
resource/background/example_4_d_loading.tga	fit	768	768
resource/background/example_4_e_loading.tga	fit	1024	768
resource/background/example_4_f_loading.tga	fit	1280	768
resource/background/example_4_g_loading.tga	fit	1536	768
resource/background/example_4_h_loading.tga	fit	1792	768
resource/background/example_4_i_loading.tga	fit	2048	768
resource/background/example_4_j_loading.tga	fit	2304	768
resource/background/example_4_k_loading.tga	fit	2560	768
resource/background/example_4_l_loading.tga	fit	2816	768
resource/background/example_4_m_loading.tga	fit	3072	768
resource/background/example_4_n_loading.tga	fit	3328	768
resource/background/example_4_o_loading.tga	fit	3584	768
resource/background/example_5_a_loading.tga	fit	0	1024
resource/background/example_5_b_loading.tga	fit	256	1024
resource/background/example_5_c_loading.tga	fit	512	1024
resource/background/example_5_d_loading.tga	fit	768	1024
resource/background/example_5_e_loading.tga	fit	1024	1024
resource/background/example_5_f_loading.tga	fit	1280	1024
resource/background/example_5_g_loading.tga	fit	1536	1024
resource/background/example_5_h_loading.tga	fit	1792	1024
resource/background/example_5_i_loading.tga	fit	2048	1024
resource/background/example_5_j_loading.tga	fit	2304	1024
resource/background/example_5_k_loading.tga	fit	2560	1024
resource/background/example_5_l_loading.tga	fit	2816	1024
resource/background/example_5_m_loading.tga	fit	3072	1024
resource/background/example_5_n_loading.tga	fit	3328	1024
resource/background/example_5_o_loading.tga	fit	3584	1024
resource/background/example_6_a_loading.tga	fit	0	1280
resource/background/example_6_b_loading.tga	fit	256	1280
resource/background/example_6_c_loading.tga	fit	512	1280
resource/background/example_6_d_loading.tga	fit	768	1280
resource/background/example_6_e_loading.tga	fit	1024	1280
resource/background/example_6_f_loading.tga	fit	1280	1280
resource/background/example_6_g_loading.tga	fit	1536	1280
resource/background/example_6_h_loading.tga	fit	1792	1280
resource/background/example_6_i_loading.tga	fit	2048	1280
resource/background/example_6_j_loading.tga	fit	2304	1280
resource/background/example_6_k_loading.tga	fit	2560	1280
resource/background/example_6_l_loading.tga	fit	2816	1280
resource/background/example_6_m_loading.tga	fit	3072	1280
resource/background/example_6_n_loading.tga	fit	3328	1280
resource/background/example_6_o_loading.tga	fit	3584	1280
resource/background/example_7_a_loading.tga	fit	0	1536
resource/background/example_7_b_loading.tga	fit	256	1536
resource/background/example_7_c_loading.tga	fit	512	1536
resource/background/example_7_d_loading.tga	fit	768	1536
resource/background/example_7_e_loading.tga	fit	1024	1536
resource/background/example_7_f_loading.tga	fit	1280	1536
resource/background/example_7_g_loading.tga	fit	1536	1536
resource/background/example_7_h_loading.tga	fit	1792	1536
resource/background/example_7_i_loading.tga	fit	2048	1536
resource/background/example_7_j_loading.tga	fit	2304	1536
resource/background/example_7_k_loading.tga	fit	2560	1536
resource/background/example_7_l_loading.tga	fit	2816	1536
resource/background/example_7_m_loading.tga	fit	3072	1536
resource/background/example_7_n_loading.tga	fit	3328	1536
resource/background/example_7_o_loading.tga	fit	3584	1536

For other GoldSrc games, or pre-25th anniversary engine/SDK

PlacementTip.pngExample:BackgroundLayout.txt
resolution	800	600

resource/background/test_1_a_loading.tga	fit	0	0
resource/background/test_1_b_loading.tga	fit	256	0
resource/background/test_1_c_loading.tga	fit	512	0
resource/background/test_1_d_loading.tga	fit	768	0

resource/background/test_2_a_loading.tga	fit	0	256
resource/background/test_2_b_loading.tga	fit	256	256
resource/background/test_2_c_loading.tga	fit	512	256
resource/background/test_2_d_loading.tga	fit	768	256

resource/background/test_3_a_loading.tga	fit	0	512
resource/background/test_3_b_loading.tga	fit	256	512
resource/background/test_3_c_loading.tga	fit	512	512
resource/background/test_3_d_loading.tga	fit	768	512

Utilities

XBLAH's Modding Tool XBLAH's Modding Tool - Game Menu Editor
XBLAH's Modding Tool XBLAH's Modding Tool
Creating a background for a GoldSrc GoldSrc mod requires spliting the image into multiple TGAs by hand and indexing them in a layout file. This process is streamlined in XBLAH's Modding Tool XBLAH's Modding Tool using an intuitive interface, that creates all the required files based on the background image you import. The tool also allows you to merge all the tiles and export an existing background into a single image See more.