CONTEXT
CONTEXT
Crusader Kings 3 is a medieval dynasty simulator. You play as a noble house across generations, scheming, conquering, marrying strategically, and trying not to get murdered by your own children.
Every house has a motto, a short phrase that captures their identity. Think "Winter is Coming" or "Ours is the Fury". These appear in-game on house screens and add flavor to the dynasty you're building.
The base game generates these procedurally, but the results feel generic. This project uses LLMs to generate 14,000 culturally-authentic mottos across 53 cultures, so a Norse house sounds Viking, a Byzantine house sounds Roman, and an Irish house sounds Celtic.
Crusader Kings 3 is a medieval dynasty simulator. You play as a noble house across generations, scheming, conquering, marrying strategically, and trying not to get murdered by your own children.
Every house has a motto, a short phrase that captures their identity. Think "Winter is Coming" or "Ours is the Fury". These appear in-game on house screens and add flavor to the dynasty you're building.
The base game generates these procedurally, but the results feel generic. This project uses LLMs to generate 14,000 culturally-authentic mottos across 53 cultures, so a Norse house sounds Viking, a Byzantine house sounds Roman, and an Irish house sounds Celtic.
HOW VANILLA WORKS
HOW VANILLA WORKS
The base game uses template-based slot-filling. Sentence structures like "By $1$ and $2$" get filled from word pools:
TEMPLATE: "By $1$ and $2$"
│ │
▼ ▼
INSERT POOLS: [honor, truth, valor, strength, wisdom...]
RESULT: "By Honor and Truth"
"By Valor and Wisdom"
"By Strength and Honor"
...
Same sentence structure, different word fills.
This generates variety efficiently, with ~50,000 theoretical combinations from minimal content. But the mottos feel interchangeable. Here's what different cultures get:
They're fine. But they could belong to any culture. Nothing about "By Honor and Sword" feels specifically Norse.
The base game uses template-based slot-filling. Sentence structures like "By $1$ and $2$" get filled from word pools:
TEMPLATE: "By $1$ and $2$"
│ │
▼ ▼
INSERT POOLS: [honor, truth, valor, strength, wisdom...]
RESULT: "By Honor and Truth"
"By Valor and Wisdom"
"By Strength and Honor"
...
Same sentence structure, different word fills.
This generates variety efficiently, with ~50,000 theoretical combinations from minimal content. But the mottos feel interchangeable. Here's what different cultures get:
They're fine. But they could belong to any culture. Nothing about "By Honor and Sword" feels specifically Norse.
WHAT THE PIPELINE PRODUCES
WHAT THE PIPELINE PRODUCES
The same cultures, with mottos generated by this pipeline:
The same cultures, with mottos generated by this pipeline:
THE DIVERSITY PROBLEM
THE DIVERSITY PROBLEM
What happens if you just ask an LLM to generate Norse mottos with no context? I ran the experiment: "Generate 100 Norse house mottos for a medieval strategy game."
Here's a sample of what came back:
These are Norse-ish, but not actually Norse. The giveaway:
Now compare to the pipeline output, which had access to deep cultural research:
What happens if you just ask an LLM to generate Norse mottos with no context? I ran the experiment: "Generate 100 Norse house mottos for a medieval strategy game."
Here's a sample of what came back:
These are Norse-ish, but not actually Norse. The giveaway:
Now compare to the pipeline output, which had access to deep cultural research:
THE PIPELINE
THE PIPELINE
Five stages, each solving a specific problem:
Web search + LLM synthesis builds authentic cultural context for each of the 53 cultures. Not surface-level facts, but worldview: What did this culture value? How did they think about death, honor, legacy? What did their poetry sound like?
Six lifestyle voices per culture (martial, diplomacy, intrigue, stewardship, learning, prowess). A warrior's motto sounds different from a scholar's. Each persona is a rich prose description of how this character thinks and speaks.
Generate in batches of 10, analyze thematic diversity after each batch, continue until "saturation" is detected. This avoids both under-generating (missing themes) and over-generating (endless variations of the same idea). Some cultures saturate at 15 mottos; others hit 70 before running out of fresh ground.
An LLM acts as a critical editor, rejecting generic or weak mottos. "The wolf never bows" gets cut; "The unwounded man has no saga" stays. Retention rate is remarkably consistent at ~70% across all cultures.
Text cleanup (normalize quotes, remove trailing periods, title case) and generate CK3 mod files with proper triggers so Norse mottos only appear for Norse houses, Arabic mottos for Arabic houses, etc.
The next sections dive deeper into the interesting parts: research, personas, and the saturation detection loop.
Five stages, each solving a specific problem:
Web search + LLM synthesis builds authentic cultural context for each of the 53 cultures. Not surface-level facts, but worldview: What did this culture value? How did they think about death, honor, legacy? What did their poetry sound like?
Six lifestyle voices per culture (martial, diplomacy, intrigue, stewardship, learning, prowess). A warrior's motto sounds different from a scholar's. Each persona is a rich prose description of how this character thinks and speaks.
Generate in batches of 10, analyze thematic diversity after each batch, continue until "saturation" is detected. This avoids both under-generating (missing themes) and over-generating (endless variations of the same idea). Some cultures saturate at 15 mottos; others hit 70 before running out of fresh ground.
An LLM acts as a critical editor, rejecting generic or weak mottos. "The wolf never bows" gets cut; "The unwounded man has no saga" stays. Retention rate is remarkably consistent at ~70% across all cultures.
Text cleanup (normalize quotes, remove trailing periods, title case) and generate CK3 mod files with proper triggers so Norse mottos only appear for Norse houses, Arabic mottos for Arabic houses, etc.
The next sections dive deeper into the interesting parts: research, personas, and the saturation detection loop.
CULTURAL RESEARCH
CULTURAL RESEARCH
Each culture gets a research document built from web search + LLM synthesis. Not surface-level facts ("Mongols rode horses") but the underlying worldview: What did this culture value? How did they think about death, honor, legacy? What did their poetry sound like?
Here's what the research captures for Steppe cultures (Mongolic, Turkic):
The supreme sky god governing all existence. Genghis Khan began declarations with "By the will of Eternal Blue Heaven." Khans were "sons of Tengri," receiving kut (heavenly spiritual force). Conquest wasn't ambition; it was divine mandate.
A spear with the best stallion's horsehair draped around its base. The warrior's soul resided forever in those tufts. While living, it carried destiny; in death, it became the soul itself. The body was abandoned to nature, but the sulde lived on.
The Secret History of the Mongols begins: "At the beginning there was a blue-grey wolf, born with his destiny ordained by Heaven Above. His wife was a fallow doe." The wolf represents the sky; the deer symbolizes earth. Genghis Khan's clan name relates to böri (wolf).
A sacred bond between two men who become brothers by choice, not birth. "Sworn friends share but a single life. They do not abandon one another: they are each a life's safeguard for the other." Genghis Khan and Jamukha swore anda three times.
The research also captures authentic vocabulary (sulde, kut, anda, uran, tamga), anti-patterns to avoid (castle imagery, European feudal terms, agricultural metaphors), and linguistic style (terse commands, oral tradition rhythms, verb-final structures).
This context shapes everything. When the model generates steppe mottos, it draws on these concepts:
Each culture gets a research document built from web search + LLM synthesis. Not surface-level facts ("Mongols rode horses") but the underlying worldview: What did this culture value? How did they think about death, honor, legacy? What did their poetry sound like?
Here's what the research captures for Steppe cultures (Mongolic, Turkic):
The supreme sky god governing all existence. Genghis Khan began declarations with "By the will of Eternal Blue Heaven." Khans were "sons of Tengri," receiving kut (heavenly spiritual force). Conquest wasn't ambition; it was divine mandate.
A spear with the best stallion's horsehair draped around its base. The warrior's soul resided forever in those tufts. While living, it carried destiny; in death, it became the soul itself. The body was abandoned to nature, but the sulde lived on.
The Secret History of the Mongols begins: "At the beginning there was a blue-grey wolf, born with his destiny ordained by Heaven Above. His wife was a fallow doe." The wolf represents the sky; the deer symbolizes earth. Genghis Khan's clan name relates to böri (wolf).
A sacred bond between two men who become brothers by choice, not birth. "Sworn friends share but a single life. They do not abandon one another: they are each a life's safeguard for the other." Genghis Khan and Jamukha swore anda three times.
The research also captures authentic vocabulary (sulde, kut, anda, uran, tamga), anti-patterns to avoid (castle imagery, European feudal terms, agricultural metaphors), and linguistic style (terse commands, oral tradition rhythms, verb-final structures).
This context shapes everything. When the model generates steppe mottos, it draws on these concepts:
LIFESTYLE PERSONAS
LIFESTYLE PERSONAS
A warrior's motto sounds different from a scholar's. Each culture gets six personas: rich prose descriptions of how this character thinks and speaks. Not labels, but voice.
Here are three Persian personas and the mottos they produce:
"You are a Persian warrior-noble who remembers Rostam's defiance and the Savaran cavalry that shook empires. Think of the farr blazing in battle, armored elephants bearing the sun-standard. Your motto should proclaim divine mandate for conquest—how your house stands as the bulwark against druj (chaos)..."
"You are a Persian courtier who knows that silence defeats the stupid and patience makes all things possible. Your cunning is the measured strike of the chess master, not the assassin's crude blade. Think of secrets kept like gems in mud, the subtle word that topples thrones while you smile behind wine-cups..."
"You are a keeper of the Shahnameh's wisdom, heir to Ferdowsi's deathless words and Avestan knowledge. Your library preserves what the Arab conquest could not burn. Think of the farr that comes from understanding cosmic order, poetry that plants the seed of the Word..."
A warrior's motto sounds different from a scholar's. Each culture gets six personas: rich prose descriptions of how this character thinks and speaks. Not labels, but voice.
Here are three Persian personas and the mottos they produce:
"You are a Persian warrior-noble who remembers Rostam's defiance and the Savaran cavalry that shook empires. Think of the farr blazing in battle, armored elephants bearing the sun-standard. Your motto should proclaim divine mandate for conquest—how your house stands as the bulwark against druj (chaos)..."
"You are a Persian courtier who knows that silence defeats the stupid and patience makes all things possible. Your cunning is the measured strike of the chess master, not the assassin's crude blade. Think of secrets kept like gems in mud, the subtle word that topples thrones while you smile behind wine-cups..."
"You are a keeper of the Shahnameh's wisdom, heir to Ferdowsi's deathless words and Avestan knowledge. Your library preserves what the Arab conquest could not burn. Think of the farr that comes from understanding cosmic order, poetry that plants the seed of the Word..."
ADAPTIVE SATURATION
ADAPTIVE SATURATION
Instead of generating a fixed number of mottos, we generate in batches and detect when we've saturated the thematic space:
+-------------------------------------------+
| Generate batch of 10 mottos |
| (using research + persona context) |
+---------------------+---------------------+
|
v
+-------------------------------------------+
| Analyze cumulative corpus: |
| - How many thematic categories? |
| - Largest category < 30%? |
| - Are new patterns emerging? |
| - Entropy assessment (high/med/low) |
+---------------------+---------------------+
|
+-----------+-----------+
| |
v v
+------------------+ +------------------+
| NOT SATURATED | | SATURATED |
| | | |
| Loop back, | | Stop. Move to |
| generate more | | next lifestyle |
+--------+---------+ +------------------+
|
+------+
v
(back to top)
Saturation conditions (any triggers stop):
- • No new patterns: After batch 3, no new structural patterns emerge
- • Over-concentration: Single thematic category exceeds 30% of corpus
- • Entropy drop: Diversity assessment drops to "low"
- • Safety cap: Reached 70 mottos (hard limit)
Results across 318 culture-lifestyle combinations: some saturate at just 2 mottos, others hit the 70-motto cap still finding fresh ground. If we'd used a fixed number (say, "generate 30 per combo"), we'd either waste capacity on rich cultures or force repetitive output from thin ones.
Instead of generating a fixed number of mottos, we generate in batches and detect when we've saturated the thematic space:
+-------------------------------------------+
| Generate batch of 10 mottos |
| (using research + persona context) |
+---------------------+---------------------+
|
v
+-------------------------------------------+
| Analyze cumulative corpus: |
| - How many thematic categories? |
| - Largest category < 30%? |
| - Are new patterns emerging? |
| - Entropy assessment (high/med/low) |
+---------------------+---------------------+
|
+-----------+-----------+
| |
v v
+------------------+ +------------------+
| NOT SATURATED | | SATURATED |
| | | |
| Loop back, | | Stop. Move to |
| generate more | | next lifestyle |
+--------+---------+ +------------------+
|
+------+
v
(back to top)
Saturation conditions (any triggers stop):
- • No new patterns: After batch 3, no new structural patterns emerge
- • Over-concentration: Single thematic category exceeds 30% of corpus
- • Entropy drop: Diversity assessment drops to "low"
- • Safety cap: Reached 70 mottos (hard limit)
Results across 318 culture-lifestyle combinations: some saturate at just 2 mottos, others hit the 70-motto cap still finding fresh ground. If we'd used a fixed number (say, "generate 30 per combo"), we'd either waste capacity on rich cultures or force repetitive output from thin ones.
NATIVE-FIRST GENERATION
NATIVE-FIRST GENERATION
A key technique: generate in the native/historical language first, then translate. When the model thinks in Classical Chinese, it reaches for four-character idioms and Confucian concepts that wouldn't emerge from "write a Chinese-sounding English motto."
Here's what this produces across three very different writing systems:
Note the parallel structure (靜/疾, 百世/一朝), the four-character rhythm that echoes classical idioms, and concepts like 道 (Way) that carry Confucian/Daoist weight.
Ainu cosmology pervades: kimun-kamuy (bear-god), kotan-kor-kamuy (owl, village guardian spirit), Okikurmi (culture hero). The ci= prefix marks first-person plural—"we" as a clan.
The Homeric concept κλέος ἄφθιτον (imperishable glory) appears naturally. "Μολὲ καὶ λάβε" echoes Sparta's legendary response to Xerxes. The παραστάτης (the man beside you in the phalanx) captures Greek warfare's communal ethos.
The translation step isn't literal. It aims for comprehensible English that preserves cultural feel. "百世修文,一朝用武" could be translated word-for-word as "hundred generations cultivate writing, one morning use martial"—but "A hundred generations cultivate learning; one dawn demands the sword" carries the meaning and rhythm.
A key technique: generate in the native/historical language first, then translate. When the model thinks in Classical Chinese, it reaches for four-character idioms and Confucian concepts that wouldn't emerge from "write a Chinese-sounding English motto."
Here's what this produces across three very different writing systems:
Note the parallel structure (靜/疾, 百世/一朝), the four-character rhythm that echoes classical idioms, and concepts like 道 (Way) that carry Confucian/Daoist weight.
Ainu cosmology pervades: kimun-kamuy (bear-god), kotan-kor-kamuy (owl, village guardian spirit), Okikurmi (culture hero). The ci= prefix marks first-person plural—"we" as a clan.
The Homeric concept κλέος ἄφθιτον (imperishable glory) appears naturally. "Μολὲ καὶ λάβε" echoes Sparta's legendary response to Xerxes. The παραστάτης (the man beside you in the phalanx) captures Greek warfare's communal ethos.
The translation step isn't literal. It aims for comprehensible English that preserves cultural feel. "百世修文,一朝用武" could be translated word-for-word as "hundred generations cultivate writing, one morning use martial"—but "A hundred generations cultivate learning; one dawn demands the sword" carries the meaning and rhythm.
QUALITY FILTER
QUALITY FILTER
Generated mottos pass through a filter before making it to the final output. The framing that worked best: the HBO/BBC Historical Drama Test.
"You are a historical consultant for premium TV productions like HBO's Rome or BBC's The Last Kingdom. Would this phrase feel authentic and natural if spoken by a character or displayed on a banner in a prestige historical drama about this culture?"
The criteria are surprisingly concrete:
- • Could be carved on a medieval banner, seal, or tombstone — not just a phrase but something a house would choose to represent them forever
- • A character in the show could say it with a straight face — the cringe test
- • Feels specific to THIS culture's values, imagery, religion — not generic warrior platitudes
- • Evokes the right time period and worldview — no anachronisms
The filter runs mottos through three different LLMs (Claude, GPT-4, Gemini), each applying the same test independently. A motto only passes if it gets 2/3 or 3/3 TRUE votes.
[C] = Claude, [G] = GPT-4, [M] = Gemini. The multi-judge approach catches mottos that pass one model's bar but not another's.
Final retention rate: remarkably consistent ~70% across all cultures. The filter is aggressive enough to cut the generic ("Honor above all else") while preserving the distinctive ("The blade remembers what the hand forgets").
Generated mottos pass through a filter before making it to the final output. The framing that worked best: the HBO/BBC Historical Drama Test.
"You are a historical consultant for premium TV productions like HBO's Rome or BBC's The Last Kingdom. Would this phrase feel authentic and natural if spoken by a character or displayed on a banner in a prestige historical drama about this culture?"
The criteria are surprisingly concrete:
- • Could be carved on a medieval banner, seal, or tombstone — not just a phrase but something a house would choose to represent them forever
- • A character in the show could say it with a straight face — the cringe test
- • Feels specific to THIS culture's values, imagery, religion — not generic warrior platitudes
- • Evokes the right time period and worldview — no anachronisms
The filter runs mottos through three different LLMs (Claude, GPT-4, Gemini), each applying the same test independently. A motto only passes if it gets 2/3 or 3/3 TRUE votes.
[C] = Claude, [G] = GPT-4, [M] = Gemini. The multi-judge approach catches mottos that pass one model's bar but not another's.
Final retention rate: remarkably consistent ~70% across all cultures. The filter is aggressive enough to cut the generic ("Honor above all else") while preserving the distinctive ("The blade remembers what the hand forgets").
CROSS-CULTURAL GALLERY
CROSS-CULTURAL GALLERY
Final output samples with explanations of why each works:
Final output samples with explanations of why each works:
BY THE NUMBERS
BY THE NUMBERS
WHAT'S NEXT
WHAT'S NEXT
The mod will be on the Steam Workshop soon. I'm still cleaning up a few edge cases and adding the remaining cultures.
Beyond mottos, I'm exploring how these techniques might apply to other procedurally-generated text in CK3 and other Paradox games: character nicknames, event flavor text, dynasty legacies, realm names. The same principle holds: deep cultural research + persona-driven generation + quality filtering produces output that feels authentic rather than generic.
If you're an expert (or just knowledgeable) in any of these cultures and spot something wrong, please reach out. The pipeline is only as good as the research feeding it, and I'd rather fix inaccuracies than ship them. Especially for the less-documented cultures (Ainu, Akan, Sogdian, etc.), any corrections or additional context would be valuable.
You can find me on Twitter/X at @liggi or email me at jasonliggi@gmail.com.
The mod will be on the Steam Workshop soon. I'm still cleaning up a few edge cases and adding the remaining cultures.
Beyond mottos, I'm exploring how these techniques might apply to other procedurally-generated text in CK3 and other Paradox games: character nicknames, event flavor text, dynasty legacies, realm names. The same principle holds: deep cultural research + persona-driven generation + quality filtering produces output that feels authentic rather than generic.
If you're an expert (or just knowledgeable) in any of these cultures and spot something wrong, please reach out. The pipeline is only as good as the research feeding it, and I'd rather fix inaccuracies than ship them. Especially for the less-documented cultures (Ainu, Akan, Sogdian, etc.), any corrections or additional context would be valuable.
You can find me on Twitter/X at @liggi or email me at jasonliggi@gmail.com.