List of The Stanley Parable console commands and variables

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

The following is a list of unique The Stanley Parable The Stanley Parable and The Stanley Parable Demo The Stanley Parable Demo console commands, grouped by their properties and uses.

Note.pngNote:The Stanley Parable The Stanley Parable is based on the Portal 2 Portal 2 engine branch, so most commands present in the List of Portal 2 console commands and variables will also work in The Stanley Parable

Notes

The "Special Execution" Variable

In The Stanley Parable, there is an internal variable that dictates whether or not you are allowed to run certain commands. I call this the "Special Execution Variable" (SEV). There are two types: One for client commands, and one for server commands (each defined in client.dll and server.dll respectively). These are boolean variables, meaning they hold a value of 0 or 1 at any given time. A value of 0 indicates Special Execution is allowed, and 1 means it is disallowed. The value of these two commands can be controlled in-game by using the "~" commands listed below (however, they cannot be used under normal circumstances). If a command is bound by the SEV, the appropriate flag is marked in the tables below. "CL" refers to the Client Flag, and "SV" refers to the Server Flag.

Note.pngNote:These are not "real" flags, but were made as an easy way to describe which SEV is used for the relevant commands listed below

Bypassing the SEV

Because of the SEV, most of these commands will not work when run directly by the client. Instead, there will be some pre-programmed response in the console. To bypass this, simply execute the commands from a point_servercommand (in most default maps, this will have targetname "cmd2" if the entity exists). You can do this by running the following command:ent_fire cmd2 command "<command> <params>"

General Notes

  • All commands written here are implicitly assumed to exist in both The Stanley Parable The Stanley Parable and The Stanley Parable Demo The Stanley Parable Demo unless otherwise noted.
  • This list is not exhaustive: Because The Stanley Parable is based on the Portal 2 engine branch, only unique commands are listed here (with any exceptions marked). Most other commands are likely to be found in the List of Portal 2 console commands and variables (Though, not all of them will work in The Stanley Parable, as their functionality may have been disabled).
  • Most of these commands do not provide an actual description, so there is a community provided description with the assumed function of the command, alongside the original description (if one exists). Some investigation and reverse engineering has been done in order to get a better idea of what some of these commands do.
Note.pngNote:As of 5/26/2024, the majority of this technical research was done by user BetweenReality
  • "Console Response" indicates the response from the console after the command was entered. If the SEV is relevant to the command, only the "SE message" will be printed to the console when run by the client.

Cvar list

General Commands

Command Default Value Flags SEF Console Response Description
dead cmd Unknown Unknown command: dead Unknown. Supposedly found in map1.bsp.
Confirm:Does this actually exist anywhere? I couldn't find any references to it in map1, any other maps, or in any command dumps. I think that whoever wrote this accidentally looked at the Stanley model in the Mariella Ending and though the default animation value was a command somehow
interruptvideos cmd "cl" Actual Description: Interrupt all interruptable videos playing to the screen

Skips the intro video (if entered in while the video is playing). Functionally identical to clicking during this time.
(also in Portal 2)
sv_cheats
0 Usually used to enable cheats, but instead loads map seriousroom.bsp. This can be bypassed by using the client.dll from The Stanley Parable Demo and overwriting the one from the base game.
Warning.pngWarning:While this does work, it also breaks other parts of the game, as this dll is missing some important functions that the main dll contains (namely, all of the Passes)

Alternatively, you can use a modified dll that removes this limitation, while still keeping all of the other functionality intact.

