From 113e6822baa6b9d5b364f10f236e19c39b5262c4 Mon Sep 17 00:00:00 2001 From: theludovyc Date: Wed, 8 Mar 2023 13:02:07 +0100 Subject: [PATCH] update readme --- README.md | 64 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 25bd34b..6e2c1cc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ![Logo](WindowIcon.png) Rakugo +# ![Logo](WindowIcon.png) Rakugo Dialog System ![MIT License](https://img.shields.io/static/v1.svg?label=📜%20License&message=MIT&color=informational) [![Join the Discord channel](https://img.shields.io/static/v1.svg?label=Join%20our%20Discord%20channel&message=🎆&color=7289DA&logo=discord&logoColor=white&labelColor=2C2F33)](https://discord.gg/K9gvjdg) @@ -9,12 +9,13 @@ [![GitHub](https://img.shields.io/github/issues/rakugoteam/Rakugo.svg)](https://github.com/rakugoteam/Rakugo/issues) [![GitHub](https://img.shields.io/github/issues-closed/rakugoteam/Rakugo.svg)](https://github.com/rakugoteam/Rakugo/issues) -Core of our projects. Inspired by [Ren'Py](https://www.renpy.org), Rakugo is a project aiming to provide a way to make narrative-based games on [Godot](https://godotengine.org) easily. Simplify your project, if it is a visual novel, point and click, RPG, interactive text game or many other styles and blends of styles. +Core of our projects. Inspired by [Ren'Py](https://www.renpy.org), this project aiming to provide a way to make narrative-based games on [Godot](https://godotengine.org) easily. Simplify your project, if it is a visual novel, point and click, RPG, interactive text game or many other styles and blends of styles. Support this project here [itch.io](https://rakugoteam.github.io/donations/). [Showcase](#Showcase) - [Installation](#Installation) - +[Use .rk files](#Use-.rk-files) - [Get Started](#Get-Started) - [Documentation](#Documentation) - [Rakugo Addons](#Rakugo-Addons) - @@ -29,7 +30,7 @@ Support this project here [itch.io](https://rakugoteam.github.io/donations/). * Own script language * Save/Load system * Global variables and character's variables -* [Gut](https://github.com/bitwes/Gut) (Godot Unit Test) +* Unit tested with [Gut](https://github.com/bitwes/Gut) ## Showcase @@ -45,17 +46,36 @@ Check our project [Examples](https://github.com/rakugoteam/Examples) to see exam If your game uses Rakugo, tell us on [Discord](https://discord.gg/K9gvjdg). +## Update from Godot 3.X to 4.X +Signal system have changed. So we renamed all Rakugo signals. + +Just add "sg_" at begining. Like "old_signal_name" to "sg_old_signal_name". + +Everything else is the same. + ## Installation -To install Rakugo plugin, download it as a [ZIP archive](https://github.com/rakugoteam/Rakugo/releases). Extract the `addons/Rakugo` folder into your project folder. Then, enable the plugin in project settings and restart Godot-Engine. +To install Rakugo plugin, download it [here](https://github.com/rakugoteam/Rakugo/releases). Then extract the `Rakugo` folder into your `res://addons` folder. Finaly, enable the plugin in project settings and restart Godot-Engine. If you want to know more about installing plugins you can read the [godot official documentation page](https://docs.godotengine.org/en/stable/tutorials/plugins/editor/installing_plugins.html). +## Use .rk files +### Configure Godot +Rk files are text files. So you can use .txt extension. But if you want to use .rk you can do this : +- Go to Editor > Editor Settings +- In search bar type : "Extensi" +- Add "rk" + +### Export +**/!\ .rk files are not exported by default /!\\** + +Follow this guide https://rakugoteam.github.io/rakugo-docs/export/ + ## Get Started -- Create a scene with a Node and script on it +- Create a scene with a Node and add a script on it -Basic GdScript (Node.gd) : +GdScript (Node.gd) : ```gdscript extends Node @@ -63,25 +83,29 @@ extends Node const file_path = "res://Timeline.rk" func _ready(): - Rakugo.connect("say", self, "_on_say") - Rakugo.connect("step", self, "_on_step") + Rakugo.sg_say.connect(_on_say) + Rakugo.sg_step.connect(_on_step) + Rakugo.sg_execute_script_finished.connect(_on_execute_script_finished) - Rakugo.parse_and_execute_script(file_path) + Rakugo.parse_and_execute_script(file_path) func _on_say(character:Dictionary, text:String): - prints("say", character.get("name", ""), text) + prints("Say", character.get("name", ""), text) func _on_step(): - prints("Press 'Enter' to continue...") + prints("Press \"Enter\" to continue...") + +func _on_execute_script_finished(file_name:String, error_str:String): + prints("End of script") func _process(delta): - if Rakugo.is_waiting_step() and Input.is_action_just_pressed("ui_accept"): - Rakugo.do_step() + if Rakugo.is_waiting_step() and Input.is_action_just_pressed("ui_accept"): + Rakugo.do_step() ``` - Create your first RakuScript (text file) *"Timeline.rk"* at root of your project folder (res://) -Basic RkScript (Timeline.rk) : +RkScript (Timeline.rk) : ``` character Gd "Godot" @@ -91,7 +115,17 @@ Gd "I'm !" - Run Scene (F6) +Out : +``` +Say Godot Hello, world ! +Press "Enter" to continue... +Say Godot I'm Godot ! +Press "Enter" to continue... +End of script +``` + ## Documentation +If you want to know how to use Rakugo or write rk scripts. Go to https://rakugoteam.github.io/rakugo-docs/ ! @@ -107,7 +141,7 @@ Go to https://rakugoteam.github.io/rakugo-docs/ ! **A:** Yes **Q:** What difference with [Dialogic](https://github.com/coppolaemilio/dialogic) ?

-**A:** Our project use normal coding with our own scripting langue inspired by Ren'Py, instead of visual. Plus is just a core, simple as possible, autoloaded when you enabled the plugin. If you wnat more check our addons and kits bellow. +**A:** Our project use normal coding with our own scripting langue inspired by Ren'Py, instead of visual. Plus is just a core, simple as possible, autoloaded when you enabled the plugin. If you want more check our addons and kits bellow. ## Rakugo Addons