Trying to merge Hall Of Fame files...

1980ajw

Chieftain
Joined
Aug 21, 2013
Messages
13
Some time ago I uninstalled Civ5; before I did so I made sure to make a backup of the Replays folder, so that I could keep my Hall Of Fame results (in HallOfFameDatabase.db).

I recently reinstalled Civ5 but forgot to restore the Replays folder from my backup. Naturally, after playing a few games, the scores from these games were saved into a new HallOfFameDatabase.db.

Using sqlite3.exe I have tried to merge the new scores into the original HallOfFameDatabase.db file. First I renamed the new file as HallOfFameDatabase2.db, then I carried out the following (I moved both files into the root of the C-drive for simplicity):

attach 'c:\halloffamedatabase.db' as hof;
attach 'c:\halloffamedatabase2.db' as hof2;
insert into hof.victories select * from hof2.victories;

Once this was been done, I can clearly see the rows from the new file appearing in the original file. However, within the game itself, none of the new scores are visible - only the original scores are shown.

Similarly, I used:

delete from hof.victories where score < 5000;

to remove all scores below 5000. In the old file there were 10 scores > 5000, and in the new file there is just 1. Again, after the deletion, I can see 11 rows in the table, but only the original 10 appear in the game itself.

Is there something I am missing to ensure the game displays the new records that have been merged with the original records?
 
I've done this successfully before (transplanted HoF entries from an old computer to a new one using DB commands). All of the corresponding entries from the VictoryDLC and VictoryMods tables need to be transferred over and have their VictoryRow column modified to match up with the correct game in the Victories table. (Because you've played other games, the new ones have been added at the start, where it expects to find your oldest game once you copy and paste the DB entries.)
 
Thanks for the advice. I'll look into that when I get home.

(I had a feeling there were extra references to the new games that I would need. Just wasn't sure where to look for them.)
 
Although it's taken me a while to get around to this, I can confirm that the advice above worked. Thanks S3rgeus :)

update hof2.VictoryDLC set VictoryRow = VictoryRow + (select max(VictoryRow) from hof.VictoryDLC);
insert into hof.VictoryDLC select * from hof2.VictoryDLC;


The VictoryMods table did not require any change because I haven't play any mod games since the re-install.
 
Top Bottom