stanley_animation 0 The Stanley Parable Demo "cl"
The Stanley Parable "cl", "hidden"
Changes the speed of the closing eyes animation. Primarily used in the Mariella Ending.
Note.pngNote:The value of this convar can only be changed during the sequence where Stanley closes his eyes.
Confirm:Is this true? Also, is this the full functionality of this command?
(only in The Stanley Parable)
stanley_drawcredits
0 "cl", "hidden" After credits finish:
Ending credits sequence...
Draws the credits over the screen. Only used during the Incorrect Ending.
(only in The Stanley Parable)
stanley_stopanimation
0 "cl", "hidden" I assume this is similar to the commandstanley_animation, but stops the animation instead.
Confirm:Is this true? Also, is this the full functionality of this command?
tsp_crash cmd "cl" Crashes the game and opens The Stanley Parable game page on Steam client
Confirm:Does this only open the in-game browser, or can it also open the actual browser?
tsp_enablemenunarrator cmd "cl" Actual Description: ?

After the command is run and you pause the game, it attempts to play a nonexistent sound"narrator\zen_final_escape.wav"(which is referenced in The Stanley Parable Demo narration file, which contains many beta strings), and shows"No, please Stanley! Don't quit- I'm asking you- please don't take this away from me!"in the captions (This caption text is hard-coded in client.dll). Likely part of a beta version of the "Zending" (based on the file name). Video demonstration
(only in The Stanley Parable)
tsp_inhibitcontroller
0 "cl", "norecord" Actual Description: Disable controllers in apartment ending

Prevents controllers from being used in the apartment ending.
Confirm:Does this work?
tsp_lightstyle cmd "sv" SV SE Message:
nope
Actual Description: Test

Unknown purpose. Doesn't seem to do anything when run by the server. Possibly unused, since there are no references to it in any of the maps. Based on the description, this command may not do anything at all and is just a remnant of some test.
Todo: Trace the function this command calls to figure out what it actually does
(only in The Stanley Parable Demo)
tsp_openstore
Unknown Unknown Unknown command: tsp_openstore Supposedly opens the store page for The Stanley Parable, however it seems that the command was either never implemented, or else it was removed. It shows the error in the console even when the game tries to execute it.
tsp_paused 0 "cl" Unknown. Possibly an unused command from back when the "Escape Menu" was a thing, and this would detect if you were paused or not? Running this command from the server with a parameter of 1 causes a generic command tooltip to show up delayed, while running it with any other parameters or with no parameters it comes up immediately.
Todo: Figure out what this actually does, or if it does anything at all
tsp_reload cmd "sv", "hidden" SV
Todo: Potentially make the formatting of this box better

The Stanley Parable The Stanley Parable
SE Message:
yeah no

The Stanley Parable Demo The Stanley Parable Demo
No Parameters OR Parameter == 0 OR Parameter == {Non-Numeric-Character}
Using outdated reload syntax! FIX ME WILLIAM!!!

Parameter != 1:
PlayerLocal(§USERNAME)::UpdatePlayerTitleData: TSP_PLAYTHROUGHS = <%i> (0x00000001)]

Always:
CModelLoader::Map_IsValid: No such map 'maps/map1.bsp'
map load failed: map1 not found or invalid

Parameter != 1:
User stats written.

When user session is invalid:
Steam stats are botched! (if you bought the game you should totally report this)

Confirm:Check to see when and why exactly this line is printed

Note.pngNote:§USERNAMEis the player's Steam Username, and<%i>is an integer value equal toTSP_PLAYTHROUGHS + 1

The Stanley Parable The Stanley Parable
Reloads the game, as a "soft" reload (loads back into map1.bsp). When run with no parameters, it seems to update the user's Steam Stats and increment the internalTSP_PLAYTHROUGHSvalue along with loading back into map1.bsp. When run with a parameter of 1, it seems to just reload normally without any additional effects. When run with a parameter of 5, The Stanley Parable Adventure Line™ will show up in map1.bsp on this playthrough. The function of parameters 2 - 4 is unknown, but they have no visible effects.

The Stanley Parable Demo The Stanley Parable Demo

