PDA

View Full Version : GDBM.h Database



Shadow_Walker
05-30-2003, 11:36 AM
Ok I have search ever possable code construction there is.
Looking in the gdbm.h file there is a #define GDBM_WRCREAT and GDBM_NEWDB. I have looked at the coding and see that there is only one statment that comes close to these things is were seq opens the file with GDBM_FILE ref to gdbm_open and in the gdbmconv.h were it will use GDBM_WRITE.

But I am a little lost as to were in seq is the itemdata.dbm file is frist made. Many post states that. it has not seen any thing.. or this or that.. but nothing on what it looks like or how the out put strings works. . I see were it is pulling in the data but were is it Writing the data and adding lines to the Database.

The tiemtool look like it might do it. Yet, it is a converter file from one point to another. If you happen to know the answer.. or better yet. Zip uo a itemdata.dbm and itemdataraw.dbm in a zip or tar file so I could have a better look at this.

Thank you for your help in advance...

Cryonic
05-30-2003, 05:19 PM
try the same place that SEQ puts everything else (maps, configs, etc...)

Shadow_Walker
05-30-2003, 11:35 PM
Cryonic,

Yes I know it is "Supposed" to be in the same folder as that of the (map, config, ect...) But I have been spending a lot of time on this and there is something that I am missing.. It is not that I do not know where it should be located nor is it that I do not have the proper libs installed..

My problem is that, it will not creat the database will not find it.. will not start it.. no begaing... No alpha.. and there is only a Dump tool that gives me info but not the true code it would seem. so I am still a little lost on How this Database thing works.

Do you happen to have the itemrardata.dbm located in teh folder? Is it working for you? For it is not for me and I am not sure what I am not doing to get it to work.

What I have tried is.. making sure the def.xml is set so that ItemDB is Enable. Since I would like the raw data as well as the normal I have the DatabasesEnabled to 4 as listed in the xml file. But with all this and looking at the source code.. it is NOT making it not creating it is not doing "$h17"

Yes, I would be the first it could be a ID10-T error.. and yes I may have over looked something.. But what.. what could it be.. where did I miss the little command that tells links.. Oh ya I supposed to make a Database at this location. and then added things to it.

I personaly do not work with Links all day long and still a little slow. All I ask is that you explain in a little more detail on this matter for I am not getting any where with it.. Over all EVERY thing works and is working the way I like it but I am sick of seeing this and I would like it to get it to work with out Disabling the funcation.

GDBM Notice: GetEntyr: gdbm_open failed on file '/user/local/share/showeq/itemdtat.dbm': File open error
File '/usr/local/share/showeq/itemdata.dbm' dosen't exist.

How do I tell it to make it that is all I want to know, what am I doing wrong that is stoping it from creating the database. And if you are saying to use the itemdbtool to import a flat table.. I have tried that too.. keeps saying that my file is not a muiltiable of 462 or some number like that. This would mean I am not setting the .txt file correct..

Please assiste me in this matter..

thank you in advance..

fester
05-31-2003, 06:50 AM
I don't quite understand your question, but I will say this:

1) It will auto create the file if it does not exist when you loot or pick up an item. This requires item structures to be correct with ShowEQ and the opcodes for looting items from corpses, ground, and CharProfile during logon.

2) It uses Berkley DBM or GDMB and they must be installed and ready when you ./configured showeq.

3) There is nothing to "do" to create the file, it will be created if all else is fine.

4) You can not port the file from one system to another (generally.)

5) The file LIKELY will need to be removed and recreated if there are major structure changes to ShowEQ and/or EQ item structures. This may require you to remove the old DB.

6) The file is referenced by the short name ("itemdata") and not "itemdata.dbm") and there may be multiple files "itemdata" dot something.

7) It is stored in the log directory (usually /usr/local/share/showeq), you can find it with a "find / -name itemdata\* -print" command.

Shadow_Walker
05-31-2003, 11:10 AM
Feser,

Thank you for that information at lest I know that Showeq should be making the file..

But let me ask.. Are thos settings in Showeq working so that it can do the auto creation or will I need to do a search on it?

I am using Berkely 4.1.25 from Sleepycat, should I be using another one?

I see duing the ./configer that there is a secation that stats "Checking whether to build with Berkeley DB3... no". Is it not reading the Berkeley 4.1.25?

I have tried installing gdbm-1.8.3, not sure if it is working at this point but it is located in the lib folder.

fester
05-31-2003, 02:15 PM
Originally posted by Shadow_Walker
But let me ask.. Are thos settings in Showeq working so that it can do the auto creation or will I need to do a search on it?

stats "Checking whether to build with Berkeley DB3... no". Is it not reading the Berkeley 4.1.25?

