From acc755b2ca5d6ace4184a27e90eb674c221e6041 Mon Sep 17 00:00:00 2001 From: 4ian <1280130+4ian@users.noreply.github.com> Date: Mon, 4 May 2026 10:50:42 +0000 Subject: [PATCH] [Auto] [Improve] Document dialogue tree typewriter effect, branch tags, and save state --- automated_updates_data.json | 4 +++ .../all-features/dialogue-tree/index.md | 26 ++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/automated_updates_data.json b/automated_updates_data.json index 6c71cb99bf9..e834892a1ab 100644 --- a/automated_updates_data.json +++ b/automated_updates_data.json @@ -92,6 +92,10 @@ { "date": "2026-04-22", "summary": "Improved resources-loading docs (named Preload scene action, documented SceneLoadingProgress expression and AreSceneAssetsLoaded condition, clarified custom loading screen approach) and added extension lifecycle functions table to events/functions docs" + }, + { + "date": "2026-05-04", + "summary": "Improved dialogue tree docs: added typewriter text effect section (ClippedLineText/ScrollClippedText/CompleteClippedTextScrolling), branch tags section with parameterized tags and WasBranchVisited, and updated save state note with SaveState/LoadState actions" } ] } diff --git a/docs/gdevelop5/all-features/dialogue-tree/index.md b/docs/gdevelop5/all-features/dialogue-tree/index.md index 2643b897bb2..d8e295a31ec 100644 --- a/docs/gdevelop5/all-features/dialogue-tree/index.md +++ b/docs/gdevelop5/all-features/dialogue-tree/index.md @@ -130,7 +130,7 @@ Don't forget that you can put anything inside this **<>**...**<>* !!! note - The dialogue tree extension stores all the $variables the player sets while playing the game and also comes with expressions/actions to get/set them - in case you want to store them when the game is saved by the player and be able to reload them. + The dialogue tree extension stores all the `$variables` set during dialogue. Use the **Save dialogue state** and **Load dialogue state** actions together with GDevelop's [Save & Load](/gdevelop5/all-features/save-state/) feature to persist dialogue progress across sessions, so the player's choices survive a save/load cycle. ### 3. Option line type @@ -238,6 +238,30 @@ The demo does not use the entire capability of the extension and is aiming to pr - Tell the game engine how you want the dialogue data to be displayed to the player and used by the engine - for each of the three types - Set reusable commands to be triggered by Yarn - such as changing of avatars, playing of sound effects and any other game events to help tell your story. +## Typewriter text effect + +Use `ClippedLineText()` instead of `LineText()` to reveal the current line character by character. Call the **Scroll clipped text** action every tick to advance the reveal — the more frequently it is called, the faster text appears. + +To let the player speed through text, bind **Complete clipped text scrolling** to a button press so the full line appears instantly. Use the **Has clipped text scrolling completed** condition to guard the **Go to next dialogue line** action, ensuring the player can only advance after the full text is visible. + +The built-in `<>` Yarn command pauses scrolling automatically for the given number of milliseconds, allowing you to time dramatic pauses mid-sentence without extra event logic. + +## Branch tags + +Yarn node headers support a `tags:` field of space-separated words: + +``` +title: VillageWell +tags: npc outdoors +--- +Node text here. +=== +``` + +Use the **Current branch contains tag** condition to react to these at runtime. Tags can carry parameters using the `tagName(value)` syntax — for example `character(ant)` — and the `TagParameter(0)` expression retrieves the first value. A common pattern is to encode the speaking character in a tag so the portrait sprite swaps automatically without needing a `<>` command in every branch. + +The **Was branch visited** condition checks whether the player has previously passed through a specific branch, which lets NPCs refer to past conversations and makes the world feel reactive. + # Examples [Open example in GDevelop](https://editor.gdevelop.io/?project=example://dialogue-tree-with-yarn){ .md-button .md-button--primary }