Change VNM's Message Caret

Change VNM's Message Caret
upload_2018-11-28_0-29-21.png


​
Introduction
This tutorial helps you change the Message Caret or indicator found in VNM's default messages.

The Tutorial​
  • Create a spritesheet of your message caret. Okay, let's say I want Ralph to terrorize my Visual Novel Maker game.
upload_2018-11-28_0-40-8.png

Behold his majesty​
  • Afterwards, import this spritesheet in Visual Novel Maker using the Resource Manager. Just make sure it's in Graphics/Pictures. I personally like putting it in a folder called "New UI" just so it's organized.
upload_2018-11-28_0-37-16.png

  • Go to Database -> Animations and replace the Message Caret Animation on slot 1. Remember, all the frames start at 1 and not 0!
upload_2018-11-28_0-41-48.png

​
  • Next, go to the Script Editor. Copy Layouts -> Templates -> Template_MessageBox and Paste it to a new folder with a new name just above Main. This is important so updates won't overwrite your changes. Here's an image of how I handle it.
upload_2018-11-28_0-48-33.png

​
  • Now on the New_Template_MessageBox (or whatever you called it), look for Lines 63 and 96 that contains the code:
Code:
"image": "message_caret",

and then rename it. In my case it's RalphCaret
Code:
"image": "RalphCaret",

You can easily replace it by pressing CTRL+H and inputting it like this in the search and replace bar:
upload_2018-11-28_0-53-6.png

Afterwards, press the Replace button.​
  • Now hit save and test play and it should be changed!
upload_2018-11-28_0-54-45.png

​
OPTIONAL:
  • Depending on your image, sometimes it may not align correctly with your messages. You will need to do an extra step. Look for Lines 51, 52 & Lines 84, 85. The codes should look something like this:
Code:
$ -> o.dstRect.x = o.parent.controls[0].message.caretPosition.x
                $ -> o.dstRect.y = o.parent.controls[0].message.caretPosition.y - 20
Code:
                $ -> o.dstRect.x = o.parent.controls[0].message.caretPosition.x
                $ -> o.dstRect.y = o.parent.controls[0].message.caretPosition.y - 10

The first code handles Custom Show Message and the other is for regular Show Message.
What you want to do is add +/- offsets to the x/y depending on your needs.
Let's say I remove the -10 offset in the .y axis:​

upload_2018-11-28_1-0-9.png


Now as you can see, he's not aligned to the message at all without that -10 offset. That is the purpose of those lines.

And that's about it!
Enjoy!​
Japanese Version:

Spoiler
ラノゲツクールMVのメッセージキャレットを変更
1619425959072.png

​

はじめに
このチュートリアルでは、ラノゲツクールでデフォルトで設定されているメッセージキャレット(入力位置を表示するカーソル)や、インジケーターの変更方法について記載しています。

チュートリアル
● まずはメッセージキャレットに使いたいスプライトを作成します。ここでは仮に、ラルフに登場してもらうとしましょう。
1619425968769.png

見よ、この誇り高き姿を!​

● 次にリソースマネージャーを使って、ラノゲツクールにこのスプライトをインポートします。この際「Graphics/Pictures」に格納するように注意してください。個人的に私は、「New UI」というフォルダに格納するようにしています。
1619425982162.png

​
● 「Database -> Animations」から、スロット1の「Message Caret Animation」を変更してください。フレームは0ではなく、常に1から始まることに注意してください!
1619425996945.png

​
● 次に、スクリプトエディターを開きます。「Layouts -> Templates -> Template_MessageBox」と進みそれをコピーしたら、「Main」の上に新規に作成したフォルダー内にそれをペーストしてください。この重要なステップにより、アップデートがあっても変更が上書きされなくなります。詳しくは以下の画像をご参照ください。
1619426003423.png

● ペーストしたものに名前をつけ(ここでは「New_Template_MessageBox」としました)、その中の63行目と96行目で以下のコードを探してください。

Code:
"image": "message_caret",

名前を変更します。ここでは「RalphCaret」としました。

Code:
"image": "RalphCaret",

「CTRL+H」を使って、検索窓から以下のように入力することでも簡単に変更できます。

1619426016268.png

変更するには「Replace」ボタンを押します。​

● セーブをしたらテストしてみてください。以下のように変更されていたら成功です!

1619426024144.png

補足:

● 使う画像によっては、メッセージ内で上手く表示されない可能性があります。その場合はいくつかの追加手順が必要になります。コード内で51行目、52行目、84行目、85行目を探すと、以下のようになっているはずです。

Code:
$ -> o.dstRect.x = o.parent.controls[0].message.caretPosition.x
$ -> o.dstRect.y = o.parent.controls[0].message.caretPosition.y - 20


Code:
$ -> o.dstRect.x = o.parent.controls[0].message.caretPosition.x
$ -> o.dstRect.y = o.parent.controls[0].message.caretPosition.y - 10

最初のコードはカスタマイズされた「メッセージの表示」を、2番目のコードは通常の「メッセージの表示」をコントロールしている部分です。

必要に応じて x/y の部分に +/- の調整を加えます。

例えば y の値「-10」を消去してしまった場合:
1619426035792.png

​
ご覧のように「-10」がない状態では、メッセージとラルフの位置がずれてしまっているのが分かります。


以上が、メッセージキャレットの説明です。

それではお楽しみください!

Original thread: https://forums.rpgmakerweb.com/threads/change-vnms-message-caret.102645/