Macros¶
Macros are template variables written as {{macro_name}} that get replaced with dynamic content during prompt assembly. They can be used in preset blocks, prompt text fields, chat messages, and included world book content.
For the complete macro reference, see Presets > Macros Reference.
For how macros are evaluated and execution order, see Presets > Execution Order.
Quick Examples¶
You are {{char}}, a character described as: {{description}}
You are speaking with {{user}}.
Current time: {{time}} on {{weekday}}.
During prompt assembly, each macro is replaced with its current value:
You are Aria, a character described as: A curious adventurer...
You are speaking with Alex.
Current time: 14:30 on Wednesday.
Where Macros Work¶
- Preset blocks — The primary use case. Macros make your presets dynamic.
- World book entries — Active entry content and outlets are macro-evaluated when they are injected into the prompt
- Guided generation content
- Author's Note content
- Chat messages — Each message is macro-evaluated during assembly
Common Categories¶
| Category | Examples | Full List |
|---|---|---|
| Names | {{user}}, {{char}}, {{group}} |
Identity macros |
| Character data | {{description}}, {{personality}}, {{scenario}} |
Character macros |
| Chat state | {{lastMessage}}, {{messageCount}}, {{messageAt::0}} |
Chat macros |
| String | {{upper}}, {{replace}}, {{len}}, {{split}} |
String macros |
| Math | {{calc::2+3}}, {{clamp}}, {{min}}, {{max}} |
Math macros |
| Logic | {{switch}}, {{default}}, {{and}}, {{not}} |
Logic macros |
| Random | {{random::1::100}}, {{pick::a::b::c}}, {{roll::2d6}} |
Entropy macros |
| Variables | {{.var}} (local), {{@var}} (chat-persisted), {{$var}} (global) |
Variable macros |
| Prompt Variables | {{var::tone}}, {{varDefault::tone}} |
Prompt variable macros |
| Conditionals | {{if .var == 5}}...{{else}}...{{/if}} |
Core macros |
| Memory & Retrieval | {{memories}}, {{databank}}, {{entities}} |
Memory macros |
| Formatting | {{bullets}}, {{numbered}} |
Formatting macros |
| Council & Lumia | {{lumiaCouncilDeliberation}}, {{loomStyle}} |
Council macros |
Lumiverse has 180+ built-in macros across 20+ categories. See the full reference for the complete list.