Portal 2

Portal 2

309 ratings
Advanced Console Commands
By jams
Hey guys, i had a guide before called "Console Commands for beginners". Now i'm going to show you some advanced commands. You know, it's hard to write about a lot of commands, i will tell you at the end why i'm not going to show you all commands.
   
Award
Favorite
Favorited
Unfavorite
How to spawn the portal gun
Type this in your console:

give_portalgun - this command will grant you a blue only portal gun, it's not necesarry, because if you want to play single player, at the start you get the gun in the beginning, but if you cheat, you wont be able to use it, because you don't really need it, and it makes some bugs too. (you know, there are those blue and orange portal creator gate).

upgrade_portalgun - this command enables orange portal placement.

upgrade_potatogun - the GLaDOS potato is placed on the portalgun
Are you stuck? Suicide!
Sometimes, if you are glitching the game, or maybe try to make a shortcut, you may get stuck. There is two possible ways to escape.
1. Load last save
2. Or maybe cheat?

Yeah. With this command, you can kill yourself anywhere, anytime, you don't even need "sv_cheats 1", so it won't disable achievements.So, the command is "kill".

Or if you want to kill (actually troll...) your coop partner, than do this: "kill name"
Setting a command for a button (bind)
You can use commands with buttons easily. With a simple command, you can set any button to activate a command when pressed. For example, you can set noclip or god on/off or maybe fire_rocket_projectile?

bind "anykeynamehere" "commandnamehere"

If you set in on a wrong button, or you often accidentally hit a button that is binded for a command?Than you can delete it with this command:

unbind "anykeynamehere" "commandnamehere"

You can also delete EVERY binded buttons with a single command. It will remove everything, including all control keys. Can be useful if you want to create your own button settings:

unbindall
Using multiple cheats at the same time
You can activate a more cheats at a time, which is pretty easy. You have to use the following punctuation mark: " ; " (Alt Gr+: ). You have to leave a space after that (; ). For example:

sv_cheats 1; god; sv_cheats 0 or sv_cheats 1; noclip; sv_cheats 0

Maybe you don't know that after you activate a command, if you turn sv_cheats off, they will be still working, but you can't turn them off until you enable "sv_cheats 1" again. Like if you turn noclip on, then sv_cheats to 0, you will still be able to use noclip, but you can't turn it off.

This command is very useful when combined with "bind", because you can bind more commands on one button. For example, you can combine "noclip" with "god" can be a good idea.
Show FPS
If you want to see your FPS, you can use the following command, which have different options:

cl_showfps 0 - turns it off: it will disappear.
cl_showfps 1 - turns it on: you will see your FPS and the current map name.
cl_showfps 2 - smooth FPS: same as "1" but it shows more info.
cl_showfps 3 - server MS: It will show the FPS on the server
cl_showfps 4 - same as the first one, but it will be saved into a log file.
Spawning things
You can spawn things that can be handy if you want to make a level but you can't do and you don't want to use any command. For example spawning a cube or a laser reflector can help a lot. Not all of the spawned stuff can be used, most of them are useless. Lets start with the amazing ones, and than the less amazing.

GLaDOS: "prop_dynamic_create npcs/glados/glados_animation" It's not the real GLaDOS, it's just the huge body with no core on it.

Wheatley: "ent_create npc_personality_core"

Gels: Where you are aiming, you can spawn a gel bomb. It will deploy a same amount as the amount a dispenser would.
-Blue (big jump): "ent_create_paint_bomb_jump"
-Orange (fast run): "ent_create_paint_bomb_speed"
-White (portal anywhere): "ent_create_paint_bomb_portal"
-Water (clear gels): "ent_create_paint_bomb_erase"
Note, the gels are not usable. It's just for fun, or maybe decoration, because you will see a ball thing. If you touch it, it will splash and disappear.

Energy ball from Portal 1: "fire_energy_ball"
If you have ever played Garry's mod, you may know what a missing texture is. It has a pink-black pattern, which you can see in case the engine can't find the correct texture. For example placing a mod inside gmod without its textures. The energy ball has no textures or sound, but you can hear it when it bumps into a wall.

