About Starting KiriKiri

To start KiriKiri and specify a script, you usually need to determine the Project Folder (see Storage System).
There are several ways to determine the project folder, prioritized in the order listed below (the first applicable one is used).
For options passed to KiriKiri at startup, see Command Line Options.

Project Folder Determination Order

Folder or Archive Specified on the Command Line
If a folder is specified as a command line argument, it is treated as the project folder and executed.
If an XP3 archive is specified as a command line argument, it is assumed to contain the project folder and is executed.
While you can specify files or folders from the command prompt, the easiest way is to drop the project folder or file onto the KiriKiri executable icon in Explorer or an "Open" dialog.
It is also convenient to place a shortcut on the desktop with a specific project folder specified as an argument to the KiriKiri executable.
content-data folder in the same location as the executable
If a folder named "content-data" exists in the same location as the executable, it is treated as the project folder and executed.
"data.xp3" file in the same location as the executable
If an archive file named data.xp3 exists in the same location as the executable, it is treated as an XP3 archive containing the project folder and is executed.
data folder in the same location as the executable
If a folder named "data" exists in the same location as the executable, it is treated as the project folder and executed.

If the folder cannot be determined by any of these methods, the folder/archive selection screen will appear.
However, if "Execute only from XP3 archive" is specified in the release options, it will only operate with the data.xp3 file, data.exe file, or when an XP3 archive is bound to the executable itself (see KiriKiri Configuration).

Folder/Archive Selection

The folder/archive selection screen looks like this.
FolderSelector.png

"OK" button
Starts execution of the currently selected folder or file.
"Cancel" button
Exits KiriKiri without doing anything.

First File to be Executed

After the project folder is determined, startup.tjs in the project folder is executed first. If it is missing, an error occurs.
The first file to be executed can also be specified with -startup. See Command Line Options.

Message Map File

Immediately after startup, KiriKiri checks if msgmap.tjs exists in the same folder as KiriKiri and executes it if it does. This is skipped if the release options specify not to load it (see KiriKiri Configuration). In msgmap.tjs, you can change message assignments using System.assignMessage. msgmap.tjs can also be created using the configuration tool.

Configuration File

KiriKiri reads the configuration file (.cf or .cfu file) created with KiriKiri Configuration and operates according to the settings described there.
See KiriKiri Configuration for file names and locations.