Hot Fixing broken "sourcemods" main menu's
For you who have made your portal 2 mod using the sourcemods methods described here, you will find the main menu of your mod broken after valve updated portal 2 with the new Perpetual Testing DLC.
This is because the engine no longer looks inside the packaged filesystem for mainmenu.res , but mainmenu_new.res when trying to find it inside the resource/ui/basemod/ui folder.
I relealise people will mostly use the new workshop/puzzlemaker combo, but I invested allot in a bit of story telling, custom props and scripts for my campaign so whenever I update it I want it to update it foremost using the "sourcemods" approach.
After that I'll see if I can cram all this stuff inside workshop version of my individual core maps.
Anyway, just want to mention this for people having the same prob.
Now if there was only a way to properly modify portals' main menu...
I'm totally no programmer but I'm sure that following its structure, you could make a front-end application for it.
But I'm glad to say I was wrong lol.

Hopefully valve will fix this... ...eventually!
FelixGriffin wrote:
Well, that's awful! Is there any way to play addons like Retrospective anymore?
You can open the vpk and drag all the files into the necessary folders.
You actually HAVE to use sp_lightboards.txt , it's somehow hardcoded and some authors replace (and not complete the stock one so you end up screwing over your standard level test signs.
Rightnow if you want to extract stuff from a vpk, I even believe that some scripts are read from the main portal dir, (portal2) and the soundscripts or transitions (if added) are read from the most recent dlc dir. (portal2_dlc2) . You just have to test for that.
So in short I'd say, go ahead when it's only maps inside a vpk, you can just put them in the maps folder (of your main portal2 dir, not the dlc ones), materials and models can go in the respective dirs as well but anything in scripts and scripts/vscripts is tricky for the engine to not screw up the original game. Depending on what the author did with the files.
For example:
Some authors also make complete custom lightboards with the lightboard creator thats floating around here, this just gives you custom materials and models, thats still safer
All this what I said here is valid conserning the extractions of vpk's that were read from the /addons folder and you want to extract this.
it didn't work for me. i've named my mainmenu.res file mainmenu_new.res and all forms of capatol/lowercase of that, and even changed the line in mainmenu_new that says the directory. any ideas why?
also, here's the contents of it:
"Resource/UI/mainmenu_new.res"
{
"MainMenu"
{
"ControlName" "Frame"
"fieldName" "MainMenu"
"xpos" "0"
"ypos" "0"
"wide" "f0"
"tall" "f0"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"PaintBackgroundType" "0"
}
// Single player
"BtnPlaySolo"
{
"ControlName" "BaseModHybridButton"
"fieldName" "BtnPlaySolo"
"xpos" "88" [$GAMECONSOLE && ($GAMECONSOLEWIDE && !$ANAMORPHIC)]
"xpos" "63" [$GAMECONSOLE && (!$GAMECONSOLEWIDE || $ANAMORPHIC)]
"xpos" "88" [!$GAMECONSOLE && $WIN32WIDE]
"xpos" "63" [!$GAMECONSOLE && !$WIN32WIDE]
"ypos" "280" [$GAMECONSOLE]
"ypos" "258" [!$GAMECONSOLE]
"wide" "220"
"tall" "20"
"autoResize" "1"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"navUp" "BtnOptions" [$GAMECONSOLE]
"navUp" "BtnEconUI" [!$GAMECONSOLE]
"navDown" "BtnQuit"
"labelText" "#PORTAL2_MainMenu_Solo"
"style" "MainMenuButton"
"command" "Extras"
"ActivationType" "1"
"FocusDisabledBorderSize" "1"
}
"BtnOptions"
{
"ControlName" "BaseModHybridButton"
"fieldName" "BtnOptions"
"xpos" "88" [$GAMECONSOLE && ($GAMECONSOLEWIDE && !$ANAMORPHIC)]
"xpos" "63" [$GAMECONSOLE && (!$GAMECONSOLEWIDE || $ANAMORPHIC)]
"xpos" "88" [!$GAMECONSOLE && $WIN32WIDE]
"xpos" "63" [!$GAMECONSOLE && !$WIN32WIDE]
"ypos" "340" [$GAMECONSOLE]
"ypos" "318" [!$GAMECONSOLE]
"wide" "220"
"tall" "20"
"autoResize" "1"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"navUp" "BtnPlaySolo"
"navDown" "BtnQuit" [$GAMECONSOLE]
"navDown" "BtnExtras" [!$GAMECONSOLE]
"labelText" "#PORTAL2_MainMenu_Options"
"style" "MainMenuButton"
"command" "Options"
"ActivationType" "1"
}
"BtnQuit" [!$GAMECONSOLE]
{
"ControlName" "BaseModHybridButton"
"fieldName" "BtnQuit"
"xpos" "88" [$WIN32WIDE]
"xpos" "63" [!$WIN32WIDE]
"ypos" "378"
"wide" "220"
"tall" "20"
"autoResize" "1"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"tabPosition" "0"
"navUp" "BtnOptions"
"navDown" "BtnPlaySolo"
"labelText" "uit"
"style" "MainMenuButton"
"command" "QuitGame"
"ActivationType" "1"
}
}
This is an old thread from half-way through this year. Most probably that this solution is no longer valid as the GUI has been updated again since the workshop.
I would create both a mainmenu.res and a mainmenu_new.res and also go through the Portal 2 updates to see where the new 'community chambers' option is inside the mainmenu.res.
steam message me BenVlodgi
tile wrote:
been there, done that. and sorry for replying to an old thread.
I rechecked mine and everything is working fine. I came to the same solution than CosmicD right after the dlc update changed the menu. What I did was to copy exactly the same I had in mainmenu.res into mainmenu_new.res. Ofc, as Ben said, you have to put both into your pak01_dir.vpk file for it to work.