Code Monkey home page Code Monkey logo

enchant-order's People

Contributors

araraura avatar bennett-zhang avatar cph101 avatar ezberlin avatar gazmanovich avatar giumatt avatar iamcal avatar jianyuelab avatar jmarcinik3 avatar karis-tlg avatar murilo087 avatar plutoxar avatar realztheman avatar rilaxik avatar ryota-abe avatar sebastianbingham avatar sn4pe avatar streamversus1 avatar sycraxe avatar therockki1 avatar vinicius-8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

enchant-order's Issues

Feature Request: Enchanting Books

A potentially useful feature (at least for myself) would be the option to combine books without applying to armor or tools.

I'm not sure if it's the same order as listed just without the base item or if it's a separate calculation.

Feature Request: Light up selected enchants

Reasons to request this:

  1. There is no way to tell if you selected an enchant or not
  2. It isn't very clear on weather or not you selected an option, leading to repeated/missed selections

Thus, for all those players in Minecraft who suffer from poor memory trying to use this and forget what they selected, add the feature

Speed and generality improvements for code

Hi,

I've created a clone on my local desktop and would like to push some revisions. I am unable to publish a separate branch to this repository and unable to push to the main branch. My revisions make the code faster, add more display information, and make more of the GUI elements autogenerate solely based on the metadata file. Please enable permissions to create a separate branch and aid in getting these revisions through.

Peace,
Joey

feature request: additional interesting metrics

Thanks for writing this tool, I just discovered it and it looks very useful!

Since every possible path is evaluated, it might be interesting to gather some other statistics along the way in addition to the already-collected stat for total number of paths evaluated. For example:

  • how many paths were possible/impossible to actually use, accounting for the work penalty
  • show the worst possible path, without hitting the work penalty limit
  • show the absolute worst path, ignoring the work penalty limit

And maybe others I'm not thinking of off the top of my head.

Mace missing from item list

The mace was recently added and it would probably be a good idea to add support for it.

Although, the Wind Burst enchantment is only obtainable in survival as level 1 books from ominous vaults and must be combined to obtain the maximum level of 3. I'm not sure if that would cause any issues or difficulty implementing, but it should probably be acknowledged when adding it to the site.

Pressing "Allow multiple Protection types (1.14.1 only)" moves some enchantments

Pressing the "Allow multiple Protection types (1.14.1 only)" button moves some enchantments

Helmet/Turtle Shell:

Before
Protection
Aqua Affinity
Blast Protection
Fire Protection
Mending
Projectile Protection
Respiration
Thorns
Unbreaking
After
Protection
Blast Protection
Fire Protection
Projectile Protection
Aqua Affinity
Mending
Respiration
Thorns
Unbreaking

Chestplate:

Before
Protection
Blast Protection
Fire Protection
Projectile Protection
Mending
Thorns
Unbreaking
After
Protection
Blast Protection
Fire Protection
Mending
Projectile Protection
Thorns
Unbreaking

Leggings:

Before
Protection
Blast Protection
Fire Protection
Projectile Protection
Mending
Swift Sneak
Thorns
Unbreaking
After
Protection
Blast Protection
Fire Protection
Mending
Projectile Protection
Swift Sneak
Thorns
Unbreaking

Boots:

Before
Protection
Blast Protection
Fire Protection
Projectile Protection
Depth Strider
Frost Walker
Feather Falling
Mending
Soul Speed
Thorns
Unbreaking
After
Protection
Blast Protection
Depth Strider
Frost Walker
Feather Falling
Fire Protection
Mending
Projectile Protection
Soul Speed
Thorns
Unbreaking

Include Pre-Enchantments

When a pre-enchanted item comes as loot from somewhere(tm), it would be great to be able to add the existing enchantments to the target.

Example: Diamond shovel with Eff 3 Unbreaking 3, wanted to add Mending and Silk Touch. When choosing all 4 enchantments "as is" the result will be non-reachable combinations because the existing enchantments would have to be combined differently.

K

Consider PWP on final item

It may make no difference within the context of the algorithm, but I think a truly "optimal" solution should also optimize for the prior work penalty on the final item.

For example, consider enchanting a helmet with Thorns 3, Mending, and Unbreaking 3. The website will tell you to do (((Helmet + Thorns 3) + Mending) + Unbreaking). This costs 21 levels, which is indeed optimal. Unfortunately this results in a prior work penalty of 7 levels, which is not optimal. Consider the solution ((Helmet + Thorns 3) + (Unbreaking 3 + Mending)). This will get a prior work penalty of 3 levels.

3 very fringe max enchants crash the site

