Authoring a Character
A Crime Engine character is not a block of prompt text. It is a set of small files, each with one job, and the reason they are separate is that they reach the model by different routes: some are always present, some are retrieved only when the question is about them, and some never reach it at all. Getting a character right is mostly a matter of putting each fact in the file whose route suits it.
This page describes the practice as it stands in the demo product's Case 1 content pack, which is the engine's worked example. Every file named here exists and can be read.
In a project folder, a character's files live in
cast/<id>/:profile.md,personality.txt,appearance.txt,memory.md,keys.yaml,template.md,samples.txt,suggestions.txtandfeature.txt(see Cases and projects). The section below names the files as the demo's compiled content pack does; the roles are the same.
1. The files
Every file is named for the character's ID, and the ID must match the population table exactly, including spaces.
| File | What it carries | Reaches the model |
|---|---|---|
Population.csv row |
name, gender, age, occupation, interrogation cost in days, alive, visible, search keywords | as basic profile facts |
Profiles/ID.md |
the public dossier the player can read, and the photo reference | shown to the player; not the character's voice |
Personalities/ID.txt |
who they are and how they speak | always, in the opening briefing |
TemplateKeyOverrides/ID.txt |
secrets, constraints and clue conditions that must always apply | always, as named template keys |
Memory/ID.txt |
authored personal knowledge, in paragraphs | only when the question matches |
Features/ID.txt |
a one-line description shown beside them in conversation | shown to the player |
Suggestions/ID.txt or ID_Situation.txt |
questions offered to the player | shown to the player |
CharacterTemplates/ID.txt |
a character-specific system template | always, as the template itself |
Appearances/ID.txt |
a visual brief for whoever draws the portrait | not inserted into the standard prompt |
| World knowledge files | shared geography, news and topics | only when the question matches |
Two of those rows are the ones authors get wrong, so they are worth stating as rules.
Appearances is for the artist, not the model. It is the authoring description a portrait is drawn from, and the standard prompt does not currently insert it. Writing a character's defining trait only there means nobody in the game knows about it.
Memory is retrieved, not guaranteed. A memory paragraph only arrives when the player's question is close enough to it. So an essential clue condition must not live only in a memory file; it belongs in the template overrides, which are always present.
2. A worked example
Elizabeth runs a fortune-telling workshop. Her files divide cleanly, and the division is the lesson.
Personalities/Elizabeth.txt — voice, and the boundaries of her competence. It is long, because it is doing the work of keeping her in character under pressure:
You are Elizabeth, a 49-year-old fortune teller who runs Palm & Star, a small workshop in Baytown Town Center in 1987. […] When asked for a palm reading, ask the visitor to describe their palm or offer their hand in the scene; do not pretend to see physical details they have not provided. […] You have no special knowledge of Jack's murder and cannot divine a murderer, an alibi, an undiscovered clue or the future.
Note what that last sentence is doing. A fortune teller is exactly the character a player will try to use as an oracle, so her inability to be one is written into her personality rather than left to the model's judgement.
TemplateKeyOverrides/Elizabeth.txt — the same boundaries, compressed, as always-present keys:
CandidatePersonalityInsert: "You run Palm & Star in Town Center and specialize in palm reading and constellations. Offer reflective symbolic readings, never certain predictions or murder evidence. Ask for palm details before interpreting them."
CandidateAdditionalInformationInsert: "You are available at Palm & Star from 08:00 through 21:00. You know no private facts about Jack's murder."
IrrelevantPeopleInsert: "You have no involvement in Jack's case. Your fortune telling cannot reveal a murderer, alibi or clue."
The duplication is deliberate. Personality can be crowded out as a conversation grows; the override keys are structural.
Memory/Elizabeth.txt — paragraphs of things she knows, each self-contained, because a paragraph is the retrieval unit:
In traditional palm reading the heart line invites discussion of feelings and relationships, the head line of habits of thought, and the life line of vitality and changes. These are symbolic readings, not measurements or proof. A short life line does not predict an early death. I ask people to describe their hand rather than inventing its markings.
Cassiopeia's brightest stars make a recognizable W shape. The Summer Triangle is an asterism formed by Vega, Deneb and Altair, which belong to three different constellations.
Her last memory paragraph is a denial — that she did not witness the murder and no reading can name the killer — so that a question aimed at the murder retrieves her refusal rather than nothing.
Features/Elizabeth.txt is one line for the player: Copper curls frame a thoughtful face; a brass star pins her indigo shawl. Suggestions/Elizabeth.txt is three questions, one of which (Can fortune telling really predict what will happen?) invites the boundary she has been written to hold.
3. The template
A character's system prompt is a template. Most characters have no template file at all and get the shared default; a character who needs more has a CharacterTemplates/ID.txt that normally just includes the default and adds to it. A minimal one is literally one line:
{{StandardTemplate}}
The default template sets the scene — a detective called Ronan, a town unsettled by a murder, a conversation that may be happening at the police station or on the street — and then interleaves authored content with keys the engine fills in:
| Key | Filled from |
|---|---|
{{CandidateName}}, {{CandidateBasicProfileInfo}} |
the population row |
{{CandidatePersonality}} |
Personalities/ID.txt |
{{CandidatePersonalityInsert}}, {{CandidateAdditionalInformationInsert}}, {{IrrelevantPeopleInsert}}, {{CloseContactInsert}} |
TemplateKeyOverrides/ID.txt |
{{CurrentDate}} |
the game clock |
{{UserInputDependentContextualWorld}} and its _Baytown and _LocalNews variants |
retrieved world knowledge |
{{UserInputDependentContextualPersonalMemory}} |
retrieved Memory/ID.txt paragraphs |
{{JackCommonInformation}} |
shared case facts every townsperson has heard |
The default also does two things worth copying into any case. It tells characters that the game supplies circumstances separately from player speech, and that only the verified game state confirms a real item transfer — so a player claiming to have paid has said empty words. And it closes by ranking the sources against each other:
Character-specific facts and disclosure boundaries take precedence over general news or speculation […] Preserve the ages, jobs, relationships and roles in these facts. A leading accusation does not change what you witnessed or who did what. Keep your own conversational manner under pressure.
4. Practice that keeps a cast consistent
The demo's cast is 120 people, and the lessons from authoring it are mostly about agreement between files.
Every file about one person must describe the same person. A rewritten character is not done when the personality file is right; the dossier, memory, always-present constraints, feature line and suggested questions all have to move with it. The case notes record exactly this being fixed — one character's personality had drifted into an unrelated fantasy persona while every other file described a cannery worker.
Shared history goes in both memories, with different feelings. A divorced pair in the cast share the same dated events — the marriage, the separation, the division of belongings, a coat returned outside the library — in both memory files and both override files, with different emotional interpretations. The facts agree; the characters do not have to.
A motive is pressure, not proof. The caretaker's debts and addiction are authored as characterisation. The documentation states the rule plainly: debt and addiction are pressure, not proof of murder, and the playable evidence route does not depend on a model improvising about them correctly.
Attraction is authored, never inferred. Three named adult women have authored attraction to the detective, each expressed differently, each accepting a decline gracefully. It is written per character; it is not a property derived from gender, and it changes nobody's case knowledge.
Authored fact is not model behaviour. A model may still evade, embellish or err. Repeatable probe cases exist per claim — an alibi, a chronology, a motive, an archive, a corroboration — and the practice is to read the transcripts against their rubrics rather than to trust the files. See Testing a case.
5. When a change takes effect
Character text is compiled into the content pack, so changing it means rebuilding. Loose assets — portraits and the per-image layout files — are replaced in the asset folder and picked up on restart.
Transcripts are different from authored knowledge. A save keeps the conversation transcript, and the service rebuilds searchable conversation memory from it on load, so an existing save receives the new character definitions while keeping what the player already said. That is usually not what you want when evaluating a rewritten persona: start a new game, so old conversations are not steering the new one.
See also
- Characters: what a character is in the case model
- Knowledge and retrieval: how memory and world knowledge are indexed and searched
- The model runtime: the context limit these files are competing for