Skill and experience Concept

I have been thinking about how to get a cool skill based XP feature for awhile and wanted to run it by everyone on the forum to to see if it was a feasible idea.

My Goal: I want to have a skill based XP system. Meaning if I cut down a tree, I level woodcutting. If I attack with a sword I level swords skill. If I run or jump I can level endurance, etc.

To achieve this I wasn't to have a Skill Manager, borrowing from the ideas of the Attribute Manager, where I can assign a "Skill" to an ability.


So for example:

Attribute Manager.
I can create an attribute in the Attribute Manager called stamina. Under the Stamina attribute, I can set the min/max/current values. I can also change the update type(None - no updates, Decrease - Drain over time, Increase - Regenerate over time)

From There I can assign that attribute to a skill, for this example I will use jump. So if I assign Stamina to Jump, I can make it change the amount of stamina used per Jump. If I run out of stamina I can no longer Jump.


My Idea:

I want to be able to assign a skill to an ability. Using Jump as an example again, lets say that underneath the Stamina Attribute, there is another drop down option for skill.

Skill Manager.
Similar to attribute Manager, I would like to have a skill manager. Here I can set the min/max/current level of the skill, xp required per level(perhaps a drop down to allow for different xp algorithms). Also it would be nice to have an "Affect Attribute" and "Per Levels" drop down for certain situations.

Example Skill:
Name: Endurance
Min Lvl:
Max Lvl:
Current lvl:
XP Update Type:
Affect Attribute:
Per Levels:


Final Result would look like this:

Attribute Manager:

Name: Stamina
Min Value: 0
Max Value: 100
Value:100
Update Type: Increase

Skill Manager:
Name: Endurance
Min Lvl: 1
Max Lvl: 10
Current lvl: 1
XP needed for next lvl Type: (Drop down to either have base xp/lvl or exponentially increase xp as examples)
Affect Attribute: Stamina
Per Level: 10

Ability: Jump

Start Type: Button Down
Stop Type: Button Up
Input Name: Jump
Attribute Name: Stamina
Amount: -10
Auto Update: (Unchecked)
Skill Name: Endurance
XP Amount: 5
Auto Update: (Unchecked; This would be for an ability like run where you want to gain xp over time for as long as you run.)


So now you can have a jump ability that uses Stamina from the attribute manager and gains you Endurance Skill XP from the Skill manager. Every time you jump you gain endurance XP. After a certain amount of xp you gain an Endurance level. You can then select an affected attribute from the drop down (for example: every level, every 2 levels, every 5 lvls) and what happens( every level you gain X amount max stamina/ Every 5 levels you gain x amount max stamina).


This should easily allow you to create X ability, assign Y attribute, and gains XP in Z skill.

Sprint ability - Allows the player to jump
uses Stamina attribute - Every time you jump it cost stamina; no stamina no jumping
uses Endurance skill - every time you jump you gain endurance XP; target XP = level gain; level gains give you more max Stamina which means more jumping until 0 stamina.

Another example use would be for woodcutting

Woodcutting ability - allows you to cut down a tree
uses Stamina attribute - Each swing of the Axe will cost an amount of stamina.
uses Woodcutting skill - Each swing raise your woodcutting skill

Unlike the jump ability which is a simple action, a woodcutting ability would obviously require a bit more. Such as a tree as your interactable. Also, may want to have custom scripts in addition such as a skill level requirement to cut certain trees or perhaps the amount of logs you get once you get to a certain level etc.

Obviously this system would not be perfect and would need a lot more thought put into it to make it suitable for a wider variety of "Skills", but I thought it may be enough to ask other people what they thought of it before I tried to tinker with some code. Would this be something worth messing when or did I try and over simplify things?
 
I think that the overall idea is sound, the biggest issue relates to updating the controller. Where do you plan on having the abilities aware of the Skill Manager? Modify the base ability class?

In order to make updating easier I think you can accomplish it one of two ways:

1. Subclass each ability making them aware of the Skill Manager. This has the advantage in that it will make updating seamless.
2. Have the Skill Manager separate from the abilities and modify the ability values from the Skill Value. You can access the ability properties from the Skill Value. This also will make updating seamless since you are not modifying the core ability code.
 
Top