FR EN DE ES IT PT
In update 2.17, we have added a new interface feature that should please players who have mountains of unused ingredients in their inventory.
But allow me to quickly introduce myself before going into the heart of the subject. I am [Hyl-Harant], the latest addition to the client development team. It’s my pleasure to tell you all about this new interface through this devblog article.
 
 

What’s the new thing do?

Soberly called "Available Recipes" and once known under the code-name "Go-go-gadget-recipes," this interface allows you to visualize every recipe that could possibly be crafted using the ingredients in your possession. To access it, you just have to click on the new icon in the lower-left-most corner of your inventory interface ( ) , but it can also be found in the interface for other inventories like your bank or Dragoturkey. When you click it, you'll see this:
 


Thanks to several options, you'll be able to filter and sort out your results. If you intend to craft something yourself, you'll want to enable the "My Professions" option, for instance.
The first options speak for themselves, but let's linger a bit on the "Missing ingredients tolerance", which is set to 0 by default. By changing this value you'll see recipes that you can’t quite craft due to a lack of items, including icons that show if you don’t have the missing item at all (  ), or simply don't have enough (  ).
 


But that's not all! if you open this new interface from other inventories like chests or banks, then you'll get an additional functionality, an option to transfer ingredients for a given recipe from this second inventory to your character’s inventory. If you have enough of an item in your character's secondary inventory to make an item, it will be marked with the following icon:   .
 


By clicking the transfer button to the right of the recipe, you'll be able to select how many times you want to be able to craft the recipe in question. This will consecutively transfer the ingredients in the needed quantities (as long as you have enough and if your inventory has the required free space).
The default suggested amount will be the maximum number of times the recipe can be crafted using all of your ingredients. You’ll be able to input a higher value, and the interface will include additional sets of that particular resource in sets equal to the requirements for the recipe. Using the image above, the default number displayed for Walnut Wood will be 42, as the character in question has 440 copper and 210 iron in their inventory already. Clicking the accept button will transfer 210 Walnut wood to the character’s inventory (42 sets of 5). However, as this character has 270 Walnut wood in their bank, they can transfer more than 42 sets of 5 Walnut Wood if they want, up to 54 sets of 5 total.
 

Eureka!

The idea behind this interface is far from new, but with a crafting system as complex and extensive as the one DOFUS uses, making this type of interface run smoothly was a problem. To give you a little idea of the size of the matter, at the time I type these lines, there are 2,334 distinct ingredients in DOFUS, which can be combined into a grand total of 3,079 recipes, all jobs included.
After recent breakthroughs regarding the client's performances, the possibility to implement this idea finally presented itself. The algorithm determining which recipes are craftable is the heart of this interface and it's that algorithm that we focused on to make this feature possible.
When we started working on this algorithm, the problem was quite simple: we give it an inventory, and it gives back the list of all possible recipes using the ingredients within.
But very soon, we had to add the math for how many time each recipe could be crafted, as well as the experience it can give the player, given his crafting level. Then came the idea to take into consideration missing ingredients, sorting out recipes depending on various criteria (like number of ingredients), the accounting for a second inventory... One more week and the algorithm would have made you coffee as well, or at least calculate the necessary amount of caffeine for your next game session.
In the end, the results are rather satisfying, even on a 1GHz and 512Mb RAM computer; with 4000 different items divided between a character's bank and inventory; and using very large filters (tolerance for 7 missing ingredients and searching all professions), we got response times measured at the scale of a few hundred milliseconds.
 

In Summation

We hope this interface will allow you to discover hidden wonders in your inventories, wonders that are only one touch from the expert hands of your favorite craftsman from reality.