• Mod menu help!!!
    4 replies, posted
Hey guys, this is most likely a basic question, with a basic answer, but it is something that I haven't learned yet. So here is how it goes... When I start up my mod, I have the options to: video stress test, options, and quit. I know why I have these options, because when you make a mod it takes the sourse sdk base content, which is the lost coast content. So how do I get the options to play and ect, so that it would be like a normal Half Life 2 single player mod, so I have options like New game, and Load game. Before you answer this, I can play my levels for the mod, by opening the console and using the "changelevel" command, but I want it so that I can click new game and select the chapter or level. P.S. How do I change the main menu background? Thanks in advance guys :D. Best answer gets their name in special thanks in the credits of the mod.
Without actually naming the chapter or VGUI variables and fuctions in C++ in your mod's binary, you cannot have these features. I think there's some valve dev wiki tutorials on this, ah, here it is, the VGUI article, this should get you off on the right foot: [url]http://developer.valvesoftware.com/wiki/VGUI_Documentation[/url] good luck brother. Also, I think you can actually edit some .res files in the meanwhile, the hl2/resource/GameMenu.res to be exact. like this: [code] "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" } "12" { "label" "#GameUI_GameMenu_Options" "command" "OpenOptionsDialog" } "13" { "label" "#GameUI_GameMenu_Quit" "command" "Quit" } } [/code] For example, in hl2, the label #GameUI_GameMenu_Quit is denoted in it's binary as EXIT, so since this is the game menu res file, it shows this as EXIT. This is just an example of why the labels look like this. So, lets say you wanted the start game item to be the first map in your mod, so we'll make a little change to the command in the start game item, like this: [code] "GameMenu"(EDITED) { "1" { "label" "#GameUI_GameMenu_ResumeGame" "command" "ResumeGame" "OnlyInGame" "1" } "5" { "label" "#GameUI_GameMenu_NewGame" "command" "map first_map" "notmulti" "1" } "6" { "label" "#GameUI_GameMenu_LoadGame" "command" "OpenLoadGameDialog" "notmulti" "1" } "7" { "label" "#GameUI_GameMenu_SaveGame" "command" "OpenSaveGameDialog" "notmulti" "1" "OnlyInGame" "1" } "12" { "label" "#GameUI_GameMenu_Options" "command" "OpenOptionsDialog" } "13" { "label" "#GameUI_GameMenu_Quit" "command" "Quit" } } [/code] Simple as that, also you can denote weather or not one of these elements shows up in game or not by putting in the flag "OnlyInGame" "1/0" and also if you don't want it showing up in the multiplayer menu with the flag "notmulti" "1/0". As for chapter backgrounds, there's also a simple script file for that, hl2/scripts/ChapterBackgrounds.txt : [code] "chapters" { 1 "smbk1" 1a "smbk2" 2 "smbk2" 3 "smbk3" 4 "smbk4" 5 "smbk5" 6 "smbk6" 7 "smbk7" 8 "smbk8" 9 "smbk1" 9a "smbk2" 10 "smbk3" 11 "smbk4" 12 "smbk5" 13 "smbk6" 14 "smbk7" 15 "smbk8" } [/code] So this just randomizes different textures and maps as backgrounds, you can change these "smbkX" to whatever map/texture you want, for example. [code] "chapters"(EDITED) { 1 "background_01" 1a "smbk2" 2 "smbk2" 3 "smbk3" 4 "smbk4" 5 "smbk5" 6 "smbk6" 7 "smbk7" 8 "smbk8" 9 "smbk1" 9a "smbk2" 10 "smbk3" 11 "smbk4" 12 "smbk5" 13 "smbk6" 14 "smbk7" 15 "smbk8" } [/code] That's all for now, once again, good luck. (Also put me in dem credits!)
You will be in the credits my friend :D
Hey what is the full directory for the "hl2/resource/GameMenu.res"
[url]http://www.moddb.com/games/half-life-2/tutorials/complete-guide-for-customizing-a-single-player-mod[/url] use the above link, it tells you EVERYTHING that you need to customize a hl2 singleplayer mod
Sorry, you need to Log In to post a reply to this thread.