Jump to content

PlayerDB.txt

From fCraft Wiki
Revision as of 04:05, 22 August 2013 by F (talk | contribs) (Columns)

Encoding

Numbers: All numbers are nonnegative integers, written out with decimal digits. Empty Int32/Int64 fields are interpreted as 0.

Dates: Dates are saved as number of seconds since UTC Unix Timestamp. Value of "0" and empty DateTime fields are interpreted as "never" (DateTime.MinValue).

IP Addresses: IPs are serialized in dotted decimal notation (e.g. "192.168.1.1"). Only IPv4 addresses are used — no IPv6. Empty string, any invalid value, or "255.255.255.255" are interpreted as "unknown" address.

Strings: Strings are encoded as ASCII. Escaped characters are ,, \n, and \r — they are replaced with \xFF, \xFE, and \xFD respectively. There is no limit on string length. Parsing ends at the nearest comma.

Columns

(Note that order in this list starts with 1, not 0)

Order Name Data Type Purpose Remarks
1 Name String Player's account name. Invalid values cause whole record to be skipped. Regex used to verify validity:

^([a-zA-Z0-9._]{2,16}|[a-zA-Z0-9._]{1,15}@\d*)$

2 LastIP IPAddress For offline players, last IP used to successfully log in. For online players, current IP. May be blank ("none") for players whose records were imported.
3 Rank String Player's current rank. Full rank name. Saved as "RankName#UUID", where UUID is rank's universally unique identifier. fCraft can parse rank name without ID as well. If parsing fails, default rank is assigned to player. Not escaped.
4 RankChangeDate DateTime Date of the most recent promotion/demotion. Defaults to "never" (empty string) for players who have never been ranked.
5 RankChangedBy String Name of the player or entity who most recently promoted/demoted this player. Defaults to empty string for players who have never been ranked. Name of a player (usually). Does not have to be a valid player name though. Escaped.
6 BanStatus Enum Player's current BanStatus: Banned, NotBanned, or Exempt. One or zero characters long.
  • b = player is banned.
  • x = player is exempt from all bans.
  • Anything else (usually empty string) = player is neither banned nor exempt.
7 BanDate DateTime Date of most recent ban. Defaults to "never" (empty string) for players who have never been banned.
8 BannedBy String Name of the player or entity who most recently banned this player. Only read if BanDate was set. Defaults to empty string for players who have never been banned. Name of a player (usually). Does not have to be a valid player name though. Escaped.
9 UnbanDate DateTime Date of most recent unban. Defaults to "never" (empty string) for players who have never been banned.
10 UnbannedBy String Name of the player or entity who most recently unbanned this player. Only read if UnbanDate was set. Defaults to empty string for players who have never been unbanned. Name of a player (usually). Does not have to be a valid player name though. Escaped.
11 BanReason String Reason given for the most recent ban. Only read if BanDate was set. May be blank. Escaped.
12 UnbanReason String Reason given for the most recent unban. Only read if UnbanDate was set. May be blank. Escaped.
13 LastFailedLoginDate DateTime Date of most recent failed attempt to log in.
14 LastFailedLoginIP IPAddress IP from which player most recently tried (and failed) to log in.
15 UNUSED No longer in use. Skip this column.
16 FirstLoginDate DateTime First time the player ever attempted to log in. May be "never" for players whose records were imported.
17 LastLoginDate DateTime Most recent time the player successfully logged in. May be "never" for players whose records were imported.
18 TotalTime TimeSpan Total amount of time the player spent on this server. May be 0 for players whose records were imported.
19 BlocksBuilt Int32 Total number of blocks manually built or painted by the player.
20 BlocksDeleted Int32 Total number of blocks manually deleted by the player.
21 TimesVisited Int32 Number of sessions/logins. May be 0 for players whose records were imported.
22 MessagesWritten Int32 Total number of chat messages written.
23 UNUSED No longer in use. Skip this column.
24 UNUSED No longer in use. Skip this column.
25 PreviousRank String Player's previous rank. May be blank if player has never been promoted/demoted before. Same format as "Rank" column.