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

11-07-2003, 05:09 AM
|
Hill Giant
|
|
Join Date: May 2003
Location: The Great Northwest
Posts: 150
|
|
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
|
 |
|
 |

11-13-2003, 03:33 PM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
|
|
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.
|

11-13-2003, 03:43 PM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Tourist town USA
Posts: 1,671
|
|
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.
|

11-13-2003, 04:53 PM
|
|
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.
|

11-13-2003, 05:08 PM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
|
|
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.
|

11-13-2003, 05:57 PM
|
Hill Giant
|
|
Join Date: May 2003
Location: The Great Northwest
Posts: 150
|
|
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
|

11-14-2003, 06:02 AM
|
Dragon
|
|
Join Date: May 2003
Location: Seattle, WA
Posts: 609
|
|
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.
|

11-14-2003, 07:28 AM
|
Dragon
|
|
Join Date: Jun 2002
Posts: 776
|
|
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.
|

11-14-2003, 08:00 AM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
|
|
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.
|

11-14-2003, 08:06 AM
|
|
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.
|
 |
|
 |

11-14-2003, 12:52 PM
|
Hill Giant
|
|
Join Date: May 2003
Location: The Great Northwest
Posts: 150
|
|
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
|
 |
|
 |
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:38 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |