Source SDK

Source SDK

84 ratings
Basic Custom Main Menu for your Mod
By Wazanator
In this tutorial we will make a basic custom main menu for your mod:

  • Renaming, Removing and Adding items on the Main Menu
  • Changing the Title Font
  • Adding a New Static Background Image
   
Award
Favorite
Favorited
Unfavorite
Foreward
This tutorial is assuming you followed my previous tutorial on setting up a basic Source SDK 2013 singleplayer mod. This will of course all work with a multiplayer mod but the minor differences are not covered.

If you prefer watching over reading here is a video tutorial:

Renaming, Removing and Adding items on the Main Menu
Navigate to your mods resource folder and open gamemenu.res either in visual studio or notepad++.

label = the display name that will be pulled from your mods gameui_languagenamehere.txt
Command = the command that will be run when the player presses the item
OnlyInGame = should this item only display if the player is in game (aka a map is loaded up)
InGameOrder = the order of items while the player is in game, lower the numbers are at the top higher are at the bottom
notMulti = this will not show up if the mod is a multiplayer mod
ConsoleOnly = only display if they are playing this on a xbox or ps

The numbers for each section relate to the order of items when a player is not in game.

Go ahead and delete the achievement section since we have no use for it and renumber the sections.

Keep gamemenu.res open and open up gameui_english.txt in your resource folder. This is the file that "label" references to get the display name for items on the menu. So if we want to say rename "New Game" to "New Operation" we would find the label reference in gamemenu.res, "GameUI_GameMenu_NewGame", and do a search for it in the gameui_english.txt and replace the string next to it, "New Game", with "New Operation".

Do that for everything you want to change.

If you want to additional items to the main menu just copy paste a current one, increment the number and add a new label to gameui_english.txt
Changing the Title Font
Unless you plan to use a font that comes with windows you will need to get a new true type font (ttf) from the internet. There are a lot of sites out there for fonts but be aware of the licensing surrounding them. A good place to start would be here: https://www.behance.net/search?search=font+free+commercial

I highly recommend keeping a CREDITS.txt file in your mods folder that lists where you got what from so that proper credit is given.

Once you have downloaded the font (it should end in .ttf) drag it into your mods resource folder.

Open up clientscheme.res in your resource folder and navigate to line 631.

Replace HalfLife2 with the name of your font (you can get this name by opening up the .ttf file)



Scroll down to the bottom and in the CustomFontFiles section add it under HL2crosshairs.ttf following the same format.
Adding a New Static Background Image
Make your static background image in your image editing program of choice while making sure that you have a size for 4:3 monitors and one for 16:9. Remember though they need to still be a power of 2 (32, 64, 128, 256, 512, 1024, 2048). Export it as a .tga

Open up vtfEdit and import the image with the following settings:


Save it to your mods materials/console folder and have it named background01.vtf for the 4:3 and background01_widescreen.vtf for the 16:9 a vmt is not needed.
Example
Here is an example that I made[drive.google.com]

Keep in mind I did not properly adjust my image for 4:3 and 16:9 since it is only an example.
25 Comments
blackjacksike 10 Nov, 2024 @ 4:49am 
I don't think so. I remember making a basic menu with a static image and I still managed to play music.
taurtiscirlan 10 Nov, 2024 @ 12:51am 
Not sure if this is the right place to ask, but how can i add music to my main menu if its a static image? Do i need to make it a 3D map in order for it to play music?
QwesterGuy 21 May, 2023 @ 7:21am 
Hey, how can i add/remove some settings from the settings option
Wazanator  [author] 16 Dec, 2022 @ 8:27pm 
Double check that you are doing things properly, this process has not changed in over a decade.
Palo 13 Dec, 2022 @ 4:11pm 
bro the main menu buttons don't change at all
i literally changed every single font in the whole clientscheme.res and trackerscheme.res files but NO
everything changed expect those pesky little buttons
BuoYancY_dabl 4 Jun, 2022 @ 4:02pm 
Dude, its not working! Making for Ep2, changed in ClientTitleFont "name" "MYFONT.ttf" and nothing changes wtf im so sick already spend +-2 hours
✇ OS™ 11 Mar, 2022 @ 3:07am 
All works. But does anyone know how to get the slider menu of game modes from L4D2 to L4D1?
phikill 4 Dec, 2021 @ 1:03pm 
how do I put the letter options like icons and a 3d character on the screen to modify?
DavilarekPL 21 Apr, 2021 @ 1:13pm 
help custom font doesn't work