ノベルスクリプト

ノベルスクリプトとはイベントスクリプトnovel("NOVEL_ID"); や NPC のメッセージに使用される xml ベースのスクリプト言語です。

ノベルスクリプトの編集画面

イベントスクリプトや NPC で使用するノベルスクリプトを管理します。

名前
エディタ上で表示され、イベントスクリプトなどで参照されるスクリプトの名前です。
スクリプト
実行されるスクリプトを記述します。

文字列リソース一覧

text や title 属性に設定可能な文字列リソースの一覧です。

@message/MESSAGE_ID_OR_NAME
MessageTable の文字列を参照
@string/STRING_NAME
StringTable の文字列を参照
存在しない場合は STRING_NAME に指定した文字列

タグ一覧

使用可能なタグの一覧です。
Attributes 欄の o が付いている属性は必須属性です。

msg
指定のメッセージを表示
指定のメッセージを表示します。
text 属性を指定しない場合はメッセージウィンドウが非表示になります。
<msg text="@message/name" />
<msg text="@string/name" />
<msg text="1st language text" text2="2nd language text" />
<msg />
AttributesDescription
text表示するテキスト
text2第二言語で表示するテキスト
x表示する横座標を px, em, % で指定
y表示する縦方向を px, em, % で指定
width横幅を px, em, % で指定
height高さを px, em, % で指定
menu
メニューを表示
選択肢を表示します。
<label id="start" />
<menu title="選択肢を選んで下さい" title2="Select a menu item">
 <menuitem text="選択肢1" text2="Option 1" target="1" />
 <menuitem text="選択肢2" text2="Option 2" target="2" />
 <menuitem text="選択肢3" text2="Option 3" target="3" />
 <menuitem text="終了" text2="End" target="end" />
</menu>
<label id="1" />
<msg text="1" />
<goto target="start" />
<label id="2" />
<msg text="2" />
<goto target="start" />
<label id="3" />
<msg text="3" />
<goto target="start" />
<label id="end" />
AttributesDescription
title表示するタイトル
title2第二言語で表示するタイトル
x表示する横座標を px, em, % で指定
y表示する縦方向を px, em, % で指定
width横幅を px, em, % で指定
height高さを px, em, % で指定
menuitem
menu 内の選択項目
munu の子要素です。詳しくは menu をご覧ください。
<menuitem text="@string/yes" target="1" />
<menuitem text="いいえ" text2="No" target="2" />
AttributesDescription
o text表示するテキスト
text2第二言語で表示するテキスト
o target遷移対象 label の id を指定
label
menu や goto の遷移対象
<label id="start" />
AttributesDescription
o idmenuitem や goto の target 属性に指定するユニーク値
goto
指定の label に遷移
<goto target="end" />
<msg text="このメッセージは表示されません" text2="this message is not displayed" />
<label id="end" />
<msg text="終了" text2="End" />
AttributesDescription
o target遷移対象 label の id を指定
playbgm
BGM を再生
<playbgm src="town.mp3" />
<playbgm src="folder/town.mp3" />
AttributesDescription
o srcBGM ディレクトリ下の音声ファイルパス
playbgs
BGS を再生
<playbgm src="wind.mp3" />
AttributesDescription
o srcBGS ディレクトリ下の音声ファイルパス
playse
効果音を再生
<playbgm src="door.wav" />
AttributesDescription
o srcSE ディレクトリ下の音声ファイルパス
stopbgm
BGM を停止
<stopbgm />
stopbgs
BGS を停止
<stopbgs />
stopse
効果音を停止
<stopse />
script
スクリプトを実行
<script src="SCRIPT_NAME" />
<script>
setFlag("flag", 3);
msg("flag value is ", getFlag("flag"));
setFlag("flag", 0);
msg("flag value is ", getFlag("flag"));
</script>