PlayerDB.txt: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
===Header=== | ===Header=== | ||
=== | ===Formatting=== | ||
'''Numbers:''' All numbers are nonnegative integers, written out with decimal digits. Empty Int32/Int64 fields are interpreted as 0. | '''Numbers:''' All numbers are nonnegative integers, written out with decimal digits. Empty Int32/Int64 fields are interpreted as 0. | ||
| Line 56: | Line 56: | ||
|Player's current BanStatus: Banned, NotBanned, or Exempt. | |Player's current BanStatus: Banned, NotBanned, or Exempt. | ||
|One or zero characters long. | |One or zero characters long. | ||
*'''<code>b</code>''' = player is banned. | *'''<code>b</code>''' = player is currently banned. | ||
*'''<code>x</code>''' = player is exempt from all bans. | *'''<code>x</code>''' = player is exempt from all bans. | ||
* | *Any other value = neither banned nor exempt. | ||
|- | |- | ||
!7 | !7 | ||
| Line 174: | Line 174: | ||
|Player's previous rank. | |Player's previous rank. | ||
|May be blank if player has never been promoted/demoted before. Same format as "Rank" column. | |May be blank if player has never been promoted/demoted before. Same format as "Rank" column. | ||
|- | |||
!26 | |||
|RankChangeReason | |||
|String | |||
|Reason given for the most recent promotion/demotion. | |||
|May be blank. Escaped. | |||
|- | |||
!27 | |||
|TimesKicked | |||
|Int32 | |||
|Number of times that this player has been manually kicked. | |||
| | |||
|- | |||
!28 | |||
|TimesKickedOthers | |||
|Int32 | |||
|Number of kicks issues by this player. | |||
| | |||
|- | |||
!29 | |||
|TimesBannedOthers | |||
|Int32 | |||
|Number of bans issued by this player. | |||
| | |||
|- | |||
!30 | |||
|ID | |||
|Int32 | |||
|Player's unique numeric ID. Issued on first join. | |||
|IDs 0-255 are reserved. Player IDs start with 256. If anyone's ID in file is below 256, a new one is assigned on-load. | |||
|- | |||
!31 | |||
|RankChangeType | |||
|Enum | |||
|Type of the most recent promotion/demotion. | |||
|*'''<code>0</code>''' = Default (never been promoted or demoted) | |||
*'''<code>1</code>''' = Promoted (manually by another player or by console) | |||
*'''<code>2</code>''' = Demoted (manually by another player or by console) | |||
*'''<code>3</code>''' = AutoPromoted (e.g. by AutoRank) | |||
*'''<code>4</code>''' = AutoDemoted (e.g. by AutoRank) | |||
If blank or unrecognized value is given, either "Default", "Promoted", or "Demoted" is chosen based on values of Rank and PreviousRank. | |||
|- | |||
!32 | |||
|LastKickDate | |||
|DateTime | |||
|Date of the most recent kick. | |||
| | |||
|- | |||
!33 | |||
|LastSeen | |||
|DateTime | |||
|Last time the player has been seen online (last logout for offline players, current time for online players). | |||
|May be "never" if player has never been online. | |||
|- | |||
!34 | |||
|BlocksDrawn | |||
|Int64 | |||
|Total number of blocks modified using draw and copy/paste commands. | |||
| | |||
|- | |||
!35 | |||
|LastKickBy | |||
|String | |||
|Name of the player or entity who most recently kicked this player. | |||
| | |||
|- | |||
!36 | |||
|LastKickReason | |||
|String | |||
|Reason given for the most recent kick. | |||
|May be blank. | |||
|- | |||
!37 | |||
|BannedUntil | |||
|DateTime | |||
|Reserved for future use (temp bans). | |||
|''Currently unused.'' | |||
|- | |||
!38 | |||
|IsFrozen | |||
|Enum | |||
|Whether this player is currently frozen. | |||
|*'''<code>f</code>''' = this player is frozen. | |||
*Any other value = not frozen. | |||
|- | |||
!39 | |||
|FrozenBy | |||
|String | |||
| | |||
| | |||
|- | |||
!40 | |||
|FrozenOn | |||
|DateTime | |||
| | |||
| | |||
|- | |||
!41 | |||
|MutedUntil | |||
|DateTime | |||
| | |||
| | |||
|- | |||
!42 | |||
|MutedBy | |||
|String | |||
| | |||
| | |||
|- | |||
!43 | |||
|Password | |||
|String | |||
| | |||
| | |||
|- | |||
!44 | |||
|Online | |||
|Enum | |||
| | |||
| | |||
|- | |||
!45 | |||
|BandwidthUseMode | |||
|Enum | |||
| | |||
| | |||
|} | |} | ||
All columns prior to this are mandatory. 46<sup>th</sup> and later columns are "optional", in the sense that current version of fCraft is able to read files without them, for compatibility reasons. These columns have been added in fCraft versions {{Changelog|0.600}} and later. | |||
Revision as of 04:31, 22 August 2013
Header
Formatting
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:
| |
| 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.
| |
| 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. | |
| 26 | RankChangeReason | String | Reason given for the most recent promotion/demotion. | May be blank. Escaped. | |
| 27 | TimesKicked | Int32 | Number of times that this player has been manually kicked. | ||
| 28 | TimesKickedOthers | Int32 | Number of kicks issues by this player. | ||
| 29 | TimesBannedOthers | Int32 | Number of bans issued by this player. | ||
| 30 | ID | Int32 | Player's unique numeric ID. Issued on first join. | IDs 0-255 are reserved. Player IDs start with 256. If anyone's ID in file is below 256, a new one is assigned on-load. | |
| 31 | RankChangeType | Enum | Type of the most recent promotion/demotion. | *0 = Default (never been promoted or demoted)
If blank or unrecognized value is given, either "Default", "Promoted", or "Demoted" is chosen based on values of Rank and PreviousRank. | |
| 32 | LastKickDate | DateTime | Date of the most recent kick. | ||
| 33 | LastSeen | DateTime | Last time the player has been seen online (last logout for offline players, current time for online players). | May be "never" if player has never been online. | |
| 34 | BlocksDrawn | Int64 | Total number of blocks modified using draw and copy/paste commands. | ||
| 35 | LastKickBy | String | Name of the player or entity who most recently kicked this player. | ||
| 36 | LastKickReason | String | Reason given for the most recent kick. | May be blank. | |
| 37 | BannedUntil | DateTime | Reserved for future use (temp bans). | Currently unused. | |
| 38 | IsFrozen | Enum | Whether this player is currently frozen. | *f = this player is frozen.
| |
| 39 | FrozenBy | String | |||
| 40 | FrozenOn | DateTime | |||
| 41 | MutedUntil | DateTime | |||
| 42 | MutedBy | String | |||
| 43 | Password | String | |||
| 44 | Online | Enum | |||
| 45 | BandwidthUseMode | Enum |
All columns prior to this are mandatory. 46th and later columns are "optional", in the sense that current version of fCraft is able to read files without them, for compatibility reasons. These columns have been added in fCraft versions 0.600 and later.