[Portal 2] HOWTO: Test Co-Op maps alone

Avatar
Dewin
43 Posts
Posted Apr 27, 2011
This is a guide on how you can test co-op maps alone. This also works for any existing coop maps. It does not require you to do anything special with the map file itself. Thanks to the early posters in this thread and various people on the Source forums for the information, I just assembled it all in one place.

The following gets you started:

ss_map mapname: Load mapname in splitscreen mode.
ss_splitmode 0: Side-by-side split
ss_splitmode 1: Top-and-bottom split

If you run dual monitors and want to split to each monitor, follow the guide here: http://forums.steampowered.com/forums/s ... ?t=1857198

Controlling the second player:
There are a number of ways you can do this:

1. Use in_forceuser
This lets you "take over" the second player. It is flagged as a cheat, however, so cheats need to be enabled.
sv_cheats 1: Turn on cheats
in_forceuser 1: Control second player
in_forceuser 0: Control first player

I suggest a keybind for this:
BindToggle "z" in_forceuser
Swaps you between first and second player.

2. Use a controller
This is actually more complicated than it sounds, unless you have two controllers. There doesn't seem to be a way in Steam to bind actions on the first controller to actions for the second player.

More information for this can be found here: http://forums.steampowered.com/forums/s ... ?t=1847904

3. Use change_portalgun_linkage
This lets you create multiple sets of portals as one player, so isn't truly playing two players.

It's not yet tested to see if portals that are in the set you aren't currently linked to survive going through a fizzler.

I recommend the first option -- it's the easiest to set up, and doesn't require you to jump back and forth between mouse+keyboard and controller.

Of course, if you really are testing with two people, the second option is probably your best bet.

Advertisement
Registered users don’t see ads! Register now!
Avatar
suicidal_banana
16 Posts
Posted Apr 27, 2011
Replied 11 minutes later
Try remove the mp_ tag on the mapname maybe? :razz:

Since that prolly wont do shit, try decompiling the map, i noticed most maps have these dedicated boxes with entitys for mp, im sure you could fiddle with those. to achieve support for both sp and mp (and i guess you will need them for proper functioning coop anyway)

Avatar
Mevious
205 Posts
Posted Apr 27, 2011
Replied 1 minutes later
What you could do is use visgroups to change what entities the map is compiled with. Mark the info_player_start as part of a custom visgroup called "1 player" or something and the coop starts as part of "2 players". Then you can select which one to use before you compile. This will also allow you to test puzzles as a single person that wouldn't be possible otherwise e.g., have cleansers and walls that are only part of the "2 players" group so that they won't hinder you when testing by yourself. I use this feature all the time if I need multiple versions of a map.
Avatar
CraigChrist
41 Posts
Posted Apr 27, 2011
Replied 5 minutes later
You can try running a map in splitscreen mode. If you have a gamepad you can than test with both players.... one by one :smile:
Avatar
ollj
4 Posts
Posted Apr 28, 2011
Replied 15 hours later
it is possible. the map "coop_spawn" has a compilable version of a minimalistic coop-spawn that is palyable in singleplayer.
Avatar
Dewin
43 Posts
Posted Apr 28, 2011
Replied 3 hours later
Thanks for the replies. Based on them and some other information I've gathered, I'm going to edit a HOWTO into the opening post shortly.
Avatar
CraigChrist
41 Posts
Posted Apr 28, 2011
Replied 1 hour later
Great! I didn't know you can switch players. With that you can fully test a map without any problems (gamepad can cause some issues and i'ts not that easy to set up). Of course for fast paced maps and the ones where both players have to do something at the same time this won't work... I suggest cloning yourself :biggrin:

Thanks for the info

Avatar
msleeper
4,136 Posts
Admin
Posted Apr 28, 2011
Replied 19 minutes later
So is the first post now a complete how-to on how to solo-test a coop map?
Avatar
Dewin
43 Posts
Posted Apr 28, 2011
Replied 35 minutes later
Yup.
Avatar
msleeper
4,136 Posts
Admin
Posted Apr 28, 2011
Replied 7 minutes later
Cool. Sticky'd. You should probably post this on the VDC too.
Avatar
Dewin
43 Posts
Posted Apr 29, 2011
Replied 21 hours later

Aaand done! With some minor edits.

http://developer.valvesoftware.com/wiki ... Maps_Alone
added to http://developer.valvesoftware.com/wiki ... vel_Design

Avatar
msleeper
4,136 Posts
Admin
Posted Apr 29, 2011
Replied 43 minutes later
Nice!
Avatar
Quargos
17 Posts
Posted May 07, 2011
Replied 7 days later
I can't make it work if I make it go straight to my map.
it always sets the maxplayers to 1.

however if I use ss_map mp_coop_lobby2 then use changelevel to enter my map it works.
I tried this with not only the map that I made but also with someone elses map and both gave the same results.

Avatar
DrummerB
52 Posts
Posted May 07, 2011
Replied 40 minutes later
You may want to mention that you can set up hammer so that it does this automatically. I don't know if this is obvious (I'm new), but it took me some time to figure out that you could pass developer console commands to portal.exe as parameters using a "+" as a prefix instead of the ususal "-".
Avatar
last_
2 Posts
Posted May 10, 2011
Replied 3 days later
I use the method where you type in the command "ss_map mp_coop_lobby_2" to get it to do splitscreen. I then change to my level for testing. I spawn at the top of my spawn tube thing and cannot drop down, i can move the camera around.. its as if I am stuck on an invisible platform.

In the process of rechecking all of my entities and I can not find anything wrong I will just keep rechecking I suppose.

I followed this tutorial: http://wiki.p2mods.com/index.php?title=Co-Op_Spawn_room
Everything looks to be exactly as it should be. I have double checked and triple and... lots of checking has occured. No idea what I am doing wrong, obviously something.

Avatar
NDsource
4 Posts
Posted May 10, 2011
Replied 5 hours later

I got this error when i tried:

Valve_Reject_Server_Full

Advertisement
Registered users don’t see ads! Register now!
Avatar
Scorch
1 Posts
Posted May 11, 2011
Replied 14 hours later

Quote:
I got this error when i tried:

Valve_Reject_Server_Full

the name of the map must be like this: "mp_coop_name"
same happens if you try to load sp maps in coop