1. Chazz.ai
  2. Documentation
  3. Macros in card text

Macros in card text · Chazz.ai

How macros in card text works on Chazz.ai. Small braces inside a description or greeting that pick a variant, fill in a name, or change the text for the reader. Any field marked as accepting macros can contain small expressions in double braces. They are worked out just before the text...

Small braces inside a description or greeting that pick a variant, fill in a name, or change the text for the reader.

Any field marked as accepting macros can contain small expressions in double braces. They are worked out just before the text reaches the model, so one card can behave differently on a second playthrough, for a different reader, or in a different scene.

Picking a variant

One of the three, chosen fresh each time.

This is what makes a greeting feel different the second time you open a character. It is the single best place to spend a macro.

Filling in a value

Values are listed on the reference tab in the editor.

A fallback keeps the sentence intact when a value is missing:

Conditions

A condition writes one thing or another. The test and the branches are separated by a colon, and the two branches by a double colon:

{{unless …}} is the inverse. Tests read like a sentence: is, is not, contains, starts with, ends with, matches /pattern/i, the numeric comparisons, is empty and is not empty. They combine with and, or, not and brackets. A bare name on its own is a truth test.

Writing for two audiences at once

One condition follows the person reading rather than the rating on the card. mature is true for a reader whose account is verified for restricted content and false for everyone else:

This is how one card serves both audiences without a second version and without either reader seeing a refusal. See Content ratings and moderation.

Which fields accept macros

Not every field does. Names, tags, image fields, id references and switches are literal. The prose fields are where macros work:

The last row is your own text rather than a card's, and it behaves the same way: a persona described with {{if mature: … :: …}} reads one way for you and another for a reader who is not verified, and {{char.name}} in a custom style resolves to whoever you are talking to. Persona names stay literal, like every other name.

Two of the character fields above (Speech Patterns and Example Dialogue) and both modifier trait fields accept macros but are not currently read by the engine when building a prompt. The macro will expand correctly and then go nowhere. See Characters.

  • Character: Description, Greeting, Scenario, System Prompt, Writing Style, Personality Traits, Speech Patterns, Example Dialogue, Speech Style, Goals, Likes, Dislikes, Hard Rules, Immutable Facts, Forbidden Drifts
  • Scenario: Description, Greeting Override, Context / Premise, Location, Atmosphere
  • Modifier: Description, Prompt Instructions, Trait Additions, Trait Removals
  • Lore: Entry content
  • Yours: Persona description, custom response styles, and anything you set with /modify

When something goes wrong

The editor checks your macros as you type and points at the exact brace. An unclosed brace or a missing branch is reported rather than silently swallowed, so a broken macro never ships as literal braces into a conversation.

Elsewhere on Chazz.ai

  • Explore characters
  • About
  • Features
  • Pricing
  • Use cases
  • Integrations
  • Compare
  • Documentation
  • FAQ
  • Changelog
  • API
  • Security
  • Status
  • Contact
  • Press
  • Stories
  • Marketplace
  • Image generation
  • Credits and plans
  • Chat app connectors
  • Terms
  • Privacy
  • AI transparency
  • Notice to AI agents

This document is the server-rendered form of /docs/macros. The interactive page needs JavaScript, and shows the same content.

The complete documentation of this service is available as one plain-text file at /llms-full.txt. A short summary, with the operator's policy for automated readers, is at /llms.txt. Changes are published as a feed at /rss.xml.

Chazz.ai is operated by Cognitive Industries, ABN 62 794 528 747, Australia. Contact: [email protected].