Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2003, 05:09 AM
krich
Hill Giant
 
Join Date: May 2003
Location: The Great Northwest
Posts: 150
Default Tradeskill Table

While I was pulling together the Tradeskill database I snarfed from a major EQ Tradeskill website, I noticed an apparent issue in the tradeskillrecipe table. The table currently looks as such:

Code:
+--------------+-------------+------+-----+---------+----------------+
| Field        | Type        | Null | Key | Default | Extra          |
+--------------+-------------+------+-----+---------+----------------+
| id           | int(11)     |      | PRI | NULL    | auto_increment |
| tradeskill   | smallint(6) |      |     | 0       |                |
| skillneeded  | smallint(6) |      |     | 0       |                |
| trivial      | smallint(6) |      |     | 0       |                |
| product      | smallint(6) |      | UNI | 0       |                |
| product2     | smallint(6) |      |     | 0       |                |
| failproduct  | smallint(6) |      |     | 0       |                |
| productcount | smallint(6) |      |     | 0       |                |
| i1           | smallint(6) |      |     | 0       |                |
| i2           | smallint(6) |      |     | 0       |                |
| i3           | smallint(6) |      |     | 0       |                |
| i4           | smallint(6) |      |     | 0       |                |
| i5           | smallint(6) |      |     | 0       |                |
| i6           | smallint(6) |      |     | 0       |                |
| i7           | smallint(6) |      |     | 0       |                |
| i8           | smallint(6) |      |     | 0       |                |
| i9           | smallint(6) |      |     | 0       |                |
| i10          | smallint(6) |      |     | 0       |                |
| notes        | text        | YES  |     | NULL    |                |
+--------------+-------------+------+-----+---------+----------------+

The product row is tagged as unique. This presents an issue where there is more than one recipe for the same product. For example both of these recipes result in a Small Piece of Ore:

tarnished dagger + water flask
tarnished axe + water flask


Currently when the database is sourced, the first duplicate recipe is accepted and the rest of the duplicates generate errors.

Was this column created as unique for a reason? If not, could that be changed that so that multiple recipes for the same item could be created?

Regards,

krich
Reply With Quote
  #2  
Old 11-13-2003, 03:33 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

I don't know why it would be unique, and don't remeber any discusion about it. But there have been so many changes and I havn't been keeping track of anything for months...

Just try changing the default and see if things work...
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #3  
Old 11-13-2003, 03:43 PM
Lurker_005
Demi-God
 
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
Default

I don't know why it would be unique, and don't remeber any discusion about it. But there have been so many changes and I havn't been keeping track of anything for months...

Just try changing the default and see if things work...
__________________
Please read the forum rules and look at reacent messages before posting.
Reply With Quote
  #4  
Old 11-13-2003, 04:53 PM
mattmeck
Guest
 
Posts: n/a
Default

THis was an issue in 4.4 that i ran into trying to do custom recipe's. it wouldnt let me have several diferent recipes that made the same thing.
Reply With Quote
  #5  
Old 11-13-2003, 05:08 PM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

I'll pull it out of the default db.sql

I keep thinking that Drawde asked me to put it in there for a reason, but I can't remember to save my life...
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #6  
Old 11-13-2003, 05:57 PM
krich
Hill Giant
 
Join Date: May 2003
Location: The Great Northwest
Posts: 150
Default

Thanks Trumpcard.

I'm not a mysql guru by any means, but if there's some way of making the series of ingredients unique, that would be a good thing. So like making a unique key out of (i1, i2, i3, i4, i5, i6, i7, i8, i9, i10) would be great. Not sure if it checks linearly for uniqueness or if it checks all combinations...anyone?

Regards,

krich
Reply With Quote
  #7  
Old 11-14-2003, 06:02 AM
Merth
Dragon
 
Join Date: May 2003
Location: Seattle, WA
Posts: 609
Default

A unique constraint over those fields would be fine with me. The fields are not nullable, which means you won't run into null != null.
Reply With Quote
  #8  
Old 11-14-2003, 07:28 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Unique keys for the ingredients would be a bad idea too unless I'm missing something. There are tons of recipes that take flask of water.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #9  
Old 11-14-2003, 08:00 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Not unique on a single field, unique on a subset of fields..

Say, item 1 + item2 + item 3 would need to be unique
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #10  
Old 11-14-2003, 08:06 AM
mattmeck
Guest
 
Posts: n/a
Default

Unless changes were made with 5.0 it is already like that. In 4.4 item 1 + item 2 + items 3 = item 4, you cant use that combinations of items 1,2,3 again but you also cant have items 5,6,7 = 4 ether.
Reply With Quote
  #11  
Old 11-14-2003, 12:52 PM
krich
Hill Giant
 
Join Date: May 2003
Location: The Great Northwest
Posts: 150
Default

Quote:
Originally Posted by mattmeck
Unless changes were made with 5.0 it is already like that. In 4.4 item 1 + item 2 + items 3 = item 4, you cant use that combinations of items 1,2,3 again but you also cant have items 5,6,7 = 4 ether.
Actually, in 044, you could have 1+2+3=4 and 1+2+3=10 in the database. There was nothing preventing you from doing that. The combine will fail with an error because the code will check to see if two recipes come up when it tries to do the combine. This is why I requested a compound unique key be set up for all ingredients.

Also, you absolutely can (and must) have 1+2+3=4 and 5+6+7=4. Consider turning tarnished weapons into a small chunk of ore. I don't remember the exact recipes, but you could take basically any tarnished weapon plus a water flask and combine them in a forge to result in a small chunk of ore. Also, consider how many ways there are to make Celestial Essence. This is why the product column cannot be unique and this is why I requested it not be unique.

Regards,

krich
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:38 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3