List of useful console commands: Difference between revisions

From the Portal Wiki
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:


==cl_ commands==
==cl_ commands==
* cl_showpos 1 can useful for executing and sharing precise positioning and [[portal]] shots.
# cl_showpos 1 ( def. "0" ) can useful for executing and sharing precise positioning and [[portal]] shots.
# cl_drawhud 0 ( def. "1" ) client cheat - disable the rendering of the hud during .dem playback
 
==r_ commands ==
# r_portal_use_pvs_optimization 0 ( def. "1" ) - Enables an optimization that allows portals to be culled when outside of the PVS
#* Recommended by some speedrunners to see while out of bounds


==sv_cheats 1==
==sv_cheats 1==
Line 44: Line 49:
* maps - Display list of maps. Use <code>maps *</code> for a full listing.
* maps - Display list of maps. Use <code>maps *</code> for a full listing.


'''For recording'''
=== Recording ===


* record <demo name> - records a demo. The [[Portal 2]] will split demos on every map change (including the [[Hub]]) and adds _K as prefix where K starts from 2.
* record <demo name> - records a demo. The [[Portal 2]] will split demos on every map change (including the [[Hub]]) and adds _K as prefix where K starts from 2.

Latest revision as of 06:48, 11 May 2023

A screen of the Developer Console found in Portal 2

Using the Developer Console, you can turn specific gameplay and graphic settings on and off or modify their values. The console can be enabled from the options menu in the Keyboard/Mouse section. Any command put in the autoexec.cfg file will automatically be loaded on game launch.

cl_ commands

  1. cl_showpos 1 ( def. "0" ) can useful for executing and sharing precise positioning and portal shots.
  2. cl_drawhud 0 ( def. "1" ) client cheat - disable the rendering of the hud during .dem playback

r_ commands

  1. r_portal_use_pvs_optimization 0 ( def. "1" ) - Enables an optimization that allows portals to be culled when outside of the PVS
    • Recommended by some speedrunners to see while out of bounds

sv_cheats 1

sv_cheats 1 - disables the ability to get achievements or submit challenge mode records, and that in multiplayer it's controlled by the host of the game.

  1. r_drawviewmodel 0/1 - turns viewmodels on and off
    • Can't use cheat cvar r_drawviewmodel in multiplayer, unless the server has sv_cheats set to 1 or during .dem playback.

List of useful console commands

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

  • 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

  • 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.
  • 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.

Recording

  • record <demo name> - records a demo. The Portal 2 will split demos on every map change (including the Hub) and adds _K as prefix where K starts from 2.
    • stop - stops the recording of a demo
  • startmovie <moviename> - 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

External links