"this is multiple words argument" as an single argument instead of being splitted to multiple argumentclear or it alias cls
alias (set/map) [old] [new] or alias [old] [new]
alias set view_cam vcam now you can type vcam and it work as if you are using view_camalias (rem/remove/rm) [new]
alias rem vcam vcam will no longer workalias (clear/reset)
alias clear vcam and anything mapped before this point will now no longer workalias load [filename]
alias clear before loading the new file)alias load promax now any of pre-defined alias will work just like you manually typing alias setalias (gen/generate) [filename]
alias load, the generated file will include all of currently alias'ed commandalias gen promax will create a "PROMAX.txt" file at GAME_ROOT directory for use with alias loadThe alias text file is a simple text file that are follow the [block][separator?] format
[block]: a text section contain [old command]<space>[new command], within this block everything after [new command]<space> are ignored
[separator?]: is either a newline \n or a comma ,
E.g:
view_cams vcam <= ( [block] = view_cams vcam; [separator?] = \n )
shop s this is a comment and will be ignored
list_bulkhead ldoor -- this is also a comment and also ignored (including --)
list_cam lcam, open_bulkhead open -- this comma is valid
close_bulkhead close,minimap mmap -- also valid
SubTerminalEX.xml for more information and latest documentation (documentation here can be outdated at anytime) public static IEnumerator OnExecuteA(List<string> _){} // command has no argument so you can safely ignore the argument passed in
public static IEnumerator OnExecuteB(List<string> args) {} // command has argument, and are listed by the order they typed in
public static IEnumerator newMinimap(List<string> args) {} // when minimap is executed this method will run instead of the original method
public static void OnExecuteHook(List<string> args) {} // this method will run after route_to is executed, all argument passed in are exactly like the original command
// way 1 - for command have no argument
TerminalCommandManager.AddNoArgumentCommand("play", OnExecuteA);
// way 2 - for command that have argument
TerminalCommandManager.AddCommand("reset", OnExecuteB);
// override command (from other mods or vanilla)
TerminalCommandManager.OverrideCommand("minimap", newMinimap);
// extra: you can create your own alias too for mods that want to add alias for their own command
// note that alias created this way cant be deleted by user "alias remove" (can be changed)
TerminalCommandManager.AliasCommand("base_command", "new_alias");
// extra 2: you can now hook the desired command instead of override and then use hacks to run the original command!
TerminalCommandManager.HookCommand("route_to", OnExecuteHook, STEHookPriority.Default, STEHookTarget.Default);
TerminalCommandManager.HookCommand("route_to", OnExecuteHook, 69, STEHookTarget.Default);
// There is no checking done in the "background", so you can remove thing like this and make the game completely unplayable...
TerminalCommandManager.RemoveCommand("leave_checkpoint")
MIT License
Copyright (c) 2024 Nguyen Anh Tri
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.