PDA

View Full Version : DB file reset



GMBazUK
May 8th, 2008, 13:17
For a reason unknown to me FGII deleted (or reset) the contents of my campaign DB file. Now I know it was down to an incorrectly formatted xml entry, but would like some clarity:

What I did:
I opened the db file in notepad, and pasted in a new xml npc id, unfortunately the id tag contained spaces (this isnt allowed?).
When I launched FGII, an error message was displayed and FGII quit.
When I relaunched FGII, all my npc were missing
It was at this point that I noticed the campiagn DB file was only 1KB (as opposed to 35KB before).

Fortunately I create a copy yesterday, but would like to understand why the DB was reset, and whether or not the incorrect version might be stored by FGII elsewhere.

Thanks in advance.

Baz.

Foen
May 8th, 2008, 14:45
why the DB was reset, and whether or not the incorrect version might be stored by FGII elsewhere

Sorry I can't help you with your first question, but it is a very good reason to back up campaign folders frequently.

On the second question, the campaign directory is the only place you'll find campaign references (for example, there are no Windows registry entires at campaign level)

Cheers

Stuart

Griogre
May 8th, 2008, 20:49
I think he meant the db.xml file not FG database.

Baz, I think what happened was as FG was parsing in your db.xml, loading it as data - it crashed during the parse because the data was not in correct format. Because FG crashed while the file was open it was not apparently able to successfully close out the open db.xml file. This caused the db.xml file to truncate probably to about where it last successfully read the db.xml file to - before the crash. Crashing an app during open file read/write operations is always a dicey proposition for the open file.

It's very important you make you npc ids exactly as the program expects them. Put a dummy one in from inside the program if you ever have a question on format and then look at it in the db.xml

Unfortunately the file itself was destroyed. You would need a copy from prior to the destruction. I have Vista Business which would allow me to pull back a prior copy, but if you don't have something like that you are screwed.

If the campaign had a module exported from it you could always disassemble the module to get the db.xml file back also.