Home > Portal 2 > Portal 2 Cheats and Console Commands

Portal 2 Cheats and Console Commands

Portal 2 draws from the award-winning formula of innovative gameplay, story, and music that earned the original Portal over 70 industry accolades and created a cult following.

The single-player portion of Portal 2 introduces a cast of dynamic new characters, a host of fresh puzzle elements, and a much larger set of devious test chambers. Players will explore never-before-seen areas of the Aperture Science Labs and be reunited with GLaDOS, the occasionally murderous computer companion who guided them through the original game.

The game’s two-player cooperative mode features its own entirely separate campaign with a unique story, test chambers, and two new player characters. This new mode forces players to reconsider everything they thought they knew about portals. Success will require them to not just act cooperatively, but to think cooperatively.

Portal 2 Cheats

Allow Developer Console
If you wanna use cheats: Esc > Options > Keyboard/Mouse > Allow Developer Console.
Press the ` key (upper-left corner of your keyboard) to open the Developer Console. Most of these codes will not work unless cheats are activated (sv_cheats 1).

Make sure the Developer Console is enabled in options, and assign a proper key to open the console. Open the developer console in-game and note the following commands:

Type sv_cheats 0 or 1 to turn off or on cheats respectively.

Useful Commands

  • portal_draw_ghosting 0/1 – Toggles the outline visible on portals through walls.
  • mat_fastspecular 0/1 – Setting to 0 will improve the quality of specular highlights.
  • r_portal_use_dlights 0/1 – Creates a dynamic light where portals are placed; looks aesthetically pleasing.
  • r_waterforcereflectentities 0/1 – Force water to reflect everything.
  • gameinstructor_enable 0/1 – Toggles the popup hints found throughout the game.
  • sv_player_funnel_into_portals 0/1 – Toggles whether the player is ‘funnelled’ into portals.
  • sv_props_funnel_into_portals 0/1 – Toggles whether objects are ‘funnelled’ into portals.
  • sv_enableholdrotation 0/1 – If enabled, objects can be freely rotated with the Portal Device when holding the secondary fire key.
  • cl_fov – Set desired field of vision.
  • viewmodel_offset_x – Offsets the viewmodel by this much on the x axis.
  • viewmodel_offset_y – Offsets the viewmodel by this much on the y axis.
  • viewmodel_offset_z – Offsets the viewmodel by this much on the z axis.
  • cm_reset_vo_progress – Resets the dialog progress of Cave Johnson in the Perpetual Testing Initiative.

Miscellaneous Commands

  • bind <key> “<command>” – Binds a key with a command.
  • unbind <key> – unbinds a key
  • kill / explode – Commit suicide.
  • jpeg – Take a jpeg screenshot. Use jpeg_quality # to control the quality level of the resultant screenshots.
  • screenshot – Take a TGA screenshot.
  • r_drawviewmodel 0/1 – turns viewmodels on and off
  • find <command> – a search function that displays all commands with searched term
  • net_graph <1-6>
    • Depending on the input value, different amounts of information will be shown such as ping, fps, lerp, packet loss, etc.
  • changelevel <mapname> – changes the map without restarting the server.
  • cvarlist – View complete cvar list.
  • differences – View
  • exec – Execute config file.
  • map <mapname> – changes the map and restarts the server.
  • maps – Display list of maps. Use maps * for a full listing.

For recording

  • record – records a demo
    • stop – stops the recording of a demo
  • startmovie – opens up the Source Recorder during demo playback and allows for high quality recording
    • endmovie – stop recording to image or AVI

Note: Videos that exceed the file size of 2 GB become corrupted and unviewable, either use a lower resolution before recording or record to raw images and sound instead!

  • host_framerate <number> – tells the source recorder to record at a constant framerate
  • host_timescale <number> – use in conjunction with host_framerate to produce a smooth video output

Portal 2 Console Commands

List of Console Commands for Portal 2, something that’s need when creating a test chamber.

Allow Developer Console
If you wanna use cheats: Esc > Options > Keyboard/Mouse > Allow Developer Console.
Press the ` key (upper-left corner of your keyboard) to open the Developer Console. Most of these codes will not work unless cheats are activated (sv_cheats 1).

Note: When you turn on sv_cheats, all progress for the session is nulled, including story progression and achievements.

  • Only the host can enable cheats in Co-op mode. The host is always Atlas, the blue robot.
  • The “sv_gravity #” and “cl_showfps #” commands are examples of commands that always work, even if cheats are off.
  • Removing certain objects or removing your partner WILL crash the game (ent_remove).
  • The gel blobs will spawn in all maps, but they won’t actually function properly in maps that do not use mobility gels.

