Fix broken Chapter Handling by Base Game
In order to provide the proper menu background images and the music for each of the 5 (internal)* chapters of my mod I have included the following to override the base game:
- /media/menu_act(01 | ... | 05).bik: The background video/image which is displayed in the main menu.- pak01_dir.vpk/materials/vgui/backgrounds: Images of the main menu background which are displayed before the bik video files are loaded and played. Usually the first frame of the video.- pak01_dir.vpk/sound/music/mainmenu/portal2_background(01 | ... | 05).wav: Main menu background music overide with my content rather than the original.
* internal means here the division in 5 acts while having about 12 chapters ingame so the player can choose rather a chapter than a act to start with.
However I have and issue and one question concerning this one:
- Assume I play the first level of my mod, this is obviously Act 1 and Chapter 1. Now i close my mod and start playing Portal 2 - let's say we start with a new Game in Chapter 7 which is Act 3 internally. When I now change back to my mod it thinks it is already in Act 3 and therefore displays the wrong menu background and could spoiler the player etc. therefore the chapter handling of the base game influences my mod and I do not want to everybody something like "don't play Portal 2 unless you play through my mod.".- Is there any way to fix this issue? I already tried to mess around with the sv_unlockedchapters variable but it looks like this not affect Portal 2.A workaround would be to use only one background and the same music for all chapters but it would very neat if the menu is contextual based on the progress in the mod!
Honestly this isn't a very big problem, just a slight bug. 99/100 people who play your mod have already finished Portal 2 and are not likely to play a random act in Portal 2 and then get back to playing your mod. Even if they do see the menu change, they would probably not think much of it as they have just launched the mod.
If this is fixable by using some sort of console command on startup: I definitely don't know what it is.
Ideas people?
The point with the bug: i HATE having bugs and do not want to countenance them or find a workaround, i want to fix them. In my opinion it even sounds strange to include in a Readme etc. the notice "please do not play the base game while playing this mod, otherwise you would not have the full experience".
Moreover it is quite interesting how one could at least manipulate the current chapter besides my issues - any help is appreciated!^
**EDIT:**
After experimenting a bit, I figured out that it seems that the relation map <-> chapter is hardcoded into the game. Naming my map the as one of the original ones here or putting them in a separate folder and using symlinks with "original" allowed me to change the current chapter... (I don't know where this information is stored! I NEED to know it!) however that way I am restricted to either the original names AND the maximum amount of maps available. I need to find out, how to change this behaviour, otherwise I probably have to stick to having only one menu setting...
I assume that code inside the game handles this, and not any kind of script otherwise it wouldn't change from the base mod when you launch it.
What I would suggest is try fiddling with the sp_a#'s and perhaps even create your maps with the prefixes after the main campaign. I'm not entirely sure how this would affect your main menu though when you do go into the main game BUT you could probably set the menu screen to the same image/video for each sp from 1-5 and different ones after that (6 onwards which is the start of your mod because a5 are credits).
P.S. are you using the 'extras' menu for choosing your maps / alternative for the new game menu?
Nevertheless trying to increase the a# number didn't do anything - except having a black loading screen but the menu itself was still chapter 1. It really looks like everything concerning that is hardcoded into the game 
Oh and yes, I do use the extras menu hack, because there is no other working hack known, i think!
Nevertheless thanks for your help CM, I am eager to hear if anyone else has any ideas, meanhwile I am going to create some maps now 
Liam wrote:
[...] meanhwile I am going to create some maps now
I can't help you with this particular problem, but I wouldn't put too much time and energy into it if I were you. 99.9% of people's gaming experience is going to be the campaign itself, so focus on that!
I was planning to make a pack out of my Sendificate maps as soon as I had finished a couple of them, and was a bit let down when the whole PTI and workshop was released, thinking that potential players would be less likely to download my map pack if it meant that they had to install it manually, while they were all used to the click & play convenience of the workshop.
Then I decided to just publish maps to the workshop as they get finished, group them into a collection, do my best to make that experience as nice as it can be and otherwise just roll with it. Yes, people can play maps out of order. Yes, you need to click one extra button at the end of each map to go to the next one. But those are only small details that don't outweigh the huge advantage of how easy it is to install maps, plus: I can publish maps as soon as they are finished instead of having to wait until the whole thing is done to release it as one package.
tl;dr: please don't make mods, release maps as you finish them!
HMW wrote:
tl;dr: please don't make mods, release maps as you finish them!
I beg to differ. I feel that maps released in bulk are more exciting. You never need to wait for the next map, and you can understand a mechanic all at once. I think we wouldn't have liked 12 angry tests as much if it hadn't been released in bulk. Unless you're just trying to say don't make people install it because the workshop has made them lazy. In which case I completely agree.
HMW: are you saying that people cbf to click a button to download a mod and then extract it to one folder? Also story driven mods won't make sense if they were accidentally played out of order (I have subscribed to certain map series before on the workshop and they played out of order), plus the thumbs up menu is annoying as it will interrupt your gameplay every time you want to change to the next map.
ChickenMobile wrote:
[...]Even just putting the first map on the workshop as a demo and then saying with a game_text that you can download the rest of the mod through a link provided in the description is another a way to go.[...]plus the thumbs up menu is annoying as it will interrupt your gameplay every time you want to change to the next map.
THIS! In my opinion it is more convenient to have everything packed together in one place - furthermore telling a story this way is much easier than distributing maps to the Workshop. Moreover assume I create four maps and release them, then I am continuing with the fifth and realize that I want to change the order of the maps... patching everything when there's something new is not the way it should work. And the workshop is definitely a place to release one or two maps to showcase the game.
Ah yeah and the thing about consistency between levels - Half-Life did a good job with the allover 1st person experience without the omniscient player - there are no cuts between the levels and this is how it should be, though Valve did not that way in Portal 2 which is disappointing ![]()
Let's add one think CM already mentioned: story. I have been working for a while on a story and now I want to know, how would you (HMW) tell a story that is shattered into pieces? No one wants to play a game for months!
The first one is concerning Liam's current project: a mod / map pack, with a custom menu and chapter selection system and everything.
Liam, the part of your post I quoted ("I'm going to make some maps now") sounded to me like your project is still quite early in its development stage, and that it's perhaps not the ideal time to worry about things like the menu system. I would save details like that for later, when I'm (almost) done with the maps. Spending too much time on this kind of thing too early, can really make things grind to a halt. Again speaking from personal experience.
(Then again, perhaps you are almost done with the maps and ready to release, in wich case: forget what I just said
)
The second thing applies more to these kinds of projects in general, rather than this one in particular.
The notion that players don't have to wait for the next map if they are released all at once, is only partially correct. In reality, we have to wait for all of them. Of course, if you don't know ahead of time that a big mapping project is going to be released, then it's a nice surprise when it does, and the fact that you can play through the whole thing in one go, does make for a better experience story-wise. But "12 Angry Tests" is the positive outlier here. "Backstock", "Portal Stories" and Josepezdj's "Enceladus" series are all similar projects that are in development right now, and not getting released for quite a while, as far as I know.
My previous post suggests that I'm completely against map packs. This is not the case, and in retrospect this was poor wording on my behalf. They do certainly have the advantage of better integration, resource management, and story flow. I agree with you guys that the voting menu of the workshop does take players out of the story a bit.
What I'm worried about, is that mappers bite off more than they can chew, and that they abandon their project before it gets finished, because it turns out to take more time than they expected.
Alternatively, if you start out with an open-ended story (web-comic style) and just begin making and releasing maps, you can call it quits anytime you want, perhaps finish it up with one final boss level, and you still have released some nice stuff. (If you already have a story that doesn't fit this format, then this would not be an ideal solution of course.)
Again, I don't want to tell you how you should organise your project (and if I sounded like I did, then again I'm sorry, that was not intended), but please consider these two things:
- Releasing maps early gets you valuable feedback and publicity. It's easier to keep motivated to continue working on your series, if you know that that work is going to be appreciated.- Portal 2 is very popular right now, because there is high-quality custom content being released for it right now. Will this still be the case by the time your map pack is finished? (Which may well take a year or more, depending on the size of it.)
So, that's just something I wanted to get off my mind. I will now stop hijacking your thread with these theoreticals, Liam. 
(But comments are welcome, as always!)
All the best with your project, and I look forward to see what you come up with!