Pick up the crowbar of research scientist Gordon Freeman, who finds himself on an alien-infested Earth being picked to the bone, its resources depleted, its populace dwindling. Freeman is thrust into the unenviable role of rescuing the world from the wrong he unleashed back at Black Mesa. And a lot of people, people he cares about, are counting on him.

Post tutorial Report RSS Complete guide for customizing a single-player mod

This tutorial will teach you how to take your custom.bsp level and add the ingredients to make it start in the elaborate way that Half-Life2(r) starts.

Posted by on - Advanced Client Side Coding

[page=Complete guide for customizing a single-player mod]
Complete guide for customizing a single-player mod.
(setting-up the simple custom.bsp file to make it start like that Half-Life2® does)

This tutorial will teach you how to take your custom.bsp level and add the ingredients to make it start in the elaborate way that Half-Life2® starts.

User Posted Image
NOTE:
Few of the steps are well-known from the other tutorials, but I wanted to extract the important steps and assemble the relevant part in a compact, easy understanding tutorial.
User Posted Image
You can also take a look at the video version of my *UPDATED tutorial from my friend James Pain from the Brink of War mod HERE.

:warning: BUG REPORT:warning:

DO NOT USE OTHER TEXT EDITOR instead of the Notepad's standard text editor from Windows® (e. g.: EditPad, EditPad Pro, Notepad 2, Notepad++, BDV Notepad, TextEdit, WordStar, WordPad, Microsoft® Office® Word, etc.) to save the text files we are creating or modify in this tutorial.
It seems that by opening and saving the text files (.txt, .cfg, .rc, .res, .gam, .rad, .vdf, .lst, etc.) in Editpad, for example, the program will cut up the size of the file down by half and make something BAD behind the scenes to break it in that way, it will become "corrupted" and the Source® engine won't read it!
(found this problem with the help of my friend Brian from The Suppression mod)
_______________________________________________________________________________________________________

Steps that we'll follow in this tutorial:
1. Seting up Steam® to create our mod files needed to customize.
2. Creation of new folders\files needed for our customization.
3. Adding the .BSP files.
4. Useful tools and internet links.
5. Changing\adding new static\3D background.
6. Changing the main game title and the font used by it.
6a. *UPDATED Changing the main menu titles.
6b. *UPDATED Changing the position of the game title and the menu list.
6c. *UPDATED Adding the "shadow" effect by the second game title.
7. *UPDATED Adding new features into the Steam®'s My Games list for our mod.
8. Adding our own intro-video and tell the engine to display it.
8a. *UPDATED Add a main menu background music theme.
9. Creating our own chapters and add thumbnail pictures for each one of them.
9a. *UPDATED Changing your custom multiple chapters from the default "1st-unlocked/the rest-locked" into "ALL unlocked". (thanx to Tomaz Saraiva aka maveryck21 for bringing this up)
..::THE END::..

Step 1. After you finished the work on your single-player levels, you need to set them up to resemble like a complete job.

Open up the <Source SDK> window, from Steam® menu (or desktop shortcut), in the lower part of the <Source SDK> window be sure to select Current Game: Half-Life2
User Posted Image

In the Utilities menu, select Create a Mod and launch it
User Posted Image

In the <Create a Mod> window be sure to check Modify HL2 Single Player
User Posted Image Next >

In the <Mod information> window select the destination directory of the basic HL2 Single Player source code (less important for our lesson, but is necessary for Steam® to continue). The important step is to name your mod, which will be saved in the \SourceMods folder. Lets name it <MySPmod>.

Next >

After copying the necessary files, Next > and Finish.

Step 2. Now we begin our work.

