Go Back   Steam Users' Forums > Steam Game Discussions > M - P > Portal 2

Reply
 
Thread Tools Display Modes
Old 04-22-2011, 07:20 AM   #1
Blinxies
 
Join Date: Jun 2010
Reputation: 13
Posts: 74
[HOW-TO] Create Portal 2 maps

UPDATED APRIL 23TH

In this tutorial I'll try to show you how to make Portal 2 maps.

Things you'll need:
- Portal 2 (duh)
- Alien Swarm SDK
- GCFScape (or any tool that can extract VPKs)
- Patience

First of all you'd like to extract your portal 2 materials/models to your alien swarm directory.
To do that, just open the pak01_dir.vpk file which is located in your portal 2 directory (steamapps\common\portal 2\portal2) and extract the materials and models folders to your alien swarm directory (steamapps\common\alien swarm\swarm).
After the extraction is complete you will need to "fix" the models so that hammer can load the properly.
To do that just save the following text in a batch file (.bat), place it in your swarm/models directory and run it.

Code:
FOR /R %%a IN ("*.dx80.vtx") DO del "%%a" 
FOR /R %%a IN ("*.dx90.vtx") DO del "%%a"
FOR /R %%a IN ("*.sw.vtx") DO del "%%a"
FOR /R %%a IN ("*.vtx") DO copy "%%a" "%%~dpa%%~na.dx80.vtx"
FOR /R %%a IN ("*.vtx") DO copy "%%a" "%%~dpa%%~na.dx90.vtx"
FOR /R %%a IN ("*.vtx") DO copy "%%a" "%%~dpa%%~na.sw.vtx"
FOR /R %%a IN ("*.dx80.dx90.sw.vtx") DO del "%%a" 
FOR /R %%a IN ("*.dx80.dx90.vtx") DO del "%%a"
FOR /R %%a IN ("*.dx80.sw.vtx") DO del "%%a"
FOR /R %%a IN ("*.dx90.sw.vtx") DO del "%%a"
After this step is done you're ready to create Portal 2 maps.
Just launch Hammer through the Alien Swarm SDK and create a map.
Also, remember to follow these instructions, otherwise the map won't compile.
After you've compiled the map just copy it to your portal2/maps directory and launch it through the in-game console.

Here are some interesting entities:

Code:
prop_tractor_beam
prop_wall_projector
env_portal_laser
prop_floor_button
info_coop_spawn
You can find a coop map I made here and it's source here.

I hope this helps.

Credits:
- Whoever made that model renaming script
- The guy who made BSPSource
- Valve

PS: You can find interesting stuff by decompiling existing p2 maps (you will need to fix the endings of the VMFs in order to load them in Hammer).

Credit to NoFaTe

here's something that might help you out. Just like you, I started by opening up NoFaTe's example map, what I noticed immediately were missing models, icons, etc for all the new entities, having some past experience creating part of the L4D2 fgd back when we were waiting for the SDK, I got my hands dirty...

I am now working with Randdalf now, we have finally merged our FGDs.

1. Create a file named "portal2.fgd"
2. Copy and paste the text in-between quotes at the end of this post.
3. In Hammer, go to "Tools" -> "Options" on the menu, under the "Game Configurations" tab, go to "Game Data Files", delete any fgds in there (you should be using the alien swarm SDK, so probably the alien swarm fgd will be there) then add the one you just created.
4. There you go, new juicy stuff to play with

If there's a particular entity that you'd like to see added that I haven't gotten around to do yet, tell me which map and where on the map it is (or it's name if you can) and I'll add it to the request queue.

My top priority is adding the essential gameplay elements, including prefabs (tractor beams, bridge emitters, lasers, turrets, floor buttons, normal buttons, etc, etc), after that we'll see. I'll eventually (every week or so) release a file that you can download with all the stable stuff.


Entity List

