top of page
SpaceBackground.png
SpaceBackground.png

Developer Diary Week 1 - Proposal and Design

  • Writer: gtristanitristani
    gtristanitristani
  • Jun 1, 2023
  • 4 min read

After a great deal of design and research, I’m ready to begin work on my project: A Villager NPC Creation Tool, made using Unreal Engine 5!

ree

This project is something that I designed myself based on the NPC systems I have seen in a variety of different games, so I feel it would be easiest to explain with some visual elements from the games in question.

ree

The NPC generation tool will allow users to literally build new characters from the ground up by making use of a few different key elements, or building blocks, that they can reuse or tailor make for each NPC depending on their specific project’s needs. A lot of the fun of NPCs of course comes from interacting with them, so the player controller I create will have the ability to do so in a few key ways, with the NPC keeping track of how they have been treated in the past by the player. Finally, like us, the NPCs will have their own weekday and time based schedule, particularly one provided by a job that the user can specify.

ree

I mentioned the use of building blocks to create NPCs earlier. Each of these building blocks allows the user to specify new, unique derivatives, as well as reuse old ones. The building blocks can be mixed and matched with each other to create variation in different NPCs that may happen to have one or two in common.


The first block is career. This is what drives an NPC's daily schedule, since each career has a list of weekdays and times that the employee is expected to work for. As with us, a career is a huge part of their lives. So, this career will also come with user-specified dialog that the NPC can employ when talking with or reacting to the player, which is relevant to the specific job they have.


Second is personality. The NPC can talk to the player, with their reactions largely being determined by their personality. This personality provides a large, fully customizable bank of responses that they can draw upon when reacting to the player. This dialog bank will be larger than that provided for career. Additionally, this personality will influence how exactly the NPC’s affinity towards the player changes when they perform different actions, with each personality having their own particular preferences in how the player tries to bond with them.


Next is hobbies, which is actually a customizable list. Each hobby that a villager can have corresponds to a type of object in the village, for example, a lake for swimming. They can do these hobbies to improve their mood at the expense of some of their energy.


The last building block is gifts. One action that the player can perform is giving gifts to an NPC, and each NPC has gifts that they like and dislike. They may grow to love or hate the player based on the gifts the player gives them, so they can be an incredibly important factor in how NPC relationships develop.

ree

With each of these building blocks forming a skeleton for the NPC, there are several variables that allow it to actually move and change in the world. These variables are shared by all NPCs and constantly being adjusted, allowing a nonlinear representation of how exactly the NPC is doing at a specific point in time. The intent is to let this form a fuzzy logic system, where all four variables are taken into account when determining how the NPC will react in any given situation. Instead of a strict good or bad answer, the NPC has several different factors to consider in providing a response to how they feel.


The first variable, energy, specifies how tired or awake the NPC is currently feeling. Second is mood, an enum specifying, in general, how an NPC is feeling mentally. Third is state, what the NPC is physically in the process of doing in the world. Finally, player companionship represents how the NPC feels about the player based on prior interactions with them.

ree

To show what I mean, I made a simple diagram of how I intend these variables and blocks will derive responses from the NPC when the player talks to them. When the player initiates a conversation, the system will start by checking if the NPC is busy working, and if so, will take a randomly selected busy response from the job or personality dialog banks. If they are not working, three sub-banks from the personality and job dialog banks will be gathered. These sub banks correspond to the current affinity, energy, and mood values within the NPC. Similarly to before, a single random response is selected from the active banks. This means that a character may be talked to several times successively and still provide different responses each conversation, making them seem a bit more real and unique to the player!

ree

In the system I’m designing, the player will be able to interact in three distinct ways with NPCs. First, the player can talk to the NPC. This is generally positive for their relationship, but can be negative if the player is interrupting a busy NPC who is trying to work. Conversation is where most of the NPC’s responses can be triggered, so it is incredibly relevant to showcase the extent of the system. The second thing the player can do is give gifts to an NPC. Each NPC has their own liked and disliked gifts, and will respond to the player accordingly when receiving a gift based on their specific tastes. Finally, the player can hurt the NPC. I wanted to add this since it’s a major, dramatic way to affect a lot of NPCs at once. If an NPC is hit by the player, they will remember it in future interactions with the player, and lose a significant amount of affinity. Additionally, they will be able to tell other NPCs about it, thereby encouraging NPCs they interact with frequently to also dislike the player, having a sort of domino effect throughout the village.

ree

As I mentioned, this system is designed after a variety of other NPC systems I enjoyed interacting with in games growing up! I always had an interest in how exactly they worked behind the scenes, and am excited to take a chance to explore it in more detail. Please look forward to more updates on progress going forward!

 
 

©2022 by Gabrielle Tristani's Portfolio. Proudly created with Wix.com

bottom of page