noahm / DDRCardDraw

Card draw / randomizer for use in music game tournaments including DDR, SMX, ITG, and PIU
https://ddr.tools
BSD 2-Clause "Simplified" License
33 stars 33 forks source link

Allow songs to be temporary removed from the pool of eligible charts #320

Open albshin opened 6 months ago

albshin commented 6 months ago

Would be nice to be able to remove charts from the eligible song pool temporarily. A use case for this would be tournaments that do not allow songs to be repeated within a certain phase of the bracket/pools.

Proposed workflow:

  1. Set draw settings
  2. Go to "Show eligible songs" list
  3. Allow cards to be clickable, clicking will remove the song from being drawn
  4. Chart shrinks and darkens (like bans)
  5. Allow cards to be re-added to the pool by clicking on the card again

Also maybe adding a button near the top labelled "Restore all charts" would reset all marked charts

noahm commented 6 months ago

This is a great idea! I've wanted a good way to allow more hand edits of the draw pool, but I never had what felt like a natural UI pattern for accomplishing it. Just providing a click action in the eligible charts list sounds like a great way to surface it.

albshin commented 6 months ago

Just thinking about the code, it might be nice to have unique identifiers per song. That way we could just store the song ID and the diffClass within an object somewhere in the config state and then filter out the song from being drawn in chartIsValid

Performai + WACCA songs each have their own unique in-game ID that is easily parsed. Not sure if Bemani games expose this anywhere but worst case it could just be uniquely generated or taken from Tachi, SDVX for example

noahm commented 6 months ago

Not sure if Bemani games expose this anywhere

Yup, I think all bemani games have a unique hash that identifies each song and I have that data inside the DDR files right now under the saHash key (originally sourced from the data file from skillattack.com). There are some other games that are missing unique identifiers for songs, but I'll probably just find a way to generate them if they're otherwise missing.