When the command is run in The Demo, different effects are present. Primarily, the command fails because it tries to load "maps/map1.bsp", which is only present in the main game. When run with no parameters, a parameter of "0", or any non-numeric value, the console responds with the outdated syntax error (This message is also present in the main game, although occurs through other means).
Todo: What are these other means?
This error does not occur if running the command with other parameters, so maybe this command originally had a different syntax that actually utilized these parameters? When run with the parameter "1", it does not output theTSP_PLAYTHROUGHSvalue (which is a counter based on how many times the game executed a "soft" restart), nor does it output "User stats written.". This means that this parameter tells the game not to count the restart as an "Ending" restart, thereby not updating the users stats or playthrough counter. All other higher value parameters seem to give the same output (tested up to 10).
tsp_resetzaxis cmd "hidden"

No Parameters OR Parameter != <%5i>:
Please run "tsp_resetzaxis <%5i>" as a confirmation that you want to wipe your stats and achievements.

Parameter == <%5i>:
WIPING Z-AXIS DATA
Changes will apply once you restart your game.

Note.pngNote:<%5i> is a 5 digit integer between 10000 and 99999
Actual Description: Resets z-axis data

This command resets the player's stats and achievements if you run the command with the provided number as a parameter. The number is a random number with a value between 10000 and 99999 generated the first time you run the command, which then gets stored internally. This command is defined inmatchmaking.dll
(only in The Stanley Parable)
tsp_start
cmd "cl", "hidden" CL SE Message:
Hey don't you even try
This command sets an internal variable (that determines the time when the current playthrough began) to the value of the current time.
tsp_startapartment cmd Actual Description: Starts apartment ending sequence

Starts the sequence in The Apartment Ending where env_instructor_hints begin appearing on screen, and detects the proper key presses by checking every input the user makes, and comparing that to the current requested key. This command only makes the hints start displaying on screen; It does not cause the ending to occur if the command is used out of sequence.
(only in The Stanley Parable)
ui_saves
1 "cl", "a" Actual Description: saves

Holds the value in the "Extras" menu for enabling or disabling saves.
Confirm:Is this true?
zaxis_increase cmd "cl", "hidden" Cheating is no fun - do you need a chat with the narrator perhaps?
Note.pngNote:This gets printed unconditionally
Looking throughclient.dll, this command appears to do nothing. All it does is set some string, convert it to an integer, then does absolutely nothing with that value.

Potentially once had something to do with the "zaxis" dialog variations (all of the different things the Narrator says after you leave Stanley's office). Maybe when this command was run, some internal variable got increased, which then changed which relay gets triggered or enabled. I guess they ultimately decided to do this using existing methods instead of hard-coding it (assuming this was the function of this command). Otherwise, it had to do with whatever "zaxis" signifies (which is referenced a lot throughout the game's logic).

Achievement Commands

These commands are related to the achievements present in the game (Most of these grant the specified achievement). Running these commands should grant the specified achievement, however most of them are blocked by the SEV. To bypass this, read the secion above on bypassing the SEV.

Confirm:Does this work for all achievements?
Command Default Value Flags SEF Console Response Description
_430 cmd "hidden" (only in The Stanley Parable Demo)
failed
Note.pngNote:This gets printed unconditionally
Grants Achievement "Click on door 430 five times."

(in The Stanley Parable Demo) This command exists in The Demo, but has no functionality.
(only in The Stanley Parable)
_430_disable
cmd "hidden" SV SE Message:
heck no!
Disables the "Click on door 430 five times." achievement, or else stops you from activating it once you already got it.
Confirm:Is this actually what this command does?
_888 cmd "sv", "hidden" (only in The Stanley Parable Demo)
failed
Note.pngNote:This gets printed unconditionally
Grants Achievement "8888888888888888"

(in The Stanley Parable Demo) This command exists in The Demo, but has no functionality.
_beat cmd "hidden" (only in The Stanley Parable Demo)
failed
Note.pngNote:This gets printed unconditionally
Grants Achievement "Beat the game"

(in The Stanley Parable Demo) This command exists in The Demo, but has no functionality.
(only in The Stanley Parable) _u cmd "cl", "hidden" CL SE Message:
Hey don't you even try
Grants Achievement "Unachievable"

