Engine:Console commands: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
Line 23: Line 23:
: [[MACRO bind|run]] - run, /run - Load and run script file. Run a named script file. Name must include extension.
: [[MACRO bind|run]] - run, /run - Load and run script file. Run a named script file. Name must include extension.
==== Intrinsic vars ====
==== Intrinsic vars ====
Global:
: [[CVAR lib_path|lib_path]] - './lib/' - Path for native 'world' modules.
: [[CVAR lib_path|lib_path]] - './lib/' - Path for native 'world' modules.
: [[CVAR lib_path|base_path]] - './data/' - Path for content and assets.
: [[CVAR lib_path|base_path]] - './data/' - Path for content and assets.
Line 28: Line 29:
: [[CVAR lib_path|GameDll]] - (none) - Full path for 'world' module, './lib/gamex86.dll'.
: [[CVAR lib_path|GameDll]] - (none) - Full path for 'world' module, './lib/gamex86.dll'.
: [[CVAR lib_path|s_use_ai]] - '1.0' - If world 'AI' processing is enabled.
: [[CVAR lib_path|s_use_ai]] - '1.0' - If world 'AI' processing is enabled.
: [[CVAR lib_path|map]] - 'maps/base1.bsp' - Full path for default content module
: [[CVAR lib_path|map]] - 'maps/base1.bsp' - Full path for default content module.
: [[CVAR lib_path|startup]] - (none) - Full path of initial startup script
: [[CVAR lib_path|startup]] - (none) - Full path of initial startup script.


==== Assignments ====
==== Assignments ====
Line 35: Line 36:
: Default log assignment is 'log'
: Default log assignment is 'log'
: Initial console assignment is 'console'
: Initial console assignment is 'console'
=== Render module ===
==== Commands ====
: none
==== Intrinsic vars ====
Global:
: [[CVAR r_width|r_width]] - '900' - Initial main window height.
: [[CVAR r_height|r_height]] - '600' - Initial main window width.
: [[CVAR r_bpp|r_bpp]] - '32' - Initial render device color bit depth.
: [[CVAR r_fullscreen|r_fullscreen]] - (none) - If device full-screen, without window.
: [[CVAR r_gamma|r_gamma]] - '1.0' - Device color gamma correction.
: [[CVAR r_vsync|r_vsync]] - '1.0' - If should render each frame one frame synced with device rate.
==== Assignments ====
: none

Revision as of 22:28, 12 October 2023

This is a reference for Engine console commands available for use a chat window or other console, and as macro commands in a macro.

This list describes all of the 'slash' commands from Engine itself, and not from any additional modules or AddOns.

By default in the core or empty UI, the console can be entered during runtime by pressing the 'back tick' (`) and exited by pressing escape (Esc). If in a chat type box, commands can be run by starting with a forward slash before the command line, to separate them from actual chat.

Reference

In Engine, commands are divided into sets defined by modules. Some commands are always available by default. Others are only available by setting console context to that module first. In some modules, there can be a default command that gets run if no actual command is specified.

Data module

  • In context by default
  • Default command is 'varedit' if in context

Commands

varedit - (none), / - Prints or sets variable, if variable exists and name is not another command.
var - var, /var - Creates a variable. If already exists, then does not change value.
set - set, /set - Set an existing var. Updates a value on an existing variable if exists.
alias - alias, /alias - New named script. Will change existing alias if already created.
bind - bind, /bind - Key to script. Map a key to a script block.
echo - echo, /echo - Write text to log only. Print text to current console but not the file.
print - print, /print - Write text to log and file. Print text to current console and to file.
context - context, /context - Change context. Change current console context to another known context.
run - run, /run - Load and run script file. Run a named script file. Name must include extension.

Intrinsic vars

Global:

lib_path - './lib/' - Path for native 'world' modules.
base_path - './data/' - Path for content and assets.
module - 'game' - Base name for 'world' module, without platform postfix.
GameDll - (none) - Full path for 'world' module, './lib/gamex86.dll'.
s_use_ai - '1.0' - If world 'AI' processing is enabled.
map - 'maps/base1.bsp' - Full path for default content module.
startup - (none) - Full path of initial startup script.

Assignments

Explicit context name is 'global'
Default log assignment is 'log'
Initial console assignment is 'console'

Render module

Commands

none

Intrinsic vars

Global:

r_width - '900' - Initial main window height.
r_height - '600' - Initial main window width.
r_bpp - '32' - Initial render device color bit depth.
r_fullscreen - (none) - If device full-screen, without window.
r_gamma - '1.0' - Device color gamma correction.
r_vsync - '1.0' - If should render each frame one frame synced with device rate.

Assignments

none