NPC System and Demo

Scroll for
code!


2025

Systems Design Unity UI Toolkit Programming Solo Project




Unity tool for creating and managing NPCs, their relationships and skills.
The tool is created using Unity’s UI Toolkit and features user-friendly editor windows for managing NPC and skill data.

Platform
Unity Tool

Using
Unity Engine
C# Programming Language

Available
Itch.io
User Manual on Google Drive

Unity Asset Store (in progress)




Goals


   Create user-friendly Unity tool, utilising UI Toolkit.


  Create systems to manage NPCs, relationships and skills.


  Create a solution for in-engine and in-game data persistence.







Key Features

   NPC and Skills management windows.

  Data management in-editor and at run-time.

  Sentiment-weighted relationship system.


  Customisable, XP-based levelling.


  Full user manual.

  Demo game to show how the tool can be used.



Demo Game

I created this game to demonstrate the tool, utilising the API set out the user manual.

I harnessed the sentiment-weighted relationship system to create customers that consider their recent experiences when updating their relationship with player.

The skill system allowed me to apply varying difficulty to the minigame, based on the active skill and the player’s experience level.

The tool seamlessly handled saving of skill and relationship data.

To show off the tool, I also developed a dialogue system to fetch appropriate dialogue based on the context and relationship with the player.

I implemented a live demo window displaying the tool’s variables in real-time, helping users assess integration and functionality.



Inspiration




Love/Hate Unity Tool




Focus on complex character relationships.
Quest Machine


     

Management of complex data structures, with user friendly windows.




Development Timeline



Data Structures


NPC is a Scriptable Object responsible for all the NPC data defined during development.

This includes use of structs and enums.


Skill Information is the Scriptable Object used to store data for a skill defined during development.

Persistent Data is the class used to store data that changes at runtime and should persist between sessions.

Two subclasses define NPC data and player’s skills data.



Systems



Sentiment-Weighted Relationship System

Basic relationship system, with bias given for active sentiments held by the NPC.


XP-based Leveling System

API defined for adding XP and handling player levelling.

Option to reset XP to 0 upon levelling.


Full documentation available here.

Contact Me

-