Create a gameinfo.txt

In this tutorial, you will learn how to create a working gameinfo.txt for a single-player mod.

Creating the gameinfo.txt

Locate your ../steam/steamapps/sourcemods/[your mod folder]/ and create a text file called gameinfo.txt. In case you don't have a mod folder yet, learn how to Setup the mod folder.

In a simple way, this file will consist of two parts: one where you will insert your mod details, and another one that will load the content from the base game, which you don't need to modify.

Everything will be included inside these brackets:

"GameInfo"
{

}

First part: Mod details

In the first lines, you will insert the mod name to be displayed on Steam Library, the name to be displayed In-game, the name of the developer and the website of the mod.

 // Basic
 Title "Mod template - Game menu title"
 Title2 "Mod template - Game menu subtitle"
 
 // Steam games list
 Game   "Mod template - Library title"
 Developer   "Developer name"
 Developer_URL  "https://halflife2tutorials.blogspot.com/"
 Manual   "https://halflife2tutorials.blogspot.com/2018/12/setup-mod-folder.html"
 Icon    "resource/icon"

Second part: Content import

In the second part, which I suggest you do not modify, the content is loaded from the base game.
 // Import content - DO NOT EDIT BELOW
 Type singleplayer_only

 FileSystem
 {
  SteamAppId    243730  // This sets the app ID in Steam
  
  SearchPaths
  {
   game+mod+mod_write+default_write_path |gameinfo_path|.
   gamebin     |gameinfo_path|bin
   game     |all_source_engine_paths|ep2/ep2_english.vpk
   game     |all_source_engine_paths|ep2/ep2_pak.vpk
   game     |all_source_engine_paths|episodic/ep1_english.vpk
   game     |all_source_engine_paths|episodic/ep1_pak.vpk
   game_lv     hl2/hl2_lv.vpk
   game     |all_source_engine_paths|hl2/hl2_english.vpk
   game     |all_source_engine_paths|hl2/hl2_pak.vpk
   game     |all_source_engine_paths|hl2/hl2_textures.vpk
   game     |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk
   game     |all_source_engine_paths|hl2/hl2_sound_misc.vpk
   game     |all_source_engine_paths|hl2/hl2_misc.vpk
   platform    |all_source_engine_paths|platform/platform_misc.vpk   
   game             |all_source_engine_paths|sourcetest/sourcetest_pak.vpk
   game       |all_source_engine_paths|ep2
   game     |all_source_engine_paths|episodic
   game     |all_source_engine_paths|hl2
   platform    |all_source_engine_paths|platform
  }
 }

Finishing up

Download tutorial files

Once you type or copy everything into your gameinfo.txt file, your mod configuration will be ready to be displayed on the Steam library, if you follow up the Setup the mod folder tutorial.


The mod on the Steam library now will show the Game value you set in the gameinfo.txt, along with
You now know how to create a working gameinfo.txt for a single-player mod.

Comments

Popular posts from this blog

Setup the mod folder

Fix the game menu title font