I started looking through the crafting code yesterday after completely fucking up all my craft recipes during a recent import of all the jrose evo items.
I got all the recipes fixed again but then i started to wonder about the way crafting works in irose/prose as opposed to in evo.
In irose/prose, the first item is usually listed as an item type such as 436 (some type of cloth) whereas in evo all the items are specific items with type and id.
When I craft a fairy wing, I can use 15 of any cloth I like, along with 15 iron threads and 10 bird feathers.
My question is, does anybody know what advantage can be gained by using 'Lace' (quality = 75) over 'tough cloth' (quality = 30)?
It has to do something otherwise there would be no point using anything but the cheap crap all the time.
In the current code, the 'MaterialType' value for the first recipe item is not even loaded into the server from the STB and is most definitely not used at all in the crafting code.
I have already fixed that by adding a 'MaterialType' member to the ProductList and modifying startup to load it in.
What I need to know is what the heck does Quality do for crafting? I never crafted anything in irose or pre-evo so i have no idea.
Currently it does nothing but that has to be changed.
I have also added a bunch of checks to make sure that people are not crafting stuff by packet injection (pretty easy to do at present)
The packet that comes in from the client only contains the crafted item type and id + the inventory slot numbers for the crafting mats.
All the server is doing is checking that those slots contain 'something'. It isn't checking the type, id or even the amount in those slots against the crafting recipe.
Basically you could have one cheap item in each of those slots then send a packet with the item id (crafted item) and the slot numbers.
The server does not check the mat ids.
The server does not check the number of items in the slots.
The server does not check the MaterialType.
The server will simply say "oh yes there is something in that slot. Passed the test. Next slot please!
As long as it passes the test for each slot, you get your item.
You could make a devil wing (cloth 100, Platinum thread X 30, little devil feather X 50) for 1 rusty iron, 1 twig and 1piece of cheap ass leather.
I fixed all that too. It checks everything now
The formulas for durability and stats are based on CON and SEN so what the heck is left for Quality?
I could improvise something to give it the chance of creating a 'blue' item on a chance that is proportional to the Quality, but I'm pretty sure it didn't work that way originally.
Anybody have any insights here?
I now have the code working completely. it successfully runs checks between the crafting recipes and the items in the player's slots and rejects anything that doesn't match up.
I had to add a few definitions to various places to make it all mesh up but it's done now.
Now what the heck should i do with Quality now that the server actually reads it and has it right there ready to use?
Any ideas people?