Enchantment costs
KlutzyBubbles opened this issue · 15 comments
I have been through issues trying to find answers but no success.
Pre 1.6 this was my config
{
"allow_removing_curses": true,
"show_enchantment_cost": true,
"dedicated_server_options": {
"alternative_cost_display_enabled": false
},
"disenchant_to_book": {
"enabled": true,
"consume_enchanted_item": false,
"cost_config": {
"count_mode": "count_levels",
"cost_factor": 0.5,
"cost_offset": 0.0
}
},
"move_enchantments": {
"enabled": true,
"cost_config": {
"count_mode": "count_enchantments",
"cost_factor": 0.5,
"cost_offset": 0.5
}
}
}
this is now my current config, with the lack of documentation i couldnt tell if i moved the settings correctly
{
"allow_removing_curses": true,
"dedicated_server_options": {
"alternative_cost_display_enabled": true
},
"client_options": {
"show_enchantment_cost": true
},
"disenchant_to_book": {
"enabled": true,
"consume_enchanted_item": false,
"cost_function": {
"function": {
"type": "grindenchantments:count_min_power"
},
"factor": 0.5,
"offset": 0.0,
"type": "grindenchantments:transform"
}
},
"move_enchantments": {
"enabled": true,
"cost_function": {
"function": {
"function": {
"normal_factor": 0.5,
"treasure_factor": 0.5,
"type": "grindenchantments:count_levels"
},
"type": "grindenchantments:first_enchantment"
},
"factor": 0.5,
"offset": 0.5,
"type": "grindenchantments:transform"
}
},
"version": 2
}
2 things seem to be wrong (For the example i am disenchanting diamond boots with prot 4 and unbreaking 3 to a blank book)
-
The enchantment cost displayed by the client side mod and the alternative display for vanilla say different values, mod says 25 and vanilla says 28.
-
With my changed options in the config i wouldnt expect the cost to be so high but again without any documentation on what the numbers actually do i am really just guessing.
Some help with this matter would be greatly appretiated, i am using minecraft 1.20.1, Fabric loader version 0.14.21 and installer version 0.11.2. With grind enchantments version 3.1.2+1.20
Yeah, I do agree that most of these config options are not really easy to understand :)
That said, I believe there are two different issues here.
- The enchantment cost displayed by the client side mod and the alternative display for vanilla say different values, mod says 25 and vanilla says 28.
f you're playing on a dedicated server, make sure the config is the same on both the client and the server – the cost values are not synced. The enchantment cost shown directly in the GUI is added by the client mod, while the one in the item tooltip is added by the server mod.
With my changed options in the config i wouldnt expect the cost to be so high but again without any documentation on what the numbers actually do i am really just guessing.
In some version, I changed the default to be more expensive, but it should still be possible to use the same configuration as in older versions, where it was cheaper.
I believe the difference here is caused by grindenchantments:count_min_power
, which should be grindenchantments:count_levels
to match your old config.
count_min_power
: Uses the "minimum enchanting table power" of all enchantments on the tool – this technically has a different purpose (as you can tell from its name), but I chose it because it usually correlates with the strength of the enchantment.count_levels
: Simply adds all enchantment levels on the tool. So if you have Efficiency IV and Unbeaking III, the resulting value would be 4 + 3 = 7.
The number from that is then changed with the values near "transform". It's first multiplied by the factor
, and then offset
is added.
I hope this helps!
I believe the difference here is caused by
grindenchantments:count_min_power
, which should begrindenchantments:count_levels
to match your old config.
Thank you this worked, however
f you're playing on a dedicated server, make sure the config is the same on both the client and the server – the cost values are not synced. The enchantment cost shown directly in the GUI is added by the client mod, while the one in the item tooltip is added by the server mod.
While this does make sense, wondering if there can be a case to make this instead use the server calculation either by default or always because there will never be a case for the server config and the client config to be different.
It could be done similar to how this mod does it by sending a packet on join https://github.com/Rakambda/FallingTree/blob/minecraft/1.20.1/forge/src/main/java/fr/rakambda/fallingtree/forge/network/ForgePacketHandler.java
The reason for avoiding editing client side config is purely because i dont want to walk everyone who plays on my server through editing a config file, so i can use the vanilla visual for now.
The reason for avoiding editing client side config is purely because i dont want to walk everyone who plays on my server through editing a config file, so i can use the vanilla visual for now.
Understandable, although I don't really want to send a packet to every client on join, even if vanilla just ignores it – but maybe I will do that. In the meantime, you don't need to have the mod installed on the client, as it also works purely server-side, and the cost is still displayed in the tooltip.
so if u were to change the count_min_power to count_levels? it would fix it entirely and make it cost cheaper?
Nvm i did it Free transfering now
Can you share how you typed it in the config? I'm a bit confused..
@CainisMan https://github.com/Cam396/grind-enchantments/actions/runs/9950553376/artifacts/1704636593
this is my fork that is free to transfer
https://github.com/Cam396/grind-enchantments/actions/runs/9950553376/artifacts/1704636593 this is my fork that is free to transfer
A more simple way would be to set all the cost_factor
and cost_offset
values in the config file to 0
. That should be enough to make transfers free. If it isn't, that's a bug.
https://github.com/Cam396/grind-enchantments/actions/runs/9950553376/artifacts/1704636593 this is my fork that is free to transfer
A more simple way would be to set all the
cost_factor
andcost_offset
values in the config file to0
. That should be enough to make transfers free. If it isn't, that's a bug.
it IS a bug, and configs are broken globally, so you have to change the value that allows it to be taken to true no matter what
configs are broken globally
What do you mean? As far as I can tell, the config file should be working. If it doesn't, you should open a new issue.
i dont have one written atm, it might take a bit because of the code refactoring in 1.20.5+
@CainisMan https://github.com/Cam396/grind-enchantments/actions/runs/9950553376/artifacts/1704636593 this is my fork that is free to transfer
do you have one of these for 1.20.1?