PDA

View Full Version : Complete Tradeskill Rewrite


fathernitwit
08-12-2004, 08:42 AM
Hello all,

I have completely rewritten the tradeskill system.... I would really like some feedback on what I have done... It works on my FreeBSD server with up-to-live client. I consider this 'beta 1', everything is working from my perspective, but is not throughly tested. most of the recipes are obviously untested due to quantity.

I dont know if it is broken for everybody else, but it was completely
broken for me when I started looking at it. a lot of the recipes are obviously untested.

Heres my 'release notes':

Big picture:
- gets tradeskills working (they didnt work at all for me)
- new trade skill interface works
- searching
- viewing details
- auto combining
- recipes can return unlimited items on success and fail
- recipes have names on them :)
- nofail works (not in recipes yet)


API level:
- added constants invWhere* to represent inventory places
- added optional argument to HasItem to specify where to search
this is an OR'd set of invWhere* constants, default=ALL
- changed prototype and split GetTradeRecipe into two methods
but this is never used elsewhere
- added HandleAutoCombine to Object
- changed HandleCombine to be static for non-world objects
- added to Client:
TradeskillSearchResults - search tradeskills and send res
SendTradeskillDetails - send details about a recipe
TradeskillExecute - check success on a recipe and send results


Database:
- added two new tables to replace tradeskillrecipes:
tradeskill_recipe - info about a specific recipe
tradeskill_recipe_entry - items involved in tradeskills relation
- based on suggestions in http://www.eqemulator.net/forums/viewtopic.php?t=12067

Network:
- new opcodes:
OP_RecipesFavorite
OP_RecipesSearch
OP_RecipeReply
OP_RecipeDetails
OP_RecipeAutoCombine
- and some new structures to go with them

Other:
- Identified object type for tackle box :)

Recipes:
- Pulled all recipes from eqtraders.com
- converted all for which all items existed in the database.
- includes fishing, research, etc..
- have a script to do this for future DB updates
- there are still several thoudand which are missing items
- 5344 recipes total

Issues:
- are tradeskill gains supposed to use a different forumal that others?
- unfired pottery items are not in here since most do not
exist in the database
- I have not implemented restrictions based on race/class/etc
but the script is pulling them from the pages, so it can
be done, I just dont have any desire to do it (:
- if you dont have all the components for a recipe and you
hit combine, it dosent send you a message saying that...
- I didnt alter the success or gain forumals... assuming
that somebody more knowledgable than me made them...
- the CloseContainer_Struct has changed, but I am not able
to figure out how... tradeskills still work with it broken
- I dont know what the second ulong in the new recipe packets
actually means, I just echo it in my replies...
- my auto-converted recipes have whatever errors might exist on eqtraders.com
- My script is not pulling nofail flags from the pages yet.
- any recipe which needs to return two+ of a non-stackable item
MUST insert several 'on success return 1 item' tuples with the
same item_id to get it to work correctly.


Description of tables and columns:
http://eqemu.psend.com/tradeskill_tables.txt

The patch is here: http://eqemu.psend.com/tradeskill_overhaul_b1.diff
it applies cleanly to 7/31 CVS, with a little fuzz due to my server having a lot of my patches on it.

The sql file with all my converted recipes is here:
http://eqemu.psend.com/new_recipes_all.zip


please give me feedback, positive or negative, whatever...

sotonin
08-12-2004, 08:47 AM
holy crap dude. I am so glad you came to our community. You've been doing some great stuff )

killspree
08-12-2004, 08:49 AM
That I know of, the skill gains formula is based on researching various eqlive info sources, so it's probably about as correct as it can get currently. I'll add this to my code and do some testing for you later, thanks!

fathernitwit
08-12-2004, 08:57 AM
That I know of, the skill gains formula is based on researching various eqlive info sources, so it's probably about as correct as it can get currently.

Well the reason I mention it is that the skill gain for trade skills dosent use the same gain check code as the rest of the skills, there is a little formula hacked into the tradeskill code specifically... but im not about to change it, since I have no no clue about which is better.

Melwin
08-12-2004, 09:12 AM
You rule, duder. :)

killspree
08-12-2004, 11:36 AM
Works great so far with the testing I've done. Very nice work!

govtcheeze
09-26-2004, 01:44 AM
For jewelcraft:

I have found that many of the high trivial receipies do not exist in this version. I know you said you collected them with a script from eqtraders...and idea why this is happening? I remember platinum jasper being on there, then it jumps way up in trivials and there are only a few receipies after it, yet eqtraders lists a ton more:

http://eqtraders.com/recipes/recipe_quicklist.php?rsa=Jewelcraft&menustr=080070 900000

The gems bought from a vendor and not enchanted give the enchanted rewards, while enchanted items give the no-stat rewards.

Gems dropped in hate, seb, etc do not show as usable in any of the receipies. I think the fix is adding a new receipe with its item ID, but can this be added to your script? It could find the name of the gem in the DB and create all of the necessary combine possibilities for each item ID.

Thanks FNW

Muuss
11-03-2004, 02:44 AM
FNW,
The job done on the tradeskills is awesome, and i thank you for it !
Do you think you'll implement cultural limitations for the combines , like we spoke in that thread : http://www.eqemulator.net/forums/viewtopic.php?t=12067&highlight=recipes ?
basically something of that kind :


mysql> show columns from tradeskill_recipe_limits;
+-----------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------+----------------+
| id | int(11) | | PRI | NULL | auto_increment |
| recipe_id | smallint(6) | | | 0 | |
| class | smallint(6) | | | 0 | |
| race | smallint(6) | | | 0 | |
| level | smallint(6) | | | 0 | |
| god | smallint(6) | | | 0 | |
+-----------+-------------+------+-----+---------+----------------+

fathernitwit
11-03-2004, 03:33 AM
- I have not implemented restrictions based on race/class/etc
but the script is pulling them from the pages, so it can
be done, I just dont have any desire to do it (:

thats still my position... somebody could write it, and i'll take a look at it, but its not a priority for me...

Muuss
11-03-2004, 03:36 AM
Okay okay, i gonna have to find a way to make that... desire... raise in yourself... or to write it by myself :roll:

RangerDown
11-03-2004, 03:58 AM
Terrific job, FNW. I'll have to cut short my EQ2 beta playing tonight to check this out! :D

As to a question you had:
are tradeskill gains supposed to use a different forumal that others?

Each recipe has a "trivial" value which is the skill at which you can no longer gain skill points by making that recipe. I know the old database had a skill-required field in it, be sure not to get these two mixed up. Very few eqlive recipes have a minimum skill requirement, but they all have a Trivial value. If your skill is way under the trivial value, you will almost always fail but there's always that 1 in 1000000 chance you'll succeed :P Vice versa for being over the trivial value. To my knowledge, there is never a point at which you're 100% guaranteed success.

Once your skill is at or above the trivial value, you can no longer gain skill points by making that recipe, and you will receive String ID 338 ("You can no longer advance your skill by making this item") to remind you of it each time you combine.

It's widely believed by the crafter community that your INT or WIS being high will help your chances of a skill gain. They say that whichever stat (INT or WIS) is higher is used in the "does he get a skill gain?" calculation.

On a side tangent, many blacksmiths believe that a higher STR increases your chance of success for smithing. And many fletchers believe a higher DEX increases your chance of success for fletching. Not skill gains, just successful combines. I don't know if any other tradeskills have a stat that help them or not, nor am I 100% certain that this is the truth, it may be just crafter superstition.

Muuss
11-03-2004, 04:11 AM
EQTraders have a calculation engine, as they are specialists, i think it's pretty accurate. Perhaps someone with lotsa charism could ask them if they could share their calculation formulas...

http://eqtraders.com/calculators/main.php?menustr=130000000000

For Eqtraders, you always have 5% chances of success, whatever your skill and the trivial level are. You can't excess 95% chance of success.

fathernitwit
11-03-2004, 04:42 AM
Terrific job, FNW. I'll have to cut short my EQ2 beta playing tonight to check this out! :D


*Father Nitwit looks at the date on this 2+ month old thread, and realizes that this has been in eqemu for about that long*


anyways, I think I jacked with the success formula, but I dont remember. Nobody really knows anyways, and I havent heard any complaints with stuff being way off, so I continue to not care.

RangerDown
11-03-2004, 12:08 PM
Gah who bumped old thread?!

Back to playing EQ2 beta

Lurker_005
11-05-2004, 02:59 PM
well since this has already been bumped...


They list the formulas they used http://eqtraders.com/articles/article_page.php?article=g175&menustr=030000000000

As well as the stats that affect skillup http://eqtraders.com/articles/article_page.php?article=g256&menustr=030000000000