Injecting a variable into text: double curly braces

🧩 Injecting a variable into text: double curly braces


The mechanism fits in one sentence: any word written between double curly braces in a text field makes a new input point appear on the block. You punch a hole in your sentence, and Celestory builds the socket that will fill it. 🪄



✍️ The principle in three steps


In a Dialogue block, you type:


Hello {{FirstName}}! You have {{Score}} points.


  1. You write. Two inputs appear on the block: FirstName and Score.
  2. You connect. They are points like any other: plug in a variable, another block's output, or type a hard-coded value.
  3. Celestory substitutes. At runtime, each reference gives way to the value it received.


🔺 A single curly brace triggers nothing. {FirstName} will be displayed as is, literally.


🔺 Creating the point is not enough, you have to wire it. An input left dangling is replaced by nothing at all: your sentence becomes "Hello ! You have points.", without the slightest error message.



🔤 What you are allowed to write between the braces


The name only accepts unaccented letters, digits and the underscore _. Everything else breaks detection silently: no input is created.


{{FirstName}}     ✅ detected
{{Score_2}} ✅ detected
{{Café}} ❌ the accent breaks everything
{{my-score}} ❌ the hyphen is not accepted
{{ FirstName }} ❌ nor are the spaces


🔺 No, you cannot write {{Café}}. Put your accents in the rest of the sentence, never inside the braces.


🔺 Case matters: {{Score}} and {{score}} create two different inputs.



🔁 The same variable quoted several times


Well played {{FirstName}}! Really, {{FirstName}}, what a game.


Celestory creates only one point, FirstName, not two. You wire it once, and every occurrence is replaced. ✅



🎚️ What type is the point that gets created?


The point is not locked to "Text". It accepts Text, a Number or a Boolean interchangeably, and the value is converted to text when displayed.


Two blocks also accept an Object: Format text and the Dialogue block of the Chatbot template. The object is inserted there in its raw form — useful for debugging, rarely elegant for a player.



🧱 The blocks concerned


The mechanism is not universal: it lives in ten blocks.


Whatever the template: Format text (the dedicated block, which does nothing else and returns the assembled text), Notification, and HTML5 — where the braces go in the code, not in a text field.


Chatbot template: Dialogue, Choice with dialogue, Narrator, Alert.


Visual Novel template: Dialogue, Alert, Slide.


🔺 Everywhere else, {{...}} is nothing but ordinary text. Need a dynamic sentence in another block? Build it with Format text and wire its output wherever it is needed.



⚠️ Renaming a reference means losing its wire


A point is only recognised by its exact name. If you correct {{FirstName}} to {{PlayerFirstName}}, Celestory considers that the old point no longer exists: it deletes it, and deletes the link that was plugged into it. The new point appears blank. Likewise, removing {{Score}} from the sentence makes the Score input disappear.


So check your connections after every text tweak, especially on a block that holds five or six references.



→ Next step: open a Format text block, write Hello {{FirstName}}, you have {{Score}} points., connect the two inputs to your variables and wire the output into a Dialogue block. You are holding the basic building block of all personalisation in Celestory.

Updated on: 21/09/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!