mirror of
https://github.com/qwerfd2/Groove_Coaster_2_Server.git
synced 2025-12-22 03:30:18 +00:00
Ready up for ex release
This commit is contained in:
11
various-tools/v6 4max db shifter/readme.txt
Normal file
11
various-tools/v6 4max db shifter/readme.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Between 4MAX expansion 6 and 7, 70+ extra levels were added, that includes some AC Alternate charts that were inserted into slots without AC difficulties, due to the 1000 song hard limit.
|
||||
|
||||
Within those 10+ AC Alt levels are 3 levels that were previously part of the 4MAX expansion. Their song ID were shifted to provide space for other songs.
|
||||
|
||||
As a result, those three song's score needs to be shifted in the database (song ID 918 > 7, 921 > 4, 722 > 10).
|
||||
|
||||
Furthermore, it was discovered that a song has been duplicated. It has been deleted and all score after it must be shifted (song ID 359)
|
||||
|
||||
This script does that, simply place in the server root directory and run it.
|
||||
|
||||
Everyone with 4max expansion installed needs to run it. If you are just setting the whole things up, this is not required.
|
||||
32
various-tools/v6 4max db shifter/shift.py
Normal file
32
various-tools/v6 4max db shifter/shift.py
Normal file
@@ -0,0 +1,32 @@
|
||||
import sqlite3
|
||||
|
||||
db_path = "player.db"
|
||||
conn = sqlite3.connect(db_path)
|
||||
cur = conn.cursor()
|
||||
|
||||
# 1. Delete all rows with id == 359
|
||||
cur.execute("DELETE FROM result WHERE id = ?", (359,))
|
||||
|
||||
# 2. Shift every row with id > 359 to id = x - 1
|
||||
cur.execute("UPDATE result SET id = id - 1 WHERE id > ?", (359,))
|
||||
|
||||
# 3. Shift every row with id == 721 to id = 10 (722 - 1)
|
||||
cur.execute("UPDATE result SET id = ? WHERE id = ?", (10, 721))
|
||||
|
||||
# 4. Shift every row with id > 721 to id = x - 1
|
||||
cur.execute("UPDATE result SET id = id - 1 WHERE id > ?", (721,))
|
||||
|
||||
# 5. Shift every row with id == 916 to id = 7 (918 - 2)
|
||||
cur.execute("UPDATE result SET id = ? WHERE id = ?", (7, 916))
|
||||
|
||||
# 6. Shift every row with id > 916 to id = x - 1
|
||||
cur.execute("UPDATE result SET id = id - 1 WHERE id > ?", (916,))
|
||||
|
||||
# 7. Shift every row with id == 918 to id = 4 (921 - 3)
|
||||
cur.execute("UPDATE result SET id = ? WHERE id = ?", (4, 918))
|
||||
|
||||
# 8. Shift every row with id > 918 to id = x - 1
|
||||
cur.execute("UPDATE result SET id = id - 1 WHERE id > ?", (918,))
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
Reference in New Issue
Block a user