#Custom enchantments experience cost
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
They should be in levels
Are you sure? Because it seems very high for that
This is luck of the sea for exemple :
{
"anvil_cost": 4,
"description": {
"translate": "enchantment.minecraft.luck_of_the_sea"
},
"effects": {
"minecraft:fishing_luck_bonus": [
{
"effect": {
"type": "minecraft:add",
"value": {
"type": "minecraft:linear",
"base": 1.0,
"per_level_above_first": 1.0
}
}
}
]
},
"max_cost": {
"base": 65,
"per_level_above_first": 9
},
"max_level": 3,
"min_cost": {
"base": 15,
"per_level_above_first": 9
},
"slots": [
"mainhand"
],
"supported_items": "#minecraft:enchantable/fishing",
"weight": 2
}```
It isn't specified in the changelog if it is levels or points, or something new
Here you can find a table and graph showing how much points each level needs https://minecraft.wiki/w/Experience
Experience orbs (EXP or XP for short) can be obtained by gathering experience orbs from mining, defeating mobs, breeding, trading, fishing, completing advancements, and using grindstones and furnaces. Experience orbs gained during a player's life affects the player's score on the death screen. While having no direct effect on the player charact...
It could also be points now that I look at the example
Hmm, it seems low for points too
You have to try around and see how much the cost changes
level 1 is 7 points, level 2 is 16 points
Yep it is likely points
If you have a converter from points to level that is easy to use, could you put it in the /resources ? It could be useful, for custom enchantments and other things too
It’s just some basic math
Hey Playful
You could setup like a table if you need it lmao
Yes it is not hard to calculate, just that having a website anyone can acces in about 5/10 seconds (less if you keep it open because you know you have to work with xp) is easier
The link I send has a table and the formula
The wiki is also limited to 40 levels (even though you rarely need more)
64*
If you need to calculate beyond that I have to wonder what you are doing
I don't personally, but considering the number of people who make datapacks, I think some people do from time to time
It also work for example for people who use xp bottling systems which ask how much points you want to store and not levels
And who want to store like 100 levels
By the way, why do you have to specify two times the per_level_above_first?
Unless I missed something
Which does the game choses to use?
you specif it once for the min and once for the max
you could use different values (less for the min version for example) then the gap becomes bigger the higher the level
Well how is it used?
This calculates the min value:
"min_cost": {
"base": 15,
"per_level_above_first": 9
}
so the "per_level_above_first": 9 only counts for that value
same for the max value
So, it is randomly between 15 and 65 for the level one, and 15+9 and 65+9 for the level two for luck of the sea, is that right?
yes
And for level three it is randomly from 15+(9*2) and 65+(9*2)
yes
no mb
So
No ok I get it
Im an idiot
Just, is it two,three,four different rolls for level three, four, five?
it is random every time
Hum
Like, if you roll a level five enchantment which have a random per_level_above_first of between 9 and 20, do you roll it once (for exemple you roll 11 and it is the rolled default cost + 4*11) or do you roll it five time (and it is for exemple the rolled default cost and 9+15+12+18)
It is just a random question though
For level five, it goes like this:
- calculate the min and max (min: 15 + 9 * 4 = 51, max: 65 + 9 *4 = 101)
- final value = random(min:51, max:101)
- final value: 76 for example