Recreating GameUI
From Valve Developer Community
This article will focus on recreating the GameUI so it's easier to modify as well as control the GameMenu.
Note: There is no code posted for the below changes, so following the directions will not show expected results. The code will be released once the recreation is finished.| Table of contents |
[edit]
Base modifications
- Make
resource\GameMenu.resso it's empty or has"GameMenu"{}in it. - This will remove the GameMenu so it can be replaced by the new one.
- Remove the
titleandtitle2KeyValues fromGameInfo.txt. - This will remove the two title texts that appear on the backdrop.
- If no
resource\SourceScheme.resexists, extract it fromsource engine.gcf. - Modify
resource\SourceScheme.ressoMainMenu.Backdropis "0 0 0 0". - This will make it so the backdrop is not faded due to panels foreign to GameUI not having control over backdrop fades.
[edit]
Singleplayer mods
[edit]
New Game dialog
The custom new game dialog has been made so it uses the list in resource\ChapterList.res.
Here's an example of the file:
"ChapterList"
{
"Training" "trainingmap1"
"1" "chapter1map1"
"#Two" "chapter2map1"
"Three" "chapter3map1"
}
[edit]
Notes
- The training map is a special chapter key name that is handled by different code.
- The key name of a chapter ("1", "#Two", ...) defines what will be shown on the new game dialog (CHAPTER 1, CAPĂTULO DOS, etc).
- Localized strings referenced must be defined in a localization file.
- If the key name is text, such as "Three," it will appear as is for any language.
-
sv_unlockedchaptersis checked by running down this list in order, so arrange the chapter KeyValues in order.
[edit]
Fixes
- This dialog takes into account absolute paths for the
-gameparameter.
[edit]
Multiplayer mods
[edit]
Create Multiplayer Game dialog
The custom create MP game dialog has been made so it uses the ConVar list in cfg\server_settings_default.txt.
"ServerOptions"
{
"hostname"
{
"label" "#Valve_Hostname"
"type" "string"
"initial" "Hostname"
}
"maxplayers"
{
"label" "#Valve_Max_Players"
"type" "integer"
"minimum" "2"
"maximum" "16"
"initial" "16"
}
"sv_password"
{
"label" "#Valve_Server_Password"
"type" "string"
"initial" ""
}
"mp_fraglimit"
{
"Frag Limit"
"type" "integer"
"minimum" "0"
"initial" "0"
}
"mp_timelimit"
{
"label" "Time Limit (Min.)"
"type" "float"
"minimum" "0"
"initial" "0"
}
"mp_teamplay"
{
"Frag Limit"
"type" "boolean"
"initial" "0"
}
"mp_weaponstay"
{
"label" "Weapons Stay"
"type" "boolean"
"initial" "0"
}
"mp_footsteps"
{
"label" "#Valve_Footsteps"
"type" "boolean"
"initial" "1"
}
"mp_flashlight"
{
"label" "Flashlight"
"type" "boolean"
"initial" "0"
}
"mp_forcerespawn"
{
"label" "Force Respawn"
"type" "boolean"
"initial" "0"
}
}
[edit]
New localized strings
"NewUI_NoMapsAvailable" "No visible maps are available for this mod"