Let's go in the <MySPmod> folder we created with Steam®'s help under the \SourceMods folder.
<....\valve\steam\SteamApps\SourceMods\MySPmod>
Steam® created these files:
User Posted Image
(into the \resource and \scripts folders, Steam® created A LOT of files, that we REALY DON'T NEED to start-up our level with this tutorial)
So you can safely ignore (delete) the following files:
- from\resource folder:

User Posted Image

- from \scripts folder:

User Posted Image

Ok. Next we will create a few new folders needed for our customization.

User Posted Image

Now it will look like this:
User Posted Image

Now we need to create/copy some files into \cfg and \media folders.

1st we have to copy the file <valve.rc> from <....\valve\steam\SteamApps\your_username\half-life 2\hl2\cfg> folder into <....\MySPmod\cfg> folder.

2nd we will create 3 .CFG files into <....\MySPmod\cfg> folder with the names: <chapter1.cfg>, <chapter2.cfg> and <chapter3.cfg> (we will get back on what these files LATER) like this:
User Posted Image

3rd we will create 1 .TXT file into <....\MySPmod\media> folder and name it <StartupVids.txt> (we will get back on what these files LATER)

Step 3. Good. Now we'll put our .BSP files into the <....\MySPmod\maps> folder.

Step 4. We will leave the start level set-up for a little bit, for the Main Menu customization.

(This tutorials also follows most of the steps, regarding the Main Menu customization)
69th Vlatitude
Vlatitude.com

VALVe® erc - Making a Menu Background Map
Valve-erc.com

SourceWiki - Main Menu Editing
Sourcewiki.org

SourceWiki - Main Menu Editing Part 2
Sourcewiki.org

(I will try to resume them, and not only this ones, into a simple and fast way)

So, first let's start making a static background (for now, the static background is the fastest way to escape from loading the default Half-Life2® 3D background, which in most cases takes a lot of time).
The fast way to edit a picture is Adobe® Photoshop®, so you will need the "VTF Photoshop® plug-in v1.06" by Ryan Gregg, Nemesis.thewavelength.net (DOWNLOAD: Nemesis.thewavelength.net ) a useful tool for creating simple .VTF files (VALVe® Texture File); and the "Windows® XP/2000 VTF Shell Extensions - VTF Thumbnail & Info support v1.02" by Neil "Jed" Jedrzejewski, Wunderboy.org (DOWNLOAD: Wunderboy.org ) if you want the Windows® Explorer to visualize your .VTF files.

*UPDATED: You can try "VTF Explorer v1.3 build 1" by Vyacheslav Dzhura, Hl2source.com. VTF Explorer is a tool for viewing and extracting Source® Engine format texture files . The program allows you to view whole folder where your .VTF are located, either from hard disk or .GCF file as a collection of thumbnails. You can view all frames, mip levels and cubemap faces of the .VTF files as well as read their flags. You can also use "VTF Explorer" to extract files from Steam®'s .GCF packages.

Step 5. Unleash your magic and create your 1024x768 future background picture in Photoshop®. For some reason the Source® engine needs the image dimension to be to the power of 2, so don't forget to resize your image to a power of 2 size: 1024x1024 (if you worked with multiple layers in Photoshop® you'll need to flatten them: in the menu --> Layer / Flatten Image). Save your work in the .VTF format. Place the VTF into <....\MySPmod\materials\console> folder with the name <background01.vtf>.
Now we need to tell Source® engine to load this map/picture. There are 2 ways:

1st is to tell the engine to load only this map, so you have to open <....\MySPmod\scripts> folder and edit the <ChapterBackgrounds.txt>:

- when opened, you will find something like this:

"chapters"
{
1 "background01"
2 "background01"
3 "background02"
4 "background02"
5 "background03"
6 "background03"
7 "background04"
8 "background04"
9 "background05"
9a "background05"
10 "background06"
11 "background06"
12 "background07"
13 "background07"
14 "background07"
15 "background07"
}


- replace it with this:

"chapters"
{
1 "background01"
}


Save it.
And now the engine will load ONLY your static background image.

2nd step is to open <....\MySPmod\cfg> folder and edit the <valve.rc> (use Notepad to edit):

- when opened, you will find something like this:

// load the base configuration
//exec default.cfg

// Setup custom controller
exec joystick.cfg

// run a user script file if present
exec autoexec.cfg

//
// stuff command line statements
//
stuffcmds

// display the startup level
startupmenu


- at the end of the text find startupmenu and “comment” it:

// display the startup level
// startupmenu


Save it.
And now the Half-Life2® default 3D background map should be replaced with a constant static image.

If you want to have a 3D background map (as Half-Life2® has) leave the files copied by Steam® intact and
a. insert the static LOADING... background image (the one before the main menu background image or map is loaded) as a different theme from your 3D background map (e.g.: like a loading logo of your mod or team). The editing of the .VTF file is exactly like the static background explanation above.
OR
b. insert a "blur" image previewing the 3D map that will be loaded in your main menu (like Half-Life2® has when it loads a 3D background map). Editing it is the same as the static image.
e.g.:
User Posted Image
The 3D map used for your background theme (a .BSP file) has to be located into <....\MySPmod\maps> folder and it must have the same name as the static one that is loaded before the 3D one (in our example: "background01") which is located in the <....\MySPmod\materials\console> folder (it is a .VTF file) and the code for loading it is the same as in the static background case:
open <....\MySPmod\scripts> folder and edit the <ChapterBackgrounds.txt> file

"chapters"
{
1 "background01"
}


Step 6. Now when we finished customizing the static\3D background image\map, let's move forward and create a custom Game Title with a custom FONT also.

1st, if you have a custom font, take it and copy it into <....\MySPmod\resource> folder. Be sure to be a .TTF - TrueType Font. Now let's tell the game engine how to read our custom font. Open up the <ClientScheme.res> file (use Notepad to edit) from <....\MySPmod\resource> folder and lets edit it:

- you will find there a ton of rows, just scroll down till you will find the following line:

ClientTitleFont
{
"1"
{
"name" "HalfLife2"
"tall" "46"
"weight" "0"
"additive" "0"
"antialias" "1"
}
}


- now edit the lines like following:

