Tax Free Levels (Fabric/(Neo)Forge)

Tax Free Levels (Fabric/(Neo)Forge)

532k Downloads

Anvil Levels

INooBTooMuch opened this issue ยท 3 comments

commented

I have a mod installed that makes it possible to exceed the normal level for enchants (apotheosis) and the problem I have is not with the enchanting table but with when I remove the enchantments from the item and try to apply books from an anvil the level requirement still shows (even though it takes the flat exp amount) and it doesn't let me apply the books.

I play in Minecraft 1.18.2 and the versions are 5.3.5 for apotheosis and 1.3.1 for tax free levels

commented

so that I can understand this better, the anvil shows 236 levels, I had 206 and if I had 236 it would let me apply the book to the item and take me back to 0 exp, but I think the previous times I did this with still 205 levels this time the requirement was 130-ish and it took me back to 200-ish (now this is not accurate because I don't remember, but the point is that it wasn't much)

is the exp from 200 to 206 the same as the 0 to 130 and that's why it was like that or is it working too good?

commented

Hm... I don't quite understand what you mean.

So you wanna apply a book to an item and it doesn't let you apply it because the level requirement is too high.
I don't really see the issue with that.

even though it takes the flat exp amount

I think you might be misunderstanding how this mod works.
You're actually never paying less than the level requirement says you're paying - lemme explain.

Say you're level 100 and it says you're paying 20 levels.
You are actually still paying 20 levels (worth of XP), it's just that instead of paying the levels between 80 to 100, you're paying levels from 10 to 30, hence the level requirement is still the same.
It's as-if your player was level 30 to begin with.

If your player level is lower than 30, this mod effectively does nothing*.

(* Actually, it removes a "Small Tax", see patch notes, so you're not quite paying the full levels, but the difference is very small.)

Maybe I completely missed what you're saying, so please elaborate if I did!

commented

so that I can understand this better, the anvil shows 236 levels, I had 206 and if I had 236 it would let me apply the book to the item and take me back to 0 exp

Yep, spare some change (Small Tax).

think the previous times I did this with still 205 levels this time the requirement was 130-ish and it took me back to 200-ish (now this is not accurate because I don't remember, but the point is that it wasn't much)

is the exp from 200 to 206 the same as the 0 to 130 and that's why it was like that or is it working too good?

Yeah, you'll get something like that.
The XP needed to reach the next level grows and grows each level, so just 1 high level can be dozens of levels counting from level 0.

Just did some math:
To get from level 200 to 206, you need 9987 XP.
With that amount of XP you get from level 0 to level 63! (Or from level 30 to level 66.)
So not quite 130, but you get the point, levels that high are insanely more expensive because of the quadratic XP growth

The wiki has some graphs and formulas if you wanna check out the math.


Btw, a level cost of 200 is still a ton!
Do you know about "prior work" (technical term: repair costs) and the optimal way to combine items in your anvil?

The basic gist is that every time you combine 2 items, the prior work increases to the maximum of both + 1.
The actual level cost grows exponentially with the prior work, so it is really important to keep the prior work as low as possible.

The naive way of applying books would, step by step, look something like

item + book1 --> item'
item' + book2 --> item''
item'' + book3 --> item'''
item''' + book4 --> item''''

where the prior work of the item increases by 1 in each step, so you're already at prior work 4 with just 4 books.
That's roughly an additional level cost of 2^4 = 16.
With 8 books, that'd be a cost of roughly 2^8 = 256!

But there's a way better method.
The trick is to pair up all the items with the same prior work and pairwisely combine those.
So at the beginning you have e.g. 8 items, you pair them up, combine them and get 4 items with the same prior work.
Then you do the same again, then again, and, you guessed it, again, until you have your final item.
If you make a graph out of it. it looks like a binary tree flipped on its head:

O O O O O O O O (items with prior work 0)
\ / \ / \ / \ / (combine them pairwise)
 O   O   O   O  (resulting items have prior work 1)
  \ /     \ /   (combine them pairwise)
   O       O    (prior work 2)
    \     /     (combine)
       O        (final item only has prior work 3!)

This only gets better the more enchantments you want to put on an item - exponentially better!

If you want a clearer explanation, gnembon did a video on it.

P.S.
The fact that this method exists and is purely knowledge based also made me ponder if the enchanting system could not be changed in a way that is more fair towards the "unknowing".

P.P.S.
I wrote too much. ๐Ÿ˜