Author Topic: Console Tricks  (Read 2443 times)

Toolwut

  • Stingray
  • Posts: 60
Console Tricks
« on: August 02, 2020, 07:46:03 AM »
Might turn this into a guide at some point since the console is an important part of the game (especially since neither the official menu nor any menu mod contains all commands and cvars).

*Note: all the key specific things apparently only work for my (German) layout. Other layouts might require you to use different keys.*

Basic stuff:
- Console can be opened by pressing ^ or Shift+ยด
- Console allows changing your settings (console variables), calling functions (commands) and chatting. At some point everyone starts using it.
- You can get a list of all commands by typing "cmdlist" and a list of all console variables by typing "cvarlist". Incomplete explanations can be found at
    - http://web.archive.org/web/20090612040933/http://digitalpaint.therisenrealm.com/reference/commands
    - http://digitalpaint.org/testwiki1/pb2wiki.php?word=Commands+and+Settings
    - http://www.otb-server.de/wbblite/dp_commands.php?action=uebersicht&showall=1&sid=
- Didn't know this for a very long time: Start writing a command, then press TAB and it autocompletes the command / lists all possible commands
- Make a text italic by pressing Ctrl+i, underlined by pressing Ctrl+u, colored by pressing Ctrl+k and then a certain key that represents the color you want
- Change your name to a fun text by typing "name <fun text>" or for a multi word name "name '<fun text>'"
- Bind a fun text to a key by using "bind <key> '<fun message>'"
- Write to public chat, even if it's a command by writing "say" in front of your text, or "say_team" if you want to write it to your team mates only
- Ctrl+l (small L) clears the console history

More advanced stuff:
- You can get values of client-sided cvars by typing "$<cvarname>". If you want to insert that value into a string (e.g. for a bind), use "$<cvarname>$" if you want to add letters after the cvar value without a space in between.
- You can list directory contents of your gamedir (default is pball) using the "dir" command. If you want to list all beta maps, type "dir maps/beta/*.*". If you want to list all jpgs in your pics folder, type "dir pics/*.jpg". If you want to list all maps starting with t type "dir maps/t*.*". To list all maps with a t, any letters in between, and another t, type "dir maps/t*t*.*".

- To set custom integer variables, use "set <name> <value>". To remove it, type "unset <name>".
- To increase a cvar by a certain value, use "cvar_inc <name> <value to add> <optional: min value of the cvar> <optional: max value of the cvar>"
- To toggle a cvar, use "cvar_toggle <name>"
- To store a string or command in a variable, use "alias <name for the alias> <whatever to store>". This is for example useful for more complicated commands / scripts. Calling "<name of the alias>" will then executed whatever you stored inside.
- To bind multiple commands to a key / store in an alias, separate them with a ";". Sometimes you will have to insert one or multiple "wait;" between those so they're both executed and in the right order. (Thanks whoa)

- To get a list of binds, use "bindlist".
- To see what is bound to a certain key, type "bind <key>"
- To see what key a command is bound to, type "$bind(<command>)"
- To execute a command when a key is pressed or released, create an alias "alias +<name> <command>" (or "-<name>") and "bind <key> <alias>". If the alias name starts with "+" it will be triggered when a key is pressed, when it starts with "-" it's triggered when the key is released.

- To store your current settings to a separate config file, use "writeconfig <name>".
- To switch to a different config, use "exec <configname>".

- Directly go to a specific menu file: "menu <name>" (used that either for testing or to go to "menu setup_funname" :) ).

Commands I consider useful to know
- "info" returns server information (and related commands)
- "developer 1" will print debugging information
- "game <game>" switches to a different game dll, allows to use e.g. the Q2Jump mod locally (if you downloaded it and placed it in the right directory). This automatically changes "gamedir".
- Download stuff from a server that isn't autodownloaded (-> used by a different map): "download <path to file, relative to the server's 'gamedir'>"
- connect to the server you visited last: "connect $menu_server"
- "condump <filename>" writes all the current console history into a txt file
- Changing certain video settings requires to "vid_restart"
- As mentioned before, "wait" is useful for executing multiple commands in a row. Technically, it skips a frame / does nothing over the course of one frame.


Then there is obviously other stuff like changing your console appearance, making loc binds or creating locs, better look that up in a different thread or elsewhere ("loc_help" tells you all you need to know about that topic though).

Is there more about the console you wished you had known earlier as a player?
« Last Edit: August 02, 2020, 08:22:59 AM by Toolwut »