2,113
edits
No edit summary |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{dev|macronav}} | ||
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 is a reference for Engine [[console commands]] available for use a [[chat window]] or other console, and as [[macro commands]] in a [[macro]]. | ||
Line 27: | Line 27: | ||
* Script - May refer to the base Engine script language, which can contain elements here. Or to strings of commands for an alias, or integrated higher-level scripting like blended in-line engine script with lua, JS, or C#. | * Script - May refer to the base Engine script language, which can contain elements here. Or to strings of commands for an alias, or integrated higher-level scripting like blended in-line engine script with lua, JS, or C#. | ||
* Module - An independent static module built into the engine. Modules may create one or more command or script contexts, services or other things. If the module is not available, its commands, variables and contexts won't exist. | * Module - An independent static module built into the engine. Modules may create one or more command or script contexts, services or other things. If the module is not available, its commands, variables and contexts won't exist. | ||
* Log - A text buffer that may or may not have an actual file log attached. The default console is composed of a 'log' and a basic text mode edit box. | |||
== Reference == | == Reference == | ||
Line 42: | Line 43: | ||
: [[CCMD bind|bind]] - bind, /bind - Key to script. Map a key to a script block. | : [[CCMD bind|bind]] - bind, /bind - Key to script. Map a key to a script block. | ||
: [[CCMD echo|echo]] - echo, /echo - Write text to log only. Print text to current console but not the file. | : [[CCMD echo|echo]] - echo, /echo - Write text to log only. Print text to current console but not the file. | ||
: [[CCMD | : [[CCMD print|print]] - print, /print - Write text to log and file. Print text to current console and to file. | ||
: [[CCMD | : [[CCMD context|context]] - context, /context - Change context. Change current console context to another known context. | ||
: [[CCMD | : [[CCMD run|run]] - run, /run - Load and run script file. Run a named script file. Name must include extension. | ||
Global vars: | Global vars: | ||
: [[CVAR lib_path|lib_path]] - './lib/' - Path for native 'world' | : [[CVAR lib_path|lib_path]] - './lib/' - Path for native 'world' libraries. | ||
: [[CVAR base_path|base_path]] - './data/' - Path for content and assets. | : [[CVAR base_path|base_path]] - './data/' - Path for content and assets. | ||
: [[CVAR module|module]] - 'game' - Base name for 'world' module, without platform postfix. | : [[CVAR module|module]] - 'game' - Base name for 'world' module, without platform postfix. | ||
Line 77: | Line 78: | ||
Assignments: | Assignments: | ||
: Explicit context name is 'lua' reachable through 'global' | : Explicit context name is 'lua' reachable through 'global' | ||
: | : Default reachable contexts: none. See 'exit' command | ||
: Optional reachable contexts: none | |||
: Default self-reference context: 'lua' | |||
: Does not inherit 'global' context | |||
Lua context commands: | Lua context commands: | ||
Line 84: | Line 88: | ||
: [[CCMD lua.block|block]] - lua run - Runs a Lua command block in the Lua runtime | : [[CCMD lua.block|block]] - lua run - Runs a Lua command block in the Lua runtime | ||
: [[CCMD lua.exit|exit]] - lua exit - Immediately switches current context to 'global' | : [[CCMD lua.exit|exit]] - lua exit - Immediately switches current context to 'global' | ||
Lua context variables: | |||
: none | |||
Lua context aliases: | Lua context aliases: | ||
: none | : none | ||
Lua functions placed in a Lua runtime by the lua context: | |||
: [[CLUA script|script]] - Runs an engine script from the Lua runtime. | |||
: [[CLUA require|require]] - Loads and runs lua text file asset from engine data. | |||
=== Msg module === | === Msg module === |