Skip to content

System Data Structure

toyblocks edited this page Jul 29, 2017 · 3 revisions

BSON data structure stored in Mongo DB

stage (collection)

{
  "_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)"
    }
  },
  "superjumps":{
    "loc":"location (Location)",
    "velocity":"velocity (Vector)",
    "range":"range (Double)"
  },
  "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)"
          }
        }
      }
    }
  }
}

location (value)

{
  "world":"world name (String)",
  "x":"x coordinate (Double)",
  "y":"y coordinate (Double)",
  "z":"z coordinate (Double)",
  "yaw":"yaw (Double)",
  "pitch":"pitch (Double)"
}

records (collection)

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)"
}

game record (value)

For reception_open, reception_close records.

{
  "_id":"random (ObjectId)",
  "type":"record type (String)",
  "time":"time (Date)",
  "game":"game id (UUID)"
}

game start record (value)

For game_start records.

{
  "_id":"random (ObjectId)",
  "type":"game_start",
  "time":"time (Date)",
  "game":"game id (UUID)",
  "stage":"stage name (String)"
}

game finish record (value)

For game_finish records.

{
  "_id":"random (ObjectId)",
  "type":"game_finish",
  "time":"time (Date)",
  "game":"game id (UUID)",
  "win":["winner team color (String)"]
}

result record (value)

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)"
}

rate record (value)

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)"
}

player record (value)

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)"
}

player team record (value)

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)"
}

score record (value)

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)"
}

kill record (value)

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)"
}

game_history (view)

{
  "_id":"game id (UUID)",
  "time":"time (Date)",
  "stage":"stage name (String)"
}

stage_stats (view)

{
  "_id":{
    "stage":"stage name (String)",
    "type":"record type (String)"
  },
  "count":"records count (Int32)",
  "score":"records score sum (Int32 or Double)"
}

player_stats (view)

{
  "_id":{
    "player":"player (UUID)",
    "type":"record type (String)"
  },
  "count":"records count (Int32)",
  "score":"records score sum (Int32 or Double)"
}

player_exp (view)

{
  "_id":"player (UUID)",
  "exp":"exp (Int64)"
}

player_vibe (view)

{
  "_id":"player (UUID)",
  "vibe":"vibe (Double)"
}

Clone this wiki locally