Advanced console in FTEQW

From Quake Wiki

Note: By default the console opens with CTRL+SHIFT+ESC!

Autocompletion[edit]

  • FTE will not randomly complete commands. The ctrl+space key combo is directly equivelent to tab in vanilla engines.
  • Some commands/cvars have descriptions. These will be shown if the command is entered.

Useful commands[edit]

  • /apropos - searches all the commands, cvars that the engine has
  • /flocate - searches for a named file and gives location in OS filesystem
  • /dir *.* - Displays filesystem listings with wildcards
  • /cfg_load & /cfg_save - load and write changes to the config file
  • /fs_restart & /vid_restart - resets filesystem and renderer?

Chat[edit]

  • Lines typed in may be interpreted as either chat or commands, depending on the value of cl_chatmode.
  • Lines starting with a / are always commands.
  • Lines where the first word is automatically coloured yellow will be executed as commands.
  • Lines where the first word is automatically coloured white will be broadcast to other players as chat.
  • Tab completion will always insert a leading / to designate the line as a command rather than chat.
  • cl_chatmode 0 - Acts like NQ where the console ONLY accepts commands.
  • cl_chatmode 1 - Acts like Q3 where the input is assumed to be chat. Commands require a leading / (which is also inserted by tab, by the way).
  • cl_chatmode 2 - Acts like QW where the input is assumed to be chat if its not a valid command.

Keys[edit]

  • tab: attempt to complete the command. If there's multiple, will complete only as far as the commonality goes.
  • ctrl+space: completes the current line using the highlighted suggestion
  • ctrl+tab: cycles consoles.
  • mouse1+drag: scroll console up/down.
  • mouse1+click: 'use' link underneath the cursor.
  • shift+mouse1: insert word/link/ip under the cursor to the input line.
  • mouse2: select+copy text to the clipboard.
  • ctrl+c/ctrl+ins: copy the entire input line to the clipboard.
  • ctrl+v/shift+ins: insert the clipboard contents onto the input line. Newlines are replaced with semi-colons.
  • left/right: move cursor left/right.
  • del: remove input-line character under the cursor. If at the end of line removes just before the cursor.
  • backspace: removes char to the left of the cursor.
  • up/down: scroll through command history.
  • pgup/pgdn/mwheel: scroll console up/down.
  • home: go to top of console (oldest).
  • end: go to bottom of console (most recent).
  • alt: make text red
  • ctrl+: 0123456789[]gryb(=)a<->,.BC ctrl with one of the prior chars give various special chars. yellow numbers, LEDs, separators.

Links[edit]

  • Basic format:
^[^2VISIBLE TEXT\key1\value1\key2\value2^]
  • Colour markup for the link must be contained within, and will be reset at the end of it.
  • CSQC:
    • If CSQC is running at the time, clicking on a link will result in this call:
float(string linktext, string linkinfo) CSQC_ConsoleLink;
    • If the CSQC returns false, the engine will examine the link for default fields, so if you handle it yourself you must return true to prevent both csqc and engine trying to do the same thing.
    • The 'linktext' field is the visible text from the link (ie: what the user saw). However, any colour modifiers may have been converted/mangled.
    • The 'linkinfo' is the first \ and everything up to the closing ^]. Again, colours should be avoided.
    • For easy parsing/generation of the linkinfo field, you can use the infoget/infoadd builtins from the FTE_STRINGS extension.
    • Note that links can be sent from other players also. The behaviour of the link is also hidden from the user.
    • Thus you should either require the user to confirm the action, or provide links that are merely informative.
    • The builtin field names are somewhat generic. You can use them as a fallback for if the player disconnects.
  • Built in link fields:
    • player: the link is associated with a player slot. The value should be entnum(playerentity)-1.
      • action: if this field is also set, then when clicked the engine shall carry out the action named in the value upon that player slot.
        • kick: kicks the player (requires rcon).
        • ban: bans the player's ip (requires rcon).
        • mute: mutes the player's voicechat feature.
        • ignore: any 'say' commands received from the player are ignored. also mutes.
      • desc: displays the value as text. The use of this field is somewhat limited by length.
      • connect: the client will attempt to 'connect $value', so the value must be an acceptable hostname or ip:port. You should probably always include the port.
      • qtv: the client will attempt to 'qtvplay $value', so the value must be an acceptable qtv stream identifier.
      • demo: the client will attempt to 'playdemo $value', so this value must include any subdirectory for the named demo.
      • cmd: the client will attempt to 'cmd $value'. A mod can see the results of this using KRIMZON_SV_PARSECLIENTCOMMAND.
      • impulse: the client will attempt to 'impulse $value'. A mod can thus snoop on this by checking self.impulse on the player. Must naturally be between 0 and 255.
      • leading forward-slash: Links with no info and a leading forward slash will be inserted into the input line when clicked. The user must still press enter to issue the given command. Use semi-colons if you wish to include multiple cvars/commands in a single link.
      • This list is subject to change.

Fonts[edit]

FTE supports ttf fonts on the console.

  • Note that they are only supported in gl-only builds, for the moment
  • Uses freetype2, dynamically linked.
  • Is the console text too small? Use /con_textsize or /vid_conautoscale to change
  • Type "/apropos fonts" in the console for more info about fonts

Notes:

  • Use cvar "gl_font" to specify the font file name to load. Does not yet go through the FTE filesystem, so cannot be in any pak files, and gamedirs are ignored. c:/windows/fonts/cour.ttf gives courier.
  • A "gl_font" value such as FONT:ALTFONT specifies an alternative font when ^a is used
  • Example: "/gl_font cour?col=1,1,1:couri?col=0,1,0" will load the cour.ttf and uses the italic version for alternative text with a different colour tint.
  • Most fonts seem to use 12 pixels as a minimum height for readability. FTE allows smaller, but you probably want vid_conautoscale to 1.5 (12/8 = 1.5), or greater, or vid_conheight set to some equivelent value
  • Variable width fonts are supported, the width of the font ignores vid_conwidth.
  • ^UXXXX can be used to print a unicode character on the console (capital U, lowercase is not recognised). U is hex between 0000 and ffff
  • If com_parseutf8 is set to 1, any text printed onto the console will be read as utf8 text. If there are any errors, parsing will be disabled until the next string.
  • in_builtincharmap can be set to 0 in order to get FTE to enter characters according to their system keyboard map (only required in windows)
  • The quake charset is mapped to ^Ue000 through ^Ue0ff
  • ^Ue100 upwards displays some hud images. This mechanism will likely change some time
  • Links dynamically to FreeType. You can get a compatible version from http://gnuwin32.sourceforge.net/downlinks/freetype-bin-zip.php (freetype6.dll is the only file needed)
  • If you're compiling yourself and you have issues with FreeType2 dependancies, it can be disabled by tweeking bothdefs.h or by doing eg: 'make CFLAGS=-DNO_FREETYPE gl-rel'

Recommended font setting by Spike:

  • /con_textsize -12, which gives size in pixels and ignores random rescaling. Most ttf fonts require 12 pixels thus this gives the best control over it.