Spawns

  • Companion Cube: ent_create_portal_companion_cube
  • Weighted Storage Cube: ent_create_portal_weighted_cube
  • Weighted Pivot Cube: ent_create_portal_reflector_cube
  • Old Aperture Science Cube: ent_create_portal_weighted_antique
  • Edgeless Safety Cube: ent_create_portal_weighted_sphere
  • Turret: npc_create npc_portal_turret_floor
  • Frankenturret: ent_create prop_monster_box
  • Wheatley : ent_create npc_personality_core
  • GLaDOS: prop_dynamic_create npcs/glados/glados_animation
  • Water (clear): ent_create_paint_bomb_erase
  • Repulsion Gel (blue): ent_create_paint_bomb_jump
  • Propulsion Gel (orange): ent_create_paint_bomb_speed
  • Conversion Gel (white): ent_create_paint_bomb_portal
  • Rocket: fire_rocket_projectile
  • Beta Energy Pellet: fire_energy_ball
  • Door: give prop_testchamber_door
  • Thermal Discouragement Beam: ent_create env_portal_laser
  • Excursion Funnel Emitter (no funnel): ent_create prop_tractor_beam
  • Mounted Security Camera: ent_create npc_security_camera
  • Standing Button: ent_create prop_button
  • Error: ent_create prop_dynamic

Environment

  • Turn Cheats On: sv_cheats # (0=off, 1=on)
  • Change Gravity: sv_gravity # (600=default)
  • Burn Objects: ent_fire !picker ignite
  • Remove Objects (may crash game): ent_remove
  • Remove All Portals: ent_fire prop_portal fizzle
  • Change Maps: changelevel “map name”
  • Activate Excursion Funnel Emitter: ent_fire !picker enable
  • Turrets Target Cameras: ent_fire !picker addoutput “spawnflags 512”
  • Portals Work Anywhere: sv_portal_placement_never_fail # (0=off, 1=on)
  • Change Colors (r=red, g=green, b=blue): ent_fire !picker color “r g b”
  • Change Frankenturret Velocity: sv_monster_turret_velocity # (100=default)
  • Change Game Speed: host_timescale # (1=default, 0.5=half speed, 2=double speed)
  • Change Portal Size (w=width, h=height): portals_resizeall w h (default=”portals_resizeall 33 55″)

User Modifications

  • Turrets Don’t Shoot You: notarget
  • Kill Yourself: kill
  • Kill Partner: kill “partner’s name”
  • Invincibility: god
  • Fly: noclip
  • Teleport Atlas: ent_teleport blue
  • Teleport P-body: ent_teleport red
  • Flashlight: impulse 100
  • Remove Portal Gun (can still shoot): impulse 200
  • Regain Portal Gun: give_portalgun
  • Potato Portal Gun: upgrade_potatogun
  • Move Portal Gun Left/Right: viewmodel_offset_x # (0=default)
  • Move Portal Gun Forward/Back: viewmodel_offset_y # (0=default)
  • Move Portal Gun Up/Down: viewmodel_offset_z # (0=default)
  • First-Person View : firstperson
  • Third-Person View: thirdperson
  • Third-Person Shoulder View: thirdpersonshoulder
  • Show FPS: cl_showfps # (0=off, 1=fps, 2=smooth fps, 3=server MS, 4=show fps and log to file)

Method for Binding Keys

You can bind keys on your keyboard as shortcuts for using cheats using this format:

bind “insertkey” “insertcommand”

Note: You can also bind keys in Left for Dead using the same commands, I remember binding keys to make the characters repeat their words over and over example Tank, Hunter, Smoker boomer etc. Value patched it latter on in Left 4 Dead one.

For example, if you wanted to create a hotkey for the “kill” command to the key M, you would have to type this into your Developer Console:

bind “m” “kill”

So now every time you press M, you will die! Remember not to bind keys such as WASD, FQTEC, Spacebar, SHIFT, TAB, since those are neccessary in regular gameplay. If you want to undo a bind:

unbind “insertkey”

Binding is useful, because you don’t have to repeatedly open the Developer Console in order to execute commands. Spawning large quantities of cubes is easy with binds!

Easy Method for Binding Keys

If you would like to have an easy method of binding all of your keys at once, open up your Program Files and look for: Steam > steamapps > common > portal 2 > portal2 > cfg.

There, you can add and save your own cfg file. Open up Notepad and type in a list of all your binds. Save it and name it “Binds.cfg” (make sure that it really is a cfg extension). Run Portal 2, open your Developer Console, and type:

exec “Binds”

Execute Multiple Commands

Use the semicolon ( ; ) to execute multiple commands at once. Useful for tricks, such as killing your partner without him being able to retaliate with cheats of his own:

sv_cheats 1; fire_rocket_projectile; sv_cheats 0

And spawning a huge line of paint:

"ent_create_paint_bomb_jump; ent_create_paint_bomb_portal; ent_create_paint_bomb_speed; ent_create_paint_bomb_jump; ent_create_paint_bomb_portal; ent_create_paint_bomb_speed; ent_create_paint_bomb_jump; ent_create_paint_bomb_portal; ent_create_paint_bomb_speed; ent_create_paint_bomb_jump; ent_create_paint_bomb_portal; ent_create_paint_bomb_speed"

It’s end. I hope “Portal 2 Cheats” helps you. Feel free to contribute the topic. If you have also comments or suggestions, comment us.

Written by PhoneyVirus

Related posts you may be interested in:

1 thought on “Portal 2 Cheats and Console Commands”

Leave a Comment