This achievement has changed many times over the course of the games' history, and has never had a clear way of obtaining it legitimately. In the game's current state, it is only known that The Apartment Ending has something to do with it. The common method for obtaining it manually is shown here, however the method shown above is simpler and easier.
tsp_demo_grantcup cmd "hidden" (only in The Stanley Parable)
failed
Note.pngNote:This gets printed unconditionally

The Stanley Parable Demo The Stanley Parable Demo
Actual Description: Grants cup achievement

Grants Achievement "Video Games!!"
Typically The Demo runs this command on it's own as part of an in-game sequence, then shortly after runs the reset command below to revoke the achievement again. Using this command manually is an easy way to get and keep the achievement. All you need to do is start The Demo and execute the command. If you play through the demo again though, the achievement resets due to the mentioned sequence.

The Stanley Parable The Stanley Parable
Interestingly, this command also appears in the main game, but is only defined inmatchmaking.dll. "tsp_resetzaxis", "_888", "_430", and "_beat" are also redefined in this dll, but the regular dll's seem to take precedence over these. Otherwise, this command has no functionality in the main game.


tsp_demo_resetcup
cmd "hidden" (only in The Stanley Parable)
failed
Note.pngNote:This gets printed unconditionally

The Stanley Parable Demo The Stanley Parable Demo
Actual Description: Resets cup achievement

Revokes Achievement "Video Games!!"

The Stanley Parable The Stanley Parable
This command also exists in the main game, but is only defined inmatchmaking.dll. Otherwise, this command has no functionality in the main game.

(only in The Stanley Parable)
tsp_finish
cmd "cl", "hidden" CL SE Message:

Hey don't you even try

Else:
Done in <%f> seconds (without counting load screens (!!!))

If executed within 262 seconds since starting:
You Won!

Note.pngNote:<%f>is a floating point value equal to your current playthrough time
Grants Achievement "Speed run".
Note.pngNote:This will only grant the achievement if executed within 4 minutes and 22 seconds (262 seconds) of beginning the game

Easter Egg Commands

These commands are used to enable certain Easter eggs.

Command Default Value Flags SEF Console Response Description
(only in The Stanley Parable)
bark
cmd "sv", "hidden" Instead of the regular keyboard stroke sounds played with+use, it plays the sound of a dog barking.
(only in The Stanley Parable)
hideous
cmd "cl"
Note.pngNote:Does not work in the Epic Games version of The Stanley Parable.
Confirm:Is this true?
Opens a random page from the Team Fortress 2 Wiki in the in-game Steam web browser.
Confirm:Does this only happen in the in-game browser, or can it also open your actual browser?
These are the possible pages it will choose from:
http://wiki.teamfortress.com/wiki/Western_Wear
http://wiki.teamfortress.com/wiki/Graybanns
http://wiki.teamfortress.com/wiki/HDMI_Patch
http://wiki.teamfortress.com/wiki/Soldier%27s_Sparkplug
http://wiki.teamfortress.com/wiki/Steel_Shako
http://wiki.teamfortress.com/wiki/Well-Rounded_Rifleman
http://wiki.teamfortress.com/wiki/Soldered_Sensei
http://wiki.teamfortress.com/wiki/Timeless_Topper
imabird cmd "sv", "hidden" Activates the floating effect ("Bird Mode") used in the Mariella Ending. Run the command again to disable it.
Confirm:Does running it again actually turn it off?
mat_matoverride cmd "hidden", "cheat" Changes all textures to a texture used for a standing easel model(props_interiors/ceda_easel01), but instead it has the Facepunch logo on it(materials/facepunch_brushbased). Identical in function to typing out "facepunch" anywhere (see below). This command is initialized in engine.dll, but seemingly gets it's functionality from client.dll.
(only in The Stanley Parable)
raphael
cmd "sv" If command is active and any sound event occurs:
Sssstannnleeeyyyy!!!
Confirm:Under what exact conditions does this line get printed?
Replaces all narrator dialog with various voice lines of The Narrator saying "Stanley" in different ways ("Raphael Mode"), and prints a line to the console every time this happens.

