In VSCode, open the C:\Games\AliceSoft\戦国ランス folder.
Open the command palette (Ctrl+Shift+P or F1), type system4, and select System4: Decompile.
Decompiled source files will be saved in the src folder, and the extension will automatically open a .jaf file.
Compiling
Once you have decompiled the game, you can edit the source files and compile them back into .ain files.
Edit .jaf source files as you like.
When you are done, press Ctrl+Shift+B (the shortcut for the "Run Build Task" command).
Select system4: compile from the list. This will overwrite the original .ain file.
Debugging
Make sure a debug_info.json file exists in the src folder. The System4: Decompile and system4: compile commands generate this file automatically.
Open a .jaf file and press F5 to start debugging.
On Windows, if you haven't installed xsystem4, the extension will prompt you to download and install it. It will be installed in an xsystem4-<version> folder in the workspace root.
The game will start in a new xsystem4 window. You can pause execution, step through code, and set breakpoints in the VSCode window.
Configuration
You can customize the extension's behavior with the following settings:
system4.xsystem4Path: Path to the xsystem4 executable. If not set, the extension searches for xsystem4*\xsystem4.exe in the workspace folder on Windows.
system4.sys4langPath: Directory containing the sys4c, sys4dc, and sys4lsp executables. On Windows, this path takes precedence over the bundled version.