Portal 2: Multiplayer Mod

A mod featuring:

- A maximum player cap of 33!
- Name Tags
- Custom Player colors
- Chat commands (!help)
- In-game Admin system
- Full cooperative campaign support
- Full singleplayer campaign support (needs minor polishing)
- Full Super 8 map support
- In-house map support for select workshop maps
- Encryption of client commands invoked through the active GameRules class
- Support for Linux, Windows 10 and above
- Togglable game options and config system exposed through VScript and a custom plugin
- Support for SAR (SourceAutoRecord) for speedrunning
And more!

For a full setup guide, check out the wiki.
We're Open Source!
Portal 2: Multiplayer Mod Portal 2: Multiplayer Mod

Post article RSS Articles

P2MM Setup & Guide

Other Tutorial

Portal 2: Multiplayer Mod Installation and General Usage Guide

NOTE: This wiki covers only the latest P2:MM versions, 2.2.0 and newer as of writing.


Only the host must install the Portal 2: Multiplayer Mod. The Portal 2: Multiplayer Mod for Windows is only supported on 64-bit versions of Windows 10 and Windows 11.

Download the launcher here. P2:MM only works on 64 bit computers. If you want to compile or run directly from the source code instead, please follow the start of our Contributions wiki guide.

Setup Network Or Software to Allow Clients To Connect

Before starting the launcher, you should set up your network to allow clients to access your P2:MM play session. Setting up your network can be done in two ways: port forwarding through your router’s configuration interface or using a networking tool like Hamachi or something similar.
You do not need to do both!

Networking Tool

playit.gg, Radmin VPN, and Hamachi are some networking tools we recommend that can help simplify this process if you do not know how, don’t have the will, or are uncomfortable opening your router port for people to connect. We won’t involve instructions on how to each set these up as those programs are either straightforward or have their own guides on how to set them up. All you need to know is that the ports Portal 2 uses are 27015 and 27016, and the protocol used is UDP.

Pros and Cons With Each Recommended Networking Tool:

  • playit.gg: We recommend this networking tool to beginners for its easy setup and in-general reliability.
    • Pros: Easy setup and has connections go through their secure servers before connecting to you. Only the host needs the application.
    • Cons: You can only configure settings on their website. Because a connection goes through their servers before getting to you, there might be lag or more latency than a more direct connection.
  • Radmin VPN: We recommend this networking tool with P2MM if you want a secure P2MM server.
    • Pros: Works seamlessly with P2:MM and lets you create private network lobbies connected through a password. Lobbies are also direct connections, meaning less lag then if you were to use PlayIt.
    • Cons: Unfortunately, it's only for Windows, and everyone needs it installed to join your server.
  • Hamachi:
    • Pros: Similar to Radmin VPN. Works on Linux.
    • Cons: Not updated too often. Everyone needs the application installed to connect to your server.

Port Forwarding

If you already set up one of the aforementioned applications above, you can skip this section.

Port forwarding is challenging for those who are not experienced with network configuration. Every router has a different GUI and configuration menu, so we do not have an exact guide on how to port forward. Looking up your router’s model with "port forwarding" should help you figure out what to do with your router. Typically, the port forwarding menu is in the advanced setting sections of the router’s configuration menu.

