Mischiefblog
I make apps for other people

Cyberpunk MMO: skill success and advancement

Posted by Chris Jones
On April 12th, 2006 at 14:51

Permalink | Trackback | Links In |

Comments (2) |
Posted in Cyberpunk MMO

Recall that character skills are gained in four ways:

  • by gifting (at character creation when joining an organization),
  • by purchase (spending cash to buy training in new skills),
  • as loot in a mission, and
  • as a mission reward.

Interactions with the game portions of the world may be judged successful through the use of a skill test.

  1. A character proxy tells the server game engine that the character is attempting to use a skill and provides context, consiting of
    • the skill being tested,
    • the character state,
    • the character location,
    • equipment used by the character with bearing on this skill roll (a device),
    • additional bonuses (based on other skills or mitigating factors),
    • the target or opponent state (if any),
    • the target’s inherent penalties to this skill roll (if any), and
    • the target location (if applicable).
  2. The game engine generates a random number in the range 0.00 to 100.00 (the roll).
  3. The roll is modified by
    • a bonus provided by a character attribute that governs this skill,
    • a device used by the character for the skill roll,
    • equipment worn by the character that will penalize or bonus the roll,
    • other bonuses passed into the skill roll,
    • if a ranged attack, the distance between the player and the target penalizes the roll,
    • if a melee attack, 10% of the target’s dodge skill and 1% of the target’s speed penalizes the roll, and
    • any inherent penalty to the skill roll by the target
  4. If the modified roll is less than the character’s chance to succeed at the skill, the skill test succeeds, else the test fails.
  5. The character proxy is told the results of the skill roll, the success or failure state, and by how much.
  6. If the skill roll was successful, the character proxy tests to see if the skill has caused the skill to increase with a random number roll in the range 0.00 to 100.00. If the roll was less than the chance for improvement, the skill is improved by one point.

Character skills are capped at 10 times the rank, such that a rank 1 character will not be able to advance skills beyond rating 10 until they have entered rank 2. A prerequisite for advancing ranks is having all skills capped. Additionally, all natural humans have skills capped at 45 (all skill tests have a maximum 60.80% chance of success) in order to provide incentive to have characters purchase cyborg bodies and to recognize the difference and advantages that the improved human possesses.

Note that in combat, all attacks are based on skill rolls. However, certain devices or prior actions (such as using a scope, a device that provides a bonus, or lining up a shot, a previous skill use that provides a mitigating factor) may improve the skill roll.

Hard numbers
The chance of success for any skill test (prior to modifications) is determined by the equation:

success = ( SQRT( 24 * rating ) * 1.85

The chance of an improvement on the successful use of a skill is determined by the equation:

improvement = ( SIN( RADIANS(((100 - rating) / 100) * 60 ) ) * 30

Skill chart

These equations will be pre-calculated and the server game engine and character proxy will look up the values in tables indexed by skill rating. Random numbers, specified to be in the range 0.00 to 100.00 above, will actually be in the range 0 to 10000. (I’m old: I was indoctrinated to believe floating point operations are more expensive than integer ops.)


#include <types.h> // for ushort
#include <time.h> // for time()
 
static const ushort MIN_ROLL = 0;
static const ushort MAX_ROLL = 10000;
 
static const ushort SUCCESS_CHANCE [] =
{ 906, 1282, 1570, 1813, 2027, 2220, 2398, 2563,
2719, 2866, 3006, 3140, 3268, 3391, 3510, 3625,
3737, 3845, 3951, 4053, 4153, 4251, 4347, 4440,
4532, 4621, 4709, 4796, 4881, 4964, 5046, 5127,
5206, 5285, 5362, 5438, 5513, 5587, 5660, 5732,
5803, 5874, 5943, 6012, 6080, 6147, 6213, 6279,
6344, 6409, 6472, 6536, 6598, 6660, 6721, 6782,
6842, 6902, 6962, 7020, 7079, 7136, 7194, 7250,
7307, 7363, 7418, 7474, 7528, 7583, 7637, 7690,
7744, 7796, 7849, 7901, 7953, 8004, 8055, 8106,
8157, 8207, 8257, 8306, 8356, 8405, 8454, 8502,
8550, 8598, 8646, 8693, 8740, 8787, 8834, 8880,
8926, 8972, 9018 };
 
static const ushort IMPROVEMENT_CHANCE [] =
{ 2582, 2566, 2550, 2533, 2516, 2499, 2481, 2463,
2445, 2427, 2408, 2390, 2370, 2351, 2331, 2312,
2291, 2271, 2250, 2229, 2208, 2187, 2165, 2143,
2121, 2099, 2076, 2054, 2031, 2007, 1984, 1960,
1936, 1912, 1888, 1863, 1839, 1814, 1789, 1763,
1738, 1712, 1686, 1660, 1634, 1607, 1581, 1554,
1527, 1500, 1473, 1445, 1418, 1390, 1362, 1334,
1306, 1277, 1249, 1220, 1191, 1163, 1134, 1104,
1075, 1046, 1016, 987, 957, 927, 897, 867, 837,
807, 776, 746, 716, 685, 654, 624, 593, 562, 531,
500, 469, 438, 407, 376, 345, 314, 282, 251, 220,
188, 157, 126, 94, 63, 31 };
 
// using a reasonable implementation of a Mersenne
// random number generator . . .
Mersenne prng = Mersenne.getGenerator(time(NULL));
ushort roll = prng.getShort(MIN_ROLL, MAX_ROLL);

2 Responses to “Cyberpunk MMO: skill success and advancement”

  1. alaph Says:

    very cool. Question though? Lets say you don’t have a skill, is there a default chance to suceed at a task when no skill is present?

  2. Chris Says:

    I tend to believe that skills that you don’t know default to the parent (governing) attribute. As for the mechanic, I haven’t actually decided if it will be in game or how it will work. I don’t have a list of skills yet, either.