ClientTitleFont
{
"1"
{
"name" "Font name"
"tall" "46"
"weight" "0"
"additive" "0"
"antialias" "1"
"custom" "1"
}
}


Save it.

- in the line "name" "Font name" you need to get the true name of the font from inside the font file rather than just using the name of the font file:
(for example, I used in this tutorial the Matrix vs Miltown font (free font) theme from The Matrix® movie)
User Posted Image

- now we have to tell the game engine where to find this custom font. In the same <ClientScheme.res> file, scroll till the end of the text and find the following line:

//////////////////////// CUSTOM FONT FILES /////////////////////////////
//
// specifies all the custom (non-system) font files that need to be loaded to service the above described fonts
CustomFontFiles
{
"1" "resource/HALFLIFE2.ttf"
"2" "resource/HL2crosshairs.ttf"
}


- and add the folowing line:

CustomFontFiles
{
"1" "resource/HALFLIFE2.ttf"
"2" "resource/HL2crosshairs.ttf"
"3" "resource/matrix_cyr.ttf"
}


Save it.

- in the line "3" "resource/matrix_cyr.ttf" replace matrix_cyr.ttf with the file name of your font.

*UPDATED
Step 6a.
- if you want to change the titles in the Main Menu (like New Game, Load, Save, Quit) open the <GameMenu.res> from ....\MySPmod\resource> folder and you will find this:

"GameMenu"
{
"1"
{
"label" "#GameUI_GameMenu_ResumeGame"
"command" "ResumeGame"
"OnlyInGame" "1"
}
"5"
{
"label" "#GameUI_GameMenu_NewGame"
"command" "OpenNewGameDialog"
"notmulti" "1"
}
"6"
{
"label" "#GameUI_GameMenu_LoadGame"
"command" "OpenLoadGameDialog"
"notmulti" "1"
}
"7"
{
"label" "#GameUI_GameMenu_SaveGame"
"command" "OpenSaveGameDialog"
"notmulti" "1"
"OnlyInGame" "1"
}
"11"
{
"label" "#GameUI_GameMenu_Friends"
"command" "OpenFriendsDialog"
}
"12"
{
"label" "#GameUI_GameMenu_Options"
"command" "OpenOptionsDialog"
}
"13"
{
"label" "#GameUI_GameMenu_Quit"
"command" "Quit"
}
}


- now replace next to each "label" text with the desired title.
e. g.:

{
"label" "New Adventure"
"command" "OpenNewGameDialog"
"notmulti" "1"
}


Save it.

Step 6b.
- you can change the position, color of the main title, the second title and of the menu titles (X and Y coordinate). Open <ClientScheme.res> from ....\MySPmod\resource> folder and you find this:

// Top-left corner of the "Half-Life 2" on the main screen
"Main.Title1.X" "76"
"Main.Title1.Y" "184"
"Main.Title1.Color" "255 255 255 255"

// Top-left corner of secondary title e.g. "DEMO" on the main screen
"Main.Title2.X" "314"
"Main.Title2.Y" "242"
"Main.Title2.Color" "255 255 255 200"

// Top-left corner of the menu on the main screen
"Main.Menu.X" "76"
"Main.Menu.Y" "240"

// Blank space to leave beneath the menu on the main screen
"Main.BottomBorder" "32"


- replace with the X and Y coordinates to position your main title, second title and the main menu.

Step 6c.
*NOTE: To create a "shadow" for your main title, just change the X and Y to adjust the position below the main title font.
- well, i've noticed a weird thing :confused: (or maybe is just me...) The main title "layer" is ordered below the second title's one... so if you want to set up the second title to act as a "shadow" for the main one, well... you have to reverse roles. Your second title has to act as the main title and reverse. If it is like this, the main will be a "shadow" for the second one... cool, isnt it ? :D
e.g.:

"Main.Title1.X" "40"
"Main.Title1.Y" "350"
"Main.Title1.Color" "0 0 0 255"

// Top-left corner of secondary title e.g. "DEMO" on the main screen
"Main.Title2.X" "37"
"Main.Title2.Y" "347"
"Main.Title2.Color" "255 255 255 255"

// Top-left corner of the menu on the main screen
"Main.Menu.X" "40"
"Main.Menu.Y" "440"


Save it.
This is valid only for the order of the titles layers and is set up only in the above code (in the example above, the code will act as i described: the main title will be black [the shadow] and the second title will be white [the main title]). And of course, in this case, both of the titles have to be the same word(s) :lol: llooll

Step 7.
2nd, after we finished telling the game engine to use our custom font, now let's change the Game Title.
First we have to edit the file <gameinfo.txt> from <....\MySPmod> root folder. Open it up and you will find these lines:

