Character progression system - mganzarcik/fabulae GitHub Wiki

Characters advance through levels by gaining experience, either through combat, by completing quests or by skill use. There are no character classes and characters advance at a rate defined by their race’s experience gain multiplier. Experience gained via combat is based on the group’s level relative to the level of the enemy.

Each level gained, the main stats (HP, MP, SP) of the character increase randomly based on his race. Every level, the character gains two skill points (configurable) he can allocate to skills, but can never go over base rank 5 (configurable, modifiers not included) in any skill. Every skill can only be increased once per level (configurable).

Every 2 levels (configurable), the character can also choose from a pool of perks, based on the perk requirements.

Experience gain

Experience gain in combat

Every character in the game has a base experience value assigned. This is the amount of experience a player character group would receive for defeating this character if they had equal levels. During combat, every time an enemy is killed his level is compared to the average level of the player character group and then the actual experience gained is calculated:

actualExperience = baseExperienceValue + (enemyLevel – playerCharacterGroupAverageLevel) * (baseExperienceValue/ enemyLevel)

Examples:

Level 5 bandit with baseExperienceValue = 100 is fighting a level 7 player character group.

actualExperience = 100 + (5 -7) * (100/5) = 100 - 40 = 60

Level 10 dragon with baseExperienceValue = 500 is fighting a level 7 player character group.

actualExperience = 500 + (10 -7) * (500/10) = 500 + 150 = 650

This actualExperience is then added to the pool of experience gained. It is not immediately awarded to the player. Once combat ends, all experience in the pool is divided by the number of alive characters in the party (rounded down) and the result assigned to each surviving member after being multiplied by that member’s experience gain multiplier.

Experience gained via quest completion

Each quest has a constant amount of experience assigned. This is not relative to the party’s level. Once the quest is completed, the amount is divided by the number of live characters in the party (rounded down) and the result awarded to each live member after being multiplied by that member’s experience gain multiplier.

Experience gained via skill use

Following skills earn experience. Only the user of the skill gains the experience points. The numbers below must always be multiplied by the user’s experience gain multiplier before being awarded.

  • Lock picking: lock level * 5
  • Traps (find): trap level * 2
  • Traps (disarm): trap level * 3
  • Hunting (success only): chance to catch / 10
  • Scouting (on successfully finding water, or avoiding random encounter): chance to find / 10
  • Persuasion (success only): chance to succeed / 5
  • Climbing and swimming (success only): chance to succeed / 10

Experience table

Experience table is defined globally and it is the same for all races and characters. Characters can still progress at a different pace according to their race, but the table is the same.

The table is defined by defining the required experience gain for every level. This is the amount of new experience the character must gain in order to reach a new level.

Example:

ExperienceTable.csv

100,150,200,250,300,350,400,450,500,600,700,800,900,1000,1100,1300,1500,1700,1900,2100

This definition results in the following table:

Level Required experience total Required experience gain Experience gain difference
1 100 100
2 250 150 50
3 450 200 50
4 700 250 50
5 1000 300 50
6 1350 350 50
7 1750 400 50
8 2200 450 50
9 2700 500 50
10 3300 600 100
11 4000 700 100
12 4800 800 100
13 5700 900 100
14 6700 1000 100
15 7800 1100 100
16 9100 1300 200
17 10600 1500 200
18 12300 1700 200
19 14200 1900 200
20 16300 2100 200

The experience table also defines the hard level cap which, once reached, prevents characters from gaining more experience. Level cap is the last defined level in the table, in this case level 20.

⚠️ **GitHub.com Fallback** ⚠️