Cost exponent is a feature of anvils, which can increase or decrease cost based on the original cost.
The formula works as follows:
cost = original_cost * exponent^original_cost
So, working with an exponent of 1.02 and an original cost of 25:
cost = 25 * 1.02^25
This is then rounded up to the nearest whole number, so the cost in this example would then become 42.
Special enchantments are designed to be extremely rare, and require a lot of work to make them worth the cost.
Therefore, special enchantments are biased according to a curve.
Let's use Razor for this example.
By default, Razor has 5 Levels. So, to calculate the level to apply, a random number between 0 and 1 is generated. This number is then biased according to a curve, which means that more inputs give a lower output, so for example 0.7 may become 0.1, and only extremely high inputs, such as 0.99 may become 0.6 or higher.
The "band" for each level is calculated by dividing 1 by the amount of levels. This looks like this for an enchantment with 5 levels:
0 - 0.2
0.21 - 0.4
0.41 - 0.6
0.61 - 0.8
0.81 - 1
Increasing the bias towards 1 will lead to an increased likeliness of low-level enchantments, and lowering the bias towards -1 will lead to an increased likeliness of high-level enchantments.
In all enchantment configs, there is a hidden key that can be added if needed.
Flags are optional settings that can be set for enchantments if required.
Here is a list of flags currently available:
If the enchantment should not contribute to the hard cap