User Tools

Site Tools


development:technical-details:patches:maniac:new-maniac-commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:technical-details:patches:maniac:new-maniac-commands [2026/10/06 14:29] – [Camera Position] carbonaradevelopment:technical-details:patches:maniac:new-maniac-commands [2026/10/09 16:52] (current) – [Zoom Screen] carbonara
Line 59: Line 59:
 ===== Save ===== ===== Save =====
  
-//Player status: Supported //✅//; Inaccuracies: Store Result is not set to 0 when failing, see [[https://github.com/EasyRPG/Player/issues/3056|EasyRPG Player issue #3056]]//+//Player status: Supported //✅//; Inaccuracies: Store Result is not set to 0 when failing, see [[https://github.com/EasyRPG/Player/issues/3056|EasyRPG Player issue #3056]], lack of file output limit//
  
 The Save command (セーブの実行) allows to directly save on a requested save slot without using the save menu. The Save command (セーブの実行) allows to directly save on a requested save slot without using the save menu.
Line 66: Line 66:
   * Save Index: Save slot ID that will be used for the save file. The ID to use can either be a constant or the value of a variable. The range of valid save slots is [1;2147483647], attempting to write a save file with a null or negative ID will fail.   * Save Index: Save slot ID that will be used for the save file. The ID to use can either be a constant or the value of a variable. The range of valid save slots is [1;2147483647], attempting to write a save file with a null or negative ID will fail.
   * Store Result (Optional): Variable that should receive a value when the save file is written. If the save succeeds, the value written will be 1. Otherwise, the value written will be 0. As this value is written at the same time than the save file, and that it is not kept in the save file, the selected variable will be kept unaltered if the save file is loaded.   * Store Result (Optional): Variable that should receive a value when the save file is written. If the save succeeds, the value written will be 1. Otherwise, the value written will be 0. As this value is written at the same time than the save file, and that it is not kept in the save file, the selected variable will be kept unaltered if the save file is loaded.
 +
 +Notes:
 +  * Output saves are subject to the file output limit of the patch (not more than ~3 file writing per second): if the file output limit is reached, the [[modified-maniac-commands#file-output-is-available|Conditional Branch: File output is available]] will be reported as false until it becomes possible again to write files.
  
 It can be written as follow with the common TPC syntax: <code>@save[1].save .res v[2]</code> It can be written as follow with the common TPC syntax: <code>@save[1].save .res v[2]</code>
Line 181: Line 184:
  
 ===== Show String Picture ===== ===== Show String Picture =====
 +
 +FIXME
  
 ===== Get Picture Info ===== ===== Get Picture Info =====
 +
 +FIXME
  
 ===== Control Battle ===== ===== Control Battle =====
 +
 +FIXME
  
 ===== Control ATB Gauge ===== ===== Control ATB Gauge =====
 +
 +FIXME
  
 ===== Change Battle Command EX ===== ===== Change Battle Command EX =====
 +
 +FIXME
  
 ===== Get Battle Info ===== ===== Get Battle Info =====
 +
 +FIXME
  
 ===== Control Variable Array ===== ===== Control Variable Array =====
 +
 +FIXME
  
 ===== Key Input Processing EX ===== ===== Key Input Processing EX =====
 +
 +FIXME
  
 ===== Rewrite Map ===== ===== Rewrite Map =====
 +
 +FIXME
  
 ===== Control Shared Save ===== ===== Control Shared Save =====
 +
 +//Player status: Supported //✅//; Global save status is set to be opened on boot if it exists, no file output limit.//
 +
 +The Control Shared Save command (共有セーブの操作, known as Control Global Save in previous versions) allows to save switches and variables in a file named ''Save.lgs'', that will be able to be read and written while playing from any save file.
 +
 +When using the command, there are two different global save locations that need to be distinguished:
 +  * The **global save**, which consists of the area where the data is temporarily written in memory and altered by the various functions of the command.
 +  * The ''Save.lgs'' file, which is the actual file written in the game folder that can be read and written on. It will always be referred as ''Save.lgs'' in the documentation of this command to avoid confusion with the global save.
 +
 +Additionally, the global save can have two statuses, opened and closed:
 +  * If set to opened, and that the game is closed either by the user or by using the Exit Game command, the content of the global save will be copied to the ''Save.lgs'' file.
 +    * The ''Save.lgs'' file will not be updated if the game is forcefully closed by e.g. the Task Manager, or if a major game crash occurs (simple error messages from the engine properly write data).
 +  * If set to closed, exiting the game will not alter the ''Save.lgs'' file.
 +
 +Notes:
 +  * The file ''Save.lgs'' is stored at the root of the game folder.
 +  * Upon game boot or game reset, the content of the ''Save.lgs'' file is copied to the global save, and the global save status is set to closed.
 +  * The output ''Save.lgs'' file is subject to the file output limit of the patch (not more than ~3 file writing per second): if the file output limit is reached, the [[modified-maniac-commands#file-output-is-available|Conditional Branch: File output is available]] will be reported as false until it becomes possible again to write files.
 +
 +==== Open ====
 +
 +By using **Open**, the global save status will be set to opened.
 +
 +Common TPC syntax: <code>@gsave.open</code>
 +
 +Raw writing: <code>3016, "", 0</code>
 +
 +==== Close ====
 +
 +By using **Close**, the content of the ''Save.lgs'' file will be copied to the global save, and the global save status will be set to closed.
 +
 +Common TPC syntax: <code>@gsave.close</code>
 +
 +Raw writing: <code>3016, "", 1</code>
 +
 +==== Save ====
 +
 +By using **Save**, the content of the global save will be written on the ''Save.lgs'' file.
 +
 +Notes:
 +  * The opened/closed status of the global save does not matter for saving.
 +
 +Common TPC syntax: <code>@gsave.save</code>
 +
 +Raw writing: <code>3016, "", 2</code>
 +
 +==== Save then Close ====
 +
 +By using **Save then Close**, the content of the global save will be written on the ''Save.lgs'' file, and the global save status will be set to closed.
 +
 +Notes:
 +  * The opened/closed status of the global save does not matter for saving.
 +
 +Common TPC syntax: <code>@gsave.saveAndClose</code>
 +
 +Raw writing: <code>3016, "", 3</code>
 +
 +==== Copy from Global Save ====
 +
 +**Copy from Global Save** allows to copy values from the global save to switches and variables.
 +
 +The command has the following fields:
 +  * Type: Whether switches or variables should be copied.
 +  * Current Save Data: Position of the first switch or variable ID should receive the values from the global save, with the possility to use a constant or variable for the ID.
 +  * Global Save Data: Position of the first switch or variable in the global save that should be copied, with the possility to use a constant or variable for the ID.
 +  * Size: How many values should be copied, with the possibility to use a constant, variable or variable redirection.
 +
 +Notes:
 +  * Switches and variables do not share their slot allocations, so you can use the same slot numbers without conflict.
 +  * Using the command will set the global save status to opened.
 +  * Using a null or negative size will not copy any value.
 +
 +Common TPC syntax for switches: <code>gs[2].copyTo s[1], 3</code>
 +Common TPC syntax for variables: <code>gv[2].copyTo v[1], 3</code>
 +
 +Where:
 +  * ''1'' corresponds to the position of the wanted value in the game data, with the possibility to use a constant or variable.
 +  * ''2'' corresponds to the position of the wanted value in the global save, with the possibility to use a constant or variable.
 +  * ''3'' corresponds to the size of the array, with the possibility to use a constant, variable or variable redirection.
 +
 +Raw writing: <code>3016, "", 4, b, c, d, e, f</code>
 +  * ''3016'': Command code
 +  * ''b'': Defines if the values to use are constants, variables or variable redirections:
 +    * ''+1'' if the current game data position to use should be a variable.
 +    * ''+16'' if the global save position to use should be a variable.
 +    * ''+256'' if the size to use should be a variable.
 +    * ''+512'' if the size to use should be a variable redirection.
 +  * ''c'': Whether the type to use should be switches (0) or variables (1).
 +  * ''d'': Value to use for the current game data position.
 +  * ''e'': Value to use for the global save position.
 +  * ''f'': Value to use for the size.
 +
 +==== Copy to Global Save ====
 +
 +**Copy to Global Save** allows to copy switches and variables to the global save.
 +
 +The command has the following fields:
 +  * Type: Whether switches or variables should be copied.
 +  * Current Save Data: Position of the first switch or variable ID that should be copied to the global save, with the possility to use a constant or variable for the ID.
 +  * Global Save Data: Position of the first switch or variable in the global save that should be written to, with the possility to use a constant or variable for the ID.
 +  * Size: How many values should be copied, with the possibility to use a constant, variable or variable redirection.
 +
 +Notes:
 +  * Switches and variables do not share their slot allocations, so you can use the same slot numbers without conflict.
 +  * Using the command will set the global save status to opened.
 +  * Using a null or negative size will not copy any value.
 +
 +Common TPC syntax for switches: <code>gs[2].copyFrom s[1], 3</code>
 +Common TPC syntax for variables: <code>gv[2].copyFrom v[1], 3</code>
 +
 +Where:
 +  * ''1'' corresponds to the position of the wanted value in the game data, with the possibility to use a constant or variable.
 +  * ''2'' corresponds to the position of the wanted value in the global save, with the possibility to use a constant or variable.
 +  * ''3'' corresponds to the size of the array, with the possibility to use a constant, variable or variable redirection.
 +
 +Raw writing: <code>3016, "", 5, b, c, d, e, f</code>
 +  * ''3016'': Command code
 +  * ''b'': Defines if the values to use are constants, variables or variable redirections:
 +    * ''+1'' if the current game data position to use should be a variable.
 +    * ''+16'' if the global save position to use should be a variable.
 +    * ''+256'' if the size to use should be a variable.
 +    * ''+512'' if the size to use should be a variable redirection.
 +  * ''c'': Whether the type to use should be switches (0) or variables (1).
 +  * ''d'': Value to use for the current game data position.
 +  * ''e'': Value to use for the global save position.
 +  * ''f'': Value to use for the size.
  
 ===== Set Picture ID ===== ===== Set Picture ID =====
 +
 +FIXME
  
 ===== Set Game Option ===== ===== Set Game Option =====
Line 408: Line 557:
  
 ===== Call Command ===== ===== Call Command =====
 +
 +FIXME
  
 ===== Control String Variables ===== ===== Control String Variables =====
  
 ⚠️// This command is not directly accessible through the Maniac editor, and requires using the community plugin, TPC, raw writing or another tool.// ⚠️// This command is not directly accessible through the Maniac editor, and requires using the community plugin, TPC, raw writing or another tool.//
 +
 +FIXME
  
 ===== Get Game Info ===== ===== Get Game Info =====
Line 665: Line 818:
 ==== Camera Position ==== ==== Camera Position ====
  
-//Player status: Partial support //ℹ️//; Coordinates on looping maps for the edges are incorrectly reported, see [[https://github.com/EasyRPG/Player/issues/3665|EasyRPG Player issue #3665]]//+//Player status: Supported //✅//; Coordinates on looping maps for the edges are incorrectly reported, see [[https://github.com/EasyRPG/Player/issues/3665|EasyRPG Player issue #3665]]//
  
 **Camera Position** allows to retrieve the position of the camera. The position of the camera retrieved corresponds to the top-left corner pixel of the screen compared to the map placement. **Camera Position** allows to retrieve the position of the camera. The position of the camera retrieved corresponds to the top-left corner pixel of the screen compared to the map placement.
Line 683: Line 836:
  
 ==== Screen Shake Value ==== ==== Screen Shake Value ====
 +
 +//Player status: Supported //✅
  
 **Screen Shake Value** allows to retrieve by how many pixels the screen was shifted on the left by the Shake Screen command. **Screen Shake Value** allows to retrieve by how many pixels the screen was shifted on the left by the Shake Screen command.
Line 695: Line 850:
  
 ==== Current BGM ==== ==== Current BGM ====
 +
 +//Player status: Supported //✅
  
 **Current BGM** allows to retrieve the infos of the current music. **Current BGM** allows to retrieve the infos of the current music.
Line 717: Line 874:
  
 ===== Edit Picture ===== ===== Edit Picture =====
 +
 +FIXME
  
 ===== Output Image ===== ===== Output Image =====
Line 733: Line 892:
   * If a picture is currently being displayed and that its source file gets overwritten, the picture displayed will not change, and attempting to display another picture pulled from the same source file will display the new picture using the same display than the currently displayed picture, as its graphic will be pulled from the picture list.   * If a picture is currently being displayed and that its source file gets overwritten, the picture displayed will not change, and attempting to display another picture pulled from the same source file will display the new picture using the same display than the currently displayed picture, as its graphic will be pulled from the picture list.
     * Edited pictures through the Edit Picture or Edit Picture (Tile) commands no longer point to their original picture file, so they are not subject to this point. In the case of Edit Picture, it will work as long as the selected picture ID was targeted independently if pixels were actually written.     * Edited pictures through the Edit Picture or Edit Picture (Tile) commands no longer point to their original picture file, so they are not subject to this point. In the case of Edit Picture, it will work as long as the selected picture ID was targeted independently if pixels were actually written.
-  * Output pictures are subject to the file output limit of the patch (not more than ~4 file writing per second): if the file output limit is reached, the Conditional Branch: File output is available will be reported as true until it becomes possible again to write files.+  * Output pictures are subject to the file output limit of the patch (not more than ~3 file writing per second): if the file output limit is reached, the [[modified-maniac-commands#file-output-is-available|Conditional Branch: File output is available]] will be reported as false until it becomes possible again to write files.
  
 ==== Game Screen ==== ==== Game Screen ====
Line 792: Line 951:
   * ''e'': Whether picture effects should not be applied (0) or be applied (1).   * ''e'': Whether picture effects should not be applied (0) or be applied (1).
 ===== Add Move Route ===== ===== Add Move Route =====
 +
 +FIXME
  
 ===== Edit Picture (Tile) ===== ===== Edit Picture (Tile) =====
  
 //Player status: Unsupported// ❌ //Player status: Unsupported// ❌
 +
 +FIXME
  
 ===== Control Message ===== ===== Control Message =====
  
 //Player status: Unsupported// ❌ //Player status: Unsupported// ❌
 +
 +FIXME
  
 ===== Script ===== ===== Script =====
  
 //Player status: Unsupported// ❌ //Player status: Unsupported// ❌
 +
 +The Script command (スクリプト) allows to execute JavaScript code.
 +
 +The Maniac Patch executable comes bundled with [[https://bellard.org/quickjs/|QuickJS Javascript Engine]] to be able to execute JavaScript code, and as such follows its [[https://bellard.org/quickjs/quickjs.pdf|syntax and features]]. Note that the os and std functions are not present in the Maniac Patch implementation of QuickJS, due to their potential dangerous use.
 +
 +Additionally, the following JavaScript commands can be used to alter switches, variables and string variables:
 +  * <code>s[123] = 1</code> to alter the status of a switch (here, 123), with 0 to set it OFF and 1 to set it ON. The switch ID can be replaced by a variable (''s[v[123]]'').
 +  * <code>v[123] = 456</code> to change the value of a variable (here, 123 being set to 456). The variable ID can be replaced by a variable (''v[v[123]]'').
 +  * <code>t[123] = 'hello'</code> to change the text of a string variable (here, 123 being set to hello). The string variable ID can be replaced by a variable (''t[v[123]]'').
 +
 +The command has the following fields:
 +  * Source Text: Code to execute, with the possibility to have it come from the command, from a string variable or from a string variable redirection.
 +  * Variable that receive return value: Switches, switch redirections, variables, variable redirections, string variables and/or string variable redirections that should receive output values from the executed code, with as many output values as wanted. For instance, if you only execute the code ''[1, "a", 2]'' and that you set the output to be switch 10, string variable 20 and variable 30, the switch 10 will receive the value ON, the string variable 20 the value a and the variable 30 the value 2.
 +
 +FIXME //Provide more examples and info on using JavaScript and making it communicate with the engine.//
 +
 +Notes:
 +  * If a command with an incorrect syntax is executed, the console will be opened and will display an error highlighting the syntax issue. This does not halt the game.
 +
 +Internally, the command comes with two different command codes, ''3030'' and ''3031'', with ''3030'' used for the first line of a script and ''3031'' used for the next lines of a same script. This is similar to the Show Text and Comment commands, where their first line and their other lines use different command codes. Using ''3031'' commands without starting with a ''3030'' command first will not do anything.
 +
 +TPC only offers editing the first command code: the second command code is impossible to edit through the Maniac Patch or TPC, and can only be deleted.
 +
 +TPC syntax of the first command code: <code>@js [s[1], s[v[2]], v[3], v[v[4]], t[5], t[v[[6]]] .run "code"</code>
 +
 +Where:
 +  * ''code'' corresponds to the JS code to execute, with the possibility to replace it by a string variable or string variable redirection.
 +  * <code>''[s[1], s[v[2]], v[3], v[v[4]], t[5], t[v[[6]]]</code> corresponds to the variables that should receive any output values. It is possible to set none by removing the brackets entirely.
 +
 +Raw writing for the command code 3030: <code>3030, "code", a, b, 0, 0, e, f, g</code>
 +  * ''code'': If the code is set to come from the command, code to execute.
 +  * ''a'': Whether the code to use should come directly from the command (0), from a string variable (1) or from a redirection of string variable (2).
 +  * ''b'': If the code does not come from the command, value to use for the code.
 +  * ''e'': How many values should be set as outputs.
 +  * ''f'': Type of the selected output:
 +    * ''0'': Switch
 +    * ''1'': Switch redirection
 +    * ''2'': Variable
 +    * ''3'': Variable redirection
 +    * ''4'': String variable
 +    * ''5'': String variable redirection
 +  * ''g'': Value to use for the selected output.
 +
 +The values ''f'' and ''g'' are repeated up until the number of selected outputs.
 +
 +Raw writing for the command code 3031: <code>3031, "code"</code>
 +  * ''3031'': Command code
 +  * ''code'': JavaScript code to execute.
  
 ===== Zoom Screen ===== ===== Zoom Screen =====
Line 835: Line 1048:
   * Setting the Scale to a value above 24000 will not do any zoom.   * Setting the Scale to a value above 24000 will not do any zoom.
   * If the layer is set to a value not on the [1;10] range, no zoom will occur.   * If the layer is set to a value not on the [1;10] range, no zoom will occur.
 +  * The zoom only affects the overworld, it does not affect battles and menus.
   * The zoom properties are kept in the save file.   * The zoom properties are kept in the save file.
  
Line 849: Line 1063:
 Raw writing: <code>3032, "", a, b, c, d, e, f, g</code> Raw writing: <code>3032, "", a, b, c, d, e, f, g</code>
   * ''3032'': Command code   * ''3032'': Command code
-  * ''a'': Defines if the the values to use are constants, variables or variable redirections:+  * ''a'': Defines if the values to use are constants, variables or variable redirections:
     * ''+1'' if the Center X to use should be a variable.     * ''+1'' if the Center X to use should be a variable.
     * ''+2'' if the Center X to use should be a variable redirection.     * ''+2'' if the Center X to use should be a variable redirection.
Line 870: Line 1084:
  
 //Player status: Unsupported// ❌ //Player status: Unsupported// ❌
 +
 +The Console command (コンソール) allows to open a console in an external window, display text in it and allows the player to type text through it.
 +
 +Notes:
 +  * If the console is opened while the game is in window mode, the console will be opened by trying to not cover the area of the game screen.
 +  * If the console is opened while the game is in fullscreen, the console will be opened behind the game screen.
 +  * If this console is attempted to be manually closed by the user, the game will also be closed.
 +  * Resetting the game will close the console.
 +  * The console status is not stored in the save file, and loading a save file will not alter the state of the console.
 +  * The console is also used by the Script command: if the JS formatting is incorrect, the console will be opened and will display an error about the formatting.
 +
 +==== Open ====
 +
 +**Open** opens the console window. If the console was already opened, nothing will happen.
 +
 +Common TPC syntax: <code>@console .open</code>
 +
 +Raw writing: <code>3033, "", 0, 0</code>
 +
 +==== Close ====
 +
 +**Close** closes the console window. All text output and input of the console will be cleared, and the colours for the console will be reset. If the console was already closed, nothing will happen.
 +
 +Common TPC syntax: <code>@console .close</code>
 +
 +Raw writing: <code>3033, "", 0, 1</code>
 +
 +==== Output ====
 +
 +**Output** allows to display text in the console. If the console was closed, it will be opened prior to outputting text.
 +
 +The command has the following fields:
 +  * Output Text: Text that should be output in the console, with the possibility to define it as part of the command, or use a string variable or string variable redirection.
 +  * Extract Text: If ticked, the text markers ''\v[0]'', ''\n[0]'', ''\t[0]'', ''\SelfV[0]'', ''\SelfT[0]'' will be able to be used in messages.
 +  * Hex: If Extract Text and Hex are both ticked, values displayed using a variable or self variable text marker will be converted to the hexadecimal format (alphabet characters are in lower case).
 +  * Disable Linebreak: If ticked, the message that will be output will lack a linejump at its end, meaning that if another message is output after it, it will be displayed on the same line.
 +
 +Notes:
 +  * Other text markers than those mentioned in the Extract Text section as well as ExFont characters cannot be used in the console, and will be interpreted as pure text.
 +  * If Extract Text is enabled and that an invalid actor is attempted to be displayed, an error will be displayed forcing the game to close.
 +
 +TPC syntax: <code>@console .out "string" .extract .hex .nolb</code>
 +
 +Where:
 +  * ''string'' corresponds to the text to output, with the possibility to either use text, a string variable or a string variable redirection.
 +  * ''.extract'' corresponds to the Extract Text Parameter. If omitted, it will not be set.
 +  * ''.hex'' corresponds to the Hex Parameter. If omitted, it will not be set.
 +  * ''.nolb'' corresponds to the Disable Linebreak Parameter. If omitted, it will not be set.
 +
 +Raw writing: <code>3033, "string", a, 4, c, d</code>
 +  * ''3033'': Command code
 +  * ''string'': If the string to display is set to come from the command, text to output.
 +  * ''a'': Defines if the values to use are constants, variables or variable redirections:
 +    * ''+256'' if the string to use should be a string variable.
 +    * ''+512'' if the string to use should be a string variable redirection.
 +  * ''c'': Defines which parameters should be applied:
 +    * ''+1'' if Extract Text should be applied.
 +    * ''+2'' if Hex should be applied.
 +    * ''+4'' if Disable Linebreak should be applied.
 +  * ''d'': If the string to use is a string variable or string variable redirection, ID of the string variable.
 +
 +==== Input ====
 +
 +**Input** puts the game on hold and asks the player to type in the console. If the console was closed, it will be opened prior to the text input.
 +
 +The command has the following fields:
 +  * Variable that receive input text: String variable that should receive the text input by the user, with the possibility to use a string variable or string variable redirection.
 +  * Maximum length of input text: How many characters can be typed by the user, with the possibility to use a constant, variable or variable redirection.
 +  * Extract Text: If ticked, typing the text markers ''\v[0]'', ''\n[0]'', ''\t[0]'', ''\SelfV[0]'', ''\SelfT[0]'' will convert those to their values before being sent to the string variable.
 +  * Hex: If Extract Text and Hex are both ticked, values from variables and self variables text markers will be converted to the hexadecimal format (alphabet characters are in lower case).
 +
 +Notes:
 +  * The game will be put on hold until the Enter key is pressed.
 +  * Setting the maximum length of input text to a null or negative value will not put any length limit.
 +  * The maximum length of input text seems to be offset by -2, for some reason: for instance, if you want to set the limit to 26 characters, you will need to set it to 28.
 +    * Due to this issue, setting the maximum length to 2 will make the string variable not receive anything, due to the actual limit being set to 0, while setting it to 1 will lead to an error display forcing the game to close (as the game will try to actually set the limit to -1).
 +  * Text input in the console is actually tracked whenever text is typed in the console, not just when Input is in use:
 +    * Typing text before using Input will actually be added to the next input text, with the possibility for the user to erase the previously written text (except any Enter key press).
 + * Text written past the character limit will be able to be used for a next Input, it is not lost.
 + * As Input waits for the Enter key to be pressed and that keys are tracked outside of the Input sequence, any Enter key press will be registered as a different text input that should be used the next time Input is used.
 +  * Other text markers than those mentioned in the Extract Text section as well as ExFont characters will be interpreted as pure text.
 +  * If Extract Text is enabled and that an invalid actor is typed, an error will be displayed forcing the game to close.
 +
 +TPC syntax: <code>@console .in t[1] .max 2 .extract .hex</code>
 +
 +Where:
 +  * ''t[1]'' corresponds to the string variable that should receive input text, with the possibility to use a string variable or string variable redirection.
 +  * ''2'' corresponds to the maximum length, with the possibility to use a constant, variable or variable redirection.
 +  * ''.extract'' corresponds to the Extract Text Parameter. If omitted, it will not be set.
 +  * ''.hex'' corresponds to the Hex Parameter. If omitted, it will not be set.
 +
 +Raw writing: <code>3033, "", a, 3, c, d, e</code>
 +  * ''3033'': Command code
 +  * ''a'': Defines if the values to use are constants, variables or variable redirections:
 +    * ''+256'' if the string variable that should receive the input should be a string variable redirection.
 +    * ''+4096'' if the maximum text length to use should be a variable.
 +    * ''+8192'' if the maximum text length to use should be a variable redirection.
 +  * ''c'': Defines which parameters should be applied:
 +    * ''+1'' if Extract Text should be applied.
 +    * ''+2'' if Hex should be applied.
 +  * ''d'': Value to use for the string variable that should receive input.
 +  * ''e'': Value to use for the maximum text length.
 +
 +==== Set Text Color ====
 +
 +**Set Text Color** allows to change the colours used for the text and text background for the next text that will be displayed by the console. If the console was closed, it will be opened prior to changing the text colour.
 +
 +The command has the following fields:
 +  * Change Foreground Color: If ticked, the colour of the text will be changed according to the selected foreground colour value.
 +  * Change Background Color: If ticked, the background colour of the text will be changed according to the selected background colour value.
 +  * Foreground Color: Colour of the text to use, with the possibility to use a constant, variable or variable redirection.
 +  * Background Color: Background colour to use, with the possibility to use a constant, variable or variable redirection.
 +
 +Notes:
 +  * The following values can be used to select colours:
 +    * ''0'': Black
 +    * ''1'': Blue
 +    * ''2'': Green
 +    * ''3'': Aqua
 +    * ''4'': Red
 +    * ''5'': Purple
 +    * ''6'': Yellow
 +    * ''7'': White
 +    * ''8'': Gray
 +    * ''9'': Light blue
 +    * ''10'': Light green
 +    * ''11'': Light aqua
 +    * ''12'': Light red
 +    * ''13'': Light purple
 +    * ''14'': Light yellow
 +    * ''15'': Bright white
 +  * The selected colour is processed on 4-bit: as such, any value outside of the [0;15] range will loop back to be on said range.
 +  * The default text colour is White while the default background colour is Black.
 +
 +When not using constants, the TPC syntax is <code>@console .setColor .front v[1] .back v[2]</code>, where ''v[1]'' corresponds to the foreground colour and ''v[2]'' to the background colour, with the possibility to replace both by variable redirections, as well as removing entirely the ''.front'' or ''.back'' argument if you do not want to set a foreground or background colour.
 +
 +If you are using constants, the TPC syntax is <code>@console .setColor .front (.blue, .green, .red, .emph) .back (.blue, .green, .red, .emph)</code>, where the content in brackets defines the colour as a combination of a blue, green, red and intensity value, with the possibility to removing entirely the ''.front'' or ''.back'' argument if you do not want to set a foreground or background colour.
 +
 +Raw writing: <code>3033, "", a, 4, c, d, e</code>
 +  * ''3033'': Command code
 +  * ''a'': Defines if the values to use are constants, variables or variable redirections:
 +    * ''+256'' if the Foreground Color to use should be a variable.
 +    * ''+512'' if the Foreground Color to use should be a variable redirection.
 +    * ''+4096'' if the Background Color to use should be a variable.
 +    * ''+8192'' if the Background Color to use should be a variable redirection.
 +  * ''c'': Defines which elements should have their colour changed:
 +    * ''+8'' if the text should have its colour changed.
 +    * ''+16'' if the background colour should change.
 +  * ''d'': Value to use for the Foreground Color.
 +  * ''e'': Value to use for the Background Color.
  
 ===== Control Self Variable ===== ===== Control Self Variable =====
Line 876: Line 1240:
  
 //Player status: Unsupported// ❌ //Player status: Unsupported// ❌
 +
 +FIXME
  
 ===== Change Troop Member ===== ===== Change Troop Member =====
  
 ⚠️// This command was added in development versions of the editor, and is as such not available in public versions, in addition to lacking a common TPC writing.// ⚠️// This command was added in development versions of the editor, and is as such not available in public versions, in addition to lacking a common TPC writing.//
 +
 +FIXME
  
 ===== Control Media Option ===== ===== Control Media Option =====
development/technical-details/patches/maniac/new-maniac-commands.1791296941.txt.gz · Last modified: by carbonara