Rocket: "fire_rocket_projectile"
It will shoot a rocket the way you are looking. Useful if binded to a key.

Door: "give prop_testchamber_door"
It will spawn a door where you are standing, you can go through it, although it seems closed.

Laser beam: "ent_create env_portal_laser"
You can place a laser emitter. It's just for decoration.

Excursion Funnel: "ent_create prop_tractor_beam"
It's just for decoration. It won't work.

Camera: "ent_create npc_security_camera"
Spawns a camera.

Button (standing): "ent_create prop_button"
Useless.

Cubes and turrets:
-normal cube: "ent_create_portal_weighted_cube"
-ball: "ent_create_portal_weighted_sphere"
-companion: "ent_create_portal_companion_cube"
-laser reflector "ent_create_portal_reflector_cube"
-old cube: Cube: "ent_create_portal_weighted_antique"
-frankenturret (cube): "ent_create prop_monster_box"
-turret: "npc_create npc_portal_turret_floor"

Hover turret:
"ent_create prop_dynamic"
It's something special: If you ever explored a map with noclip, you could have seen that there is a blue error text floating in many rooms in a random position. It's a removed game element, that got rid of probably because it made random situations, because you would sometimes have to hide or run. But the game was ment to always be the same every time. The mechanic and the textures was removed, only the blue error text remained, which is still spawnable.

Most of these commands work without using sv_cheats 1, which you can use to cheat through a level in case you can't solve it. Spawning any of these won't disable achievements.
Blinding turrets
What this command does, is that it makes you invisible for NPCs, so they will ignore you even if you are attacking them. The turrets will not attack you once you enter this command: notarget
Gravity settings
You can change the gravity with the following command:
sv_gravity number
The basic gravity is 600, using any number below it decreases gravity, but also makes you unable to jump. Higher number increases it. Keep in mind that this affects the gravity of everything.
The impulse command
This command have multiple uses.

impulse 100
It gives you a flashlight. Using the command again turns it off. You may bind it to a key for easy use.

impulse 200
It toggles the portal gun texture. Although it disappears, it will still work.

Other source games have more impulse commands, for example impulse 101 gives you Half-Life 2 weapons with some ammo, but it no longer works in Portal 2.
Placing your portal gun texture
viewmodel_offset_z
viewmodel_offset_x
viewmodel_offset_y

With these 3 commands, you can move your portal gun in your hand on all axis. It's a useless command because why would you like to put your portal gun behind you or maybe far in front of you? But if you want to try them, continue reading, I will explain how to use this command correctly.

You have to write numbers after the commands. If you want to move it on every axis at the same time, use " ; " to separate the commands. Writing a positive number like 10, will move the texture forward, a negative like -10 moves it backwards. If you write "viewmodel_offset_z 0; viewmodel_offset_x 0; viewmodel_offset_y 0", you will set back the portal gun in it's right place.
Changing view
thirdperson - third person view
thirdpersonshoulder - third person view, but the camera is behind your shoulder
firstperson - the defaut first person view
Slowmotion and timelapse
As you can change the gravity, you can change the timescale too. This will slow or speed everything up. This command can be crazy, may be also good for bullet dodging (but not in this game, maybe in Half-Life 2, because here turrets will hit you anyway). Try the command, ("host_timescale number"), you will like it.

You need to wright a number after the command, but only these work:
-1 - basic speed
-0.5 - slowmotion (50% speed)
-2 - double speed (200% speed).

As far as I know, other numbers doesn't work, but if you want to try it, then do it and hope the best.
End
So, here we are, at the end of the guide! I hope you enjoyed reading this as much as I enjoyed making it. If you liked my guide, please give a like, and tell your friends about it, maybe others can find this content useful!
Further Reads
If you are new to using console commands, you should check out my other guide, where you can learn about the basics:
http://steamproxy.net/sharedfiles/filedetails/?id=299966898

