This article was recovered from an archive and needs to be reviewed
The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted.
If you�re making a mod serious mod, chances are, you won�t want to keep using the standard Half-Life 2 menu. So here, let�s go ahead and go over how to customize that menu with some examples. Hopefully, these examples will lead you to experiment to get that menu exactly how you need it for your own mod.
Mod Title
The Game Title for the main menu can be changed by editing the file gameinfo.txt (scripts/gameinfo.txt). Open up the File and you'll see something like this:
GameInfo
{
game "Half-Life 2"
title "Half-Life 2"
type singleplayer_only
}
To change it you'd simply replace the titles for 'game' and/or 'title' with whatever you would like to name your game.
game- is the name of the application, as to be seen in your taskbar
title- is the name as to be seen in the main title text
In my example I shall call the mod Murder William:
GameInfo
{
game "Murder William"
title "MURDER WILLIAM"
type singleplayer_only
}
If you were to change this now you would probably have some weird shapes as your title, the reason for this is because there is a custom font being used that was created specifically for half-life 2. In that particular font the not-needed letters are replaced by logo's, weapon icons and whatnot. Unless you want to call your mod something like 'All Hail Life 2' you're going to need to add you own font. You can change the font in the
Clientscheme.res file.
Changing the Font
Half-life 2 uses True Type Fonts (.ttf) so find or create the font you are going to use and put it in the resource folder. It is NOT recommended you rename the font file as the name of the file must match the typeface name it gets from being created (double click a .ttf file, near the top look for 'Typeface name:').
Next up you need to open up
ClientScheme.res (resource/ClientScheme.res) and scroll to the bottom. You will see something like this:
CustomFontFiles
{
"1" "resource/HALFLIFE2.ttf"
"2" "resource/HL2crosshairs.ttf"
}
This is where the fonts are defined. It is simply declaring where to find your font file (.ttf file). Add a new one like so:
CustomFontFiles
{
"1" "resource/HALFLIFE2.ttf"
"2" "resource/HL2crosshairs.ttf"
"3" "resource/impact.ttf"
}
Now that you have added the font you'll need to define where it is to be used. Still in
ClientScheme.res look further up and you'll find this:
ClientTitleFont
{
"1"
{
"name" "HalfLife2"
"tall" "46"
"weight" "0"
"additive" "0"
"antialias" "1"
}
}
Simply replace 'HalfLife2' with whatever the name of your font is, in this example it would be 'impact'
The Background Image
The Background menu for Half-life comprises of two things. A static image and a map, the image stays on the screen until the map is loaded.
NOTE: For some reason the image dimensions need to be to the power of 2, although once working it won't be loaded that size? The way to counter this is to make the image as 1024x768 and then once complete stretch it in your favourite image editing software to the power of 2 (1024x1024) The image will obviously look distorted at these dimensions but it will correct itself once up on your main menu screen.
Convert your .tga into a .vtf file and name it background01.vtf and place the file in the materials/console folder. Fire up the game now and if all has gone well you should have
something like this:
Of course, if you leave it like that its still going to use the Half-Life 2 background maps until you either disable them or replace them with your own. If you are replacing it just make sure your map is called background01
This article was originally published on
69th Vlatitude.
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the
TWHL Archiving Project page.