Typing-Only Easter Eggs

(only in The Stanley Parable)

Confirm:Do these work in The Demo?

These aren't "Commands" per se, but can be typed anywhere for some effects to occur.

String Console Response Description
"facepunch" Cheat code "" activated!
Note.pngNote:Prints with no newline character (\n) at the end

Binding uncached material "facepunch_brushbased", artificially incrementing refcount
Note.pngNote:Prints only once
Identical in function to "mat_matoverride", with the exception of the message being printed to the console.
The "Cheat code" message is actually supposed to print with a string in-between the quotes, however this seems to be broken.
Todo: Figure out if this is actually broken, or if there is a way to make it print properly
Todo: Find other uses of this "Cheat code" string, or if there even is any
"secret" After typing it out, go to the Freedom Ending or press credits in the main menu. Instead of the regular music, Easter egg music will play instead.
Todo: Filenames of the music files
"vinh" Changes the credits background to pictures of "Vinh" moving around, and plays the secret music. If you type it before the regular music starts, you can get both musics to play at the same time.
Todo: Filenames of the music files, and filename for the "Vinh" picture

Pass Commands

These commands are used to save some internal state to be used for the next restart (AKA it "passes" some state/value to the next playthrough). For most pass commands, running them usually increments the internal value by 1, up to a specific max value. Otherwise, they act as boolean variables and only increment up to 1. After each increment, there will usually be some specific relay that gets enabled, with consecutive uses of the command enabling consecutively named relays instead. The passes send inputs to hard-coded relay names, and the inputs only occur on hard-coded maps. If the user returns to the main menu or quits the game, all of the internal values of these passes get reset.

Note.pngNote:"Min" and "Max" refer to the minimum and maximum value of the internal pass variable, not the command itself
Todo: What happens when the commands are run when the internal variables are already at their max values? Do they reset to 0, keep going, or do nothing at all?
Todo: Describe when exactly each pass is activated / changed
Todo: Max value of the passes / data types (integer, boolean)
Todo: Names of all of the relays that get enabled, and by what passes
Todo: Maps the passes are hard-bound to / used in
Command Default Value Min Max Flags SEF Console Response Description
tsp_bosspass cmd "sv", "hidden" SV SE Message:
denied!
Changes the Boss's Office Narration after every soft restart (Only after the player enters the Boss's Office during the playthrough).
Confirm:Is this true?
tsp_bossskip cmd "sv", "hidden" SV SE Message:
denied!
Opens the Boss's Office Secret Door immediately upon entering the Boss's Office.
Confirm:Is this all this pass does?
tsp_boxes cmd "sv", "hidden" SV SE Message:
denied!
Makes the boxes appear in the beginning offices after the next soft restart ("boxaxis")
tsp_broompass cmd "sv", "hidden" SV SE Message:
denied!
Changes the Broom Closet Narration after every soft restart (only if the player enters the Broom Closet during the playthrough).
tsp_buttonpass cmd "sv", "hidden" SV SE Message:
denied!
Increments every time a computer with "Awaiting Input" is activated. On the fifth computer, loads the map buttonworld.bsp (Though this happens through in-game logic, not through the pass).
tsp_countpass cmd "sv", "hidden" SV SE Message:
denied!
Changes a bit of the Narration in The Countdown Ending after you return to it again in a single playthrough.
tsp_loungepass cmd "sv", "hidden" SV SE Message:
denied!
Changes the Narration in The Lounge after every soft restart (only if the player enters the Lounge during the playthrough).
Confirm:Is this true?
tsp_seriouspass cmd Unknown ? Unknown command: tsp_seriouspass This command doesn't actually exist, but was referenced in the map seriousroom.bsp. This seems to be an old version of the seriousroom pass implementation, because currently, "seriouspass" is incremented completely in code (happening any time the commandsv_cheats 1is input). I guess the theory is, if typing the cheat command should send you to the Serious Room every time, then why bother having a separate command just to increment the internal pass value. This also allows for all the Serious Room relays to be disabled by default, which means the Narration won't be activated unless you got sent to the map through use of the cheat command.

