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

Menu Background: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎top: clean up, replaced: {{Language subpage → {{langsp)
m (clean up, replaced: {{Goldsrc → {{gldsrc (3))
Line 1: Line 1:
{{langsp}}
{{langsp}}
{{Goldsrc topicon}}
{{gldsrc topicon}}


=Creating a background manually=
=Creating a background manually=
{{goldsrc|4}} background images are split into [[TGA]] tiles.  
{{gldsrc|4}} background images are split into [[TGA]] tiles.  
== Creating the tiles ==
== Creating the tiles ==
The tile files are indexed by {{path||resource/BackgroundLayout.txt|icon=file}} and {{path||resource/BackgroundLoadingLayout.txt|icon=file}}. The files should usually have the same content, although there are some cases you could use different backgrounds. See {{czds|4}} for example vanilla usage.
The tile files are indexed by {{path||resource/BackgroundLayout.txt|icon=file}} and {{path||resource/BackgroundLoadingLayout.txt|icon=file}}. The files should usually have the same content, although there are some cases you could use different backgrounds. See {{czds|4}} for example vanilla usage.
Line 37: Line 37:
[[File:XBLAH's Modding Tool - Game Menu Editor v2.0.2.png|thumb|392px|{{xblahmt|4}} - Game Menu Editor]]
[[File:XBLAH's Modding Tool - Game Menu Editor v2.0.2.png|thumb|392px|{{xblahmt|4}} - Game Menu Editor]]
;{{Xblahmt|4}}
;{{Xblahmt|4}}
:Creating a background for a {{goldsrc|4}} mod requires spliting the image into multiple TGAs by hand and indexing them in a layout file. This process is streamlined in {{Xblahmt|4}} 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 [[XBLAH's_Modding_Tool/Docs/Game/Menu_Background|See more]].
:Creating a background for a {{gldsrc|4}} mod requires spliting the image into multiple TGAs by hand and indexing them in a layout file. This process is streamlined in {{Xblahmt|4}} 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 [[XBLAH's_Modding_Tool/Docs/Game/Menu_Background|See more]].

Revision as of 13:24, 4 January 2024

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

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.