Once you’ve found the menu, you must get your local IPv4 address. Open Command Prompt by pressing Win X then clicking on "Command Prompt". A Command Prompt window should now be open. Next, type in ipconfig and press enter. Find the network adapter you’re using for your internet connection and get your IPv4 Address from that device. An example of this is in the image below.
(if you're using Linux, the command is "ip -4 -c -o address")

ipconfig Example


Take your local IP address and stick it to where you give your local IP address that needs to be port forwarded. The ports Portal 2 uses are 27015 and 27016, and the protocol used is UDP. Below is an example of a port forwarding configuration for P2:MM.

Port Forwarding Config


Configuring Portal 2: Multiplayer Mod


If you've completed the steps above, you have done the minimum to host a P2:MM Server. Read this section if you wish to set up Admins, Custom Start Options or play a Workshop level. Otherwise skip this section.

Once you’ve set up your networking, it’s finally time to configure the P2:MM launcher. Double-click the executable file for your operating system (.exe for Windows, .sh for Linux), and it should launch. You may receive a warning from Windows Defender or SmartScreen that this file might be malicious. This warning happens because we don’t have the funding to pay for a certificate to verify our executable. You will need to add an exception to the executable to run it if your system still doesn’t allow you to execute it. If you’re skeptical of the warnings your Windows system may give you, all our code is open-source for you to view in our repository.


If the executable runs, you will be presented with an update dialogue if you’ve never run the mod. Click yes, and the launcher will download the latest ModFiles from the main branch of the P2:MM repository. If this ever fails, please refer to this question in our FAQ. After it has finished you should now be presented with the Portal 2: Multiplayer Mod launcher main menu.

P2:MM Main Menu


P2:MM Menu Breakdown

Here is a breakdown of the P2:MM launcher main menu and a more in-depth explanation of some settings.

  • Start Game: This button starts up P2:MM; it proceeds to mount the mod onto your Portal 2 installation and then automatically launches Portal 2. We recommend checking out the other options before starting the mod, though.

  • Settings: Where the settings for both the launcher and the mod itself are. Here are some of the settings in more detail. These aren’t all the settings you can customize. More on that in Deeper Configuration of Portal 2: Multiplayer Mod.

    • Custom Launch Options: Used to customize the launch options ran with Portal 2. This option can change the initial starting map and add other launch options. Currently, the Source launch options programmed to run with Portal 2 are as follows: -novid -allowspectators -nosixense clear -conclearlog -usercon (user specified Custom-Launch-Options go here). Not all Source launch options work for Portal 2, so use the VDC’s Command line options page for reference.
    • Portal 2 Path: Where your path to Portal 2 is defined for the launcher to use. The launcher should be able to automatically grab the path of your Portal 2 installation (check this info if not). You can alter this if needed, but if it fails to find your manually set path, it will automatically try to locate the right path again.
    • The Admins Menu: This menu allows you to add yourself and other players as admins in your P2:MM play session. As the host, you will be given the highest permission level by default, but a prompt saying this will occur on every map load. You can add yourself if you want to turn off that message. You must input your username and Steam account Steam3 ID, only the last number part. You can get your ID using SteamDB’s Account Calculator.
  • Update: Use this to manually check for any ModFiles or launcher client updates.

  • Manual Mounting: This is your go-to if you need to test mounting the mod but not running it.

  • Workshop: Here, you can get the changelevel console command for a workshop map. That way, you don’t need to find the workshop map that is locally downloaded on your system. You are required to have already subscribed to the workshop map for this to work.

  • Resources: Menu to access links for our GitHub repository, Discord server, and wiki home page.

  • Exit: No clue what this button does. Why don’t you try it out? :)

Deeper Configuration of Portal 2: Multiplayer Mod

As the Settings menu breakdown mentions, those aren’t the only options you can customize. One additional file in the ModFiles directory, located in C:\Users\(current user)\Documents\p2mm or ~/.config/p2mm if you're on Linux.

The ModFiles folder will only be there if you said "Yes" to the update prompt when starting the launcher to download the ModFiles. If not, press the "Update" main menu button to download the ModFiles.

If you go deeper into the ModFiles directory, you can find all the files which the launcher mounts onto Portal 2. The additional file you can customize is

ModFiles\Portal 2\install_dlc\scripts\vscripts\multiplayermod\config.nut

config.nut Preview

The config file contains many options that allow you to turn many mod features on or off, enable debugging options, and customize the music that plays in the cooperative lobby (mp_coop_lobby_3 only). You can also manually set the Admins if you don’t do it in the launcher. Each config option has comments that go into detail about what it does.

Starting The Portal 2: Multiplayer Mod and Inviting Players


Congrats if you made it this far! Now it’s time for the moment you’ve been waiting for! It’s time to start the Portal 2: Multiplayer Mod! Go ahead and click the "Start Game" button on the main menu, and the mod will automatically mount its files onto Portal 2 and start up the game. You should soon see our custom loading screen as you load into the main coop lobby unless you have changed which map it starts on in the "Custom Launch Options" setting.

