Note: This tutioral is no longer needed, a Beta of the Portal 2 sdk is now on steam.
If you are like me then you will want a bit of an edge over the competion, its time we showed the guys at Black Mesa a thing or two about banging rocks. Can't wait for the offical mod sdk? Well we have you covered.
What you need:
- Portal 2, well sorta obvious but you never know.
- Alien swarm, its free so....
Step 1 (Setting up the Alien Swarm sdk for Portal 2):
We will use the Alien Swarm sdk because it is the most recent version of the source engine (bar Portal 2) and it can load Portal 2 models and textures.
Note: Click the images for a larger version.
Go to the tools tab in steam and launch the Alien Swarm Authoring tools.
Open the the edit game configurations option.
Then go to add and then enter "Portal 2" as the name and the browse to your Portal 2 folder.
See the image below for an example for what the path should look like.
Ok so thats the Authoring tools set up, next we have to edit the portal 2 gameinfo.txt file to tell it to look in the platform folder for the editior resources. If you didnt add this Hammer would moan about missing files, the 3d veiw wouldnt work and the 2d veiws would be trippy. (try it if you must :P)
Go to your portal 2 folder inside the portal2 folder and open the gameinfo.txt text file.
e.g. "C:\Program Files\Steam\steamapps\common\portal 2\portal2"
Scroll down to the bottom and look for "SearchPaths" and change it to look like this
Almost done, now we just have to set up the compile options and you can proced with the testing.
Ok, so launch the Alien Swarm Authoring tools again and select Portal 2 in the current game drop down box and now just launch Hammer.
Thankfully the final hurdel is an easy one.
To get your map to compile you will need to use the expert compile option (f9, then Expert).
We need remove some of the options for the compile tools to avoid errors.
Change $bsp_exe to "-game $gamedir $path\$file".
If you left the -alldetail option you would get alot of compiler warnings.
Well Thats about all to it.
Notes: I found some textures will cause the map to have no lighing ingame (compilers report no errors), I have a feeling that Vavle added a new material property that the compilers are freaking out over.
You can use this map decompiler to get the entity names: Nuclearvelocity.com I used the stable version as the beta with portal 2 support didnt seem to work but the older one works just fine.
Happy moding :)
Ok things are now starting to take off.
There is an .fdg in the works that you can grab from this thread: Facepunch.com