Is there a way to merge two sets of offline high scores?


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Temple Termagant

Posts: 5

Joined: Saturday, 6th December 2014, 17:03

Post Saturday, 11th July 2015, 11:20

Is there a way to merge two sets of offline high scores?

I'm getting rid of my old laptop, but don't want to lose the winning characters I had on it. I tried pasting the morgue folder to my new one, but it didn't seem to do anything
User avatar

Dungeon Master

Posts: 502

Joined: Wednesday, 7th March 2012, 13:25

Location: Lexington, KY, US

Post Saturday, 11th July 2015, 12:27

Re: Is there a way to merge two sets of offline high scores?

sarmatron wrote:I'm getting rid of my old laptop, but don't want to lose the winning characters I had on it. I tried pasting the morgue folder to my new one, but it didn't seem to do anything


You need the file "scores" in the "saves" folder. You can move any .cs files as well, if you want to transfer in-progress characters to the new version.

Temple Termagant

Posts: 5

Joined: Saturday, 6th December 2014, 17:03

Post Saturday, 11th July 2015, 12:54

Re: Is there a way to merge two sets of offline high scores?

Right, but the thing is, I've been using them both to play lately, so I have wins on both, that's why I said merge. I see that file's just text, can I just copy/paste the contents of the old one at the end of the new one? Will it merge properly if I do that?

For this message the author sarmatron has received thanks:
neil
User avatar

Dungeon Master

Posts: 502

Joined: Wednesday, 7th March 2012, 13:25

Location: Lexington, KY, US

Post Saturday, 11th July 2015, 14:58

Re: Is there a way to merge two sets of offline high scores?

sarmatron wrote:Right, but the thing is, I've been using them both to play lately, so I have wins on both, that's why I said merge. I see that file's just text, can I just copy/paste the contents of the old one at the end of the new one? Will it merge properly if I do that?


The score list assumes the files are kept in decreasing order, and the game truncates it to 100 entries every time it writes a new score. So if you just concatenate them, they'll be out of order and, worse, you'll end up losing scores from whichever you pasted in second.

You'll need to merge them together in order of score (the "sc=" field). If you happen to have Perl (which comes with Mac OS and almost all GNU/Linux distributions), you can do this (all on one line):

  Code:
perl -e 'print map { $_->[0] } sort { $b->[1] <=> $a->[1] } map { [$_, /:sc=(\d+)/] } <>;'
     old/saves/scores new/saves/scores > combinedscores


Then check that the combinedscores file looks reasonable (right length, the first couple of entries are your highest scores, etc), and if so replace the new scores file with that.

For this message the author neil has received thanks:
partial

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 17 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.