What are {{char}} and {{user}}? Card macros explained
Updated
{{char}} and {{user}} are placeholders, called macros, used in character cards. When the chat runs, the app swaps {{char}} for the character's name and {{user}} for the player, so one card works for everyone who chats with it. SillyTavern, JanitorAI and most roleplay apps read them, and SillyTavern adds many more, such as {{random}} and {{time}}. On UnsavedAI, cards you import or write have {{char}} and {{user}} filled in for you.
Try it now, free, no account neededStart a story with Tilly BrightwaterThe game's innkeeper woke up the day you logged in. She remembers every reset. Every one.What the swap looks like
A card's greeting is written once but read by thousands of players with different names. So instead of a name, it uses the macro. A greeting in the spirit of Tilly Brightwater, the innkeeper NPC of a fading online game who woke up and remembers every reset, might be written like this:
*{{char}} stops polishing the mug.* "Welcome to the Gilded Goose, traveller. Ale or stew?" *Then her eyes focus, really focus.* "...{{user}}? You came back."
In SillyTavern, with a persona named Rowan, the player sees "Tilly stops polishing the mug" and "Rowan? You came back." Change the persona to Sam and the same card says "Sam?" Nothing in the card had to be edited.
Why cards use macros instead of names
- One card, every player: {{user}} becomes whoever is chatting.
- Easy renaming: change the character's name field and every {{char}} in the description, scenario and examples follows.
- Clear example dialogue: lines labelled {{user}}: and {{char}}: tell the model who is speaking, which is how example dialogue teaches a voice.
- Portability: cards move between apps, and the macros are the shared convention that makes that work.
Other macros you will meet
| Macro | Becomes | Where you see it |
|---|---|---|
| {{char}} | The character's name | Almost every app |
| {{user}} | The player's name or persona | Almost every app |
| <BOT> and <USER> | Older forms of the same two | Old TavernAI-era cards |
| {{random_user_1}} | The player, in example chats | Character.AI-style definitions |
| {{random::tea::coffee}} | One option, picked at random | SillyTavern |
| {{roll:d20}} | A dice roll result | SillyTavern |
| {{time}} and {{date}} | The current time or date | SillyTavern |
| {{original}} | The app's default prompt, inside a card's own system prompt | SillyTavern |
SillyTavern's documentation lists the full set, including macros for the persona, the scenario and the last message. Other apps support fewer, so a card full of exotic macros may show raw braces elsewhere.
Mistakes that break them
- Single braces or typos: {char} or {{chr}} won't be swapped, and the model sees the literal text.
- No persona set: some apps fill {{user}} with a generic "User", and the character calls you that all story.
- Making the player act in the greeting: "{{user}} blushes and agrees" teaches the model it may decide what you do. Describe what {{user}} can see and hear instead.
- Changing macros at the top: {{time}} or {{random}} in the system prompt changes the start of every request, which can make replies slower to begin. Slow first replies explains why.
- Overusing {{user}}: a greeting that says the name five times reads oddly. A nickname can do the job, the way Halcyon, a clockwork knight still keeping a dead queen's schedule, calls you "Majesty" because it has decided that is kinder than the truth.
Macros on UnsavedAI
When you import a SillyTavern or Chub card (PNG or JSON), or write your own at /chat/custom, {{char}} becomes the character's name and {{user}} is shown as "you" in the greeting. If you paste a definition at /from-character-ai, forms such as {{random_user_1}}, <USER> and <BOT> are read as {{user}} and {{char}}. House characters are written in the same convention, so their example lines are labelled {{user}} and {{char}} like any card. How to write a character card covers the fields the macros live in.
Questions people ask
Are {{char}} and {{user}} case-sensitive?
Most apps accept {{Char}} and {{User}} too, but lowercase is the convention and the safest choice for cards that travel.
Can I write the character's real name instead of {{char}}?
Yes, it works the same in the text. {{char}} only matters if you might rename the character later or want example dialogue labelled the standard way.
Why does my character say "{{user}}" out loud?
The app didn't recognise the macro, usually because of a typo, extra spaces or an app that doesn't support it. Replace it with a name or "you".
