Portal 2

Portal 2

Community maps. For science.
Welcome to Aperture Laboratories, home of the Perpetual Testing Initiative. Easily create, share and play test chambers authored by and for the Portal 2 community. Do your part! Contribute to Science
Learn More
View Workshop Beta
Check out the Workshop Beta for work-in-progress updates to the browsing grid pages. Read our blog post for more details.
Publishing Maps Created In Hammer
For those of you who wish to publish maps you created in hammer, but do not know how (like I, before I found out), it's quite simple. Locate your Portal 2 bin directory ("C:\Program Files (x86)\Steam\steamapps\common\portal 2\bin" for me) and search for an application called "p2map_publish". Opening this application will pop up a File Browser. From here you have several options to choose from.

PLEASE NOTE: As far as I know, it is not possible to "Edit" (and update) an item (map) you have already posted on the workshop from PTI (hopefully Valve will alow this at some point in the future). Thus any updates to your map (that you have created in Hammer) cannot overwrite your workshop item created within PTI. THEY ARE NOT CONSIDERED THE SAME WORKSHOP ITEM.

For example: You create "Test01" in PTI. You publish it to the workshop within PTI and it gains 10 views. You decide to edit and update it in Hammer. You open "p2map_publish" (no published maps in the File Browser shown). You attempt to add the same map with the same published name "Test01" to the workshop. You will get an error saying something about that name being already used. This is because the PTI item is created and stored seperately from the one you edited in Hammer. BE CAREFUL!

So if you wish to publish a custom map (created partially from PTI and Hammer), do not publish it in PTI beforehand (or instead publish them as "private")! Otherwise any views, favourites, etc. will be lost. The maps are located in the following folder: "C:\...\Steam\steamapps\common\portal 2\portal2\maps\workshop"

Edit: To clarify, they are not "lost" in the sense that they disappear. You simply lose the progress you had by adding a second workshop item with updated features to the first, assuming you want people to play the updated version.
Last edited by Ṭoyoka; May 28, 2012 @ 11:10am
< >
Showing 1-15 of 21 comments
This should be STICKIED
Thank you. This is very useful. But I still miss interface instructions on how to upload stuff to the Steam Workshop in general and not just Portal Chambers.

One thing is unclear though. Do you select the .p2c for publishing or do you have to compile the .vmf's by yourself and select the .bsp's for publishing?

The Portal 2 puzzlemaker seems to build different levels depending on whether you choose to "publish" or just "build" the map. It also doesn't seem to save in the .vmf format with prefabs. Does the Hammer editor have .p2c reading capabilities?
I'd assume the Steam Workshop only supports maps/items/mods/etc. for the current games using the workshop (ie. Skyrim, Portal 2, and TF2). If you're inquiring about uploading Skyrim stuff or TF2 stuff, then I assume they have their own publishing area. Other games do not support the workshop yet because they are not virtually linked (ie. there is no server/databse [or what ever they use] to link the workshop to those games).

I believe the .p2c is only used for reference by portal 2 to create a .bsp (of which is found in "C:\...\Steam\steamapps\common\portal 2\sdk_content\maps") or is used by the in-game publisher to publish the map. I may be wrong of course. What I did with my map was open it in Hammer (presumably it was in .p2c format, I don't recall at the moment) and saved/compiled it to its default location (C:\...\Steam\steamapps\common\portal 2\sdk_content\maps). From there I published it through p2map_publish (it was then in .bsp format, due to compiling it in Hammer) and uploaded it to the workshop. So yes, I think Hammer does in fact have .p2c reading capabilities, but I'm not sure if it can overwrite the PTI map.

Edit: Sorry, I just realised the maps are saved in C:\Program Files (x86)\Steam\steamapps\common\portal 2\portal2\maps\workshop, not portal2\sdk_content\maps! You can of course pull your PTI maps from the workshop folder (which are in .BSP format) and edit them and upload them in the workshop.

Edit 2: Agh, I am totally confused now, I don't remember how I opened my map! Sorry for that, I know there was a way, but I can't come to the conclusion at the moment.
Ok thank you! That enlightened me in the matter of P2 additional separate modification creation and publishing.

Regarding the Steam Workshop matter, I was refering to the game Natural Selection 2 which does in fact have a virtually linked server & database, and is up and running.

Since Natural Selection 2 might not be known to everyone, I can say that you can modify the game's LUA files directly which of course directly influences how the game works. What I want to do is modify a LUA game file and upload it to the Steam Workshop. I am missing interface instructions on how to upload files to the Steam Workshop. Surely there has to be some since games have these kind of capabilities. The upload mechanism is not built into NS2 yet, which is why I want to upload the modifications by myself.

Since Portal 2 Chambers, BSP's and e.g. TF2 hat models can be uploaded, it should be possible to upload game text files as well.
Perhaps it is possible, but unfortunately I'm not familiar with NS2 and its workings so I'm afraid I can't help you there. :( Perhaps taking a look at their forum or contacting one of their developers may help you!
Found out where Steam stores the .vmf's Toyoka. For Win it's C:\...Steam\steamapps\common\portal 2\sdk_content\maps then look for the numbered .vmf file that matches the numbered .bsp file in the workshop directory which is C:\...Steam\steamapps\common\portal 2\portal2\maps\workshop\(some numbered directory)\(bunch of numbers).bsp There is a .jpg with the same number as the .bsp so you can identify what map is what.
The numbered directory might be Steam id codes. I have two, one has my map in it and the other has a map from someone I subscribed to to play their map.
There is a much simpler way I have found recently, for bringing PTI maps into Hammer. Simply type puzzlemaker_export mapname (replacing "mapname" with whatever you would like to call it) in console and it will automatically export the map into the portal2/sdk_content/ directory! :)
Last edited by Ṭoyoka; Jun 19, 2012 @ 10:09pm
Just stumbled onto something-- it turns out that if you select a differently named bsp (e.g. mymap - copy.bsp instead of mymap.bsp) you CAN update your map with the p2map_publish.exe. Fair warning had a little trouble with mine (had to try twice for it to work).
I have a problem. When I downloaded the game, I had the publisher thing put on my desktop, but it didn't seem to download it. When I clicked on it, nothing happened, so I deleted it. (tried multiple times) I just noticed there is nothing in the publisher folder! How can I solve this?
The publisher tool must stay in the folder it was in (don't move it around!). It doesn't need to be "downloaded" as it's already part of the game/workshop integration. If you haven't run Portal 2 yet before trying to run the tool, try that first.
Last edited by Ṭoyoka; Nov 15, 2013 @ 3:26pm
i ran portal, but the publisher *installer* was on my desktop, not in the folder, which is completely empty. I already cleared my trash can, so the shortcut is gone forever :(
Hm.. strange. Never heard of a publisher "installer". Valve has all their tools in Steam\steamapps\common\Portal 2\bin. There shouldn't be anything installed (including tools) as they are standalone files/executables. Are you sure you don't have the file called "p2map_publish" within Steam\steamapps\common\Portal 2\bin? It should run without needing to be installed.
Last edited by Ṭoyoka; Nov 15, 2013 @ 4:00pm
i have an empty folder called like that, but i'm pretty sure there was installer in the name of the thing that was put on my desktop. I also couldn't choose to not put it on my desktop, it was both or none when it was asked...
If i make a repair (verify the game's cache) would it solve it?
Perhaps. Try that and let me know :)
< >
Showing 1-15 of 21 comments
Per page: 1530 50

Date Posted: May 21, 2012 @ 3:12pm
Posts: 21