Quote:
env_portal_laser
func_clip_vphysics
func_instance_io_proxy
info_coop_spawn
info_overlay_accessor
info_paint_sprayer
info_placement_helper
linked_portal_door
logic_coop_manager
logic_relay
logic_script
npc_portal_turret_floor
prop_button
prop_dynamic
prop_floor_ball_button
prop_floor_button
prop_floor_cube_button
prop_indicator_panel
prop_laser_catcher
prop_laser_relay
prop_monster_box
prop_testchamber_door
prop_tractor_beam
prop_under_button
prop_under_floor_button
prop_wall_projector
prop_weighted_cube
trigger_catapult
trigger_portal_cleanser
worldspawn

Last edited by Blinxies: 04-22-2011 at 05:52 PM. Reason: more related thread name
Blinxies is offline  
Reply With Quote
Old 04-22-2011, 07:21 AM   #2
Blinxies
 
Join Date: Jun 2010
Reputation: 13
Posts: 74
Updates:

21:36 GMT 21/04/2011
Quote:
Added: prop_floor_button (All the properties added to Smart Edit, including the OnPressed output, button model is now visible in Hammer)
Added: prop_tractor_beam (All the properties added to Smart Edit, gave it a nice intuitive icon from the game, now visible in Hammer)
Added: prop_wall_projector (All the properties added to Smart Edit, gave it the right model to be displayed in Hammer)
23:17 GMT 21/04/2011
Quote:
Updated: npc_portal_turret_floor (Added new properties)
Updated: prop_dynamic (Added new properties)
Added: trigger_catapult (All the properties added to Smart Edit, including the OnCatapulted output)
Updated: func_instance_io_proxy (All the new properties added to Smart Edit, OnProxyRelay outputs added too)
Updated: logic_relay (It has angles now for some reason)
Updated: logic_script (Angles and VScripts properties)
Added: logic_coop_manager (All the properties added to Smart Edit, gave it a nice intuitive manager icon, included outputs)
00:19 GMT 22/04/2011
Quote:
Updated: func_clip_vphysics (Added origin property)
Added: linked_portal_door (Creates rectangle shaped portals that you can connect to each other, read the help on the entity to be clear. Also gave it a descriptive icon) (requested by icemaz)
03:27 GMT 22/04/2011:
Quote:
Added: prop_under_button (These are the underground buttons that you press to get paint, included OnPressed output and set the right model for it)
Added: info_paint_sprayer (These are used to spray paint, added all the properties from it as well as a nice self descriptive icon)
Updated: worldspawn (added "Allow Paint in Map" and "Max Blob Count" properties required for maps that use paint, these show up in the map properties)
Updated: prop_tractor_beam (Gave it the respective model instead of an icon, dunno why I used an icon to begin with)
Added: env_portal_laser (added all the properties from it, also gave the ability to change the laser emitter model)
Updated: prop_wall_projector (you can now change its model if you wish)
Updated: prop_tractor_beam (same as above)
Updated: prop_floor_button (same as above)
Added: info_placement_helper
Added: prop_button
Added: prop_testchamber_door
Added: prop_weighted_cube
Randdalf Merge Update (19:26 GMT 22/04/2011)
Updated: prop_testchamber_door
Updated: prop_weighted_cube
Updated: trigger_portal_cleanser
Updated: prop_button
Updated: prop_floor_button
Updated: trigger_catapult
Updated: env_portal_laser
Added: info_overlay_accessor
Updated: info_placement_helper
Added: prop_laser_catcher
Updated: npc_portal_turret_floor
Updated: info_paint_sprayer
Updated: prop_under_button
Added: prop_under_floor_button
Added: prop_monster_box
Updated: prop_wall_projector
Updated: prop_tractor_beam
Added: prop_indicator_panel
Updated: logic_coop_manager
Added: info_coop_spawn
Added: prop_laser_relay
Added: prop_floor_cube_button
Added: prop_floor_ball_button
Updated: trigger_catapult
Updated: npc_portal_turret_floor
Latest Stable Release (v5) - Includes entity example map:

http://dl.dropbox.com/u/9133125/FGD/fgd.zip

Last edited by Blinxies: 04-22-2011 at 05:54 PM.
Blinxies is offline   Reply With Quote
Old 04-22-2011, 07:21 AM   #3
Swordsman
 
 
 
Join Date: Nov 2007
Reputation: 347
Posts: 4,617
Can you check to me if you can spawn and use the half life 2 weapons like you could in portal 1?
Swordsman is online now   Reply With Quote
Old 04-22-2011, 07:28 AM   #4
Stroopwafels
 
Guest
Posts: n/a
How do I load your map?

Edit: map mp_test in console figured it out ty

Last edited by Stroopwafels: 04-22-2011 at 07:33 AM.
  Reply With Quote
Old 04-22-2011, 07:31 AM   #5
Blinxies
 
Join Date: Jun 2010
Reputation: 13
Posts: 74
Quote:
Originally Posted by Stroopwafels View Post
How do I load your map?
place the map in the map folder of portal 2 (\Steam\steamapps\common\portal 2\portal2\maps) and then open the console and type map mp_test.bsp
Blinxies is offline   Reply With Quote
Old 04-22-2011, 07:35 AM   #6
LOUD97
 
Guest
Posts: n/a
Is this hax?
  Reply With Quote
Old 04-22-2011, 07:37 AM   #7
Clord
 
 
 
Join Date: Apr 2008
Reputation: 40
Posts: 678
Quote:
Originally Posted by LOUD97 View Post
Is this hax?
No, it is not for you. It is for mappers purposes who wants to already do Portal 2 maps.
Clord is offline   Reply With Quote
Old 04-22-2011, 07:46 AM   #8
HLRoxMySox
 
Guest
Posts: n/a
I think I'm still going to wait for the official release instead of this solution.
  Reply With Quote
Old 04-22-2011, 07:57 AM   #9
Stroopwafels
 
Guest
Posts: n/a
It'd be cool if someone made some nice new puzzles. Is there a website dedicated to Portal (2) mapping?
  Reply With Quote
Old 04-22-2011, 07:59 AM   #10
Vonje
 
 
 
Join Date: May 2007
Reputation: 307
Posts: 4,512
Any reason to use Alien Swarm and not the standard SDK?
Vonje is offline   Reply With Quote
Old 04-22-2011, 08:00 AM   #11
awesome_ninjaa
 
Banned
Join Date: Feb 2011
Reputation: 138
Posts: 897
Quote:
Originally Posted by Clord View Post
No, it is not for you. It is for mappers purposes who wants to already do Portal 2 maps.
can you do co-op maps too? Interesting...
awesome_ninjaa is offline   Reply With Quote
Old 04-22-2011, 08:01 AM   #12
awesome_ninjaa
 
Banned
Join Date: Feb 2011
Reputation: 138
Posts: 897
@OP change the title to something more catchy, like "[NOW-TO] Create Portal 2 maps
awesome_ninjaa is offline   Reply With Quote
Old 04-22-2011, 08:40 AM   #13
youtwo
 
Join Date: Apr 2011
Reputation: 0
Posts: 19
haha, I had fun with huge portals in your map : Screenshot
youtwo is offline   Reply With Quote
Old 04-22-2011, 08:45 AM   #14
Tobi2392
 
Join Date: Mar 2011
Reputation: 30
Posts: 256
Quote:
Originally Posted by Vonje View Post
Any reason to use Alien Swarm and not the standard SDK?
Different engines?
Tobi2392 is offline   Reply With Quote
Old 04-22-2011, 08:46 AM   #15
Angry Kittens
 
 
 
Join Date: Apr 2009
Reputation: 69
Posts: 687
Quote:
Originally Posted by youtwo View Post
haha, I had fun with huge portals in your map : Screenshot
How did you get a portal gun in the map?

I loaded it up and didnt have anything; i assume its a command or something.
Angry Kittens is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Game Discussions > M - P > Portal 2


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -7. The time now is 06:38 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2012, All Rights Reserved.