I have tried installing gdbm-1.8.3, not sure if it is working at this point but it is located in the lib folder.

1) Who knows, put some printf's near where items are found.

2) DB3 = Berkeley DB version 3, so DB4 will not work (nor DB2 nor DB1). Install DB3.

3) gdbm should be found if you rerun ./configure; run a "make distclean" first.

Edit: fixed typo

Dedpoet
06-02-2003, 06:32 AM
FYI, Shadow_Walker, I did a fresh RH9 installation this weekend and have the same issue. I get an error on the console about the file not existing. Like fester said, maybe it's not creating the DB because all of the structures are not yet correct. Did you try touching the file manually? I have not tried yet, but will tonight. I doubt it will fix the DB issue, but it may get rid of the console error.

Shadow_Walker
06-02-2003, 07:59 AM
I not not yet sure as to all the things it is doing.. I have not been able to get the DB part to work. So I've took a break from it over the weekend so I could look at it with a fresh set of eyes.. as it were.

I going to take a few hours this morning and see about the itemSturct and if it is sending any data to the proper threads. Yet looking at the Dump logs, I am thinking there is an issuse with the opcodes as Fester was saying. for the "itemNr" is using the same Code over and over, or at lest that is what is seems to be appering on the dump logs.

I going to try to add afew statments to see if I can get this Progam to tell me what is it is truly seeing..

Shadow_Walker
06-04-2003, 11:47 AM
OK I have found that the Items are working some what.. but I think there is a lost code some place in the translation to the Database.. I am looking into seeing what was changed over the time, for this problem came up just before that major down time of SEQ..

For example.. the Main screen is showing the ID of the item like that of Mistletoe Cutting Sickle is coming up on the list as U0059. So it is reading it.. but I think the DB creation part as been altered or lost someplace.. For it started having issuse a while ago. so it my be able to "Write" to a DB that was already created.. but as for a DB that was not there or no file it will not make.. I have looked over and over the File code..

I have found there is no code in the Construct area to make the file.. there is in fact a place to OPEN an DB then Write it but if it can not open the DB it will not creat the DataBase.

I am still working out the Funcation to find out if there is a file that I can add to the Program to fix this issuse..

But there is a souation that might be suggested to the Developers is to set up a starter DB and added it to the CVS it might save the issuse of creating a line or LINES of codse to be added to the Source..

Shadow Walker

Just a side note.. The Info for the PLAYER.. (Your PC) is not showing up in the PLayer info secation so there may be an another issue with the Item OpCode for the Player Item construct.. but for other players it seam to be working for both NPC and Players

fester
06-04-2003, 03:57 PM
Originally posted by Shadow_Walker
so it my be able to "Write" to a DB that was already created.. but as for a DB that was not there or no file it will not make.. I have looked over and over the File code..

I don't know why I am replying, but I would like to note that your wrong here. Why you didn't know your wrong, I can't understand.

From the code:
gdbmconv.cpp: if ((dbf = gdbm_open((char*)(const char*)dbName, 0, GDBM_WRCREAT, 0644, 0))

From GDBM man page:
GDBM_WRCREAT writer - if database does not exist create new one

Shadow_Walker
06-04-2003, 05:05 PM
I did not DL the new version of the Showeq.. the one I had was set up as GDBM_WRITE not WRCREAT.. I just saw that..

I had an out of date version.. But I have found the OpCodes for the Looting tables are not correct.. I am working on fixing them.. My system is compling it at this time to see if it will work..

There are a lot of changes so far.. and I like to see if I can get it working before the codes changes ..

fester
06-04-2003, 10:14 PM
Originally posted by Shadow_Walker
I did not DL the new version of the Showeq.. the one I had was set up as GDBM_WRITE not WRCREAT..
-rw-r--r-- 1 root root 9821 Dec 18 2001 gdbmconv.cpp

You must have a pretty old version, eh?

user387
06-05-2003, 08:47 AM
won't work until the item structures are fixed.

Bear
06-21-2003, 02:21 AM
I'm more or less a Linux neophyte, but FWIW, here's my observations wrt RH9 and the current CVS version of seq:

RH9 (Install Everything) does have the compat-db-3 libs installed, as well as Berkeley DB4.

./configure doesn't seem to pick up the compat libs (I assume this is as it should be....) as it decides not to compile with DB3 support according to the ./configure output.

Applying Thom's quickpatch.diff and hand editing everquest.h for the new item structures allowed me to run seq without any issues or segfaults, but I was seeing that persnickety message about itemdata.dbm.

Reconfiguring/compiling using ./configure --with-db3 not only stopped the nasty repeating message, but also seemed to properly create the itemdata.db database file, though I don't know whether or not items actually add to it. It doesn't look like it.

As always, YMMV.

Cheers,
Bear