Skip to main content

Introduction

NPC Mentality is a Unity package with 7 AI systems that make NPCs feel alive.

Why We Built This

Traditional NPCs follow one of three patterns:

  • Move to a target point
  • Output pre-written dialogue
  • Rush toward the player

NPC Mentality adds layers of memory, relationships, emotion, and time. When a player steals from a merchant, the merchant remembers it, rumors spread to friendly neighbors, and the village atmosphere changes — all with a single line of code.

Systems Overview

#SystemKey Role
1NPC MemoryAccumulate player actions, calculate attitude
2Relationship ContagionSpread emotions through friend networks
3Crowd AINavMesh-based autonomous crowd behavior
4Emotion AnimationEmotion → speed, animator, blink auto-sync
5Quest GeneratorBehavior-driven automatic quest generation
6World TimeGame time schedule management
7Rumor SystemInformation propagation and mutation between NPCs

Requirements

  • Unity 2021.3 LTS or higher
  • NavMesh — required for Crowd AI and Emotion Animation
  • .NET Standard 2.1