Skip to content

Instantly share code, notes, and snippets.

@sswires
Created May 7, 2015 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sswires/8d6c6e89c4d3daa79c0d to your computer and use it in GitHub Desktop.
Save sswires/8d6c6e89c4d3daa79c0d to your computer and use it in GitHub Desktop.
Standalone Insurgency Mod example
"GameInfo"
{
game "Operator"
title "Operator"
GameData "insurgency.fgd"
gamelogo 1
nodegraph 0
type multiplayer_only
SupportsDX8 0
SupportsXbox360 0
FileSystem
{
SteamAppId 222880 // This will mount all the GCFs we need (240=CS:S, 220=HL2).
ToolsAppId 211 // Tools will load this (ie: source SDK caches) to get things like materials\debug, materials\editor, etc.
// Setup engine search paths.
//
// If a search path contains "_english", and the current language is not english, then
// another search path will be inserted above the english one by replacing "_english" with
// the appropriate language.
//
// To debug how the engine has parsed this file, type "path" at the console.
//
// Search paths are relative to the base directory, which is where hl2.exe is found.
//
// |gameinfo_path| points at the directory where gameinfo.txt is.
// |all_source_engine_paths| points at the directory containing HL2 shared content.
//
SearchPaths
{
// First, mount all user customizations. This will search for VPKs and subfolders
// and mount them in alphabetical order. The easiest way to distribute a mod is to
// pack up the custom content into a VPK. To "install" a mod, just drop it in this
// folder.
//
// Note that this folder is scanned only when the game is booted.
game+mod |gameinfo_path|custom/*
game+mod |gameinfo_path|operator.vpk
// We search VPK files before ordinary folders, because most files will be found in
// VPK and we can avoid making thousands of file system calls to attempt to open files
// in folders where they don't exist. (Searching a VPK is much faster than making an operating
// system call.)
game+mod insurgency/insurgency_materials.vpk
game+mod insurgency/insurgency_misc.vpk
game+mod insurgency/insurgency_models.vpk
game+mod insurgency/insurgency_particles.vpk
game+mod insurgency/insurgency_sound.vpk
// Now search loose files. We'll set the directory containing the gameinfo.txt file
// as the first "mod" search path (after any user customizations). This is also the one
// that's used when writing to the "mod" path.
game+mod+mod_write+default_write_path |gameinfo_path|.
// Add the insurgency directory as a game search path. This is also where where writes
// to the "game" path go.
game+game_write insurgency
// Where the game's binaries are
gamebin insurgency/bin
// Last, mount platform loose files
game |all_source_engine_paths|platform
platform |all_source_engine_paths|platform
// Content, similar to custom but searched later
game+mod insurgency/content/*
// Random files downloaded from gameservers go into a separate directory, so
// that it's easy to keep those files segregated from the official game files
// or customizations intentionally installed by the user.
//
// This directory is searched LAST. If you visit a server and download
// a custom model, etc, we don't want that file to override the default
// game file indefinitely (after you have left the server). Servers CAN have
// custom content that overrides the default game files, it just needs to be
// packed up in the .bsp file so that it will be mounted as a map search pack.
// The map search pack is mounted at the top of the search path list,
// but only while you are connected that server and on that map.
game+download |gameinfo_path|download
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment