Thread: Retrieve Deleted Character
-
July 25th, 2011, 09:51 #1
Retrieve Deleted Character
I created a server character (I'm the GM) in FG and when I was about to select the character, I noticed that there was an additional entry that I hadn't created, an unnamed character--an empty character sheet. So I hovered over it, right clicked then selected delete entry and suddenly the character that I had spent two and a half days developing was deleted instead!
Well I was livid, and I'm hoping that there's a way to get it back.
Help!
-
July 25th, 2011, 11:51 #2
On the face of it, when you delete the character from the selection window
is is gone, deleted immediatley from the database.
There is still a small chance that it has survived - in a backup file.
I have never worked out when the backup file is created and when it is overwritten, possibly it is only created when FG encounters problems, but if you look in the folder corresponding to this campaign you will find db.xml
(the database for this campaign) and if you are lucky a backup named db.backup.xml. If it is there it might contain the character (or it might just be an identical copy of the current db.xml file)
move the db.xml file somewhere safe (and possibly also a copy of db.backup.xml) and then rename the backup as db.xml and load it up and see what you have.
-
July 25th, 2011, 11:52 #3
Don't think there is... :O
The backup file is only created when FGII crashes. So yeah, if you quickly crash the game, or type "/reload all" into the chat window (which will chuck away any changes and reload from the last campaign save point) then you've got a chance. The fact that this post is coming 90 mins later pretty much says you don't
Was only thinking how easy data deletion was the other day. For what it's worth, after every session, I take a back up of the campaign folder. Once (due to an untested development feature) we had a corrupt database, and it took me 30 mins to go through the db.xml file and get it roughly back to normal.Former SW ruleset / Deadlands extension author. Now I just wanna play a few games. And maybe hack. A little.
-
July 25th, 2011, 12:04 #4
Based on the importance of this data I was considering adding a "confirm delete" to the character selection radial menu in the next release of the C&C ruleset, although to be fair I am so use to clicking through these confirmations that I probably would end up deleting anyway, even with a confirmation request, but It might help sometimes.
-
July 25th, 2011, 12:10 #5Originally Posted by Sorcerer
Heck, adding it now...Former SW ruleset / Deadlands extension author. Now I just wanna play a few games. And maybe hack. A little.
-
July 25th, 2011, 12:25 #6Exactly what I was thinking. I did add a confirm to the combat tracker though (kept deleting people when I meant to delete an effect). So maybe one for the character list is a good idea.
It seems there are no new problems in this world...
-
July 25th, 2011, 12:27 #7
For the lazy* ruleset author...
Code:function onInit() registerMenuItem("Delete Entry", "delete", 6); registerMenuItem("Confirm Entry Delete", "delete", 6, 7); end function onMenuSelection(item, subitem) if item == 6 and subitem == 7 then getDatabaseNode().delete(); end end
Former SW ruleset / Deadlands extension author. Now I just wanna play a few games. And maybe hack. A little.
-
July 25th, 2011, 21:10 #8
Lesser Deity
- Join Date
- Mar 2006
- Location
- Arkansas
- Posts
- 7,411
Originally Posted by NEPHiLiX
However, FYI, at the time you deleted the character, before the next autosave of the campaign you could have retrieved the deleted character. I have done so. You have to understand how the auto save feature works. Basically while you are running the server it makes a copy of the current campaign file as a snapshot and the snapshot is updated every five minutes. This file is called db.restore.xml
If *immediately* after you deleted the character you had copied this file to somewhere else you could have had a db.xml file that had the character still in it as it was in the last snapshot. Because the snapshot file only exists while the server is running you must go into data apps and into the running campaign's campaign folder to get it before you close the server or the next auto update.
Once you have a copy of the db.restore.xml file you can decide what to do. If, like in this case, all you were doing with the campaign at the time was editing the character you could just rename the db.xml file of the current campaign to something else and change the db.restore.xml file name to db.xml to get the character back as it was at the last autosave.
If, like what happened to me, you do it in the middle of running a game session - you would want to open up the db.restore.xml file go to the character section and copy the character back into the db.xml file. That way the rest of the campaign file is uptodate but just that character is changed back to just the way it was at the last autosave.
-
July 26th, 2011, 01:18 #9
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,612
I just reviewed the 2.8 code. The database backup file (db.restore.xml) does not get deleted until the campaign session exits (either FG closes or returns to launcher). So, as long as you grab the backup database before you exit the session, you can get a copy of the database from when the session started.
Regards,
JPG
-
December 31st, 2020, 01:02 #10
- Join Date
- Apr 2020
- Posts
- 8
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks