Merging players is now possible!

Discuss OLStats here

Merging players is now possible!

Postby DrLex on Sun Feb 17, 2008 7:42 pm

I have been running a UT2004 server for a while and some of the players changed computers in the meantime, and/or had to reinstall UT2004 and forgot which stats ID & password they used previously. So, there were 'clones' in the stats and these players wanted to be able to continue playing with their old stats. Also, we changed the name of some bots for the fun of it, but wanted the name changes to be reflected in the stats as well, instead of getting a new entry each time a bot was renamed.

I have modified the data loading routine in the source code to make these two things possible. The only changes are in OLStatsHTMLLogger.uc. I only included the updated source files (one byte was also changed in OLLocalGameStats, being the version number). You can download the full source code, replace the corresponding files, and compile the result to get your updated OLStats mutator. If the author has no objections, I can also provide the compiled mutator (or he could compile it and put it online).

This works as follows: if you want to merge two players together, you should first find their player hashes (unique identifiers). You can derive these hashes from the .log files that OLStats produces, but an easier way is to add the line
Code: Select all

in System/OLStatsDB.ini, and play a game with OLStats enabled. Afterwards, look in System/ucc.log, and you'll find a list of all the players, together with their hashes.
If you want to merge the player with old hash A into the player with new hash B, add the following lines to OlStatsDB.ini:
Code: Select all

For bots, simply use their original and new names (of course, to change the bot's actual name, you need to modify UT2004.ini). For instance, if you have renamed Nebri to Teddybear, use:
Code: Select all

You can add as many of these lines as you want. Bots will be immediately renamed, even if there is no entry yet under their new name in the database.
The merging and renaming will happen the next time OLStats is invoked, i.e. after the next logged game. After this, you can remove the FusePlayer lines from OLStatsDB.ini.

Mind that this has some limitations: the career stats pages of merged players will show old non-merged stats until they have played a game. Also, if merging two players would cause the merged player to set some new global records, this will (unless I'm mistaken) also only be registered after this player has played a game. This could be fixed of course, but will require more work than I'm willing to do.

I also fixed one tiny bug that showed 0.0 for total efficiency in the career pages. :)

Of course, I give no guarantee of any kind on this updated source code. Use at your own risk (but it seems to work at my place) ;)
Updated source file(s)
(40.76 KB) Downloaded 788 times
Posts: 1
Joined: Sun Feb 17, 2008 6:58 pm
Location: Belgium

Return to OLStats

Who is online

Users browsing this forum: No registered users and 5 guests