Here is a walkthrough for the singleplayer story:
http://steamproxy.net/sharedfiles/filedetails/?id=310520223

Here you can find all the commands related to all Source Engine games:
https://developer.valvesoftware.com/wiki/Console_Command_List
Space Core Project
If you are read the comments, you can see that I have planned an idea about spawning/placing a space core. I don't know yet that it is possible or not, but I'm sure that there is a way to do it, because everything is possible somehow.

I already gave up on this, haven't even started working on it, due to lacking actual interest to find a solution. I also didn't wanted to waste the small freetime I had on that. Uhh, don't even ask about it anymore, this is going to stay like this forever. Keep in mind that since this idea was "announced" years have passed. And this game already turned from having just a couple of players, to being entirely dead.
The future of my projects
There used to be a milestone list in here, where I expected to get 10k views at most. After actually reaching that goal, I decided to leave my thoughts about making such content like this one. So my guess was right I guess. I thought it wouldn't pass 5k, but I left a higher goal anyways, hoping the best is the key right?

I made this guide back in 2014, and I never expected that it would help so many people. So far, over 10k people have seen it, and judging from how few people are actually still play this game, its not a bad number. It seems like most people who started playing Portal 2 recently, have seen this guide. Well, only those who wanted to dig deeper inside the game. Considering the number of people who added this to their favourites, this guide is the most popular reference to console commands. You likely noticed that I still answer to people with different questions, because I saw no point of leaving this one behind. Since I stopped playing Portal 2, there was no other game to do such, probably because modern titles are either more straight-forward when it comes to modifying the gameplay, or they don't even have any similar functions anymore.

Since then, I entirely got over making such content, and rather focused on more important things, and spent my extra time with playing games, instead of doing extra work. That doesn't mean that I wouldn't live with the chance, if I would see an opportunity, to fill certain empty holes with content if needed. That was the reason for this guide too, as far as I knew, there were no guides discussing such commands like this, and if there were, not with such details and explanations.

Sometimes, I feel like I would try making guides for other games, but as mentioned above, I don't have any idea what to do. But it should be your choice right? Even if I would start working on anything, not having enough time would mean that it would take a while until it's finished, but it still would end somewhere with small steps too.

Still reading? lol

If you have any questions, regarding to this game, or basically anything, feel free to leave a comment below. Also, if you have any idea of what projects to work on (but nothing related to Portal 2 anymore), make sure to leave your idea, and if I found it interesting, I may give it a go!



Certain parts of the guide, such as the updates list was cut, to optimize the guide for the few people who might still take a look at it.
271 Comments
Asmordeus #Fixtf2 #SaveTf2 23 Jun @ 2:50pm 
i wanna create the cores
Beeboy 30 Apr @ 4:15pm 
dude ent_create prop_dynamic is not the way u do it to get hover turrets u use ent_create npc_hover_turret
boggie glove 16 Jan @ 9:59pm 
yay
dsaS 28 May, 2023 @ 3:43pm 
1000-THR "Earthmover" 19 Aug, 2022 @ 4:07pm 
Do viewmodel_offset_x -6.5 to play Portal Doom!
ladkeysladkey 30 Jul, 2022 @ 11:18am 
noclip works do sv_cheats 1 lol\

haha source go brr
neeboo12 2 Apr, 2022 @ 8:02am 
NOCLIP DOESNT WORK YOU NEED A DIFFRENT ONE
Unknown 12 Dec, 2021 @ 6:32am 
hey you missed some more console commands
RedLazer5000 7 Nov, 2021 @ 2:14pm 
I just found out something. If you spawn Gladoses cores from Portal one into portal 2, it will actually spawn heres one of the cores: ent_create prop_glados_core coretype 1 spawnflags 1048904 cycle 0.91 playbackrate 1.00 sequence 4 delaybetweenlines 0.10 skin 2
RedLazer5000 1 Nov, 2021 @ 2:08pm 
I love this console command!!! I love the fact that I can make Glados mad because I spawned over 500 wheatly's in her lair. There are so many Wheatlies in her lair she can't even tell which one is real...