Skip to content

TG menu & Modules config

KissLick edited this page Apr 16, 2016 · 2 revisions

Module config is automatically created by TeamGames and is used to determine TeamGames main and game menu.

You can do following things with the config:

  • Change the order of items in menu
  • Change the visibility of items in menu
  • Set separators for items (prepend, append or both)
  • Disable module item loading

Config example

"Root" // DO NOT CHANGE THIS!
{
	"MainMenu" // DO NOT CHANGE THIS!
	{
		"Core_TeamsMenu"{}
		"Core_GamesMenu"
		{
			"visibility" "0" // Make this item invisible
		}
		"Core_GamesMenu-TeamGame"{}
		"Core_GamesMenu-RedOnly"{}
		"Core_FencesMenu"{}
		"Core_StopGame"{}
		"Core_GamesRoundLimitInfo"
		{
			"disabled" "1" // Disable this item
		}
		"Core_Separator"{}
		"BombToss-SpawnBomb"
		{
			"name"	"Spawn bomb (32)"
			"separator" "append" // Append separator after this item
		}
		"BombToss-Target"
		{
			"name"	"Spawn target"
		}
	}
	"GamesMenu" // DO NOT CHANGE THIS!
	{
		"KnifeFight-TeamGame"
		{
			"name"	"KnifeFight"
		}
		"KnifeFight-RedOnly"
		{
			"name"	"KnifeFight"
		}
		"ReloadBattle-TeamGame"
		{
			"name"	"Reload battle"
		}
		"ReloadBattle-RedOnly"
		{
			"name"	"Reload battle"
		}
	}
}

Core menu items

Item Description
Core_TeamsMenu Open TG teams menu
Core_GamesMenu Open TG games menu
Core_GamesMenu-TeamGame Open TG games menu (with only TeamGame games)
Core_GamesMenu-RedOnly Open TG games menu (with only RedOnly games)
Core_FencesMenu Open TG fences menu
Core_StopGame Stop currently running game
Core_GamesRoundLimitInfo Show how many games left in this round (ConVar tg_game_roundlimit)
Core_Separator Menu separator (empty line)

Overriding menu items access

You can use SourceMod override system to restrict access to menu items (games included). As override command use TG_Game-GAME_ID, TG_MenuItem-MENU_ITEM_ID or just MODULE_ID.

P.S.: GAME_ID, MENU_ITEM_ID and MODULE_ID are in fact same.