I've just finished an enchantment calculator. It calculates the probability of you gaining a particular enchantment for that prized posession you've been saving up for.
I was going to get the program to work out the actual probability using probability theory, but looking at the algorithm used, that is just not going to happen.
Instead this uses a brute force method to run through the algorithm (as given on the wiki - http://www.minecraft...wiki/Enchanting) 1000 times. Once this is done, the probability of gaining a particular enchantment can be calculated.
It also has a mode whereby you can run it once to see what enchantments you might have gotten for a given instance.
The program takes 3 inputs:
- Item type
- Enchantment level
All the values are hard coded (embeded xml) (because I wrote this in a hurry), but I have released the source.
If the rules ever change, it should be fairly straight forward to update.
Enjoy, and feel free to tinker with it.
Please feel free to point out any mistakes.
I hope this makes the game more fun for you.
Google code link: http://code.google.c...ent-calculator/
Binary (windows only sorry): http://code.google.c...or.exe&can=2&q=
Also, you will need to install .net framework 4 to use this.
This was written in VB.Net using WPF. The project file is for Visual Studio 2010
Note: You will need .Net Framework 4 installed if you don't already have it: http://www.microsoft.com/net/
As an example, to get Fortune III on a Diamond Pickaxe
Level 40 will give you ~ 14% chance
Level 50 will give you ~ 24% chance