So, in 1.14.1 it's possible to enchant armor with EVERY protection type, when doing "inspect element" I was able to switch the toggles from on to off, this works for Chestplate, Leggings, and Bow (for 1.11)
However, for Helmet and Boots, since there's a LOT of enchantments possibly on them, it can't compute it (it is possible, even with SS added at the end), or it enters into a runtime error of some kind, I'm not a coding expert by any means so what do I know
But, I'd like to know if I can help this algorithm in anyway, I know of ways to get maximum helmet and boots enchants while keeping the costs under 39

So that's issue number 1
Number 2: Can you remove the "mutually exclusive" tag from all Armor, and the Bow, as it's "possible"
And write somewhere "This armor is only possible in 1.14.1, go at your own risk" and "This bow is only possible in 1.11, go at your own risk"

That's all, this is very much a hidden gem of a website, and I've been using it a ton!

Boots unavailable

When inputting all boots enchants, the page lags, shortly before crashing. I don’t expect there to be a possible way for this to cost <40 levels though, so I assume it just overloads and can’t compute it.

Feature Request: Pre-Enchanted Items

It would be cool if there were an option to input items that are already enchanted (like the ST+U3 picks you can get from a villager trade), and to calculate the cost for adding the desired enchantments to those.

Loving this tool by the way, it's been very helpful.

EDIT: Just realized there's already a closed request on this. In response to what you said on that one, I think pre-enchanted items do affect xp cost, don't they? Maybe they don't result in the 'too expensive' thing though, based on what you said, so I guess it isn't really necessary.

Incorrect Results on Axe

If you follow the instructions generated for an Axe with:

  • Sharpness V
  • Efficiency V
  • Silk Touch
  • Mending
  • Unbreaking

It will generate an Axe that cannot proceed past Sharpness V on 1.18.1

axe
axe2
axe3

feature request: optimize for trade rebalance

The next version of Minecraft will rework the villager trading system so that obtaining enchanted books won't be quite so "broken". It'll require more exploration and such, but ultimately it'll be easier to get second-rate enchantments from the RNG. First-rate enchantments will be impossible to buy, but will be discoverable in chests and via fishing and enchantment tables.

It would be cool if this calculator could suggest "optimal" combinations of only the tradable enchantments. It'll require combining some similar books and presumably the work penalty will exclude the possibility of maximizing everything that way, so some guidance for what to prioritize might be helpful.

This feature might include a visual indication of what can be traded, UI elements for combining certain books (vs. including book acquired elsewhere), possibly a free selection that finds how to achieve it with the tradable books, and maybe even modes like "max damage", "max protection", "max speed" that make intelligent optimal selections.

Bug: Unoptimal enchantment order

How to Reproduce

Select boots and the following enchantments:

  • Blast Protection 4
  • Depth Strider 3
  • Feather Falling 4
  • Mending 1
  • Thorns 3
  • Unbreaking 3

The result is as follows:

image

However, that is NOT the optimal solution.

Here is a better enchantment order:

image

As you can see, the total cost between the two solutions are both 53 levels. So how is the second solution better?

Well, let's break down the individual costs of combining each enchantment.

First solution:

  • Boots + Blast Protection 4 (8 Levels)
  • Boots + Depth Strider 3 (7 Levels)
  • Feather Falling 4 + Mending 1 (2 Levels)
  • Boots + (Book with Feather Falling 4 + Mending 1) (10 Levels)
  • Thorns 3 + Unbreaking 3 (3 Levels)
  • Boots + (Book with Thorns 3 + Unbreaking 3) (23 Levels)

8 + 7 + 2 + 10 + 3 + 23 = 53 Total Levels

Second solution:

  • Boots + Thorns 3 (12 Levels)
  • Blast Protection 4 + Mending 1 (2 Levels)
  • Boots + (Book with Blast Protection 4 + Mending 1) (12 Levels)
  • Depth Strider + Unbreaking 3 (3 Levels)
  • Boots + (Book with Depth Strider + Unbreaking 3) (13 Levels)
  • Boots + Feather Falling 4 (11 Levels)

12 + 2 + 12 + 3 + 13 + 11 = 53 Total Levels

You see even though both solutions use the same number of total levels, the final step in the first solution requires a whopping 23 levels! On the other hand, in the improved second solution, you only need at most 13 levels at any time (for the second to last step).

This is super important, because the way EXP scales with Levels in the game is not linear! The higher a Level you are, the harder it is to gain additional Levels. To put things in perspective, going from Level 30 to Level 40 takes about the same EXP as going from Level 1 to Level 26!

With a few changes to your code, I have fixed this issue to always find the optimal combination of enchantments to minimize EXP in addition to minimizing Levels. I will submit a pull request.

Cheers!

Bedrock vs. Java

