Ideas:chad3f:SkillsSystem: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Chad3f
imported>Chad3f
Line 48: Line 48:


<item name="short_sword">
<item name="short_sword">
<skill name="attacking" weight="10"/>
<skill name="sword" weight="20"/>
<skill name="sword" weight="20"/>
<skill name="short_sword" weight="20"/>
<skill name="short_sword" weight="20"/>
Line 59: Line 60:
<item name="long_sword">
<item name="long_sword">
<skill name="attacking" weight="10"/>
<skill name="sword" weight="20"/>
<skill name="sword" weight="20"/>
<skill name="long_sword" weight="20"/>
<skill name="long_sword" weight="20"/>
Line 70: Line 72:
<item name="knife">
<item name="knife">
<skill name="attacking" weight="10"/>
<skill name="knife" weight="20"/>
<skill name="knife" weight="20"/>
<skill name="slash" weight="5"/>
<skill name="slash" weight="5"/>
Line 83: Line 86:
For the sake of calculations, all current player skill values are converted to a number in the range of 0.0 to 1.0. How this is done should remain independent of this portion of the skill system, but the values are assumed to be a linear value where 0.0 = complete novice, and 1.0 = perfect expert.
For the sake of calculations, all current player skill values are converted to a number in the range of 0.0 to 1.0. How this is done should remain independent of this portion of the skill system, but the values are assumed to be a linear value where 0.0 = complete novice, and 1.0 = perfect expert.


The proportional skills from the item is then scaled (multiplied) against the player's current value for the corresponding skill. All of these values are added together, which have a maximum total of 1.0. This total is then use to scale the item's normal potential (like atk, or whatever might replace it) and applied as needed. As skills are gained from use of an item, the gain is divided up based on the proportion each skill's weight and added to the player's skills (based on it's independent implementation).
The proportional skills from the item is then scaled (multiplied) against the player's current value for the corresponding skill. All of these values are added together, which have a maximum total of 1.0. This total is then use to apply/scale the item's normal potential (like atk, or whatever might replace it) and applied as needed. As skills are gained from use of an item, the gain is divided up based on the proportion each skill's weight and added to the player's skills (based on it's independent implementation).

==== Example Case ====

Assuming a new player, that has no skills except the default ''attacking'' skill that has a value of 0.5. The player has a knife a preceeds to use it, over time gains skills related to it. The maximum atk potential of a knife for this example is 10.

Here are the calculated proportions for a knife, along with the player's skills and scaled result:

portion player final
attacking 0.147 0.500 0.074
knife 0.294 0.000 0.000
slash 0.073 0.000 0.000
stab 0.220 0.000 0.000
range_close 0.147 0.000 0.000
agility 0.102 0.000 0.000
strength 0.014 0.000 0.000
+ =====
0.074


In this case the total skills applied are 0.074 (or 7.4%). There are several ways this could be applied to the weapon (possibly even using item specific algorithms). In this case, a simple attack value +/-20% random chance (even novices get lucky hits).

The final atk value is computed as:

effective_atk = (10 * 0.074) +/- (10 * 20%) = 0.74 +/- 2.0 = [0.00 - 2.74]

In this case, let's assume the the number 1.60 was generated. Assuming this was enough to kill something after a few hits (perhaps a rat), and the total xp earned was 20, the amount of xp given to each skill is:


portion xp
attacking 0.147 2.94
knife 0.294 5.88
slash 0.073 1.47
stab 0.220 4.41
range_close 0.147 2.94
agility 0.102 2.06
strength 0.014 0.29