Initial implementation of skills and skill groups
- By opening this merge request, you agree to release your code and all other changes under the GPL 3 license and to abide by the terms set by this license.
- Significant changes of this merge request have been added to the changelog.
This MR is based on the design document here: https://docs.google.com/document/d/1mlsws_bcGhEkXdfbChO6vGWceu3aNThCM1gNqQRSPm4/edit
The tree pictured in the document is outdated and a new grid has been decided on by @Silentium2318 - here is a drawing showing how this might look/work:
This MR will not include any UI, but will include all functionality required for the client to request skill unlocks, retrieve current skills (as a new
SkillSet struct within the existing Stats component), and persistence to the database.
- Implemented Skills and Skill Groups for characters
Contained within a
SkillSetstruct within Stats which is persisted into a new skills column in the stats database table as serialized JSON.
As skills are contained within the existing Stats component, they are synced to the client so no events related to skills are required since the client will always have the same representation of a character's skills as the server.
These call the respective methods (server-side) on the
SkillSet for the player .
Outstanding Game Design decisions:
- Skill Groups / Skills - currently there are a few placeholder skill groups and skills that I added while developing the feature but they don't do anything.
- How skills are actually used - there are three kinds of skills that come to mind:
- Passives, which require no extra development with skills since it's just "does player have this skill if yes then do this" in a system.
- Active (like Auras for example) would probably require some additional design work and may want to be kept separately from the "has this skill" data structures.
- Action skills, "pressing this button shoots a fireball" likely doesn't need any additional work other than checking the player has the skill before performing the server-side actions involved in activating the skill.
- The method for unlocking/learning skill groups
- EXP tables/levels for skill groups to determine the exp required before a Skill Point is earnt
- How exp is earnt for each skill group
Additional development required:
- Relative skill positions within the skill grid per skill group, this initial MR does not include any logic for determining which skills are eligible for unlock based on which skills are already unlocked.
- UI to display the player's skill groups and skills (under design by @Pfauenauge) which will then send the
UnlockSkillclient message to the server (and
- UI/NPC trainer for learning skill groups
- Systems to increase Exp for Skill Groups when actions are taken within the game
Database migration considerations for future changes to skills / skill groups:
No migration required:
- Adding new skills
- Adding new skill groups
- Moving a skill between groups
Database migration required:
- Renaming a skill
- Removing a skill
- Renaming a skill group
- Removing a skill group
Removing skills / skill groups could probably be improved to not require a migration with custom de-serialization that gracefully removes skill groups/skills that exist in the database but no longer exist in the game.