forked from SakuraServer/FlagGame
-
Notifications
You must be signed in to change notification settings - Fork 0
System Data Structure
toyblocks edited this page Apr 8, 2017
·
3 revisions
BSON data structure stored in Mongo DB
{
"_id":"stage name (String)",
"time":"game time (Int64)",
"teamlimit":"team limit (Int32)",
"protected":"protected (Boolean)",
"available":"available (Boolean)",
"kill":"kill score (Double)",
"death":"death score (Double)",
"entryfee":"entry fee (Double)",
"prize":"prize (Double)",
"cooldown":"respawn cooldown (Int64)",
"author":"author (String)",
"description":"description (String)",
"guide": "guide (String)",
"spawn":{
"team color (String)":"spawn location (Location)"
},
"specspawn":"spec spawn (Location)",
"flags":{
"index (String)":{
"loc":"location (Location)",
"point":"point (Double)",
"producing":"producing (Boolean)"
}
},
"nexuses":{
"index (String)":{
"loc":"location (Location)",
"color":"team color (String, optional)",
"point":"point (Double)"
}
},
"banner-spawners":{
"index (String)":{
"loc":"location (Location)",
"point":"point (Int32)",
"hp":"duration (Int32)",
"producing":"producing (Boolean)",
"wall":"wall (Boolean)",
"face":"facing (String)"
}
},
"banner-slots":{
"index (String)":{
"loc":"location (Location)",
"color":"team color (String, optional)"
}
},
"containers":{
"index (String)":{
"loc":"location (Location)"
}
},
"areas":{
"areas":{
"area id (String)":{
"pos1":"pos1 (Location)",
"pos2":"pos2 (Location)"
}
},
"info":{
"area id (String)":{
"rollbacks":{
"rollback name (String)":{
"timing":"rollback timing (Int64)",
"target":"rollback type (String)",
"data":"data (Binary)"
}
},
"permissions":{
"permission type (String)":{
"team color (String)":"permission state (String)"
}
},
"messages":{
"index (String)":{
"timing":"message timing (Int64)",
"type":"message type (String)",
"message":"message (String)"
}
}
}
}
}
}{
"world":"world name (String)",
"x":"x coordinate (Double)",
"y":"y coordinate (Double)",
"z":"z coordinate (Double)",
"yaw":"yaw (Double)",
"pitch":"pitch (Double)"
}Basic record structure; all records have these fields.
Other fields depend on type.
{
"_id":"random (ObjectId)",
"type":"record type (String)",
"time":"time (Date)",
"game":"game id (UUID)"
}For reception_open, reception_close records.
{
"_id":"random (ObjectId)",
"type":"record type (String)",
"time":"time (Date)",
"game":"game id (UUID)"
}For game_start records.
{
"_id":"random (ObjectId)",
"type":"game_start",
"time":"time (Date)",
"game":"game id (UUID)",
"stage":"stage name (String)"
}For game_finish records.
{
"_id":"random (ObjectId)",
"type":"game_finish",
"time":"time (Date)",
"game":"game id (UUID)",
"win":["winner team color (String)"]
}For win, lose, draw records.
{
"_id":"random (ObjectId)",
"type":"record type (String)",
"time":"time (Date)",
"game":"game id (UUID)",
"x":"x coordinate (Double)",
"y":"y coordinate (Double)",
"z":"z coordinate (Double)",
"player":"player (UUID)",
"exp":"experience point (Int64)"
}For rate records.
{
"_id":"random (ObjectId)",
"type":"rate",
"time":"time (Date)",
"game":"game id (UUID)",
"x":"x coordinate (Double)",
"y":"y coordinate (Double)",
"z":"z coordinate (Double)",
"player":"player (UUID)",
"exp":"experience point (Int64)",
"rate":"rate (Double)"
}For login, logout records.
{
"_id":"random (ObjectId)",
"type":"record type (String)",
"time":"time (Date)",
"game":"game id (UUID)",
"x":"x coordinate (Double)",
"y":"y coordinate (Double)",
"z":"z coordinate (Double)",
"player":"player (UUID)"
}For team records.
{
"_id":"random (ObjectId)",
"type":"team",
"time":"time (Date)",
"game":"game id (UUID)",
"x":"x coordinate (Double)",
"y":"y coordinate (Double)",
"z":"z coordinate (Double)",
"player":"player (UUID)",
"team":"team color (String)"
}For banner-hold, banner_deploy, banner-steal, banner_keep,
flag_capture, flag_break, flag_score, nexus_break, death
records.
{
"_id":"random (ObjectId)",
"type":"record type (String)",
"time":"time (Date)",
"game":"game id (UUID)",
"x":"x coordinate (Double)",
"y":"y coordinate (Double)",
"z":"z coordinate (Double)",
"player":"player (UUID)",
"score":"score (Double)"
}For kill records.
{
"_id":"random (ObjectId)",
"type":"record type (String)",
"time":"time (Date)",
"game":"game id (UUID)",
"x":"x coordinate (Double)",
"y":"y coordinate (Double)",
"z":"z coordinate (Double)",
"player":"player killer (UUID)",
"score":"score (Double)",
"killed":"player killed (UUID)",
"weapon":"weapon (String, optional)"
}{
"_id":"game id (UUID)",
"time":"time (Date)",
"stage":"stage name (String)"
}{
"_id":{
"stage":"stage name (String)",
"type":"record type (String)"
},
"count":"records count (Int32)",
"score":"records score sum (Int32 or Double)"
}{
"_id":{
"player":"player (UUID)",
"type":"record type (String)"
},
"count":"records count (Int32)",
"score":"records score sum (Int32 or Double)"
}{
"_id":"player (UUID)",
"exp":"exp (Int64)"
}{
"_id":"player (UUID)",
"vibe":"vibe (Double)"
}