このリポジトリは、Godotの高機能会話ウィンドウアドオン Dialogicをフォークし、ルビ機能を追加したものです。
DialogicとGodotの初期フォントは日本語が含まれていないため、日本語が表示できません。日本語フォントを別途用意してください。
Google Fontsとかいっぱいあっておすすめです。ゲーム組み込みもだいたいOKのはずです。(使う時はしっかり確認してください)
- Dialogic を addons ディレクトリに配置します。
プロジェクト設定→プラグインから Dialogic を有効化します。
その後プロジェクトを再起動してアドオンを反映させます。 - 上部に Dialogic タブが追加されています。開きます。
- 左部のサイドバーの Theme → Default Theme を選択します。
Dialog Text タブのFonts列に、Ruby Font, Ruby Alignment, Ruby Offset 、Colors列に Ruby Color が追加されています。
初期値 | 説明 | |
---|---|---|
Ruby Font | res://addons/dialogic/Example Assets/Fonts/DefaultRubyFont.tres FontDataのOverlock-Regular.ttfが英語フォントなので日本語フォントに変えること |
ルビに使用するフォントリソースです。DynamicFont リソースを推奨します。 新しくフォントのリソースを作って設定するか(おすすめ)、 DefaultRubyFont の FontData を変更します。(おすすめしない) |
extra_spacing_charはプログラム内で自動に設定されるため、変更しても意味がないかもです。 | ||
Ruby Alignment | Center | ルビを左寄せ、真ん中、右寄せ、Fillします。 Fillは使い物にならないかもです。(よくわかっていません) |
Ruby Offset | X:0 Y:0 | ルビを指定したピクセルぶんずらします。 これで微調整してください。 |
Ruby Color | ルビの色 |
- 左部のサイドバーの Timeline → 右クリック → Add Timeline を実行してタイムラインを追加してみます。名前をひかえておきます。
(Themeエディタのプレビュー欄でもルビは表示されますが) - テキストイベントを追加します。右部の Main Events から 💬Text をクリックします。
- テキストを入力します。
例文
[r=ごどー@Godot][r=えんじん@Engine]のアドオン[r=ダイアロジック@Dialogic]でルビを[r=ふ@振]るよ。[br][r=ハードラック@不運]と[r=ダンス@踊]っちまった。
書き方
[r=ルビふりがな@ルビをふる文字]
@がルビと文字の区切りです。(そのため、@をルビや文字に使うことはできません。)
@は全角、半角どちらでも可です。
[r=]はすべて半角です。
- 適当にNode2Dでシーンを作成し、スクリプトを作成 → アタッチします。
スクリプトを書きます。Timelineの文字列は、先程作成したタイムラインの名前と同じにする必要があります。
extends Node2D
func _ready():
var dia = Dialogic.start('timeline-1643877658')
self.add_child(dia)
ライセンス MIT
参考にさせていただきました
https://gitlab.com/clvs7/godot-sample-project-furigana-ruby
↓以下は Dialogic 本リポジトリのReadMe
Create dialogs, characters and scenes to display conversations in your Godot games.
Changelog — Installation — Documentation — Credits
- If you are interested in contributing feel free to visit the main branch.
- Only bug fixes are going to be merged to this branch
You can read a step by step guide on how to use Dialogic here
You can check the documentation from inside the plugin or here
To install a Dialogic, download it as a ZIP archive. All releases are listed here: releases. Then extract the ZIP archive and move the addons/
folder it contains into your project folder. Then, enable the plugin in project settings.
If you want to know more about installing plugins you can read the Godot docs page.
You can also install Dialogic using the AssetLib tab in the editor, but the version here will not be the latest one available since it takes some time for it to be approved.
There has been some people having issues exporting their games. If you are having issues you can try to add *.cgh
and *.json
to your export settings (image). If it is not that, try having at least 1 theme in your project. If you still have issues, please open an issue.
Made by Emilio Coppola.
Contributors: Jowan-Spooner, zaknafean, Arnaud, ellogwen, Tim Krief, and more!. Special thanks: Toen, Òscar, Francisco Presencia. Placeholder images are from Toen's YouTube DF series
Thank you to all my Patreons for making this possible!
Mike King, Allyson Ota, Gemma M. Rull, newyear Studios, Joe Constant, kycho , Luke Peters, Wapiti ., Garrett Guillotte, Karl Anderson, Alex (Well Done Games), GodofGrunts , Tim Krief, Daniel Cheney, Carlo Cabanilla, Flaming Potato, Joseph Catrambone, AzulCrescent , Hector Na Em, BasicIncomePlz, p sis, Sukh Atwal, Patrick Hogan, Jesse Priest, Ceah Sharp, Mark Charnock, soliare, Anthony Wilson, KvaGram , Steven Shearer, Carter Lilley, CorbineCaleb, Thick Biscuit, Rodemarck Júnior, Jim Hewell, White Vulture, Brianna Allen, teesloane, RagingRoosevelt, Jacquelinett
Support me on Patreon https://www.patreon.com/coppolaemilio