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

Support for v4 format #512

Open
DanTheMan827 opened this issue Mar 8, 2024 · 3 comments
Open

Support for v4 format #512

DanTheMan827 opened this issue Mar 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@DanTheMan827
Copy link

DanTheMan827 commented Mar 8, 2024

1.35 added a v4 difficulty format, picture below is a screenshot from AssetStudioGUI of one of the new DLC files
image

The files are still json, but now with a .beatmap extension, and the asset files also gzip compress them.

@DanTheMan827 DanTheMan827 added the enhancement New feature or request label Mar 8, 2024
@XAce1337manX XAce1337manX changed the title Beatmap Difficulty V4 Support for v4 format Mar 8, 2024
@XAce1337manX
Copy link
Collaborator

v4 has actually been in the game since 1.34.5.
It's on the radar but it will take time as it substantially changes serialization format which has a bunch of challenges.

@DanTheMan827
Copy link
Author

DanTheMan827 commented Mar 8, 2024

Maybe this'll be helpful, maybe not... but I've figured out this much based on comparing the new beatmap with the old difficulty file.

V4 > V3
  beatmap
    colorNotes
      b > b
      i = index for colorNotesData
      colorNotesData[i ?? 0].x > x
      colorNotesData[i ?? 0].y > y
      colorNotesData[i ?? 0].c > c
      colorNotesData[i ?? 0].d > d
      colorNotesData[i ?? 0].a > a

    bombNotes
      b > b
      i = index for bombNotesData
      bombNotesData[i ?? 0].x > x
      bombNotesData[i ?? 0].y > y

    obstacles
      b > b
      i = index for obstaclesData
      obstaclesData[i ?? 0].x > x
      obstaclesData[i ?? 0].y > y
      obstaclesData[i ?? 0].d > d
      obstaclesData[i ?? 0].w > w
      obstaclesData[i ?? 0].h > h

    chains > burstSliders
      hb > b
      tb > tb
      i = index for colorNotesData
      colorNotesData[i ?? 0].x > x
      colorNotesData[i ?? 0].y > y
      colorNotesData[i ?? 0].c > c
      colorNotesData[i ?? 0].d > d
      ci = index for chainsData
      chainsData[ci ?? 0].tx > tx
      chainsData[ci ?? 0].ty > ty
      chainsData[ci ?? 0].c > sc
      chainsData[ci ?? 0].s > s

    arcs > sliders
      hb > b
      tb > tb
      hi = index for colorNotesData
      ti = index for colorNotesData
      ai = index for arcsData
      colorNotesData[hi ?? 0].c > c
      colorNotesData[hi ?? 0].x > x
      colorNotesData[hi ?? 0].y > y
      colorNotesData[hi ?? 0].d > d
      colorNotesData[ti ?? 0].x > tx
      colorNotesData[ti ?? 0].y > ty
      colorNotesData[ti ?? 0].d > tc
      arcsData[ai ?? 0].tm > tmu
      arcsData[ai ?? 0].m > mu
      arcsData[ai ?? 0].a > m

I haven't done the lightshow yet, but I don't even know if converting v4 to v3 would even work?

@Caeden117
Copy link
Owner

Caeden117 commented Mar 9, 2024

v4 contains the same information as v3, but has additional compression on top for shared object states.

For ChroMapper, the implementation I'm thinking about is to decompress a v4 list of indices and data back into a full complete list of objects, so v4 maps can be manipulated using the same systems we already have in place for v2 and v3. At save time, ChroMapper will re-compress objects back into the indices and data lists. This decompression/compression process will be invisible to the mapper and to the rest of ChroMapper's codebase, so systems like Node Editor can still function as expected and not have to be entirely rewritten.

that being said, considering official editor still does not save in the v4 format just yet, i don't think implementation is of utmost priority, but it is something we'll want to look into

EDIT: Should want to mention that changes involving the v4 Info.dat file will need more substantial changes to the Song Edit screen, and how CM loads lightshowss alongside maps. There's still quite a lot of work and refactors to be done to support the v4 format, but I think my solution outlined above will cut out a lot more work involving the Editor itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants