Suggestion: Item Enchantability Balance Config
IdrisQe opened this issue ยท 2 comments
I'm surprised nobody has mentioned this yet, but each vanilla piece of equipment has an enchantability rating which allows for stronger or weaker enchantments depending on its level. From my testing it seems like this mod doesn't use that at all.
What I propose is a simple config option that lets you set a modifier for how high you can level enchantments on an item based on its enchantability, perhaps using the same calculations that the vanilla Enchanting Table does when deciding what enchants can go on what item.
Alternatively, a cost increase/decrease multiplier, affected by enchantability.
"The first thing that Minecraft does is apply two modifiers to the base enchantment level. Each modifier is restricted to a certain range, with numbers close to the middle of the range more common than those near the ends.
The first modifier is based on the item's "enchantability," which depends on the material and the type of the item (see the table below). Minecraft picks a number between 0 and half the enchantability, then adds that number plus one to the enchantment level. Bows, books, and fishing rods have an enchantability of 1 for this purpose. This random value follows a triangular distribution (like rolling a pair of dice and adding) so results close to a quarter of the enchantability are much more likely than results at the extremes."
modified enchantment level = base enchantment level + Random(0, enchantability / 4) + Random(0, enchantability / 4) + 1
(Rounding Down after each step)
-Minecraft Wiki Enchantment Mechanics page
This would help (optionally, hence the config) balance things differently, say if you want to alter things to cost less levels, but instead be affected by enchantability like the base Enchanting Table.
I would personally vote to clamp max enchantability at 2-3x vanilla and disallow enchanting at negative values. it seems sad to lose features because other mods don't set their values in a logical range.
Thanks for the suggestion, older versions of the mod would use the enchatability rating to provide a discount to the price, but a lot of mods have really weird values, such as negative ones which would mess that up. I disabled that feature in the 1.12 release because I wasn't happy with the old concept for it, and I wanted to focus on getting the mod out.
Implementing things in the way you suggest could be cool, but it would take a bit of work to get done properly. I also need to test how the current system handles items with enchantments higher levels than the table's max, and some similar situations. I will put this on my to do list, although I can't promise it will be implemented exactly how you imagine it.