Visual Novel Construction Tool “Blade Engine” Command Reference

[Version 2.0: November 11, 2006]

 

| Text | Background | Character Image | BGM, Sound Effect & Voice |

| Variable and IF/ELSE | Rollback | Playing Movie | Others |

 

==========

Text

==========

 

Defining Character Name values

 

@def_text

{

[Character #] [Character Name] 0x [Message Color] [Display or Do not Display Character Name]

}

 

Explanation:

 

Above lines assign various values to a character Name.

[Character #] can be between 0-127.

[Character Name] can be up to 14 characters.

[Message Color] is defined as hexadecimal number. Start with 0x, then followed by RGB color in hexadecimal number. (For examples, While: 0xfff, Red: 0xf00, Black: 0x000)

When [Display or Do not Display Character Name] is assigned as on, it displays character name on the message window. When it is assigned as off, character name will not be displayed.

 

Example:

 

@def_text

{

0 Maxter 0xfff on

1 Mir 0xfdd on

2 Man 0xfff on

3 Girl 0xfdd on

4 Old woman 0xfdd on

5 ??? 0xfff on

20 Narration ddd off

}


 

Text Window Display Option


@textwindow show

@textwindow hide

 

Explanation:

 

Text window will be displayed when it is assigned as show. On the other hand, it will be hidden when it is assigned as hide.

When text window is hidden, no message will be shown. Also, while text window is hidden, menu will not be accessible. Please remember that when text window is being hidden, functions such as Save, Load, and Options can not be accessed.

 

Displaying Text

 

@text,[Character #] 

{ 

[Message]

 

Explanation:

 

[Character #] should be previously defined.

Within [Message], each row can contain up to the max of 60 characters. [Message] can contain up to three rows. Line break will not automatically be inserted. You have to press ENTER to indicate line break.

 

Example:

 

// Short Message

@text,0

{

No. You're the fortuneteller. Can't you guess?

}

 

// Long Message

@text,20

{

However, post-war conditions cause certain countries to

embrace harsher ideologies. Germany turns to Nazism,

Japan to imperialism.

}

 

TIP: Inserting | in the midst of text acts as a "wait-for-click" pause .

 

Text Window Display Part II

 

@textwindow_fx1 show

@textwindow_fx1 hide

@textwindow_fast show

@textwindow_fast hide

 

Explanation:

 

@textwindow_fx1 displays text with effect.

@textwindow_fast displays text immediately.

 

Clearing Message

 

@text_cls

 

Explanation:

 

Above line clears message that is currently being displayed on the text window.

 

=================

Background

=================

 

Displaying Background

 

@bg_load [File Name]

@bg_change [Duration (m/s)]

 

Explanation:

 

Create 800x608 (32bit) .png or .jpg file in BG folder.

 

@bg_load

 

When above line is executed, loads image onto the background. (Note: Extension type (such as .png and .jpg ) must be included in the file name)

 

@bg_change

 

When above line is executed, adds cross-fade effect to the currently displayed image and sends the image to back buffer.

 

Example:

 

@bg_load black.png

@bg_change 1000

 

Background Scroll

 

@bg_scroll [Direction],[Duration (m/s)]

 

Explanation:

 

@bg_load

 

When above line is executed, loads the image file onto the background. (Note: Extension (such as .png) must be included in the file name)

 

@bg_scroll

 

When above line is executed, image is scrolled onto background.

Direction where the image is scrolled can be defined as follows:

 

up

down

left

right

 

Example:

 

// Displays background

@bg_load black.png

@bg_change 1000

 

// Scrolls image from black.png to white.png

@bg_load white.png

@bg_scroll up,2000

 

================

Character Image

================

 

Character Fade-In and Fade-Out

 

@chr_load [Plane], [File Name]

@chr_fade_in [Plane], [Time(m/s)]

@chr_fade_out [Plane], [Time(m/s)]

 

* “Plane” is similar to Photoshop’s “Layer”.


Explanation:

 

Create 512x608, 32bit color .png file in CHR folder.

 

@chr_load

 

When above line is executed, loads character image into back buffer.

(Note: Extension (such as .png) must be included in the file name)

There are three Plane names you can use. Those are A, B and C.

 

@chr_fade_in

 

When above line is executed, assigned Plane fades into the scene.

On the other hand, @chr_fade_out fades out assigned Plane out of the scene.

Multiple Planes can be used with @chr_fade_in and @chr_fade_out command.

(For examples, combinations such as AB, AC, BC, ABC can be used.)

 

Example:

 

// Fade-in Plane A

@chr_load A,character01.png

@chr_fade_in A,500

 

// Fade-in Plane B and C simultaneously

@chr_load B,character02.png

@chr_load C,character03.png

@chr_fade_in BC,500

 

// Fade-out Plane ABC simultaneously

@chr_fade_out ABC,500

 

Position of Character Image

 

@chr_setpos [Plane],[Position]

 

Explanation:

 

The position where the character appears in the scene has to be defined for each Plane.

When this command is executed, it assigns the position where the Plane is displayed. Unless

the value is changed later, this position will continue to stay as it is.

 

Positions are as follows:

 

0 Left end

1 Slightly Left

2 Center

3 Slightly Right

4 Right end

 

(Note: In the case when character positions overlaps, C will be the most front, and A will be the most rear)

 

Example:

 

// Display Plane A at the center of the window

@chr_setpos A,2

@chr_load A,character01.png

@chr_fade_in A,500

 

Character Image Slide-In and Slide-Out

 

@chr_slide_in [Plane],[Direction],[Position],[Speed]

@chr_slide_out [Plane],[Direction],[Speed]

 

Explanation:

 

Character image slides-into the scene or slides-out of the scene.

 

@chr_load

 

When above line is executed, loads character image into back buffer.

(Note: Extension (such as .png) must be included in the file name)

 

[Direction] can be one of the followings:

 

top

bottom

left

right

 

When specifying Slide-In position, position where the image comes to stop has to bedefined .

[Speed] can be a number between 1 – 100.

 

Example:

 

//Plane A appears from left and runs off to the right.

@chr_load A,character01.png

@chr_slide_in A,left,2,10

@chr_slide_out A,right,10

 

Turning Character

 

@chr_turn [Plane],[Duration (m/s)]


 

Explanation:

 

@chr_load

 

When above line is executed, loads character image into back buffer.

(Note: Extension (such as .png) must be included in the file name)

 

@chr_turn

 

When above line is executed, character image switch with back buffer.

Multiple Planes can be used simultaneously with this command.

(Example: Combination such as AB, AC, BC, ABC can be used.)

 

Example:

 

// Display character01

@chr_load A,character01.png

@chr_fade_in A,500

 

// Switch to character02.

@chr_load A,character02.png

@chr_turn A,500

 

// Turn A and B simultaneously.

@chr_load A,character03.png

@chr_load B,character04.png

@chr_turn AB,500

 

Moving Character Image

 

@chr_move [Plane],[Location][Speed]

 

Explanation:

 

Move a Plane to different position while it is being displayed.

 

Example:

 

// Display character01on the left side

@chr_setpos A,0

@chr_load A,character01.png

@chr_fade_in A,500

 

// Move to the right side

@chr_move A,4,10


 

Drop Shadow

 

@chr_shadow [Plane],on

@chr_shadow [Plane],off

 

Explanation:

 

“Drop Shadow” effect is applied to each Plane. Default is On.

 

======================

BGM, Sound Effect & Voice

======================

 

BGM

 

@bgm_play [File Name]

@bgm_stop [Duration]

 

Explanation

 

Prepare .ogg sound file in BGM folder (Located within SOUND folder).


@bgm_play

 

Sound start. (Note: Extension (such as .ogg) must be included in the file name)

 

@bgm_stop

 

Sound stop. [Duration] is the duration until the sound fades out. Value can be 0-3.

 

0 Cut-Out immediately

1 Fade out quickly

2 Fade out normaly

3 Fade out slowly

 

Example:

 

@bgm_play music01.ogg

@bgm_stop 2

 

Sound Effect

 

@se_load [Channel],[File Name]

@se_play [Channel]

@se_loop [Channel]

@se_stop [Channel]

@se_fade_out [Channel],[Duration]

 

Explanation:


Prepare .wav sound file in SE folder (Located within SOUND folder).

 

@se_load

 

When above line is executed, loads sound file to assigned channel.

(Note: Extension (such as .wav) must be included in the file name)

Channel value can be 0-7.

 

@se_play Play only once

@se_loop Play in loop

@se_stop Stop sound

@se_fade_out Fade out sound effect

 

[Duration] can be follwings:

 

0 Dade out quickly

1 Fade out normally

2 Fade out slowly

 

Example:

 

@se_load 0,beep01.wav

@se_play 0

 

// Fades out looping sound effect

@se_load 1,beep02.wav

@se_loop 1

@se_fade_out 1,2

 

Voice

 

@text,[Character #],[File Name]

{

[Message]

}

 

Explanation:

 

Play voice along message.

Prepare .ogg voice file in VOICE folder (Located within SOUND folder).

By assigning voice file name within the message definition, the message and voice can be generated simultaneously.

(Note: File name does not have to include extension)

 

Example:


// Play voice01.ogg with text message.

@text,0,voice01

{

No. You're the fortuneteller. Can't you guess?

}

 

======================

Variable and IF/ELSE

======================

 

Variable manipulation

$[0-99](Operator)

 

Explanation:

Operation can be increment, decrement, or substitution.

Please do not include any space.

 

Example:

 

$[0]++

$[0]--

$[0]=somenumber

 

Condition branching

if( Condition){ state 1 }else{ state 2 }

 

Explanation:

 

Check the (Condition) result.

If true, execute state 1

If false, execute state 2

 

There are three kinds of Operator

Equal               ==

Comparison    < >

Unequal           !=

 

Example:

 

if( $[0] < 0 )

{

            State 1

}else {

            State 2

}

 

For more example, try Tutorial #3

http://www.bladeengine.com/BladeEngine/tutorial.php

 

==================

Rollback function

==================

 

Allowing / prohibiting Rollback function

 

@rollback_on

@rollback_off

 

Explanation:

 

Player is able to or unable to be able to use Roll-back function after this point.

If you turn off Rollback at the beginning, player won't be able to use the Rollback at all.
The example of how to use @rollback_off is when you don't want a player to get a second chance to re-select command options at some decision making point. In that case, you might want to insert @rollback_off right before the selection command in your script.

 

======================

Playing Movie

======================

 

To play Movie

 

@movie_load  [File Name]

@movie_play

 

Explanation:

 

Play movie (MPEG1, 800x600).

While movie is running, script execution will be stopped.

Movie can be skipped with right click.

 

Example:

 

@movie_load  test.mpg

@movie_play 

 

=================

Others

=================

Wait

 

@wait [Durationm/s]

 

Explanation:

 

Stop the execution of script for defined duration time.

 

Example:

 

@wait 1000

 

Key Wait

 

@keywait

 

Explanation:

 

Stop script execution until either left-click, space-key or enter-key is pressed.

 

Load

 

@load [File Name]

 

Explanation:

 

Start to read next script file.

Define script file in [File Name]. (Note: File name does not have to include extension)

Script file should be a text file with .scp extension. It should be located in the SCP folder.

Please note that even next script file is being executed, currently displayed screen, BGM,

back buffer, and setting will continue to be carried on.

 

Example:

 

@load genyuu


Selection Commands

 

@select

{

[Selection 1],[File Name]

[Selection 2],[File Name]

[Selection 3],[File Name]

}

 

Explanation:

 

Display choice command.

Command message goes into [Selection 1], [Selection 2], [Selection 3].

[File Name] is the script file that is executed when associated command is selected.

(Note: File name does not have to include extension)

 

Choice message [Selection #] can be up to 32 characters.

Choice options displayed can be either two, three or four.

 

Example:

 

// Two choices

@text,0

Where are you from

@select

{

I’m from Japan ,script01

I’m from China ,script02

}

 

Quake

 

@effect_quake [Direction],[Duration (m/s)]

 

Explanation:

 

Generate earth-quake-like visual effect to the scene.

[Direction] can be either ver or hor.

ver shakes screen vertically, and hor shakes screen horizontally.

 

Example:

 

@effect_quake ver,1000

 

Blackout, Whiteout

 

@effect_white_out [Duration (m/s)]

@effect_white_in [Duration (m/s)]

@effect_black_out [Duration (m/s)]

@effect_black_in [Duration (m/s)]

 

Explanation:

 

Generate Black-out or White-out effect to the whole screen.

After the execution of @effect_white_out, nothing will be shown on the screen until @effect_white_in is executed. Although it is possible to run some other commands while Whiteout effect is taking place.

 

Example:

 

// Delete text window and character image during Whiteout, and switches the background.

 

@effect_white_out 1000

@textwindow_fast hide

@chr_fade_out ABC,1

@bg_load black.png

@bg_change 1

@effect_white_in 1000