[RESOLVED] PlayerDB

Fixed bugs, solved problems, and old reports.
Locked
Silent79
Offline
Posts: 9
Joined: June 23rd, 2011, 4:15 pm
Location: St. Petersburg, FL
Contact:

[RESOLVED] PlayerDB

Post by Silent79 »

I am migrating to fcraft from MCStorm and I was using mySQL with MCStorm. My players want to hang on to their stats from MCStorm, their blocks built and time spent on the server. What format is the playerdb.txt file so I can correctly transfer this information? The most important is the time spent on the server as that is the basis for them getting ranks.

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: Playerdb

Post by fragmer »

I cannot help you. PlayerDB is a work in progress and I cannot provide any support. The file format is subject to change. There are no plans to make MCStorm-to-fCraft import tools.

Silent79
Offline
Posts: 9
Joined: June 23rd, 2011, 4:15 pm
Location: St. Petersburg, FL
Contact:

Re: Playerdb

Post by Silent79 »

Shoot, that is what I thought, just wanted to hear it from the horses mouth ... :)

User avatar
Ollieboy
Trustee
Offline
Posts: 2343
Joined: May 23rd, 2011, 3:13 am
Location: Australia

Re: Playerdb

Post by Ollieboy »

*pony's mouth.
<TKB> Hit_Girl: zombies don't hurt
<TKB> Hit_Girl: weird.
<TKB> Hit_Girl was slain by Zombie

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: Playerdb

Post by fragmer »

Woops, you are talking about PlayerDB. I thought you are talking about the things I added 2 days ago (BlockDB). I'll post PlayerDB info.

Silent79
Offline
Posts: 9
Joined: June 23rd, 2011, 4:15 pm
Location: St. Petersburg, FL
Contact:

Re: Playerdb

Post by Silent79 »

fragmer wrote:Woops, you are talking about PlayerDB. I thought you are talking about the things I added 2 days ago (BlockDB). I'll post PlayerDB info.
LOL ... ok, thanks for that. I know your busy a lot and read things quick, so I understand the mix up.

User avatar
xanderortiz
Offline
Posts: 19
Joined: August 2nd, 2011, 9:27 am

Re: Playerdb

Post by xanderortiz »

Perhaps I can help some here. I created an Excel file that pulls the data from the PlayerDB.txt file and separates it into columns.
I can read it better and search for specific fields quickly and easily. I suggest you do that for your old database and for the fields I'm about to tell you.
Then copy time spent from that one single column (in old database) and paste into the time column of the NEW excel file.
Then output into a PlayerDB.txt file.
Here is the format:

playerName,lastIP,rank,rankChangeDate,rankChangeBy,banStatus,banDate,bannedBy,unbanDate,unbannedBy,firstLoginDate,lastLoginDate,lastFailedLoginDate,lastFailedLoginIP,failedLoginCount,totalTimeOnServer,blocksBuilt,blocksDeleted,timesVisited,linesWritten,UNUSED,UNUSED,previousRank,rankChangeReason,timesKicked,timesKickedOthers,timesBannedOthers,UID,rankChangeType,lastKickDate,LastSeen,BlocksDrawn,lastKickBy,lastKickReason,bannedUntil,loggedOutFrozen,frozenBy,mutedUntil,mutedBy,IRCPassword,online,leaveReason

Good Luck!

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: Playerdb

Post by fragmer »

The first line of PlayerDB.txt is the header. First number is format version (between 0 and 3). Second number is max player ID. After that, there's a list of columns.

Format versions differ mostly in the way dates are stored:
  • 0 - Prior to 0.530 - Dates are in local time, date and time format is locale-dependent.
  • 1 - 0.530 to 0.536 (current stable) - Dates are UTC, date and time format is in milliseconds since Unix epoch (like Unix timestamp, but with more precision).
  • 2 - old 0.600 dev builds - Dates are UTC, date/time format is Unix timestamp (seconds since Unix epoch).
  • 3 - current 0.600 dev builds - PlayerDB sorting by ID (ascending) is now enforced.
The list of columns is in the header. Values are comma-separated. Blank values for numeric columns mean "0". Blank values for date/time columns mean "Never."

roblikescake
Offline
Posts: 43
Joined: August 20th, 2011, 3:34 am

Re: Playerdb

Post by roblikescake »

if its a fairly small amount of players you could always just use the /setinfo command

User avatar
fragmer
fCraft Developer
Offline
Posts: 1386
Joined: May 21st, 2011, 10:53 pm

Re: Playerdb

Post by fragmer »

There are also /importranks and /importbans commands. The are set up to work with MCZall. I'm not sure if MCForge uses same format.

Locked