Two-Letter Commands

These commands are special commands used internally during The Apartment Ending (with the exception of te).

Command Default Value Flags SEF Console Response Description
ae cmd "cl" SV SE Message:
aaargh!
This command is used internally during the apartment ending to trigger the Apartment relays after the player presses the appropriate keys. Once an input is received, it checks to see if the player input the correct key. If the key was correct, it triggers the next relay using this command. It is unknown why they needed a command for this, instead of just doing it purely in code.

Equivalent to running the commandent_fire ENT_NAME trigger

am cmd "cl" This command creates an internal instructor hint entity using the "instructor_server_hint_create" event. After initialization, it fires the event.

The hint is initialized with these values:

"hint_name"                 -> "apartmentinternal"
"hint_replace_key"          -> {unknown_data}
"hint_target"               -> 0
"hint_activator_userid"     -> 0
"hint_timeout"              -> {AND(SEV,0x80000009) + 0x7ffffffa}
"hint_icon_onscreen"        -> {unknown_data}
"hint_icon_offscreen"       -> {unknown_data}
If SEV is set to "Allow":
        "hint_caption"           -> ""
        "hint_activator_caption" -> ""
If SEV is set to "Deny":
        "hint_caption"           -> "WHY ARE YOU DOING THIS"
        "hint_activator_caption" -> "WHY ARE YOU DOING THIS"
"hint_color"                -> "255,255,255"
"hint_icon_offset"          -> 0
"hint_range"                -> 0x4cbebc20
"hint_flags"                -> 0
"hint_binding"              -> {unknown_data}
"hint_gamepad_binding"      -> {unknown_data}
"hint_allow_nodraw_target"  -> 1
"hint_nooffscreen"          -> 0
"hint_forcecaption"         -> 1
"hint_local_player_only"    -> 0
"hint_nofadeout"            -> 1
Note.pngNote:{unknown_data} refers to some byte referenced in code. It is unknown how exactly this byte is used.
Todo: Figure out how this byte is used

Based on in-game testing, it appears that the "hint_timeout" is set to ~3 seconds if the SEV is set to "Deny", and ~infinite if set to "Allow": If this command is manually invoked and the SEV is set to "Deny", the "WHY ARE YOU DOING THIS" message appears for ~3 seconds. Otherwise, it displays "No Caption Found" indefinitely.

It is speculated that this command has to do with the Unachievable Achievement, because this command gets run internally by the function responsible for granting that achievement. This is also the only location in code where the command is called.
Confirm:Is this the only location where it is called?
as cmd "cl" SV SE Message:
no!
This command is used internally during the Apartment Ending to end the instructor hints displayed on-screen after the player presses the appropriate key. Internally, calls theinstructor_server_hint_stopevent with a "hint_name" of "apartmentinternal" (which is the same name that theamcommand uses to initialize a hint). Although this calls the event with the name "apartmentinternal", it still stops all currently active instructor hints. Again, it is unclear why they created a command for this, instead of performing the logic locally in code. Perhaps they needed a quick way to test this stuff in-game?
Todo: How does this turn off all hints if it only targets "apartmentinternal"? Is this hint only created by theamcommand, or does it get created by other means as well?

The TE Command

(in The Stanley ParableThe Stanley Parable DemoPortal 2Half-Life 2)

This command relates to Temporary Entities in the source engine (hence the name "te"). It is not exclusive to The Stanley Parable, however it is still to be determined which games have this command. The command also seems to not be present anywhere in any documentation, nor discussed anywhere publicly (as far as I could find).

Todo: Find all games that have this command
Command Default Value Flags Console Response
(also in Portal 2Half-Life 2)
te
cmd "cl" Unknown command: te
Note.pngNote:Only when in the main menu