Once you’re in the hub, you can now invite your clients. If you followed the Port Forwarding section, you only need to give your public IP to your clients. You can get your public IP from your router’s configuration menu or go to What Is My IP to see your public IP. The clients must connect to your server through the Portal 2 console with connect (your public IP). If you followed the Networking Tool section instead, give your clients the IP assigned to you with the networking tool you are using. The clients must connect to your server through the Portal 2 console with connect (your assigned IP). If everything goes correctly, you should see players joining your P2:MM server!

Players Joined In


What To Do Next


Now that you're in with your clients, what's there to do in the Portal 2: Multiplayer Mod?

Chat Commands:

P2:MM gives the host and clients access to a range of chat commands that can be executed by typing into chat starting with the prefix ! . To see what commands you can access, type !help into the chat (press "T" to access it) and press enter. There will be a list of commands as well as what they do. Type !help (command name) if you want info on a specific command. These commands give you control over certain things, from changing your player model color to slapping players across the map to kicking any pesky players giving you trouble. Some of these commands also use targeting parameters, just like Minecraft. "@a" targets all players, "@b" targets all Atlas/Blue team players, "@o" targets all P-Body/Orange/Red team players, and "@s" targets all single-player team players.

Chat Commands !help


Starting The Multiplayer Gameplay:

Assuming you started in the main lobby (mp_coop_lobby_3), you can do the regular cooperative campaign courses from there. But if you want to do the single-player campaign, you can use the chat command !spchapter to select a chapter in the single-player campaign to begin in. (only the host and configured admins can do this) You can also use "changelevel" in the Portal 2 console instead to change to a specific map in the single-player campaign or any map in general. Using changelevel is also how you play workshop maps and that obscure extra map Valve made as a teaser for the movie Super 8 (e1912). Please look at these FAQ questions for single-player and workshop content for more information.

Workshop Map ITMVCoop


Need Help?/Other Information


Please go check out the FAQ if you are having trouble before heading over to the #mod-help forum channel of our Discord server. You can also hang out to talk and see what other stuff we have cooking up. If you find any bugs or issues with the mod, please post an issue post in this GitHub Repository's Issue section.

Wish to contribute to the Portal 2: Multiplayer Mod? Please go check out our Contributions wiki page!

We Hope You Enjoy Playing The Portal 2: Multiplayer Mod! :DP2:MM GitHub Wiki Footer


Add file RSS Files
Portal 2: Multiplayer Mod 2.2.3

Portal 2: Multiplayer Mod 2.2.3

Full Version 1 comment

[HOST ONLY MOD] This mod allows you to play with 2-33 players in both the multiplayer and singleplayer campaign in Portal 2. Setup Instructions are in...

New Version created by kyleraykbs

New Version created by kyleraykbs

Patch 1 comment

kyleraykbs made a newer version of this mod that works with the latest version and more than 3 people, you can download it from his steam community link.

Portal 2 MP 0.5.1 Fixed

Portal 2 MP 0.5.1 Fixed

Patch 32 comments

Added a readme, planning on a second script, this is filler

Portal 2 MP 0.5.1 Fixed

Portal 2 MP 0.5.1 Fixed

Patch 8 comments

This is a fix for the mod. The sourcemod for whatever reason is what caused the game to stop working.

Portal 2 MP 0.5

Portal 2 MP 0.5

Demo 1 comment

This is the most basic release of the game. It only includes the basics to make it work.

Post comment Comments
Guest
Guest - - 719,628 comments

This is pointless.
Solo campaing is for one person to crack the puzzles. With two it's trivial. Solo was design for one player.
The same goes for coop.

It's not a shooter, where you can choose higher difficult or where you can do custom challenge where you only use pistoles.
This mod makes no sense. Why are you wasting time?

Reply Good karma Bad karma-1 votes
Back-Slash-N Creator
Back-Slash-N - - 1 comments

Everyone enjoys mods differently. In the later levels of both campaigns, cooperation is also much harder if you surpass more then ~10 people, which can make for an interesting challenge.

Reply Good karma 2 votes
mikegent
mikegent - - 54 comments

cool beans

Reply Good karma Bad karma 2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: