diff --git a/README.md b/README.md index 3a6590c..be7ae92 100644 --- a/README.md +++ b/README.md @@ -7,23 +7,32 @@ I got tired of waiting for actual custom music to be added to Mega Man Maker. So ![Alt text](/nsf_changer.png?raw=true "NSF Changer window") ## Installation -You will need to install through PIP the package PySimpleGUI. The rest of the dependencies *should* be already installed. +You will need to install through PIP the package PySimpleGUI and maybe requests. The rest of the dependencies *should* be already installed. ## Usage Please use at your own risk and make backups of the MegaManMaker folder before you use it. -To use it just launch the executable file (if available for your os) or type "python mmm-nsf-changer.py" in the terminal or commandline, and the GUI will launch. Maybe CLI support will come in the future. Then you choose your nsf file and where your Mega Man Maker folder is. Please note that support for Windows systems is not tested much since I don't use it. On windows systems the program may freeze for about ten seconds, please DO NOT CLICK RESET ON MEGA MAKER WHILE THE TOOL IS FROZEN, IT WILL CRASH THE GAME. +To use it just launch the executable file (if available for your os) or type "python mmm-nsf-changer.py" in the terminal or commandline, and the GUI will launch. Maybe CLI support will come in the future. Then you choose your nsf file and where your Mega Man Maker folder is. Please note that support for Windows systems is not tested much since I don't use it. On windows systems the program may freeze for about 5 seconds, please DO NOT CLICK RESET ON MEGA MAKER WHILE THE TOOL IS FROZEN, IT WILL CRASH THE GAME. + +## Features +* Easy way to choose a NSF, NSFe, SPC, VGM, GYM, AY, HES, KSS, SAP or GBS file as a replacement for every song in the game. Yes, you heard that right: You can use SNES Music, Sega Genesis Music, and more in Mega Man Maker! +* A "mute" button for replacing every song in the game with a silent song. For people that play Mega Man Maker with external music, like streamers. +* Reliable way to restore the original songs. +* A decent interface. ## Support -If you have any issues, which is probable, make a gitlab issue. There *will* be bugs. +If you have any issues, which is probable, make a gitlab issue. There may be bugs. ## Roadmap -fix slowdown on windows systems -Ability to change only the level music and leave the menu, or just the menu and leave the level music. -Instead of duplicating a single file a lot of times, maybe I'll implement symlink support. -add autoupdater?? +* add selective mute, so that you mute every music except the boss music, or every song except menu music or both. +* figure out the best way to add a setting for changing each of the level editor songs, menu music, or a specific level song. Maybe an extra popup window or a check box for "replace every one" "menu" and "levelBuild" +* add a way to show the available nsf files in the selected folder, like a playlist. +* add a settings file for the last folder chosen, so if there is a path try to use that so that you don't have to choose it manually +* fix slowdown on windows systems +* Instead of duplicating a single file a lot of times, maybe I'll implement symlink support. +* add autoupdater?? ## Contributing -You can help with the project by testing it and reporting issues, or by making pull requests. +You can help with the project by testing it and reporting issues, or by making pull requests. Windows testers are especially needed since I don't daily drive Windows. ## License For open source projects, say how it is licensed. diff --git a/bin/mmm-nsf-changer.exe b/bin/v1.0/mmm-nsf-changer.exe similarity index 100% rename from bin/mmm-nsf-changer.exe rename to bin/v1.0/mmm-nsf-changer.exe diff --git a/bin/v1.1/before_you_use.txt b/bin/v1.1/before_you_use.txt new file mode 100644 index 0000000..9c90f4a --- /dev/null +++ b/bin/v1.1/before_you_use.txt @@ -0,0 +1 @@ +This executable was made in Wine, a Windows compatibility layer for Linux. It is not perfect. Because of that, this exe package may not work properly. It is NOT TESTED. diff --git a/bin/v1.1/mmm-nsf-changer.exe b/bin/v1.1/mmm-nsf-changer.exe new file mode 100755 index 0000000..4f8285c Binary files /dev/null and b/bin/v1.1/mmm-nsf-changer.exe differ diff --git a/mmm-nsf-changer.py b/mmm-nsf-changer.py index 8a9c8aa..a08605c 100644 --- a/mmm-nsf-changer.py +++ b/mmm-nsf-changer.py @@ -6,6 +6,7 @@ import pathlib import filecmp import webbrowser import requests +import base64 ##Here goes the actual code @@ -18,8 +19,6 @@ def safelist(): #MAYBE SYMLINKS??? - -#maybe check with mmm api if new version #maybe add autoupdater through gitlab #add @@ -36,6 +35,17 @@ def check_version(version=False): return False +def create_mute_file(base64_str): + current_dir = os.path.dirname(__file__) + mutefile = os.path.join(current_dir, "mmm_nsf_changer_mute.nsf") + if os.path.exists(mutefile): + print("the mute nsf file already exists. This is a safety measure.") + else: + with open(mutefile, 'wb') as file_to_save: + decoded_image_data = base64.b64decode(base64_str) + file_to_save.write(decoded_image_data) + return True + def check_folder_structure(megamaker_folder, og_music=False): megamaker_folder = os.path.abspath(megamaker_folder) subfolders = ([ f.path for f in os.scandir(megamaker_folder) if f.is_dir() ]) @@ -74,12 +84,17 @@ def move_music_to_ogmusic(path): print("Cutman.nsf and Oilman.nsf match in Music folder.") return False - def recreate_structure(new_nsf, original_paths_list): for path in original_paths_list: if not os.path.exists(os.path.dirname(path)): os.makedirs(os.path.dirname(path)) - shutil.copy(new_nsf, path) + print("recreate structure if not os.path.exists") + try: + shutil.copy(new_nsf, path) + print("recreate structure shutil.copy") + except: + print("continuing") + continue #check if the contents of files in original_music != the files in music AND check if contents of input nsf == every file in music. if all of that is true replace music with original_music def restore_ogmusic(path): @@ -105,10 +120,16 @@ def restore_ogmusic(path): def nsf_changer (nsf_path, megamaker_folder): original_path = check_folder_structure(megamaker_folder) if original_path: + if os.path.commonpath([os.path.dirname(nsf_path), os.path.join(megamaker_folder, "Music")]) == os.path.join(megamaker_folder, "Music"): + restore_ogmusic(megamaker_folder) + shutil.copy(nsf_path, os.path.join(megamaker_folder, os.path.basename(nsf_path))) + nsf_path = os.path.join(megamaker_folder, os.path.basename(nsf_path)) move_music_to_ogmusic(megamaker_folder) recreate_structure(nsf_path, original_path) + print("nsf changer returning true") return True else: + print("nsf changer returning false") return False sg.theme('LightBlue') @@ -117,6 +138,8 @@ icon = b"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAArlBMVEUAAAAAAAB5eXmioqI gif = b"R0lGODdhQgAmAHcAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgAAACwAAAAAQgAmAIAAAAAAefsCzISPqcvtD6OctNqLs95chg92YgOGT/mNExpArOqhrgzPpW3WznvSHM8AknwbocK4QGKUBybCWYFCDdMV8XhNZpfbZvf5BUjD1fFteA6GqeR2WvtWxxPmHNwux9PdevAc++cVyDYotmZYWJeCaFLGt5i3yON4NvnYwih5aFl5Sdi4ScPZJwjaeWo3qpko2ooKmYmpKutqaruaWou7S/vae4v5ySv8OxxLjFxqPJvMfKxcHN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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + if check_version(): version_color = "black" version_message = f"Works with Mega Man Maker {mmm_version}" @@ -128,16 +151,18 @@ layout = [ [sg.Text("Mega Man Maker NSF Music Changer | Made by Timothy GFO", justification="center")], [sg.Text("YouTube", enable_events = True, key="-YT-", text_color="red"), sg.Text("GitLab",enable_events = True,key="-GIT-", text_color="purple"), sg.Text("Blog",enable_events = True,key="-SITE-", text_color="blue")], [sg.Text(version_message, text_color=version_color)], - [sg.Text("Input NSF File:"), sg.Input(key="-IN-"),sg.FileBrowse(file_types=(("NSF Files", "*.nsf*"),))], + [sg.Text("Input NSF File:"), sg.Input(key="-IN-"),sg.FileBrowse(file_types=(("NSF Files", "*.nsf*"),("NSFe Files", "*.nsfe*"),("SNES Files", "*.spc*"),("Gameboy Files", "*.gbs*"), ("Sega Genesis VGM", "*.vgm*"),("Sega Genesis GYM", "*.gym*"), ("ZX Spectrum", "*.ay*"), ("TurboGrafx 16", "*.hes*"), ("MSX Home Computer", "*.kss*"), ("Atari Pokey", "*.sap*"),))], [sg.Text("MegaMaker Folder:"), sg.Input(key="-OUT-"), sg.FolderBrowse()], - [sg.Exit(),sg.Button("About") , sg.Button("Replace NSF Music"), sg.Button("Restore Original Music"), sg.Image(data=gif, key='_IMAGE_')], + [sg.Button("Mute All")], + [sg.Exit(),sg.Button("About") , sg.Button("Replace NSF Music"), sg.Button("Restore Original Music"),sg.Image(data=gif, key='_IMAGE_')], ] how_to_use = "I made this tool to be able to change the music for any Mega Man Maker level while playing the game. It works by replacing every nsf file with a custom one, but while preserving the original folders and file names.\n\nTo use it, just choose a nsf file and then tell the program where you store the *game* folder. That is where the .exe is, not the user folder.\n\nIf you find this useful, you can check out my YouTube Channel or my blog since I will keep making tools like this. Also, if you find any bugs or errors remember to notify me at GitLab by making an Issue." +app_version = "v1.1" -window = sg.Window("MMM NSF Music Changer v1.0", layout, grab_anywhere=True) +window = sg.Window(f"MMM NSF Music Changer {app_version}", layout, grab_anywhere=True) disclaimer = sg.popup_yes_no('NSF Changer, by Timothy GFO', 'This program is not complete, there WILL be bugs. Use at your own risk.', 'Do you want to continue?') while disclaimer == "Yes": event,values = window.read(timeout=50) @@ -153,6 +178,12 @@ while disclaimer == "Yes": webbrowser.open("https://gitlab.com/gamefeveronline") if event == "About": sg.popup(how_to_use) + if event == "Mute All": + create_mute_file(mute_nsf) + if not nsf_changer(os.path.join(os.path.dirname(__file__), "mmm_nsf_changer_mute.nsf"), values["-OUT-"]): + restore_ogmusic(values["-OUT-"]) + if not nsf_changer(os.path.join(os.path.dirname(__file__), "mmm_nsf_changer_mute.nsf"), values["-OUT-"]): + sg.popup_error("MegaMaker folder is not valid or definitions are out of date.") if event == "Replace NSF Music": if not nsf_changer(values["-IN-"], values["-OUT-"]): restore_ogmusic(values["-OUT-"])