XP Requirements
Guide to customizing XP requirements
The amount of XP required to level up skills can be configured in the xp_requirements.yml file.

Expressions and Variables

Within a section, such as the default section, you will see an expression value that contains the expression/equation used to calculate the XP requirements.
The expression can be changed as you wish, but it must be a valid EvalEx expression. You can view the supported operators and functions here.
The result of the expression will always be rounded to the nearest whole number
Variables are also supported in expressions. In order to have a different XP required for each level, you must have the level variable in the expression somewhere. This variable corresponds to the level that is unlocked upon reaching the required XP. The level starts at 2 and goes up to the maximum level of the skill. For example, the result of the expression when level is 5 is the XP need to go from level 4 to 5.
Custom variables are also supported, which allow you to label and organize the parts of your expression. Instead of using the numbers directly in the expression, you can turn it into a variable that is specified in its own key. In the default expression shown below, multiplier and base are examples of custom variables.
1
multiplier * (level - 2) ^ 2 + base
Copied!
As you can see, the numeric values of multiplier and base are specified as keys with the same name as the variable:
1
default:
2
expression: 'multiplier * (level - 2) ^ 2 + base'
3
multiplier: 100.0
4
base: 100.0
Copied!
You can use any variable name, as long as the value of the variable is defined in a separate key of the same name.

Skill Overrides

You can create different XP requirements for each skill by adding a skills.[skillName] section that will override the default section. The keys and values in the skill section are the same as the default section.
Here is an example of Alchemy XP requirements that override the default:
1
default:
2
expression: 'multiplier * (level - 2) ^ 2 + base'
3
multiplier: 100.0
4
base: 100.0
5
skills:
6
alchemy:
7
expression: 'multiplier * (level - 2) ^ 3 + base'
8
multiplier: 20.5
9
base: 20.0
Copied!
Last modified 2mo ago
Export as PDF
Copy link
Edit on GitHub