How to write AI character cards: a practical starter guide
The five basic sections of a character card, with examples for modern, fan-made and game-style cards, plus tips on length and testing.
Verification
- Test environment
- Unknown
- Tested on
- Unknown
- Last updated
- 2026-11-20
A character card is a structured system prompt that tells the model who to play and how the story works: the scene, the character, the world, the rules and how it interacts with the player. Reading stories and paying attention to characterization helps more than collecting prompt tricks. The examples below use a single main character, but the same structure extends to group cards.
Five basic sections
Character identity
Relationship / affinity rules
Narration style
Dialogue format
Opening scene
Modern-setting cards
- Identity: name, personality, age and background.
- Affinity: the starting value, what raises or lowers it, and what changes at thresholds, for example: "When affinity exceeds 30, the character is comfortable around {User} and starts conversations."
- Narration style: e.g. scene description in parentheses, speech in quotation marks; say what deserves detailed description.
- Dialogue format: if you track affinity, fix the layout so it always shows:
Line 1: Affinity: {affinity} {change}
Line 2 onward: dialogue and scene narration
- Opening scene: give the user something to respond to, e.g. a sunny weekend morning when the character, still in oversized pajamas, knocks on {User}'s door holding a plush toy. Sample exchanges can demonstrate the voice but are optional.
Fan-made cards
The goal is fidelity to the original. Revisit the work first, then record background, speech patterns and relationships. A handful of short dialogue examples (your own, or material you are allowed to reuse) teaches the voice; put longer background in a lorebook so it isn't sent every turn. An inner-thoughts module can make the character livelier, and a good opening imagines how the character and player first meet.
Game-style cards
For something like running an old-fashioned restaurant, add attributes, places and an economy, and define what each turn changes instead of letting the model invent every calculation:
Starting attributes: strength, intelligence and charisma (random or player-chosen).
Training locations raise specific attributes.
Thresholds unlock events: intelligence 60 opens a route; charisma 50 changes a relationship outcome.
Plan a dozen or so locations, each with its activities, who may appear and what it costs. Complex games benefit from a lorebook and a memory mechanism; check the numbers regularly, because models still drop settings or mix up values.
Length and testing
The author's modern and fan cards often ran about 2,000–3,000 Chinese characters, and larger game setups 3,000–5,000. These are examples, not targets: more text is not automatically better. Remove contradictions and repetition, add your own ideas to give the card character, and let testing show where it needs work.
Adapted from the XMLans blog: How to Write AI Character Cards: A Practical Starter Guide (Chinese original: AI写卡指南:从零开始写好卡).
Sources
- AI写卡指南:从零开始写好卡(星梦博客)www
.xmlans .com (opens in a new tab) · checked 2026-11-20 - How to Write AI Character Cards: A Practical Starter Guide (XMLans blog)en
.xmlans .com (opens in a new tab) · checked 2026-11-20