Classes¶
Taking inspiration from classic pen and paper RPG games, the Stats module lets you create character Classes which contain a collection of Stats and Attributes. On the other end, Classes can be assigned to any number of characters or game objects using the Traits component.
Example
This concepts are more easily understood with an example. Let's say we want to create a Warrior character. In this case, we would create a Class called "Warrior" which would contain the following Attributes:
Health
Stamina
And the following Stats:
Strength
Constitution
Now that we have the Warrior class, we can create a scene Character with the Traits component and assign it the Warrior Class defined above. This same class can be reused for other characters, such as enemies and NPCs.