dev.tsunagite.score

tsunagite.dev

Documentation

A score in a game hosting leaderboards via Tsunagite.

main record

A score in a game hosting leaderboards via Tsunagite.

Record Key tid Timestamp-based ID

Properties

chart string at-uri Required

The chart this score was earned on. URI must point to a record of type `dev.tsunagite.chart`.

game string at-uri Required

The game this score was earned in. URI must point to a record of type `dev.tsunagite.game`.

inputMethod string Optional

The input method this score was earned using. Must be an input method defined by the game record if present.

judgments object Required

A map of judgment names to the integer judgment amounts earned during play.

mode string Optional

The game mode this score was earned on. Must be a mode defined by the game record if present.

scoreComponents object Required

The components that make up this score, as defined by the game record.

song string at-uri Required

The song this score was earned on. URI must point to a record of type `dev.tsunagite.song`.

version bytes Optional

The md5 hash of the chart version this score was earned on. Optional if you will not perform leaderboard resets upon any chart changes.

maxLength: 16minLength: 16
View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "game",
      "song",
      "chart",
      "judgments",
      "scoreComponents"
    ],
    "properties": {
      "game": {
        "type": "string",
        "format": "at-uri",
        "description": "The game this score was earned in. URI must point to a record of type `dev.tsunagite.game`."
      },
      "mode": {
        "type": "string",
        "description": "The game mode this score was earned on. Must be a mode defined by the game record if present."
      },
      "song": {
        "type": "string",
        "format": "at-uri",
        "description": "The song this score was earned on. URI must point to a record of type `dev.tsunagite.song`."
      },
      "chart": {
        "type": "string",
        "format": "at-uri",
        "description": "The chart this score was earned on. URI must point to a record of type `dev.tsunagite.chart`."
      },
      "version": {
        "type": "bytes",
        "maxLength": 16,
        "minLength": 16,
        "description": "The md5 hash of the chart version this score was earned on. Optional if you will not perform leaderboard resets upon any chart changes."
      },
      "judgments": {
        "type": "object",
        "properties": {
          "$keyFormat": {
            "type": "string",
            "format": "record-key",
            "maxLength": 32,
            "minLength": 1,
            "description": "Must match a judgment defined by the game record."
          },
          "$valueType": {
            "type": "object",
            "required": [
              "total"
            ],
            "properties": {
              "late": {
                "type": "integer",
                "description": "The number of total judgments of this type earned when hitting late."
              },
              "early": {
                "type": "integer",
                "description": "The number of total judgments of this type earned when hitting early."
              },
              "total": {
                "type": "integer",
                "description": "The number of total judgments of this type earned."
              }
            }
          }
        },
        "description": "A map of judgment names to the integer judgment amounts earned during play."
      },
      "inputMethod": {
        "type": "string",
        "description": "The input method this score was earned using. Must be an input method defined by the game record if present."
      },
      "scoreComponents": {
        "type": "object",
        "properties": {
          "$keyFormat": {
            "type": "string",
            "format": "record-key",
            "maxLength": 32,
            "minLength": 1,
            "description": "Must match an ID defined by the game record, as well as using the same type."
          },
          "$valueType": {
            "refs": [
              "#enum",
              "#points",
              "#percentage",
              "#text"
            ],
            "type": "union",
            "description": "If you need a component type that doesn't exist yet, contact @lemmaeof.gay"
          }
        },
        "description": "The components that make up this score, as defined by the game record."
      }
    }
  },
  "description": "A score in a game hosting leaderboards via Tsunagite."
}
enum object

An indexable named score component.

Properties

value string record-key Required

The internal ID of the value, matching with an allowed enum value defined by the game record.

View raw schema
{
  "type": "object",
  "required": [
    "value"
  ],
  "properties": {
    "value": {
      "type": "string",
      "format": "record-key",
      "description": "The internal ID of the value, matching with an allowed enum value defined by the game record."
    }
  },
  "description": "An indexable named score component."
}
percentage object

A percentage score component.

Properties

value string Required

The percentage score earned, capped and formatted by the limits defined by the game record. Stored as a decimal number without a percent sign.

View raw schema
{
  "type": "object",
  "required": [
    "value"
  ],
  "properties": {
    "value": {
      "type": "string",
      "description": "The percentage score earned, capped and formatted by the limits defined by the game record. Stored as a decimal number without a percent sign."
    }
  },
  "description": "A percentage score component."
}
points object

An integer point score component.

Properties

value integer Required

The number of points earned, capped by the limit defined by the game record if present.

View raw schema
{
  "type": "object",
  "required": [
    "value"
  ],
  "properties": {
    "value": {
      "type": "integer",
      "description": "The number of points earned, capped by the limit defined by the game record if present."
    }
  },
  "description": "An integer point score component."
}
text object

A fallback score component.

Properties

id string record-key Required

The internal ID of this component, matching with a text score defined by the game record.

maxLength: 32 bytesminLength: 1 bytes
value string Required

The text value of this score.

View raw schema
{
  "type": "object",
  "required": [
    "id",
    "value"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "record-key",
      "maxLength": 32,
      "minLength": 1,
      "description": "The internal ID of this component, matching with a text score defined by the game record."
    },
    "value": {
      "type": "string",
      "description": "The text value of this score."
    }
  },
  "description": "A fallback score component."
}

Lexicon Garden

@