Neocortex Logo
Give NPCs distinct personalities with AI: write a backstory, set wants and fears, shape how they talk, then test that two characters never sound alike.

How to Give NPCs Unique Personalities with AI

TutorialAI NPCGame Design

Most AI NPCs fail in the same way: they are polite, helpful and interchangeable. The blacksmith and the thief both say "Ah, traveler! How can I help you today?" This guide shows how to give NPCs personalities that hold up in open conversation, with the exact fields we fill in when we build a character in Neocortex.

Why AI NPCs drift to the same voice

A language model has a default personality: agreeable, chatty and eager to help. Any detail you leave out gets filled with that default. A one-line description ("a grumpy dwarf blacksmith") gives the model three adjectives and leaves hundreds of choices to the default, so after two exchanges your grumpy dwarf is cheerfully offering directions.

The fix is not a longer list of adjectives. It is decisions that change what the character says.

Five layers of an NPC personality

1. What they want right now

A want gives every conversation a direction. Brannoch the smith wants to finish the commission for the baron before the frost, because his forge is mortgaged. So he is short with idle chat, interested in anyone who brings ore, and suspicious of anyone asking about the baron.

2. What they fear or avoid

Fears create the topics a character steers away from, which is where personality shows. Brannoch avoids talking about his son, who left to join the rebels. Push on it and he changes the subject or ends the conversation.

3. Opinions about people and places

Generic NPCs have no opinions. Give each one two or three: Brannoch thinks the town guard are lazy, respects the miller, and won't sell to elves after a deal went bad. Now when the player mentions any of them, the answer has a slant.

4. How they talk

Speech habits do more for distinctness than any trait list:

  • Sentence length. Brannoch speaks in short bursts. The scholar in the next street never finishes a sentence without a clause.
  • Words they use and avoid. He says "aye" and "lad", never "awesome" or "absolutely".
  • What they call the player. "Outsider" for the first visit, the player's name only after they've earned it.

5. What they know, and what they don't

A character's knowledge is personality too. Brannoch knows metals, prices and the baron's habits. He has never heard of the capital's politics and says so. Limits make characters believable, and they stop the model inventing lore.

Setting it up in Neocortex

In the Neocortex editor, a character is a graph of nodes, and each layer above has a place:

  • Personality node: the backstory, wants, fears, opinions and speech habits, plus one of 16 personality types as a base.
  • Accent and voice: an accent that shapes the dialect of their lines, and a voice to match, from stock voices or your own custom voices (5 on Pro, 20 on Team).
  • Vocabulary node: the names and invented words from your world, so speech recognition hears "Brannoch" when the player says it.
  • Knowledge node: a knowledge base with your lore files, so the character answers from your world instead of guessing.
  • Emotion node: the mood they start a conversation in. Every reply then carries an emotion tag your game can use for faces and animation.

You test the character in the browser editor as you build, free on every plan, before it goes anywhere near your engine.

The same question test

The fastest way to check distinctness: ask every character in a scene the same three questions and read the answers in a row.

  1. "What do you think of the baron?"
  2. "Can you help me with something?"
  3. "Tell me about yourself."

If two answers could swap speakers without anyone noticing, one of those characters needs a stronger want or a stronger speech habit. Fix the weaker one and run it again. We do this for every cast before it ships.

Letting personality react to the game

A fixed personality is the base, not the whole story. Characters should respond to what happens:

  • Send events. Add what just happened to the chat request as an event, like "the player returned the stolen hammer". Brannoch is still gruff, but now he is gruff and grateful.
  • Change tone, not core. The player can win him over, but he should never turn into a cheerful shopkeeper. Keep wants and speech habits fixed, and let the emotion and attitude move.
  • Use group chat for contrast. Personalities are clearest next to each other. In a group chat (Pro and Team plans, up to six characters), the smith and the scholar can argue, and each makes the other more distinct.

Common mistakes

  • Adjective stacking. "Brave, kind, witty, mysterious" gives the model nothing to act on. Replace each adjective with a decision.
  • Everyone helps. Some characters should refuse, bargain or lie. A merchant who won't sell to you until you've done a favour has more personality than one who always says yes.
  • No limits. A character who knows everything has no personality. Decide what they don't know.
  • Copying a famous character. Original characters avoid licensing problems and give you room to make them yours.

Where this fits

Personality is half of a good AI NPC. The other half is what they recall about the player and staying in character when players try to break them. Once your character is ready, put it in your engine with our Unity, Unreal or Godot guides, all collected in the guide to building AI NPCs.

Frequently Asked Questions

How do you give an NPC a personality?

Decide what they want, what they fear and how they talk, then make every line pass through those three. With an AI character you write them into the character definition, and Neocortex adds a personality type, vocabulary, accent and voice on top.

Why do all my AI NPCs sound the same?

Because a short prompt like "you are a friendly blacksmith" leaves the model to fill in the rest with its default voice. Give each character specific wants, opinions, speech habits and things they refuse to talk about, and test them side by side.

Should I use the Big Five or MBTI for NPC personalities?

Either works as a starting point, as long as it changes behaviour. Neocortex lets you pick one of 16 personality types for a character, but the backstory, wants and speech habits do most of the work.

Can an NPC's personality change during the game?

Yes. Keep the core traits fixed and send what happened as events, like "the player saved her brother". The character's tone shifts in response while the personality underneath stays the same.

SA

Written by

Sercan Altundas

Founder of Neocortex

Sercan founded Neocortex and builds the platform, the engine SDKs and the mods these guides are based on.

Read More