Closed Iiridayn closed 3 years ago
I've tried to add this now but it could use some testing.
A few lessons learned thus far.
Some Mystic Forge recipes which are added have a chance to produce the listed item - "Endless Gift Dolyak Tonic" and "Mini Steam Minotaur" are two examples. They actually produce a net negative due to the random output, though the tool (based on the data; I probably need to open a bug for those on the upstream) currently reports a positive.
We should cache the JSON file to not keep hitting github on every request.
As you've probably noted from your output, some Mystic Forge recipes are probabilistic, and produce a non-integer output. It might be worth factoring those in as a probabilistic measure; or silently rejecting them as not worth attempting in small volumes (or worth adjusting the code to handle non-integer production from recipes).
The Guild Ballista (and related) Blueprints require 30s in an assembler; thus the steps listed are not a fully accurate representation of the time commitment in crafting.
Another issue with the upstream data: https://wiki.guildwars2.com/wiki/Minor_Rune_of_the_Air (and likely similar recipes) show historical recipes which are no longer accurate, and do not reflect the true cost of producing the item.
Thanks for the feedback!
Some Mystic Forge recipes which are added have a chance to produce the listed item - "Endless Gift Dolyak Tonic" and "Mini Steam Minotaur" are two examples.
I didn't realize this - in that case I think I'll have mystic forge recipes only be included when you opt-in, since there are already enough things that people need to be aware of with the non-mystic forge recipes.
We should cache the JSON file to not keep hitting github on every request.
I'll add this.
Mystic Forge recipes are probabilistic, and produce a non-integer output
I noticed the non-integer output and ignore those items at the moment. I think this probably isn't worth the work required to handle them because so few mystic forge recipes are showing as profitable anyway.
The Guild Ballista (and related) Blueprints require 30s in an assembler; thus the steps listed are not a fully accurate representation of the time commitment in crafting.
Recipes that require assembly could be another opt-in. Ideally I'd want to be able to keep them in the default output, and accurately calculate the time required for each recipe. Then recipes could be ranked by gold per time. Unfortunately as far as I could tell the crafting times from the API weren't accurate, so I added crafting steps as an approximation of time required.
Another issue with the upstream data
This might require a blacklist which is updated as these recipes are found.
I think the upstream can (and probably should) fix the inclusion of deprecated recipes, so it might not be worth developing a blacklist. Hiding mystic forge recipes behind a flag seems reasonable.
I've also been thinking about a gold per hour calculation, and recognized steps as a proxy for it; I hadn't realized the crafting times were included in the API. Could it be the API crafting time is for a single item? Crafting multiple items provides a speed bonus for each - https://wiki.guildwars2.com/wiki/Crafting says:
When crafting a stack of items, the process speeds up progressively: each item queued will craft in half the time of the previous item. For example, if it takes two seconds to create a single bronze ingot, it will take only one second to create the second, and a half second to craft a third. There is a limit to how fast items can be crafted.
I suspect the halving ends after 4-5 times; but it should be pretty easy to craft a stack of mithril ore or something (do it all the time...) and time the duration. I'll check it out.
Two problems with assembler recipes:
Edit: Moved into #12
Current status of this one: unless fixing things like the Steam Minotaur or Endless Gift Dolyak Tonic on this ticket (might be worth another one for those), this seems to be working pretty solidly. Going to close this one.
Created https://github.com/t-mw/gw2-arbitrage/issues/19 for opting out of mystic forge recipes.
https://github.com/gw2efficiency/custom-recipes is a good source which aggregates wiki data; might be easy to integrate since it's JSON formatted.