TTRPG NPC Generator
Generate detailed, coherent NPCs for tabletop RPGs with names, races, classes, personalities, backstories, equipment, and quirks. Fully random or seeded.
About
Generating a believable NPC on the fly is harder than it looks. A random name paired with a random class produces incoherent characters that break immersion. The real challenge is trait coherence: a dwarven blacksmith should not speak like an elven diplomat, and a street urchin rogue should not carry plate armor. This generator solves that problem by using weighted probability tables where each selected trait constrains subsequent selections. Race influences name syllable pools. Class influences equipment loadout and skill proficiency. Background drives motivation and personality vectors. The result is a character that reads as designed, not dice-rolled. Seed any generation with a string to reproduce the exact same NPC across sessions. Note: this tool approximates fantasy archetypes common to systems like D&D 5e and Pathfinder. Homebrew settings may require manual adjustment of cultural assumptions.
Formulas
NPC generation uses a weighted coherence pipeline rather than uniform randomness. Each trait selection narrows subsequent probability distributions.
Where wbase is the default weight for a trait in the global pool, and wcoherence is a multiplier derived from previously selected traits (e.g., selecting "Dwarf" multiplies the weight of "Fighter" by 2.0 and "Wizard" by 0.5). The denominator normalizes across all k candidates.
Name generation uses syllable concatenation:
The seeded PRNG uses xorshift128 initialized from a string hash, ensuring seed(s) → deterministic output for reproducibility across sessions.
Reference Data
| Race | Typical Lifespan | Common Classes | Name Style | Stat Tendency |
|---|---|---|---|---|
| Human | 70 - 90 years | Any | Varied cultural | Balanced |
| Elf | 700 - 900 years | Wizard, Ranger, Bard | Flowing vowels | DEX, INT |
| Dwarf | 300 - 400 years | Fighter, Cleric, Artificer | Hard consonants | CON, STR |
| Halfling | 150 - 200 years | Rogue, Bard, Ranger | Warm, short | DEX, CHA |
| Gnome | 350 - 500 years | Wizard, Artificer, Bard | Playful, multi-syllable | INT, DEX |
| Half-Orc | 60 - 80 years | Barbarian, Fighter, Ranger | Guttural, strong | STR, CON |
| Half-Elf | 150 - 200 years | Bard, Warlock, Paladin | Blended human/elf | CHA, DEX |
| Tiefling | 70 - 100 years | Warlock, Sorcerer, Rogue | Infernal or virtue names | CHA, INT |
| Dragonborn | 60 - 80 years | Paladin, Fighter, Sorcerer | Clan + personal | STR, CHA |
| Goliath | 70 - 90 years | Barbarian, Fighter, Druid | Deed names | STR, CON |
| Tabaxi | 70 - 90 years | Monk, Rogue, Ranger | Descriptive phrases | DEX, CHA |
| Firbolg | 400 - 500 years | Druid, Cleric, Ranger | Nature-based | WIS, STR |
| Kenku | 50 - 60 years | Rogue, Monk, Warlock | Sound-based mimicry | DEX, WIS |
| Aasimar | 150 - 200 years | Paladin, Cleric, Sorcerer | Celestial + human | CHA, WIS |
| Lizardfolk | 50 - 60 years | Druid, Barbarian, Ranger | Sibilant, reptilian | CON, WIS |
| Tortle | 350 - 400 years | Monk, Cleric, Druid | Simple, earthy | STR, WIS |
| Changeling | 70 - 100 years | Rogue, Bard, Warlock | Adopted names | CHA, DEX |
| Warforged | Indefinite | Fighter, Artificer, Paladin | Designation codes | CON, STR |