Last active
July 4, 2025 10:53
-
-
Save NAEL2XD/c7d2229ebf047c21fe7dee3476fc4968 to your computer and use it in GitHub Desktop.
FNF Utils: Convert fnf .json files to add Duet/Dual mode support!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Python script that makes both bf and dad's section be in duet/dual mode!! | |
| Does NOT require any library and you can launch it and it'll do the work. | |
| Tested with a 1.5mb JSON, works fine. | |
| """ | |
| import json | |
| import os.path as path | |
| from tkinter import filedialog | |
| file = filedialog.askopenfilename(filetypes=[("Psych Engine Chart Compatible JSON", "*.json")]) | |
| content = json.load(open(file, "r")) | |
| i = 0 | |
| for section in content['song']['notes']: | |
| overwrite = section | |
| for notes in range(len(section['sectionNotes'])): | |
| nData = overwrite['sectionNotes'][notes][1] + 4 | |
| if nData > 7: | |
| nData -= 8 | |
| s = section['sectionNotes'][notes] | |
| overwrite['sectionNotes'].append([s[0], nData, s[2], "No Animation"]) | |
| content['song']['notes'][i] = overwrite | |
| i += 1 | |
| file = file.replace(".json", "") | |
| file = open(f"{file}-duet.json", "w") | |
| file.write(json.dumps(content, separators=(",", ":"))) | |
| file.close() | |
| print("Complete!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment