Hot Fixing broken "sourcemods" main menu's

Quote from ChickenMobile on May 18, 2012, 10:02 pmFelixGriffin 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 can open the vpk and drag all the files into the necessary folders.
Quote from CosmicD on May 20, 2012, 10:05 amyeah, it's usually ok when it's only singular maps and custom props etc. But when the author includes custom transitions and lightboards and uses the same transition file (scripts/vscripts/sp_transition_list.txt) and actually replaces the entire file with their custom stuff, your main game starts to be a bit polluted.
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 saferAll 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.
yeah, it's usually ok when it's only singular maps and custom props etc. But when the author includes custom transitions and lightboards and uses the same transition file (scripts/vscripts/sp_transition_list.txt) and actually replaces the entire file with their custom stuff, your main game starts to be a bit polluted.
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.
Quote from tile on November 17, 2012, 10:17 pmit 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:
- Code: Select all
"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"
}
}
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:
- Code: Select all
"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"
}
}

Quote from ChickenMobile on November 17, 2012, 10:33 pmTile,
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.
Tile,
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.


Quote from josepezdj on November 20, 2012, 3:36 amtile 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.
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.