Defining Labels

 Well, it is necessary to explain Labels before choices can be used.
 When choices are selected, the scenario should move towards the destination selection. This is achieved using Labels. The label becomes a mark of the movement of the control at that time.

 Label is a line with *(asterisk) at the beginning of the line. For instance...

[wait time=200]
*start|Start
[cm]
Hello.

 Label looks like that. In this case, the label of the name of *start was defined here. Then, | (a vertical bar) is added like this "|Start" after the label name. It is used when saving and loading the game ( → Using the Save & Load feature ) , so that the game knows the location, where the player was in the scenario. | (the vertical bar) is purely optional, but label with * is important.

 Writing alphanumeric character might be safer, though an arbitrary thing can be specified for the name of the label. Moreover, please do not use spaces for the label name.

 The important function of the label includes becoming the position of the saving and loading, besides becoming a signpost when the label is targeted. Labels will be dealt in more detail later, along with | (the vertical bar).

Using Choices

 In KAG, the idea of choices is very close to a hyperlink in HTML.
 Tags named link and endlink are used to write choices. When sentences, that you want to become as choices, are placed between these two tags, then it becomes possible to select the choices with the mouse or keyboard. It jumps to the label of the target attribute written, when the choice is clicked with the mouse or 'Enter' is pushed on the keyboard in the corresponding link tag.
 Moreover, [s] tag is used to stop the choice waiting in the scenario. The scenario is executed continuously(non-stop), until [s] tag is used, when "Advance to the next choice option" is selected from the game's menu.
 It is possible to use it as described below. Please do not forget * (asterisk) to use as a label name, since it is needed for the target=*(labelname). Moreover, | (vertical bar) is not needed to specify in the target attribute after the *(labelname).


[wait time=200]
*start|Start
[cm]
[link target=*select1]Choice 1[endlink][r]
[link target=*select2]Choice 2[endlink][r]
[link target=*select3]Choice 3[endlink][r]
[s]


*select1
Choice 1 was selected. [l]
[s]

*select2
Choice 2 was selected. [l]
[s]

*select3
Choice 3 was selected. [l]
[s]

 Choices do not disappear, even if you have chosen an option, when this is executed as it is.
 To erase it, [cm] is usually written under the label.

[wait time=200]
*start|Start
[cm]
[link target=*select1]Choice 1[endlink][r]
[link target=*select2]Choice 2[endlink][r]
[link target=*select3]Choice 3[endlink][r]
[s]


*select1
[cm]
Choice 1 was selected. [l]
[s]

*select2
[cm]
Choice 2 was selected. [l]
[s]

*select3
[cm]
Choice 3 was selected. [l]
[s]



Diverge.png
Example of choices


Note
     Once selected, new choices are displayed until unlocklink tag is executed.
     Moreover, use the locklink tag to display the translated scenario.
     This isn't specified in a normal description.

Two or more scenario files

 It is actually common for the scenario file to be divided into two or more scenario files.
 The usage is simple; use the storage attribute in the link tag. For instance, to link to the scenario named scn2.ks, and to jump to the label of *scn2start, write this:

[link storage="scn2.ks" target=*scn2start]scn2start of scn2.ks[endlink]


 This is how it looks. scn2.ks is read when this choices is clicked, and it directly jumps to the label of *scn2start.

Scenario Branches

 There is a jump tag, if you want to navigate in the scenario file by specifying only the target.
 Moreover, the link tag also includes the function to execute TJS expression (scripts which the Kirikiri can directly understand) when clicked. Also, the button tag can be used to make a button with a graphical image, instead of pure-text choices. Use this tag to achieve graphical choices.
 Please refer to the Tags Reference for details.