Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New match type: ddrSongHash #1213

Merged
merged 6 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion common/src/config/game-support/ddr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const DDR_CONF = {
inGameID: zodNonNegativeInt,
flareCategory: DDR_FLARE_CATEGORIES,
basename: z.string().optional(),
ddrSongHash: z.string().optional(), // optional because konaste-only songs have no hashes
}),
} as const satisfies INTERNAL_GAME_CONFIG;

Expand Down Expand Up @@ -206,7 +207,7 @@ export const DDR_SP_CONF = {
preferences: z.strictObject({}),
scoreMeta: z.strictObject({}),

supportedMatchTypes: ["inGameID", "songTitle", "tachiSongID"],
supportedMatchTypes: ["inGameID", "songTitle", "tachiSongID", "ddrSongHash"],
} as const satisfies INTERNAL_GAME_PT_CONFIG;

export const DDR_DP_CONF = {
Expand Down
3 changes: 2 additions & 1 deletion common/src/lib/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,8 @@ const PR_BATCH_MANUAL_SCORE = (game: Game, playtype: Playtype): PrudenceSchema =
"inGameID",
"inGameStrID",
"uscChartHash",
"popnChartHash"
"popnChartHash",
"ddrSongHash"
),
identifier: "string",
comment: optNull(p.isBoundedString(3, 240)),
Expand Down
1 change: 1 addition & 0 deletions common/src/types/batch-manual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type MatchTypesNoDifficulty = "bmsChartHash" | "itgChartHash" | "popnChartHash"

// These MatchTypes need `difficulty` set in the batch manual.
type MatchTypesWithDifficulty =
| "ddrSongHash"
| "inGameID"
| "inGameStrID"
| "sdvxInGameID"
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/codebase/batch-manual/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ means that it will check for any of `INF/GRV/HVN/VVD/XCD` for this song.

This is useful for services that store all of those as the same difficulty.

- ddrSongHash

This is a 32-character hash used by the official DDR e-amusement website to
identify a song; you must specify the difficulty for this chart as well.

## Example

A final example of a simple BATCH MANUAL format
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/game-support/common-config/match-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Uses `identifier` as a SHA1 hash, since that's what USC uses.

These match types need both `identifier` and a `difficulty` defined.

### `ddrSongHash`

Looks up on the 32-character song hash for this chart, where the hash is from the official DDR e-amusement website.

### `inGameID`

Looks up on the in game ID for this chart.
Expand Down
1 change: 1 addition & 0 deletions docs/docs/game-support/games/ddr-DP.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ The folowing judgements are defined:
- `inGameID`
- `songTitle`
- `tachiSongID`
- `ddrSongHash`
1 change: 1 addition & 0 deletions docs/docs/game-support/games/ddr-SP.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ The folowing judgements are defined:
- `inGameID`
- `songTitle`
- `tachiSongID`
- `ddrSongHash`
Loading
Loading