"GameInfo"
{
// This is what shows up in the 'Third Party Games' area of the Steam® games list.
game "Half-Life 2 Mod"

FileSystem
{


- now lets add a few lines, and tell the engine what's the name of our single-player mod:

"GameInfo"
{
name "MySPmod"
game "MySPmod"
title "P I T U L O N"
title2 "No 1"
"icon" "resource\icon_MySPmod"
"homepage" "Valvesoftware.com"
"developer" "Pitulon"
"developer_url" "Valvesoftware.com"
"manual" "Half-life2.com"

type singleplayer_only

FileSystem
{


Save it.

Line translation :)
name "MySPmod" = needed to tell to the game engine the names of the chapters inside the <New Game> menu

game "MySPmod" = it tells Steam® to display the name of your mod in the <My Games> menu window:
User Posted Image
= and also it tells the engine to display the name of your mod on the taskbar when running:
User Posted Image <-- you have noticed a custom icon beside our mod title. Well, it's very easy to add even your custom icon to your mod. Just make yourself an icon (Icon WorkShop®), and copy it into the <....\MySPmod\resource> folder, and rename it <game.ico>.

title "P I T U L O N" = will tell the game engine to change the default Half-Life2® title with our custom one.
(in the <ClientScheme.res> file under <....\MySPmod\resource> folder, at the line ClientTitleFont you can change the tall, weight, antialiasing values)

title2 "No 1" = it lets you add a subtitle to your main Game Title (thanx to imatard from HL2 Coding forum). If you use the "shadow" effect, the word(s) has to be the same as the other title.

*UPDATED:
"icon" "resource\icon_MySPmod" = adds a icon in the Steam® My Games menu near your mod name. The icon is a .TGA file 16x16 pixels (original HL2 size) (the maximum size inside the Steam® My Games menu line is 19x19 pixels) with Alpha Channels and it has to be located inside <....\MySPmod\resource> folder. The location of the .TGA file can be anywhere inside your mod folder, just change the location into the code
e. g.: "icon" "icon_MySPmod" - now it has to be in the root folder of your mod.
(notice that in the code it doesnt have a extension for the icon file. Its how the engine read this file code)

User Posted Image___User Posted Image
16x16 19x19
- click on the icons to download the .TGA file (16x16 or 19x19) with Alpha Channels which you can use to create your custom icon (edit it with Photoshop®)
You will find the tutorial on how to create and modify an Alpha Channel HERE.

User Posted Image

"homepage" "Valvesoftware.com" = it will create a internet link to your mod homepage. The link will be under your mod Properties from the Steam® list.

User Posted Image and it will look like this: User Posted Image

"developer" "Pitulon" = it will add your name (your team) as the developer of the mod and will apear in the Steam® My Games menu

User Posted Image
and in your mod Properties from the Steam® list User Posted Image

"developer_url" "Valvesoftware.com" = it will transform your developer name into a internet link to your developer page (if you have one separately from your mod page)

"manual" "Half-life2.com" = it adds a internet link into your mod Properties from the Steam® list to your mod manual (Reference Help, Walkthroughs, FAQ, Hints and Tips, Cheat Codes, etc.)

User Posted Image

That's enough for the game engine to change the Game Title and to change the title's font and add other misc features.
I've tested all this, but in a few tutorials I found that is necessary to change also some other lines from other files. For example:

In the <....\MySPmod\scripts> folder, open the file <gameinfo.txt> and you will find:

// Valve Game Info file
// These are key/value pairs. Certain mods will use different settings.
//
GameInfo
{
game "HALF-LIFE 2"
title "HALF-LIFE'"
type singleplayer_only
}


- now replace the lines with:

GameInfo
{
game "MySPmod"
title "MySPmod"
type singleplayer_only
}


Save it. (nothing will change this :D )

- and also in the <....\MySPmod\scripts> folder, open the file <liblist.gam> (use Notepad to edit) and you will find:

// Valve Game Info file
// These are key/value pairs. Certain mods will use different settings.
//
game "Half-Life 2"
startmap "Hyper_001"
trainingmap "t0a0"
hlversion "1000"
mpentity "info_player_deathmatch"


- now replace the lines with:

game "MySPmod"
startmap "my_single-player_level"
trainingmap ""
hlversion "1000"
mpentity "info_player_deathmatch"


Save it. (nothing will happen again :D )
So what we did is to edit files for nothing. The last 2 steps are worthless, and worth editing the files just to be correct and have our mod title everywhere. :P

Step 8. At the Step 2, at the 3rd line, we said something about a <StartupVids.txt> file. Well, this file will tell the game engine to load a INTRO-VIDEO at the beginning, replacing the default video from VALVe®.

1st you should have created a custom video, with whatever you want to show up in it (must be a .AVI format). Name it <my_video.avi> for example. Remember to put it into <....\MySPmod\media> folder.

2nd let's open the <StartupVids.txt> file that we created into the <....\MySPmod\media> folder and add this line:

media/my_video.avi


Save it.

Step 8a. If you want your mod to have a custom background menu MUSIC, follow the next steps.
Open the <valve.rc> file located into the <....\MySPmod\cfg> folder and at the end of the text add this line:

// Game Menu Music Theme
play ../media/your_music_file.mp3


Save it.
The .MP3 file can be located wherever you want inside your mod folder. Be sure to specify the path and also be sure to have the same name in the code like the one of the .MP3 file. For the code to work you must have the ../ in front of the file name (if it is located in the root directory of your mod) or the path to your file.
The music file can be any format you chose for your sound file (.MP3, .WAV, .WMA, etc.).

• Now we'll start the final phase of our tutorial: Setting-up the levels to start from the <New Game> menu.

Step 9. Let's get busy!

1st lets tell our Source® engine to load our custom levels from the <New Game> menu, so when you press on the level's chapter button the level will load.
In the <....\MySPmod\cfg> folder, open the newly created <chapter1.cfg> file (we created it on the 4th step). Into the blank text add the following line:

map my_single-player_level_chapter1


Save it.
(my_single-player_level_chapter1 being the name of your .BSP that you want to start first (like a chapter, in case you have sub-levels for that chapter)
In case you have multiple chapters (in my example, 3), you must do the same thing for the other two.
- open <chapter2.cfg> file and edit the line : map my_single-player_level_chapter2
- open <chapter3.cfg> file and edit the line : map my_single-player_level_chapter3
- ...... till chapter 213 :D

2nd step is to add a chapter title that will appear into the <New Game> menu window.
Go in <....\MySPmod\resource> folder and there you will find the <hl2_english.txt> file. Rename it to <MySPmod_english.txt>. Open it. You will find a lot of lines there, select all and delete them! In the new blank text file add the following strings:

"lang"
{
"Language" "English"
"Tokens"
{
"MySPmod_Chapter1_Title" "MySPmod Chapter 1"
"MySPmod_Chapter2_Title" "MySPmod Chapter 2"
"MySPmod_Chapter3_Title" "MySPmod Chapter 3"
}
}


Save it.
In this way we have inside the <New Game> window this 3 chapters listed, so you can start the chapters individually, as in Half-Life2® <New Game> window.

Step 9a. *UPDATED - When customizing a new single player mod with multiple chapters, the game will lock your chapters and leave unlocked ONLY the first one. So when you need to test your work from a custom chapter (2nd, 3rd or X-number in the chapter list) the option to have your the custom chapters unlocked from the begining is found in the <config.cfg> file under the <....\MySPmod\cfg> folder, find the line sv_unlockedchapters.
We have to change the line sv_unlockedchapters ''1'' (which is the default value - allways the first chapter is unlocked, and the other ones will become unlocked along with your progress in the game) with:

sv_unlockedchapters "X"

The number we put in the "X" place is the number of the chapters that you want to be unlocked. (e.g.: you have 5 chapters, you write down 5 instead of "X")

3rd step is to create the small thumbnail picture that's characterizing for each one of your chapters. The easiest way is to edit one of the existing thumb picture from one of the Half-Life2® chapters:
User Posted Image
the image is 256x128 pixels (so you can edit even this one in Photoshop® because it's the correct size)
After you made your modifications on each chapter's thumb picture, save them in the .VTF format and place them in the <....\MySPmod\materials\VGUI\chapters> folder that we created when we started.
You should have 3 .VTF files:
User Posted Image

It should look like this after all the editing:

User Posted Image

User Posted Image

OK. So far we did:
1. Steam® copied our mod into the \SourceMods folder.
2. We deleted\created a few folders and files.
3. We put our .BSP file into \maps folder
4. We created a static background.
5. We changed the Game Title with a new one and using a custom font, changed the position and add more features to the Steam®'s My Games menu.
6. We created our own intro-video and a background music theme.
7. We made our levels to start from <New Game> menu and we added for each chapter a title and a thumb picture.

Well, my friends, that's all about the fast customization of your Half-Life2® single-player mod.

For any questions or bugs please e-mail me at: c_petrut@yahoo.com

::credits::
69th Vlatitude
VERC Collective
HL2Coding.com
SourceWiki
Half-Life2® Database
HL2 Mod Central
SDK Docs - VALVe® Developer Community
Wavelength | Your Game Editing Resource |

::thanx to::
mastakilla47@gmail.com
imatard @ HL2 Coding :: Forum
dak @ HL2 Coding :: Forum
Mr. Greenfish

by Pitulon
©2005-2006

Post comment Comments  (0 - 50 of 69)
Brad_Mclain
Brad_Mclain - - 30 comments

Very nice work, some great tips in there to get people started.

Reply Good karma Bad karma+4 votes
Virii
Virii - - 3 comments

Very nice and helpful, shows you everything you need to get going. Now where to go from here is another story.

Reply Good karma Bad karma+3 votes
Keliah
Keliah - - 1 comments

Everything is perfectly explained, thanks for this tuto !!

Only one thing that doesn't work for me is the intro video

Reply Good karma Bad karma+4 votes
Flavored-Pills
Flavored-Pills - - 5 comments

Great intro, Ive followed it all the way through, but I'm having problems with my mod loading up still. I'm thinking there are some map settings that are set improperly..any idea?

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

@ Keliah:
If u followed the steps exactly your custom intro vid should start :confused: I used to have the same problem in the past, but it didnt worked out because it was into the main HL2 folder. It seams that the customized folder that u create for your custom mod (with all the files into it needed to run), allows the custom video to start up. Maybe, a hint, try to rename your video as the one from VALVe, or HL2.avi (for me it works fine with HL2.avi file name) and replace the old name with this one (HL2.avi or maybe u can try with the one that VALVe created, dont remember now the exact name) into the <StartupVids.txt> from the <....\YourSPmod\media> folder (into your customized MOD folder, ofcourse 8) ). Hope this will help, but still its no such a important hint :P

@ Flavored-Pills:
Have no ideea what it could be the problem there. Maybe the .bsp file is scripted from the Hammer editor and the customization of your mod needs more coding. If u can send me something, so i can test it... if u can, the starting .bsp would be great, and i think i can help u!

I guarantee for everybody that EVERY STEP in this tutorial is tested and RE-tested for bugs. Till now the tutorial works from start to finish with no bugs.

Thanx a lot for feedback.
Please feel free to e-mail me @

c_petrut@rdslink.ro

for bugs, problems or improvements to this tut and i will answer a.s.a.p. and try to give u a hand :)
cheers

Reply Good karma+4 votes
Flavored-Pills
Flavored-Pills - - 5 comments

Could it possibly be that there is something in the map that I made that doesnt allow it to run properly...like if I have 2 starting locations in a single player version, because of potential conflicts? What I did was basically take an existing Lockdown map and changed it into a "school environment" (still working on it)

Reply Good karma Bad karma+1 vote
Flavored-Pills
Flavored-Pills - - 5 comments

I might have figured out the problem for myself, but not the solution.
Leaks, as I understand, are things in the map that make it not work..?
And my compiling report states that I have leaks:

ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (1)
**** leaked ****
Entity prop_physics (-3331.00 5040.00 65.00) leaked!
Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 328 detail faces...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (1)
...
Memory leak: mempool blocks left in memory: 48
Memory leak: mempool blocks left in memory: 10

How do I know what is causing a leak?

Reply Good karma Bad karma+1 vote
bengreco
bengreco - - 1 comments

load the pointfile from hammer and it will show you where any leaks are.

Reply Good karma Bad karma+1 vote
Himme
Himme - - 11 comments

Seems like the leak is coming from a prop_physic at -3331.00 5040.00 65.00

Load the map in hammer, then click the view tab and choose Go to cordinates.

Type -3331.00 5040.00 65.00 in the field and do something with the prop_physics entity there.

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

Hi there.
There are a few steps to display a custom Chapter title. Note that you DONT need to edit no other file before that, just as i discribe, right away after Steam created a fresh directory with the needed base files (open Steam, open Sorce SDK, Create a mod, Modify Half-Life 2 Single Player)

1. go inside freshly created test folder inside \SourceMods dir
2. create a \cfg dir (lets say u have only one chapter) and a file chapter1.cfg
3. in the chapter1.cfg u write:
map test
lets say, which is your starting chapter-map
4. in the \resource dir first u find a hl2_english.txt. Rename it in test_english.txt, (**** the other hl2_french, portughese, chinese and the other shitless files, they dont count)
5. inside it find and replace HL2_Chapter1_Title with:

"test_Chapter1_Title" "T E S T"

thats it m8.This is ALL that hl2 needs to rename your chapter. No other editing is needed.
IT SHOULD WORK!
PS: you will ALWAYS get the #MyMod_ChapterX_title **** when you DONT rename the hl2_english.txt from \resource and also if u DONT rename "HL2_Chapter1_Title" inside the hl2_english.txt with the NAME of the directory where u have your mod.
e-mail me to keep me posted

Reply Good karma+2 votes
tangentworlds
tangentworlds - - 6 comments

Hi, nice tutorial, but I'm having a problem. I followed it exactly (twice) and I cannot get my chapter titles to appear. They say #mySPmod_Chapter1_Title instead of, say, "Test".

Any ideas on how I can fix this? Remember, my mySPmod_english.txt and gameinfo.txt are set up exactly as you specified. Thanks!

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

I've updated the Tutorial with new features. Check for *UPDATED lines

Reply Good karma+3 votes
Hades_9966
Hades_9966 - - 2 comments

I don't know what it is but i have followed your tutorial step by step and have tryed 100 different ways but the chapter titles just don't apear.
Every time I click on new game there is nothing there. I also couldn't get my background picture to apear but I managed to get a .bsp map
to play as my background.

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

@ Hades_9966
Do u use another text editor instead of the default Notepad? if yes, DONT!
pls e-mail me and explain exactly w0t are the errors.

Reply Good karma+2 votes
wtf?
wtf? - - 3 comments

ive got a problem, when i start my mod it says cannot find the file: "materials/console/chapter1.vtf". and the file is in the materials/VGUI/chapters! so can u pls help me?

Reply Good karma Bad karma+1 vote
wtf?
wtf? - - 3 comments

sorry found it out lol

Reply Good karma Bad karma+1 vote
Erilis
Erilis - - 33 comments

-extremely helpful; I speak for the mod community when I say thank you.

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

@ -Dan911

pls e-mail me your problem

Reply Good karma+2 votes
Dan911
Dan911 - - 333 comments

changing the font isnt working for me.., anyonebody else having this problem?

Reply Good karma Bad karma+1 vote
isivisi
isivisi - - 41 comments

The only time i had problems with the font change was when i made a multiplayer mod.

Reply Good karma Bad karma+1 vote
maveryck21
maveryck21 - - 1 comments

Hi there

I've followed your tutorial and everything is allrigth, it's very good. But when i define the various chapters how can i unlock them from the beginning? because they al apear but only the first one is available, how can i make them all be available?

Thanks for any help

Reply Good karma Bad karma+1 vote
T0Rn
T0Rn - - 3 comments

I also get the "Could not load library client"

The tutorial is very clear and with the help of the images makes it even easier.
It would be great if this error could be resolved.

Thanks.

Reply Good karma Bad karma+1 vote
UnknownSoldier
UnknownSoldier - - 25 comments

--------------------------------------------------------------------
my steam erro for my mod :
---------------------------------------------------------------
Engine error <<<---
Could not load library client <<<--

Steam dint extract bin file you need to copy it from you half-life 2
"steamapps\you account\half-life 2\hl2\bin" need to copy you bin to you mod.
start you mod problem fixit.
bin files are files client.dll & server.dll problem fix xD

Reply Good karma Bad karma+2 votes
UnknownSoldier
UnknownSoldier - - 25 comments

!!
Evrey thing work fine only wen i start my mod i getting my intro.
in mean screen i getting this error how to fix this ?
--------------------------------------------------------------------
my steam erro for my mod :
---------------------------------------------------------------
Engine error <<<---
Could not load library client <<<--

Reply Good karma Bad karma+2 votes
mitch793
mitch793 - - 11 comments

For people getting the "Could not load library client" error, try these pages depending on what compiler you use:
I'm new, so i cant post links but search compiling on the developer website.
I'm not entirely sure that this works, just trying it now.

Reply Good karma Bad karma+1 vote
gilly_54
gilly_54 - - 1 comments

Thanks Unknown Soldier!
I have been getting this problem for months until i came accross this website, i tried the fix and its all working fine now.
I can finally get back to working on my mods.

Reply Good karma Bad karma0 votes
Devoured_By_Beef
Devoured_By_Beef - - 1 comments

Good tutorial
But the pics are not showing up only Xs

Reply Good karma Bad karma+1 vote
SecretSecretary
SecretSecretary - - 3 comments

Hey, I cannot download this file!
It says server not found...
Do you perhaps know of any other place where I can download the plug-in for Photoshop?
Great tutorial by the way.
Thanks!

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

@ SecretSecretary
the file is still up.. :|
if yer still gettin' server down, try Nemesis.thewavelength.net
or
Rapidshare.com
cheerios

Reply Good karma+2 votes
somoza
somoza - - 6 comments

Greatest tutorial ever ¡

On other hand, i'm translating this tuto onto spanish for the greates hl2 spanish sitez.

www.hl2spain.com

Are u agree?

Reply Good karma Bad karma+1 vote
somoza
somoza - - 6 comments

So here´s the same tutorial for spanish people ¡¡¡ ;)

Hl2spain.com

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

@ somoza
no problemo!
very good job! :thumbup:

Reply Good karma+2 votes
fearian
fearian - - 1 comments

Pitulon, there is no doubt this tut has helped a TON of people get their mod together! Thankyou so much for taking the time to help the community!

Reply Good karma Bad karma+2 votes
1337FeRReT
1337FeRReT - - 170 comments

Seconded, This is possibly the most in depth and accurate tutorials I have read. Very very well done and you can see a hell of a lot of time went into this, Thanks a lot for using your time to help the community out and help add to the awesomeness the modding community already has.

Cheers mate

Reply Good karma Bad karma+1 vote
l00n_NooN
l00n_NooN - - 45 comments

The background music wont work

Reply Good karma Bad karma+1 vote
Obli
Obli - - 1 comments

Hi,

Thanks for this tutorial... was a great help!

I have a problem though. In the main menu, when I click New Game, my chapters and chapter names display fine. However, in the top-left corner of the New Game window is a check box with #HL2 next to it. It is behind the New Game text and I noticed it's not in the pictures in this tutorial. Any idea what that is and how to get rid of it? I don't believe following your tutorial has introduced this - I believe it has been there since the start after I first chose to Create a Mod in the Source SDK. Still, any ideas?

Reply Good karma Bad karma+1 vote
Rockdog
Rockdog - - 20 comments

I just wanna know if you are good at mapping too... because i need some practice at making my NPC's work in hammer i dont know how to make them walk and attack :S

You have done a great job by showing me how to make the mod thank you very much :D

Reply Good karma Bad karma+2 votes
Studiopaw
Studiopaw - - 12 comments

i would like to know this too.
sorry for the double post!

Reply Good karma Bad karma+1 vote
mctusk
mctusk - - 12 comments

This tuto is the best thing that i see at internet!
Now i canstart my project!

Thank You Pitulon ! \o/

Reply Good karma Bad karma+2 votes
Zeltrax
Zeltrax - - 379 comments

Omg i cant even use sdk because steam ****** it up with orange box because orange box wont alow me to make mods...

Reply Good karma Bad karma+1 vote
StigGoldenbullet
StigGoldenbullet - - 3 comments

Great tutorial! But when I went into scripts to delete all the files I was supposed to (which I did) I wasn't left with:
ChapterBackgrounds.txt
gameinfo.txt
liblist.gam

but with:

[DIR] vehicles
ChapterBackgrounds.txt
gameinfo.txt
liblist.gam
soundscapes_klab.txt
soundscapes_manifest.txt
soundscapes_prison.txt
soundscapes_streetwar.txt
soundscapes_town.txt
soundscapes_trainyard.txt
surfaceproperties.txt
surfaceproperties_hl2.txt
surfaceproperties_manifest.txt
titles.txt
vgui_screens.txt
weapon_357.txt
weapon_alyxgun.txt
weapon_annabelle.txt
weapon_ar2.txt
weapon_bugbait.txt
weapon_citizenpackage.txt
weapon_citizensuitcase.txt
weapon_crossbow.txt
weapon_crowbar.txt
weapon_cubemap.txt
weapon_frag.txt
weapon_physcannon.txt
weapon_physgun.txt
weapon_pistol.txt
weapon_rpg.txt
weapon_shotgun.txt
weapon_smg1.txt
weapon_stunstick.txt

Should I keep or delete the extra ones?

And you said to delete files like npc_sounds_zombie
but then in-mod if there is an npc it won't make any noises will it?

Help Please!

P.S. And how do you make .cfg files for the part after?

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

@ StigGoldenbullet
in the tut i said to IGNORE those files (or in any case to delete), so you can ignore them with no problem. dont do something drastic like "deleting" if you are unsure. about creating .cfg files, u simply create a .txt (or any format) and change the extension to a .cfg (and open it with Notepad) ;) as for the icon size and format, ya have to use a photo editing software, i use Adobe Photoshop.
cheerios

Reply Good karma+3 votes
StigGoldenbullet
StigGoldenbullet - - 3 comments

And um for the icon, is there a way to turn a .GIF image into a .TGA file? And it's 20x20 pixels so how can I make it 19x19?

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

yes, you can use a image converter/editor, like adobe photoshop, pls google for it

Reply Good karma+1 vote
Komatose
Komatose - - 17 comments

i dont get the files that you have in yor folder. i dont have reasource or anyh9ting like that, i get mapsrc, modelssrc, and materials src. and some other jumbo.

Reply Good karma Bad karma+1 vote
Studiopaw
Studiopaw - - 12 comments

Thankyou Pitulon! this was SO helpfull :D

1 problem!....
i start up the game and it says this!

\gameinfo.txt is not a valid format
thankyou and.. what can i dooo????

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

we'll fix this. continue via email ;)

Reply Good karma+1 vote
Fewes01
Fewes01 - - 40 comments

Incredibly helpful guide, many thanks!

Reply Good karma Bad karma+1 vote
antonphd
antonphd - - 1 comments

I created a simple mod to play HL2 called myMod. I don't have any maps that I created. I only want to use the HL2 maps. I want them showing in the new game gui just as they do when playing HL2.

I followed the instructions to show chapters in the new game gui.

I added the Chapter1.cfg, Chapter2.cfg, etc... in the cfg folder.

I properly named which maps to use with the chapters.

ex. Chapter 14.cfg uses map credits

I changed the name of hl2_english.txt to the name of myMod_english.txt.

I changed the "HL2_Chapter1_Title" to "myMod_Chapter1_Title", etc...

When I open the new game gui I see the chapters with the proper images and they open the correct maps, but, all that it shows for chapter names is(and this is the same for each chapter name)

Chapter
#myMod_Chapter_Title

Does this process for chapter naming work if you are using the HL2 chapters?

Reply Good karma Bad karma+1 vote
Pitulon Author
Pitulon - - 12 comments

@ antonphd
please e-mail me with your mod's file, excluding the map files or video or textures or sounds, and we'll fix this!

* for other ppl havin issues: PLEASE e-mail me (c_petrut @ yahoo.com), rather than posting here, for further support! This way is more faster for me to help you fix the problems. Thanks.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: