Preparation

 First, make folder of Kirikiri SDK ( krkr.eXe ) of any project name. Please avoid the folder name(data) When distributing, it may cause errors. This folder is called Project folder.

 Then, the system files of KAG are copied under the folder. It should be in a folder calledtemplate by expanding the LZH file of KAG downloaded. I copied the contents(rather than the template).
 Arrangement is as follows:

Folders.png
Copying the file

 First, rename a file named, Config.~new, in the system folder to Config.tjs After that, please open Config.tjs with your text editor.


 The Config.tjs file will be explained later in the tutorial. If you want to know about it now, a detailed explanation is written in the file Config.tjs and refer to that please....


 In addition, there may be a file 「~このファイルは削除してかまいません~」(means "-This file can be deleted and isn't cared about-") inside the folder you copied. This is because the Archive Development Software might not develop an empty folder. (There is also no reason to leave it and can be deleted).

Note
 If you want to update KAG, basically, the contents of the system folder of the new KAG can be copied and the old files of the system folder can be overwritten. The files are automatically updated, when running the updated Config.tjs file for the first time. Just follow the instructions on the screen.

Explanation of folder

 Some folders are copied together when copying it. This explains each folder.
 The explanation of the folder is not much need, but if you want to change the arrangement of these folders, the content of Initialise.tjs might have to be changed. Please see the contents of Initialise.tjs in detail ( Because the tjs file is a text file, open with the text editor).
 Wherever what is put, the folder name need not be specified in the file specification of KAG. For example, you can put MIDI files in bgimage folder and it's fine! However, for the sake of convenience, the folder is made beforehand.(^^)

 There is not a problem with empty folders. The files that is not required can be deleted, without any problems.

folder.png system folder
 system files necessary for the operation of the KAG are included in this folder.
folder.png scenario folder
 In the scenario folder, you put the Scenario(Scenes) files. Embedded using the markup-tag language, you can specify the text to be displayed on the screen or whether to display any image. Scenario files have .ks extension.
 By the way, it is the "Project folder" to specify when the Kirikiri is started up, NOT an individual scenario file.
folder.png bgimage folder
 This is the folder, where you put the background image to be displayed.
folder.png fgimage folder
 This is the folder, where you put (such as standing pose of the character) foreground/character image to be displayed.
folder.png image folder
 This is the folder, where you put other images (for instance, one piece picture) etc.
folder.png bgm folder
 This is the folder, where you put BGM files(background music).
folder.png sound folder
 This is the folder, where you put sound effects files.
folder.png rule folder
 This is the folder, where you put the image of the universal rule transition.
folder.png others folder
Others
folder.png video folder
 This is the folder, where you put your Video files.

Displayable Image Formats

 Image formats that can be handled by KAG (or rather Kirikiri) is as follows:
 Also see, About the image formats.

BMP images
 The extension is .DIB or .BMP. In Kirikiri, it supports only uncompressed BMP.
 BMP 32bit of (32bpp) is considered as an alpha channel with bit-map.
JPEG images
 The extension is .JPG or .JPEG. You can handle JPEG image outputted from various graphic tools(like Photoshop or Paint).
Portable Network Graphic image ( PNG images )
 The extension is .PNG. It is possible to output it with a variety of graphic tools. It supports Alpha Channel and the Transparent-Color specification.
Entis Rasterized Image format image ( ERI image )
 The extension is .ERI. It is a lossless image compression format that was developed and devised by Mr. Leshade Entis. It is commonly known as "Eri-chan".
 Utilities such as the image converters 「Eri club」 is available at http://www.entis.gr.jp/eri/.

 If you are using this image compression format, copyright(©) relationships can be very tricky. Refer to the "Terms of Use" at Kirikiri SDK Help and above-mentioned 「Eri club」 for details.
TLG5 image
 The extension is .TLG(It is NOT .TLG5). The feature is a lossless image compression format from Kirikiri, which can be deployed quickly. It always correspond to a full-color image with an alpha channel.
TLG6 image
 The extension is .TLG(It is NOT .TLG6). Lossless image compression format made by Kirikiri and expands at a relatively high rate and high compression rate. It always correspond to a full-color image with an alpha channel.
Other Images
 It is also possible to use image formats other than these if Susie Plugin is used. Please put Susie Plugin in the same folder as the executable file krkr.eXe, in the underlying plugin folder, or the Project folder.(For reference, please see below "About Plug-ins")

Playable Audio formats


 Audio formats that can be handled by KAG(or rather Kirikiri)is as follows:
 Only PCM can be used for the sound effects.
 The change of Config.tjs of KAG is needed to specify which format to use for BGMs. Please see the content of Config.tjs in detail.

PCM
 By default, you can play the RIFF-WAVE of no compression(extension .WAV).

 You can also play Ogg Vorbis(*.OGG), TCWF(*.TCW), Microsoft ADPCM, etc.(*.WAV) other than RIFF-WAVE uncompressed, but the plug-in is required.
 As for the plug-in, (wuvorbis.dll) for Ogg Vorbis, (wutcwf.dll) for TCWF, and (wumsadp.dll) for Microsoft ADPCM are appended as two distribution files of Kirikiri.

 With Ogg Vorbis, you can use the compressed music format of patents and patents free, with a usage equivalent to MP3. For the encoder, go here: http://www.vorbis.com/.

 You can also reproduce the format by using other plugins(if any). For details of each plugin, please refer below to "About plugin" for more instructions on plugins.

 By creating the information on the loop by using the Loop Tuner(available from the support page), each uncompressed format of Wave, Ogg Vorbis, TCWF, of Microsoft ADPCM allows you to exactly specify the loop position. As a result, the loop performance is not only possible, but also very efficient and easy.
MIDI sequence data
 Standard MIDI Format (with a extension of .MID or .SMF) can be played. It can be slightly tricky if you want to cross-fade, so refer to the SDK Help of Kirikiri "About MIDI sound buffer" for details.
CD-DA
 The CD-DA part of CD-XA can be played. CD-XA is CD in the format of the audio data and CD-DA for the computer data as a CD-ROM. If it is not CD of the CD-XA format, it is not possible for Kirikiri to handle it. So do a search based on the volume label for the computer data of the CD-ROM to search the available CD-ROM drive. (Although you can play if you explicitly name the drive letter to perform most in this tutorial...)

Playable Movie Formats

MPEG I
 It is compatible with MPEG I general.
 However, when distributing it, it is necessary to keep krmovie.dll in the same location as the Kirikiri executable file. Moreover, DirectX 8 is needed as an environment to play the movie.

Note
 Please use .MPV, rather than .MPEG/.MPG, because the extension of the MPEG I stream can't be determined. Kirikiri determines the video format extension.

WMV
 Kirikiri supports WMV.
 Version of playable WMV is dependent on DirectX and Media Player that is installed on the user-system, but we recommend the environment(OS) where DirectX 9 or later is installed.

Note
 The movie can be played directly from the archive(without using a temporary file) if it is stored within the executable or the archive that you created using the Releaser. However, in the Releaser, movie file must be classified as "Compressed"(default is Not Compressed).


Note
 AVI movie format is not supported!

Flash

SWF
 Playback of Macromedia Flash is supported.
 However, when distributing it, it is necessary to put krflash.dll in the same location as the Kirikiri executable file. It is also necessary to install Flash Player to play SWF.
 Playback of Flash is treated the same as the video.

Note
 Flash Support is not complete, presently. There is a possibility that Flash content that requires keyboard input does not work correctly. Further, if the SWF flash file is big(exceeds 3~5MB), then it shouldn't be stored in the archive, such as XP3.


Note
 You can jump to an arbitrary label of the KAG scenario by controlling Flash contents, though it isn't tested yet because the author doesn't have the production environment of Flash. Use action "Get URL"(action of URL display), in which URL as FSCommand:Go to a string in the form "scenario file/label" as a target destination to the label (for example: first.ks/label2).
 If you specify the TJS expression as the target destination, and such as to assign a value to a variable, use: FSCommand:Eval to run the TJS expression of your choice when the action has occurred.
 You can use the playvideo tag or openvideo tag to specify the parameters, like storage attributes, and pass it to the Flash afterwards(example: hoge.swf?name=value&param=content ).

Usable Archive formats

XP3 and PEXP3
 The XP3 format is an original kirikiri archive format and is completely supported.
 PEXP3 is a format, that combines XP3 format and the Kirikiri executable file, in a single execuatable file.
 Releaser of Kirikiri SDK comes with either format.
Other archive formats
 Susie Plug-in Using the Susie Plugin, you can also support archive formats other than these. (Please refer below "About Plugins")

Rendering fonts

 Rendered font is the font data that you create in the production side. By using this, it is possible to display without the font, intended by the author, affected by the environment(OS). Moreover, even the foreign characters can be freely used.
 The Rendered font is made with krkrfont.exe. When you create the font for vertical writing, make it at the head of the @.

 Rendered font files have the extension .TFT. It is placed in the others folder, and allocate it in an arbitrary font with the mappfont tag, if you want to use it.


Note
 Please refer to the Kirikiri SDK help to know how to use pre-rendered font creation tool.

About Plugins

 Other plugins or plugin, in order to enhance the playable form of PCM or Susie-Plugin, requires loadplugin to specify it.

 For example, if you want to use wuvorbis.dll:


@loadplugin module=wuvorbis.dll


 This describes it.

 Moreover, the plugin should be either in:  It is necessary to put it in. However, it is not recommended to put it in an archive, made by the Releaser. Put it along with the main project files, because an error comes up, when the game is run directly from the CD-ROM with plugins included in the archive. If possible, distribute the game by placing the plugins in a folder along with the main files.

Also neither krmovie.dll nor krflash.dll are plugins, so it isn't necessary to specify it with the loadplugin tag.

 Please refer to the SDK help Kirikiri about "plugin".

Note
 It is necessary to explictly specify the plugin for Kirikiri 2, by putting the plugin files in the same place as the game executable files.

UNICODE support

 In order to edit the TJS scripts and scenario files, text editor is required.
 There is no problem in the text editor of your choice, but because the save data of KAG log files and console outputs text corresponding to the UNICODE, you have to edit the files with UNICODE text editor.
 Moreover, it is necessary to describe UNICODE text in the scenario file and the TJS script, excluding a Japanese character (A Japanese character here is a character that can usually be used in Japanese version Windows).

 There are some conditions in order to display the language in Japanese non-character.


 In any case, you can see the non-japanese characters in the "About Screen" of the game. You can only view Japanese characters in the User Interface of Windows standard, such as a menu item and the title bar of the window. Moreover, only japanese characters can be entered in the edit generated by the edit tag.


Note
 It basically follows the language locale of OS from which it is executed with Kirikiri, though it was written in Japanese characters(such as Chinese if it's the Chinese version of Windows and Japanese if it's the Japanese version of Windows). However, the author is not checking it.


Note
 Because it operates only on Windows, Kirikiri/KAG, UNICODE is UTF-16 of the little-endian(However, a surrogate pair cannot be used for the time being).
 Moreover, if the UNICODE text is UTF-16 of the little-endian, Kirikiri doesn't have BOM (Byte Order Mark) at the head. The character-code cannot be normally identified(Even if formal BOM is attached, UTF-16 of the big-endian cannot be read under the present situation).