The Wiki says that the cost is calculated differently between the two editions. I don't fully understand how, but here are the words:

If the enchantment is compatible with the existing enchantments on the target:

For Java Edition, add the final level of the enchantment on the resulting item multiplied by the multiplier from the table below.
For Bedrock Edition, add the difference between the final level and the initial level on the target item multiplied by the multiplier from the table below.

If that really does make a difference, then please add an option to switch between them, or list both.

If, as I suspect, this does not make any difference (because the tool assumes you're starting from clean), then please say so; otherwise Bedrock players like me look at it and wonder if I'm looking at Java-only wisdom.

Bug: Other language(s) behaving wierdly

Example:
Example

This may be due to the cache IDs being the same in script.js, the issue happens with this config:

var languages = {
	//key   : ['LABEL', cache-id],
	'en'    : ['English', 1],
	'pt-BR' : ['Português', 2],
	'ru-RU' : ['Русский', 1],
	'zh-CN' : ['中文', 2],
        'nl' : ['Nederlands', 1],
};

Not sure if this is the problem, but it seems likely.

What also sometimes happens, is that it offers enchantments as an option which aren't available for that item, for example, Swift Sneak for chestplates and Infinity for helmets.

My website design

Good morning or Good afternoon,

As a fan of the game Minecraft, I liked your idea of ​​helping players with enchantments to enhance their experience. However, I found the website ugly and visually nonsensical, so I made my own version of the site. I hope you like it.

Attached are the files
enchant-order-main.zip

1.14.1 is incorrect

1.14.1 is not the correct version for armor enchantment compatibility. It is from 19w02a (1.14) to 1.14.3 pre-1, meaning 1.14.2 was the last release version to allow for "god armor".

Styled the website

Hello! I really liked this website but there was one thing missing. The styling is a bit outdated and so i thought i could make it look better with some rounded corners dark background and more! If you want to check the improvements i made its available at https://enchant-order.lunartaku.codes/ or the repo https://github.com/LunarTaku/enchant-order

PS: I included credits that its made by you since i only changed the style a lil bit :D
Also if you want me to remove the repo that's okay with me since its your work.

Option to calculate Thorns III as 2x Thorns II

According to the wiki, obtaining Thorns III directly can be a bit complicated, because villagers only sell Thorns II, so often the player will need to somehow combine two Thorns II books (I guess the same argument could be made for Swift Sneak and Soul Speed).

Do you think it would be possible to add a way to say that I want the enchantment order including combining the same book? Or is the impact of combining thorns books negligible?

Non Optimal Solution

When I input this request:

Boots with Fire Pro 4, Frost Walker 2, Feather Falling 4, Mending, Thorns 3 and Unbreaking 3

I got a non-optimal solution that was too expensive to use. Granted, the Thorns 3 book I used was made with Thorns 1 books, but I tried another combination from another tool and I was able to enchant them there. So I think something is wrong with the suggested solution.

too expensive enchant

Whereas the following solution worked:

working solution

Optimal solution still brought up "Too expensive"

I'm facing some issues with enchanting in Minecraft and I'm not sure if it's due to outdated information or my own mistakes. Despite following a guide for sword enchantments, I received a "Too expensive" message when attempting to add my final book. Additionally, the tool indicated that it would require 49 levels, but I ended up spending around 90 levels in total. It's unclear where the problem lies, but I would appreciate any help in resolving this matter.

Can't enchant sword

Screenshot_2023-03-02-22-57-28-35_1ffb234d33525882661a5a8d47829dc1.jpg
When I try to enchant for enchantments from the screenshot, the site crashes at step 6 of 7.

How about renaming? :D

When I was making my helmet, it came out as too expensive when I renamed it as well. If you could add that as a stage it'd be perfect, rn Im using the 1.14.1 only thing as a workaround. Thanks!

"Calculate" button doesn't work

Hi,
Clicking the 'Calculate' button only works rarely for me. I don't know what the issue is; the only solution I found is refreshing the page, which makes it work only about 10% of the times I try.

Is there something I'm doing wrong?

Not all options are explored. (maybe intended)

This is more a curious question.

I noticed that the counter saying how many options were explored doesn't equal all the unique options for 3 enchantments or more.
Are some options intentionally left out, since they will never be optimal.

Or is something else going on?

For 3 enchantments on an item there are 30 unique ways of combining the books and item.
But the tool claims to only explore 24.

Chinese Language Translation problem

Hi developer, when I use your tool from the website. I found out that there have some translation issues in Chinese version. It have some difference with translation on you site and official minecraft translation.

iOS Crash

On iOS, chrome or safari if you select boots for example and fully enchant them then the webpage crashes.

I believe it’s hitting some sort of timeout value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.