(only in The Stanley Parable Demo) Usage: te <lifetime> <entname>
Note.pngNote:Only when in-game

Attempting to use the command by putting in random<entname>s gives the output"Couldn't find temp entity '%s'"(Where %s is the entered string). Upon further testing, using some single or double letter combinations seem to work. Why the command exists or why typing in seemingly random letters has random things occur is still unknown. So far, it is know that this command exists in The Stanley Parable The Stanley Parable, Portal 2 Portal 2, and Half-Life 2 Half-Life 2. In The Stanley Parable and Portal 2 (I assume), the effects below can be observed, however in Half-Life 2, this command doesn't give any errors, has no console output, and seemingly has no effects at all.

Todo: Find more entnames that work
Todo: Figure out what the pattern is behind all of this

Some notes:

  • Parameters are case-insensitive
  • Parameters were tested based on qwerty order, then character-number order, then uppercase character-number order (based on the common keyboard, left to right, top to bottom).
  • All single letters, numbers, and characters were tested. What was not tested were number-number, character-character, letter-number, letter-character, or number-character combinations.
  • Letter-letter combinations were tested up to "az", and "ta" - "tz". Any other combinations listed below were randomly tested.
  • The<lifetime>parameter changes how some of these display. Here is a list of unique Attributes:
    • {type0}: The Effect exists constantly. May or may not disappear after a given time.
    • {type1}: The Effect activates once per second for<lifetime>+1 seconds (AKA Activates<lifetime>+1 times, once per second).<lifetime>appears to have a minimum value of 1, which means the effect will always run at least twice (once to start, once at the end since 1 second passes)
    • {type2}: Constantly active for <lifetime>+1 seconds
  • For the "Literal Effects" category, the position where they generate is in front of the player at some specific distance away, and in the direction of the player's view yaw.
    Todo: Determine tow far away this specific distance is

Below is a list of the<entname>sthat were tested and their results.

Type Effect <entname>
(space-delimited)
Notes
No Visible Effects u a d f j k z x b
at au ai as al ac
tr tt ty ti ta ts tl
entity
Console Output Usage: te <lifetime> <entname> {no-parameter} ; " This is a typical error message for invalid commands. Based on the only names in this category, I think it's quite obvious why this is the output.
Couldn't find temp entity %s
Note.pngNote:%s is the input <entname>
q
1 2 3 4 5 6 7 8 9 0
~ ! @ # $ % ^ & * ( ) _ + [ ] \ ; ' , . /
` - = { } | : " < > ?
No model 0! t y i p s ay te
WallPaintedEvent v
breakmodel ak
PlayerAnimEvent an
Footprint Decal tp Also creates a bullet hole overlay at the world origin.
EffectDispatch td tc Also creates an "explosion" of red X's at the world origin.
Literal Effects Seemingly one of the the Half Life 1 resonance cascade anti-mass spectrometer effects.
On First Execution:
Prints material "sprites/flare6" not found.
g
{type0} Displays a horizontal line of particles.
On First Execution:
Prints material "particle/particledefault" not found.
h n Dissapears after ~30 seconds.
{type1} Displays Smoke puffs. k ar
{type1} Displays Big smoke puffs. m
{type2} Creates a dim yellow dynamic point light am
{type0} Creates a Bullet Hole overlay. w e r o l c Does not conform to the rules stated above. Instead, it generates on the nearest brush intersecting the player's look ray, only accounting for yaw rotation. Seems to stay forever.
Confirm:Does this only account for yaw, or does it appear exactly at the crosshair?

Tilde Commands

These commands mainly act as a way to change the Special Execution Variable from within the game. They are usually blocked from being input into the console. This is because a check is performed to see if any ~ characters are in the console input, and if they are found, it stops execution of any further commands (It is also hard to enter the commands at all because the key is the same key that is bound to the console itself; more information below). If you bypass this check by modifying client.dll, you are able to input these commands without any problems.

Their functionality however, is still being prevented through another measure. After the initial check is performed, there are four command inputs sent to the console in this order: ~ ; {console_input} ; ~~ ; ~~~. Additionally, right after the first ~ command, the Client SEV is set to 1. This makes it so that the Client SEV is always set to "Deny", no matter what. It gets reset every time the user enter any command, meaning even if these special commands are run, their functionality is blocked. If this check is bypassed, the default value for the Client SEV is actually 0 (Allow) by default. The default value for the Server SEV is also 0.

Entering the commands

Now, about inputting these characters in general: If you try to type either the ` or ~ characters at all, the console will close. If you copy-paste the character, nothing shows up in the input field. However, if you first type any character, then you can paste the character and it will show up. If you try deleting these special characters or any characters near them (by means of backspace or delete), the console window closes and clears the input. If you highlight the character and paste again, then the character gets deleted properly, and no new characters are actually pasted (but it does send the cursor back to the beginning of the input). Using this information, we can enter the below commands as follows: Type any character, paste ~ as many times as you need, highlight the final character, paste again, and then the command is ready to execute.

