A rhythm game net ranking service built on ATproto.
at main 165 lines 4.9 kB view raw
1{ 2 "lexicon": 1, 3 "id": "dev.tsunagite.score", 4 "description": "Definitions related to scores in games hosting leaderboards via Tsunagite.", 5 "featureFlags": ["dev.tsunagite.dictionaryObject"], 6 "defs": { 7 "enum": { 8 "type": "object", 9 "description": "An indexable named score component.", 10 "properties": { 11 "value": { 12 "type": "string", 13 "description": "The internal ID of the value, matching with an allowed enum value defined by the game record.", 14 "format": "record-key" 15 } 16 }, 17 "required": ["value"] 18 }, 19 "points": { 20 "type": "object", 21 "description": "An integer point score component.", 22 "properties": { 23 "value": { 24 "type": "integer", 25 "description": "The number of points earned, capped by the limit defined by the game record if present." 26 } 27 }, 28 "required": ["value"] 29 }, 30 "percentage": { 31 "type": "object", 32 "description": "A percentage score component.", 33 "properties": { 34 "value": { 35 "type": "string", 36 "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." 37 } 38 }, 39 "required": ["value"] 40 }, 41 "text": { 42 "type": "object", 43 "description": "A fallback score component.", 44 "properties": { 45 "id": { 46 "type": "string", 47 "description": "The internal ID of this component, matching with a text score defined by the game record.", 48 "format": "record-key", 49 "minLength": 1, 50 "maxLength": 32 51 }, 52 "value": { 53 "type": "string", 54 "description": "The text value of this score." 55 } 56 }, 57 "required": ["id", "value"] 58 }, 59 "main": { 60 "type": "record", 61 "description": "A score in a game hosting leaderboards via Tsunagite.", 62 "key": "tid", 63 "record": { 64 "type": "object", 65 "properties": { 66 "game": { 67 "type": "string", 68 "description": "The game this score was earned in. URI must point to a record of type `dev.tsunagite.game`.", 69 "format": "at-uri" 70 }, 71 "song": { 72 "type": "string", 73 "description": "The song this score was earned on. URI must point to a record of type `dev.tsunagite.song`.", 74 "format": "at-uri" 75 }, 76 "chart": { 77 "type": "string", 78 "description": "The chart this score was earned on. URI must point to a record of type `dev.tsunagite.chart`.", 79 "format": "at-uri" 80 }, 81 "scoredAt": { 82 "type": "string", 83 "description": "The time this score was originally earned.", 84 "format": "datetime" 85 }, 86 "version": { 87 "type": "bytes", 88 "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.", 89 "minLength": 16, 90 "maxLength": 16 91 }, 92 "mode": { 93 "type": "string", 94 "description": "The game mode this score was earned on. Must be a mode defined by the game record if present." 95 }, 96 "inputMethod": { 97 "type": "string", 98 "description": "The input method this score was earned using. Must be an input method defined by the game record if present." 99 }, 100 "judgments": { 101 "type": "object", 102 "description": "A map of judgment names to the integer judgment amounts earned during play.", 103 "properties": { 104 "$keyFormat": { 105 "type": "string", 106 "description": "Must match a judgment defined by the game record.", 107 "format": "record-key", 108 "minLength": 1, 109 "maxLength": 32 110 }, 111 "$valueType": { 112 "type": "object", 113 "properties": { 114 "total": { 115 "type": "integer", 116 "description": "The number of total judgments of this type earned." 117 }, 118 "early": { 119 "type": "integer", 120 "description": "The number of total judgments of this type earned when hitting early." 121 }, 122 "late": { 123 "type": "integer", 124 "description": "The number of total judgments of this type earned when hitting late." 125 } 126 }, 127 "required": [ "total" ] 128 } 129 } 130 }, 131 "scoreComponents": { 132 "type": "object", 133 "description": "The components that make up this score, as defined by the game record.", 134 "properties": { 135 "$keyFormat": { 136 "type": "string", 137 "description": "Must match an ID defined by the game record, as well as using the same type.", 138 "format": "record-key", 139 "minLength": 1, 140 "maxLength": 32 141 }, 142 "$valueType": { 143 "type": "union", 144 "description": "If you need a component type that doesn't exist yet, contact @lemmaeof.gay", 145 "refs": [ 146 "#enum", 147 "#points", 148 "#percentage", 149 "#text" 150 ] 151 } 152 } 153 } 154 }, 155 "required": [ 156 "game", 157 "song", 158 "chart", 159 "judgments", 160 "scoreComponents" 161 ] 162 } 163 } 164 } 165}