### Table of contents:

Configuration of the leveling system might be confusing at first, but it’s quite simple once you get the hang of it. In this tutorial, I will show you how to set up a leveling system using the CyberLevels plugin. I will also show you some of our own tweaked leveling systems and how to set them up.

## How it works

### Level requirements (breakpoints)

CyberLevels uses `levels.yml`

as a leveling system for the whole plugin. This file contains certain *“requirements”* (or breakpoints), where you can set any amount of exp needed to reach the next level. The plugin will automatically calculate the needed exp to reach the next level based on the current level and exp.

These requirements could be set to any level you want. If you don’t plan to lock certain level milestones under a bigger/smaller number of exps, the plugin will follow the *General formula* rule set in the file.

### General formula

When the next level is ahead of you, the plugin will check if this level has an exp requirement or not. If it doesn’t, the plugin uses the general formula to calculate the exp needed to reach the next level.

General formula is only one, and it’s used for all levels that don’t have a specific exp requirement set. If you want to use two formulas, you probably need to set up a requirement for every single level until the maximal level you have.

### Minimum and maximum level

There’s an option to set any level as a minimum or maximum level. If you set a level as a minimum, the player can’t go below that level. If you set a level as a maximum, the player can’t go above that level. Very simple.

There’s no limitation on how many levels you can have. You can have ten of trillion levels if you want, but the default ones are:

```
# What level and experience should players start with? This will
# also be treated as the minimum level/exp a player can get to.
starting:
level: 1
experience: 0
# Maximum level a player can achieve.
maximum:
level: 25
```

## Let’s set up a leveling system

First things first, make sure you already know how exponentially you want to increase the exp needed to reach the next level. You can also set something very simple, like 100 exp for every level. It’s mostly up to you and your server’s economy.

Know already? Good, let’s set up the leveling system. We will use the default `levels.yml`

file that comes with the plugin. You can find it in the plugin’s folder. Here’s how it looks like (comments removed for better readability):

```
levels:
starting:
level: 1
experience: 0
maximum:
level: 25
experience:
general-formula: '25 * {level}'
level:
1: 250
2: '{level} * 25'
3: 'sin(1) + ({minEXP} / {level}) + {maxLevel} * 2'
```

### Explanation

`starting`

- the level and exp a player starts with (you can’t go below this).`maximum`

- the maximum level a player can achieve (you can’t go above this).`experience`

- the exp requirements for each level.`general-formula`

- the formula used for levels that don’t have a specific exp requirement.`level`

- the exp requirement for each level. You can use any formula or exp amount you want. You can also use placeholders like`{level}`

,`{minEXP}`

,`{maxLevel}`

, etc.

### “I want to have more levels!”

Fine, we’ll increase the maximum level to 100. Here’s how it looks like:

```
levels:
...
maximum:
level: 100
...
```

### “I need a simple leveling system that will grow linearly.”

Sure, that’s very simple. In this case, you probably don’t even need to use level requirements. For example, I want to have every level exp requirement increased by 100. Here’s how it looks like:

```
levels:
...
experience:
general-formula: '{level} * 100'
...
```

#### Every level has the same exp requirement

Don’t like the general formula and maybe want to have 100exp requirement for every level? Here’s an example:

```
levels:
...
experience:
general-formula: '100'
...
```

#### Lock different levels under different exp requirements

Hm, maybe you want to lock level 10 under a bigger exp requirement? I want to lock level 10 under 2500 exp. Check this out:

```
levels:
...
experience:
general-formula: '100'
level:
10: 2500
...
```

### “I want to have a more complex leveling system.”

*This is an extreme example. The formula used below IS NOT recommended for a leveling system. I’ll show you a more friendly one right after this one.*

Here the real fun begins. You can use any formula you want. For example, I want to have a general formula of something like `sin(1) + ({minEXP} / {level}) + {maxLevel} * 2`

. Here’s how it looks like:

```
levels:
...
experience:
general-formula: 'sin(1) + ({minEXP} / {level}) + {maxLevel} * 2'
...
```

### “Ok ok, show me a more friendly formula”

This formula should be just fine. It uses a simple hyperbolic function to calculate the exp needed to reach the next level. It’s not too hard to understand, and it’s not too hard to calculate. Here’s how it looks like:

```
levels:
...
experience:
general-formula: 'pow(1.1, {level}) * 1000'
...
```

This uses advanced math functions, but it’s very simple to understand. It calculates the exp needed to reach the next level by using the hyperbolic function `pow(1.1, {level}) * 1000`

. The `pow(1.1, {level})`

calculates the exponential growth of 1.1 for every level, and then it multiplies it by 1000. This means that every level will have an exp requirement increased by 10% of the previous level, and then multiplied by 1000.

And yes, you can use advanced math functions like `sin`

, `cos`

, `tan`

, `pow`

, `sqrt`

, etc. You can also use placeholders like `{level}`

, `{minEXP}`

, `{maxLevel}`

, etc.
Here’s a quick list of available math functions:

`sin(x)`

- Sine of x.`cos(x)`

- Cosine of x.`tan(x)`

- Tangent of x.`pow(x, y)`

- x raised to the power of y.`sqrt(x)`

- Square root of x.`abs(x)`

- Absolute value of x.`log(x)`

- Natural logarithm of x.`log10(x)`

- Base 10 logarithm of x.`exp(x)`

- Exponential function of x.`ceil(x)`

- Smallest integer greater than or equal to x.`floor(x)`

- Largest integer less than or equal to x.`round(x)`

- Rounds x to the nearest integer.

## Pre-made leveling systems by ZeroToil Staff

### Simple leveling system

- Simple yet effective leveling system
- Every level has the same exp requirement (except levels with specific requirements)
- Maximum level is 100
- You don’t need to give out that much exp to players from events to level up

```
levels:
starting:
level: 1
experience: 0
maximum:
level: 100
experience:
general-formula: '{level} * 100'
level:
10: '{level} * 250'
25: '{level} * 500'
50: '{level} * 1000'
75: '{level} * 2000'
100: '{level} * 5000'
```

### Advanced leveling system

- More complex leveling system
- Every level has a bit different exp requirement (except levels with specific requirements)
- Maximum level is 100
- You need to give out a ton more exp to players from events to level up

```
levels:
starting:
level: 1
experience: 0
maximum:
level: 100
experience:
general-formula: 'pow(1.1, {level}) * 1000'
level:
10: 'pow(1.1, {level}) * 2500'
25: 'pow(1.1, {level}) * 5000'
50: 'pow(1.1, {level}) * 10000'
75: 'pow(1.1, {level}) * 20000'
100: 'pow(1.1, {level}) * 50000'
```

### Extreme leveling system

- Very complex leveling system
- Every level has a different exp requirement
- Maximum level is 100
- You need to give out a ton more exp to players from events to level up

```
levels:
starting:
level: 1
experience: 0
maximum:
level: 100
experience:
general-formula: 'sin(1) + ({minEXP} / {level}) + {maxLevel} * 2'
level:
10: 'sin(1) + ({minEXP} / {level}) + {maxLevel} * 2'
25: 'sin(1) + ({minEXP} / {level}) + {maxLevel} * 2'
50: 'sin(1) + ({minEXP} / {level}) + {maxLevel} * 2'
75: 'sin(1) + ({minEXP} / {level}) + {maxLevel} * 2'
100: 'sin(1) + ({minEXP} / {level}) + {maxLevel} * 2'
```

**Actually, don’t use this one. Only if you want to make a fun leveling system.**

## Conclusion

Setting up a leveling system is quite simple once you get the hang of it. You can use any formula you want, and you can set any level as a minimum or maximum. You can also set different exp requirements for different levels. It’s all up to you and your server’s economy.

Well, that’s it. I hope you now understand how to set up a leveling system using the CyberLevels plugin. If you have any questions, feel free to ask in the comments below. Have fun setting up your leveling system!

You can now go set up exp events, so players can level up and have fun on your server. You can find the article about setting up exp events here.