Command Default Value Flags SEF Console Response Description
~ cmd "cl" [Found invalid character in console input! (don't be so clever pls)] Sets the Special Client Execution Variable to "Allow"
Confirm:Is this true?
Note.pngNote:This string is only found in client.dll, with only one reference pointing to it in a seemingly unrelated place.
~_~ cmd "cl" [Found invalid character in console input! (don't be so clever pls)] Sets the Special Client Execution Variable to "Deny".
Note.pngNote:This string is only found in client.dll, and has no references pointing it.
Confirm:Confirm that this one is actually for "Deny" and not "Allow"
Confirm:Does this command even work at all?
~~ cmd "sv" [Found invalid character in console input! (don't be so clever pls)] Sets the Special Server Execution Variable to "Deny"
~~~ cmd "sv" [Found invalid character in console input! (don't be so clever pls)] Sets the Special Server Execution Variable to "Allow"

Portal 2 Beta Commands

These commands are seemingly unrelated to The Stanley Parable, but do make sense to have been part of the Portal 2 Branch at some point. It's also possible that the TSP Developers got access to a Beta / In-Dev version of the Portal 2 Code.

Note.pngNote:The SEV is not relevant here, and is therefore omitted from the tables

"Paint" Commands

Originally, Portal 2 was going to get a new weapon called the "Paint Gun", which would shoot gels instead of portals. The Stanley Parable contains leftover commands from when this was still part of the engine.

Todo: Check if these commands exist in earlier versions of Portal 2
Command Default Value Flags Console Response Description
changepaintto cmd "cl" No Parameters:
changepaintto bounce,speed,portal
Note.pngNote:Prints with no newline character (\n) at the end
Unknown. Assuming this relates to the "paintgun", this command would probably change the current active paint type to the specified type.
giveallpaintpowers cmd "sv" Unknown. Based on the name, it would give you the ability to shoot all types of paint from the paintgun.
nextpaint cmd "cl" Unknown. Based on the name, it would switch the active paint in the paintgun to the next paint type, possibly looping back to the first type if necessary.
prevpaint cmd "cl" Unknown. Probably works the same as "nextpaint", except goes back in the list instead (similar tonextweaponandprevweaponin Half-Life 2 Half-Life 2)
Todo: Real names of these commands

Other Commands

These commands do not exist in modern versions of Portal 2.

Command Default Value Flags Console Response Description
ui_overlay_pos 3 "cl", "a" Actual Description:

Overlay position
0 - Top left
1 - Top right
2 - Bottom left
3 - Bottom right

Note.pngFix:Indentation of these

Unknown. According to some ancient Garrysmod bug report, this command was supposedly an old version of the "cl_steamoverlay_pos" command.

vp8_mat_queue_mode 1 Actual Description: Update vp8 on mat queue thread if mat_queue_mode is on (if turned off, always update vp8 on main thread; may cause stalls!)

Unknown.
Todo: Check the functionality of this command

See also