mirror of
https://gitlab.com/GameFeverOnline/mmm-nsf-changer.git
synced 2025-12-17 01:17:43 -04:00
fixed most original song overwriting bugs
This commit is contained in:
parent
13e12d859a
commit
6f65630aa2
2 changed files with 14 additions and 9 deletions
|
|
@ -7,24 +7,25 @@ I got tired of waiting for actual custom music to be added to Mega Man Maker. So
|
|||

|
||||
|
||||
## Installation
|
||||
You will need to install through PIP the package PySimpleGUI and maybe requests. The rest of the dependencies *should* be already installed.
|
||||
You will need to install through PIP the package PySimpleGUI, requests, and packaging. You can just do "pip install -r requirements.txt". The rest of the dependencies *should* already be 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.
|
||||
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. Then you choose your nsf file and where your Mega Man Maker folder is.
|
||||
|
||||
## 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.
|
||||
* -NEW- Support for "permanently" replacing a specific song to one of your liking, with restoring capabilities.
|
||||
|
||||
## Support
|
||||
If you have any issues, which is probable, make a gitlab issue. There may be bugs.
|
||||
|
||||
## Roadmap
|
||||
* add check so pressing replace_song twice in a row doesn't replace the original song
|
||||
* Add requirements.txt
|
||||
* stop using os.path in favour of pathlib
|
||||
* switch to using a config file (or database) for keeping track of which tracks have been changed, that way only having one original_music folder and being able to *show* the user which song you used to replace which file.
|
||||
* 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"
|
||||
|
|
@ -37,4 +38,4 @@ If you have any issues, which is probable, make a gitlab issue. There may be bug
|
|||
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.
|
||||
GNU General Public License v3.0
|
||||
|
|
|
|||
|
|
@ -115,11 +115,15 @@ def replace_song(new_song_path,old_song_name, megamaker_folder):
|
|||
##backup_song
|
||||
if old_song_name != False:
|
||||
os.makedirs(os.path.dirname(backup_path), exist_ok=True)
|
||||
try:
|
||||
shutil.copy(old_song_path, backup_path)
|
||||
if os.path.isfile(backup_path):
|
||||
shutil.copy(new_song_path, old_song_path)
|
||||
except FileNotFoundError:
|
||||
print("FILE NOT FOUND")
|
||||
print("skipping backup file. why, it already exists!")
|
||||
else:
|
||||
try:
|
||||
shutil.copy(old_song_path, backup_path)
|
||||
shutil.copy(new_song_path, old_song_path)
|
||||
except FileNotFoundError:
|
||||
print("FILE NOT FOUND")
|
||||
def restore_song(old_song_name, megamaker_folder):
|
||||
path = os.path.abspath(megamaker_folder)
|
||||
old_song_path = filename_to_filepath(old_song_name, megamaker_folder)
|
||||
|
|
@ -127,7 +131,7 @@ def restore_song(old_song_name, megamaker_folder):
|
|||
backup_path = os.path.join(megamaker_folder, "original_specific_songs", subfolder, old_song_name)
|
||||
if old_song_name != False:
|
||||
try:
|
||||
shutil.move(backup_path, old_song_path)
|
||||
shutil.copy(backup_path, old_song_path)
|
||||
except FileNotFoundError:
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue