Portal 2

Portal 2

160 ratings
p0rtalmaster's Hammer Guide Series Part 00/19
By The Sojourner
Hello and welcome to my series of mini-guides, designed to help you learn perhaps what is the biggest part of the Portal 2 Authoring tools: Hammer.

For a super-quick version of this series, please check out my other guide, Hammer for the Flustered.
   
Award
Favorite
Favorited
Unfavorite
Why These Guides?
Someone asked me that recently. Here's why:

1) There are still crappy Hammer-made maps on the Steam Workshop of all sorts, from simply lacking detail to being just a PeTI remake without a Full Compile. People don't always realize that Hammer mapping is often more of an art than simply designing a good puzzle (although both of these things together make for a great bonus!). We're getting sick and tired of it. We want puzzles! We want adventure! We need you to help create Science!

2) I suspect that if more people read the VDC Wiki, (especially the pages on Portal 2 Level Design), people would become better mappers within a matter of time. However the VDC Wiki is often too technical or broad for the casual PeTI mapper hoping to learn Hammer (granted that Hammer is very technical by nature, but it can be made to seem less so). It's the sort of thing that could leave someone super-proud of making their own fizzler that they publish a dumb puzzle with it. These guides try to narrow down the scope somewhat, so as to (hopefully) avoid that effect. On the other hand, the VDC Wiki has been around much longer than Portal 2 has, and so in each of my guides, I have included links to it toward the bottom.

To help, I've included lots of images so that you won't feel so scared or intimidated about what you're doing. My first guide even teaches you about Hammer in case you have trouble browsing the VDC Wiki (or are just too shy to do it). I've also left out a lot of extraneous information. For instance, you will almost never need to use an ai_goal_actbusy in your maps — that entity and quite a few others were leftovers from Half Life 2. Finally, throughout the first 12 guides, I've described as much detail as I can give for making your Hammer maps look and act good.
Test Chambers in Hammer...
...are very, very different from the ones you see in-game. They look almost exactly as you would play them. But now you're seeing so much more — stuff you would never even think to see in-game: light sources as lightbulbs and spotlights, little blue splotches that are logic_relays, pink textures to mark off where you are not supposed to go, orange areas that mark triggers, and so on. When anything is selected, the highlighting is very different than what you may be used to. You have complete control over all of what you see now, so use it wisely.

All of what you make in a Portal 2 map comes from just 2 very basic groups:

1) Brushes (a.k.a. worldbrushes): try not to be bewildered by the name. These are simply boxes in your map that you use to make walls, floors, ceilings, panel tops, ledges, still bridges, pillars, clips that prohibit movement into a certain area, and so on. Using brushes, you can fully control which surfaces you want to be portalable, and perhaps even when. Frames for round things such as test chamber doors, excursion funnels, and glass with little holes in them are also made up of brushes (though they're not exactly worldbrushessee why not here).

2) Entities: much of the time these are just little points in your map. They do things like adding light, making confetti and steam, making GLaDOS and Wheatley talk (and perhaps spew out neurotoxin), opening and closing doors, moving panels, and above all, making your testing elements work flawlessly. Buttons, hard light bridges, gels, turrets, cameras, excursion funnels, and even your portal gun are all entities used in chambers all the time. Even the location where you start is an entity.

One of the most common type of entities in Portal 2 are prop entities (prop_static and prop_dynamic). These are responsible for creating all sorts of things, including (but not limited to): panel arms, platforms on rails (as well as the rails themselves), catwalks, crushers, breakers, diversity vents (behind-the-scenes), other kinds of vents, frames of all sorts (for glass, grating, observation rooms and elsewhere), cables, doors, office equipment, light fixtures, elevators, plants (e.g. in overgrown chambers), rubble, pipes, and even those huge Enrichment Spheres. These are all things I won't be covering because they're just props — there's nothing really fancy about them. You'll be using props a LOT to detail your maps. In fact, skilled mappers can sometimes fake things like a door, elevator, or a button with a prop, some ambient_generics for sound, and a brush entity or two for movement.

Another common entity is info_overlay. You can apply them directly to a surface using Hammer's Overlay tool (left toolbar), much like you would apply a sticker to a wall. Overlays are responsible for creating things such as: faith plate targets (those blue bullseye things), indicator lights, signage of all sorts (telling you that, yes, this is a cube dropper, or that yes, this is a deadly goo pit), moss (for overgrown chambers), as well as stains of all sorts, such as deadly goo stains around the perimeter.
Tricks of the Trade
You can name stuff in Hammer, and not just to somehow stay organized. Name anything that you expect to receive inputs. Many testing elements are good candidates. You likely won't need to name triggers, buttons, laser catchers or laser relays since these are output devices.

Entities have various settings, set through keyvalues. Unless I tell you otherwise, changing a setting is totally optional. In fact, some settings aren't even worth messing around with, as they are just leftovers from Half Life 2 (e.g. the "Locked Sentence" keyvalue).

Many entities communicate with one another through inputs and outputs. This is how you make your button presses count. This is how you can allow your test subjects to turn on a hard light bridge or excursion funnel to cross the deadly gap. This is how you can open and close doors at the touch of a laser (e.g. using laser catchers). This is how you can even make GLaDOS and Wheatley speak at just the right moment.

One thing that comes up a fair bit is parenting. When one entity such as a crusher panel (prop_dynamic) is parented to another (func_movelinear, say), the crusher will move in whatever direction the parent moves in (e.g. the crusher panel will move in the direction of the func_movelinear — very useful for creating deadly crushers). Parenting can be done in a hierarchy, so for example, you could parent said crusher to a moving test chamber, and the crusher will then move along with the test chamber. In general, the parenting technique is used to parent a prop (prop_dynamic) to a brush entity that moves or rotates.

More to come in the next guide.
How to Get the Most out of My Guides
  • My older guide, Hammer for the Flustered, is meant to outline the process for map creation. This series will flesh out that guide.
  • Outline a puzzle or a cool adventure before you begin detailing
  • Once you've done that, detail your map using props and overlays. I cannot emphasize that enough, and neither can any other good Hammer mapper.
  • Try to make the testing elements yourself, from scratch! You can learn a lot just by trying to create a simple cube dropper. I know I did.
  • If you're stuck doing that, then read my guides and follow the procedures within them.
  • Open the included instance files and take them apart, learning what does what and why. An instance is not a complete map, but rather a part of a map, such as a cube dropper or a set of stairs. All PeTI maps are made from instances.
  • If you don't know what an entity in my guides is or does, I highly recommend looking it up by clicking the "help" button or searching or it on the VDC Wiki. There is no better reference.
  • Be patient with yourself. Good maps take time to make. Don't publicly publish your half-baked maps to the workshop please (on the workshop page, you can set the visibility to "Friends Only" or "Hidden"). We will no longer fall for the "test" titles/descriptions if they're bad Hammer maps.
There are a few of basic things I won't really be discussing in detail in my guides:

1) How to detail your maps. It depends on the theme you want to convey to your test subjects, but more important is the fact that my guides are meant to focus in on common test element creation, both in and out of the testing chambers. Detailing can be done at a later stage, but it should not be forgotten! All you need to do is add some props, overlays, and sounds (ambient_generic and env_soundscape) to make your map stand out from the crowd.

2) Clip brushes. See above — they're just more details. Clipping brushes are useful to prevent stuckages of either you or something you need. Occasionally, you might need to use the func_clip_vphysics brush entity for this purpose, but most of the time a simple brush with the player clip (tools/toolsplayerclip) texture will do the trick.

3) Something super-cool you saw in someone else's map. Talk to them instead of me — chances are they know what they did better than I do. It's also likely that it's not a common testing element (or a sorely misused one, like the infamous linked_portal_door), and thus not worth covering.

4) Flinging. Did you know there are over 10 different ways to fling yourself into space? It's true. They can also be controlled with the trigger_catapult entity for greater precision. Nevertheless, flinging in and of itself is not really a testing element — just a raw and common skill that is required to be mastered before handling the dual portal device.
Mistakes to Avoid & More Information
Every one of my guides in this series will have this section. It will start out with:



...and then list the common mistakes that I and other test subjects have observed. For instance:
  • Not detailing your maps
  • Not using clip brushes to prevent stuckages
  • Allowing the player to get trapped (see this guide for hints on fixing that — also get acquainted with func_portal_detector and trigger_multiple, as you will no longer need escape routes). Likely you weren't even thinking about it, but these things can sneak up on you unexpectedly.
The most important points in my guides will be mentioned in bold and/or ALL CAPS text. Italic text will indicate a technical term, such as the name of an entity, a keyvalue, or an input or output it uses.

Next, I'll include a list of the most relevant VDC Wiki links. All of these links are within the scope of Portal 2 level design (even though a few of them pertain to level design in general). For instance:
Contents
This first guide would not be complete without links to all of my other guides (lack of links indicate works in progress). Here's what I have in store for you:
Testing Element Index
Wondering about how to create a certain testing element found in the in-game editor? Like other mappers, I've wondered that too. Here's the definitive list of standard testing elements:

Behind the scenes, we have:

What's NOT featured among these guides because they're too custom or rare:
  • Anything from Rexaura: cube stabilizers, deadly positron orbs, flux fields, and high energy pellets, including the launchers and catchers.
  • Anything with combustible lemons.
  • Bombs (as seen just before you get to the deadly Lair).
  • Bumbleballs.
  • Catapult cubes.
  • Companion Cube Incinerators.
  • Cube sensors or lifeform sensors.
  • Custom fizzler fields: matter inquisition, compressed smoke, surface division, force deflection (just use grating :P), death fizzlers, liquid coloring excision fields (paint fizzlers), etc.
  • Defective Turrets.
  • Futbol stuff.
  • Neurotoxin (both the effect and the countdown clock).
  • PsychoBR's TNT turrets.
  • PUNT cubes.
  • The Sendificator — talk to HMW or get BEEMOD, as it requires a special script and such to set up.
  • World Portals and "Time Travel" effects.

Special design features not featured in this particular series:
  • Breakable glass (use a prop_dynamic and some other stuff)
  • Disassemblers (coop)
  • Dripping pipes (use an info_particle_system)
  • Fires of burning garbage (use an env_fire and some other stuff)
  • Gel Pump Stations
  • GLaDOS herself
  • Laser disks (coop)
  • Management Rails
  • Moving test chambers
  • npc_wheatley_boss (I hear you cannot use the developer console to spawn this entity)
  • Office doors (use a prop_dynamic)
  • Personality Cores
  • Rainbow Trails (coop, and yes it's a real thing)
  • Rattman's dens
  • Retraction of testing elements
  • Rocky surfaces (use displacements...)
  • Skyboxes (TIP: use light_environment)
  • The Incinerator Room
  • Wheatley's monitor

At the bottom of every guide except this one, I'll have a Master Guide List containing links to all of my guides.

Now let's get going shall we? Link to next guide to introduce you to Hammer.
Other Useful Guides
Puzzle Creation
http://steamproxy.net/sharedfiles/filedetails/?id=664907762
http://steamproxy.net/sharedfiles/filedetails/?id=169270051
Demon Arisen is also doing a video series on puzzle creation.

Hammer Mapping Briefs
http://steamproxy.net/sharedfiles/filedetails/?id=156948537
http://steamproxy.net/sharedfiles/filedetails/?id=642040698
http://steamproxy.net/sharedfiles/filedetails/?id=251265571

Antlines in Hammer
http://steamproxy.net/sharedfiles/filedetails/?id=645236003

Advice on Properly Publishing a Modified PeTI Map
http://steamproxy.net/sharedfiles/filedetails/?id=244711878

How Not To Trap The Player
I originally designed that guide for PeTI mappers, but many concepts carry over to Hammer mapping as well. The main difference is that now you don't need to design escape routes, as you can now use triggers to free your test subject.
http://steamproxy.net/sharedfiles/filedetails/?id=264300097

Map Customization Stuff
http://steamproxy.net/sharedfiles/filedetails/?id=608136553

Proper Test Chamber Appreciation and Non-appreciation
http://steamproxy.net/sharedfiles/filedetails/?id=425731057

32 Comments
Beckeroo 😎👍 8 Aug, 2023 @ 5:28am 
this guide needs to be more popular, it is literally the most helpful guide for p2 on steam.
kopap 4 Sep, 2021 @ 3:46am 
Блять спасибо :steamthumbsup:
Squidward 22 May, 2021 @ 5:27am 
oh, what does it do?
The Sojourner  [author] 22 May, 2021 @ 12:52am 
It's a console command used in coop mode.
Squidward 20 May, 2021 @ 8:25am 
what is a rainbow trail? and how do you find it?
TheDiamondKiwi 15 Sep, 2020 @ 1:16am 
Hi!
first of all, these are great tutorials and thanks for doing them. Second, could you try and do a guide on things like Breakabe Glass and Nerotoxin? AKA the stuff you said was too advanced for these guides. I am a beginer to Hammer, so even if you could direct me to some other guides on those things would be awesome.

Thanks, TheDiamondKiwi
The Sojourner  [author] 31 Aug, 2020 @ 9:47am 
Go for it! I've been meaning to do a whole other series for years on that subject, but if someone else wants to help out with the various themes of Aperture Laboratories, that'd be great. It's generally more of an artistic thing and can be labor-intensive, so I left that to a separate series.
logiqed 31 Aug, 2020 @ 7:19am 
I have an idea for a future guide! Maybe it might not be apart of this series, but make a guide about test chamber asthetics in hammer
idontknow 29 Aug, 2020 @ 6:51am 
I'm sorry to disturb you. But I don't know how to add you to contributors if you don't befriend me.
The Sojourner  [author] 29 Aug, 2020 @ 6:06am 
Sure.