From 366280da249715714ff162a3751d717792f6bffe Mon Sep 17 00:00:00 2001 From: Jeremi Biernacki Date: Wed, 1 Nov 2023 18:54:31 +0100 Subject: [PATCH] Rakugo Dialogue System 2.2 --- _posts/2023-11-01-devlog-20.md | 94 ++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 _posts/2023-11-01-devlog-20.md diff --git a/_posts/2023-11-01-devlog-20.md b/_posts/2023-11-01-devlog-20.md new file mode 100644 index 0000000..6dccae6 --- /dev/null +++ b/_posts/2023-11-01-devlog-20.md @@ -0,0 +1,94 @@ +--- +title: "Rakugo Project Devlog #20: Rakugo Dialogue System 2.2!" +date: 2023-09-25 +published: true +categories: + - news + - devlog +author: "Jeremi360" +excerpt: "Big changes for Variables, String and HTML5 Export" +--- + +Join our [Patreon](https://www.patreon.com/rakguoteam) to support us! + +Hi everyone, here is the **20th** devlog of **Rakugo Project**. +I'm happy to announce that we add huge new features in RakuScript this release including: +- now is possible to use double quotes inside strings example: `"it is a "really" good one"` +- using assignment operators like: =, +=, -=, *=, /= +- using variables in any string: say, ask, menu and for variables + +# Rakugo Dialogue System 2.2 +**Full Changelog**: https://github.com/rakugoteam/Rakugo-Dialogue-System/compare/2.1.1...2.2 + +## Strings +### Using double quotes + +Like the title says, you can do that now `"it is a "really" good one"` + +*Added with [#257](https://github.com/rakugoteam/Rakugo-Dialogue-System/issues/257) use double quotes inside strings by @theludovyc in [#261](https://github.com/rakugoteam/Rakugo-Dialogue-System/issues/261)* + +### Variables inside strings + +The big update of this version ! You can now use variables inside any strings, for say, ask questions and ask variable, menu choices and for variables ! +```renpy +# example +player.life_str = "You have life points left" +``` + +A very important thing: string is replaced with a value **when you use/read it**, not on assignment. +```renpy +# example +player.life = 10 +player.life_str = "You have life points left" +player.life = 5 +narrator "" +``` +The narrator will say: *"You have 5 life points left"*. + +```gdscript +# example +Rakugo.get_variable("") +Rakugo.get_variable("player.life_str") +# both returns "You have 5 life points left" +``` + +We took advantage of this to let you a new Rakugo method `replace_variables(text:String)`. +```gdscript +# example +Rakugo.replace_variables("You have