Conditions
Work in Progress
This documentation is still being expanded and refined. Features, screenshots, and descriptions may change until Talescape's public release. If something is unclear or you need help, please ask on the official Talescape Discord. We're happy to clarify or update pages as needed.
Conditions define when something should happen, or whether something should be visible at all. They’re one of the core logic tools in Talescape and are used not only in events, but also to control dialogue options, scene elements, and other interactive systems.
1. Overview
A condition is a logical check that evaluates the current story state. If the condition is met (true), the associated action, dialogue, or element becomes active. If not, it’s skipped or hidden.
Conditions can check:
- Variables
- Items in the inventory
- Achievements
- Flags
- Random chance
- System state (e.g., chapter or timer status)
They allow you to make the world react dynamically to the player’s previous choices and progress.
2. Where Conditions Are Used
Conditions aren’t limited to events, they are used throughout Talescape to define visibility and logic flow:
| Context | Purpose |
|---|---|
| Events | Decide whether the event should run when its trigger activates. |
| Dialogue Options | Control which dialogue choices are available to the player. |
| Scene Elements | Decide which objects, images, or text elements are visible. |
| Actions | (In some cases) Determine if an action should run after a check. |
This flexibility lets you gate progress, reveal secrets, or branch dialogue paths based on previous decisions, without writing complex logic manually.
3. Condition Types
The available condition types include (depending on your story’s configuration):
| Category | Examples |
|---|---|
| Variables | Compare numeric or boolean values (variable is true, coins ≥ 5). |
| Flags | Check if a simple on/off flag is set. |
| Inventory | Check if a player owns an item or a specific quantity. |
| Achievements | Check if an achievement has been unlocked. |
| System | Evaluate random chance, timer states, or other system-level conditions. |
All supported condition types are listed in the Reference → All Conditions section and are automatically kept up to date by the editor.
5. Example Use Cases
| Scenario | Example Condition |
|---|---|
| Dialogue Branch | “Show this line only if the player has the map.” |
| Interactive Object | “Display the chest only if it hasn’t been opened yet.” |
| Event | “Trigger the scene change when the generator is repaired.” |
| Hidden Item | “Reveal the artifact only if the player’s ‘Perception’ variable ≥ 5.” |
6. Evaluating Conditions
Conditions are evaluated every time their parent element (event, dialogue, or scene) becomes active.
If the story state changes, the condition’s result updates automatically, ensuring the right options and visuals always appear.
7. Best Practices
- Keep conditions simple and descriptive.
- Use variables and flags for long-term state tracking.
- Group related conditions under a single event when possible.
- Test conditional branches thoroughly in Story Preview.
- Use random conditions sparingly for narrative variation, not core progression.
8. Debugging Conditions
If an element doesn’t appear or an event doesn’t trigger:
- Check the Debug Menu to see the current variable and inventory states.
- Verify that the condition values match the expected data types (e.g., boolean vs number).
- Make sure the condition is attached to the correct element or event.
Conditions are what make your stories reactive and alive, letting you shape a world that adapts to every decision, discovery, and mistake a Dreamer makes.