Actors, Players, NPCs

How to organize our actors

Using game modules, all things that might have stats, conditions, give conditions, have an inventory, and so on, will benefit from having an actor class which inherits from GameModulesInventoryActor. Just because it has an actor class on it, does not mean it's going to walk around and do things in the world.

Entity

All entities will be interactable, implementing IAmInteractable. They will have to decide for themselves what happens when they are interacted with. And all will have a public actor Actor on them. Actor is a class which inherits from GameModulesInventoryActor, and may have additional functionality on it in the future, shared by all Entity objects.

An entity can be the Player, or a townsperson, or a dragon. It can also be a treasure box, a secret wall that can be destroyed, or a barrel that explodes causing massive damage.

Player

This is one of the main player characters. These are special. For Legend of the Stones, there will be 4 players, each of whom does not have an in-game body. Instead, we have a first person view with four portraits. However, each player will be a monobehaviour (inheriting from Entity), and can do things with Update() and other similar methods.

Character

This is an Entity which can move around the world. It doesn't mean that it's an NPC, it just means that it may wander around the world in some way. While it can be interacted with, it does not have all the engagement mechanics that an NPC would have.

NPC

This is a Character which engages with the player. It may be an enemy or a friend. NPCs will also be able to join the party as a "hireling" or follower.

While the chart below shows the basic flow of inheritance, we will likely have additional classes added. For sure we will have specific classes for specific NPC/Enemies such as "Slime", which has unique methods and properties to that specific character.

We may also add new classes for specific non-character entities. One may imagine a "Barrel" class which inherits from Entity, and handles all the aspects of being a barrel. Even then, we may have "PotionBarrel", "LootBarrel", etc to further segment things out.

Last updated