File experience.json
This config is used to define experience behavior such as how much experience is required to level up or how experience can be gained. It is may be located in the experience.json
file inside each category folder. This file is optional, and if it is absent then experience is not enabled for this category.
This is probably the most complex part of configuration.
Example
json
{
"experience_per_level": {
"type": "expression",
"data": {
"expression": "min(level ^ 1.432 + 10, 200)"
}
},
"sources": [
{
"type": "puffish_skills:kill_entity",
"data": {
"parameters": {
"dropped_xp": {
"type": "entity_dropped_experience"
},
"max_health": {
"type": "entity_max_health"
}
},
"experience": [
{
"expression": "dropped_xp + max_health / 20"
}
],
"anti_farming": {
"enabled": true,
"limit_per_chunk": 15,
"reset_after_seconds": 300
}
}
}
]
}
JSON Structure
Property | Description |
---|---|
enabled | A boolean. Defines if experience is enabled. |
experience_per_level | An 'experience_per_level' object. Defines how much experience is needed to level up and gain point. |
sources | An array of source objects. |
experience_per_level
object
Property | Description |
---|---|
type | A string. Defines the type of the experience per level. Allowed values are values , expression |
data | An experience_per_level_data element. |
experience_per_level_data
object when type
is values
Property | Description |
---|---|
values | An array of integers. Each value defines experience needed for each level. |
experience_per_level_data
object when type
is expression
Property | Description |
---|---|
expression | An expression string that contains arithmetic expression. Variable level can be used in the expression. |
source
object
Property | Description |
---|---|
type | A string. Defines the type of the source. |
data | An source_data element. |
Experience sources
You can read more about experience sources here.