Closed SnowSzn closed 1 year ago
it is possible to implement that you said.
I tried executing game.exe with the "debug" argument like start '.\Game.exe' "debug" but still nothing happens, so it seems this feature was added for RPG Maker VX Ace and won't work for RGP Maker XP.
To use the console window in the RPG Maker XP, You must use third party script for Console Window that includes the function AllocConsole.
For instance, https://github.com/biud436/RGSS3/blob/master/XP/RS_ConsoleForRMXP.rb
I am an RPG Maker XP user. Thank you for your wonderful plugin! It was very helpful!
By doing the following, I was able to start in debug mode of RPG Maker XP.
makeCommand() {
this._args = ["debug"];
}
Thank you for your consideration.
@SirenSingsCurse thank you. I will try
Hi there!
Could you considerate implementing support for the native RPG Maker VX Ace console?
In RPG Maker VX Ace editor, when testing the project, game.exe process is created and this one allocates its own console (if user desires to by activating an option in the editor) and modifies the Ruby standard output and standard error. It also activates the
$TEST
flag (this flag is used to call the in-game debug scene to modify variables and switches).In the public version of the extension, the game only runs in normal mode (without
$TEST
flag activated) and using the VSCode extension's output channel as the standard output.It would be amazing if you could allow the user to decide whether to use the VSCode or let the game allocates its console, because in my case it seems there are problems when it comes to show the debug messages to the VSCode output, probably the contents are not flushed to VSCode therefore messages are not displayed the moment they are written to the active output.
RPG Maker VX Ace games support two command-line arguments to do this:
console
: The process allocates its own consoletest
: The process will set the global variable$TEST
totrue
You can test this by simply setting the working directory to the game's folder and running
start '.\Game.exe' "console test"
in shell. If done correctly you will be able to press F9 key to call the in-game debug scene when playing the game.Since
(property) GamePlayService._args: any[]
is available it could be used to determine whether a console should be allocated or not. I modified this method in "TestGamePlay.js" to allow the process allocate a console for testing and it works nice.As far as I know, this always works for RPG Maker VX Ace projects, but for RPG Maker XP it is different since it does not support console allocation so
console
argument will always be ignored. I tried runningstart '.\Game.exe' "test"
with a RPG Maker XP project and it seems thattest
command does not work neither. I used Process Explorer by Microsoft to analyze the game.exe strings and found a "debug" string.I tried executing game.exe with the "debug" argument like
start '.\Game.exe' "debug"
but still nothing happens, so it seems this feature was added for RPG Maker VX Ace and won't work for RGP Maker XP.To implement this method, the generated file:
rgss-compiler.json
could be used to add a new key->value and determine whether to use VSCode console or let the game allocate its own console, something like:"VXAceConsole": true
You can also use the rgssVersion key ("rgssVersion":"RGSS3"
) to determine whether allocating a console window is supported based on the editor used (RPG Maker XP/RPG Maker VX Ace) or not.For the
test
argument, I think it won't need an option on the JSON because test play should always run with that option enabled. But if desirable, you could create two separate commandsRun Game (Normal Mode)
andRun Game (Test Mode)
and alternate the use oftest
argument between these two commands or just add another key->value pair inrgss-compiler.json
like:"testMode": true
.