Save-Point
Action if BGM is missing - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Action if BGM is missing (/thread-6281.html)



Action if BGM is missing - Whisper - 04-02-2017

Hello everyone,
I'm planning to change BGM in my game(because i found out that some of them are illegal to use).
Thing is that i think i should leave the oryginal title of song im gonna use. Of course i will change BGM's everywhere i'll find BUT...
its highly possible i wont notice every moment where BGM is changing so in project there still will be command to play old one.
but when RMXP is forced to play BGM that doesnt exist it simply show error and colse application.
Question is:
Have anyone heard or can make script that changes what RMXP is doing after "asked" to play BGM that doesnt exist?
For example -
"If BGM 'BattleMusic' is missing play 'NewBattleTheme',
if BGM 'XXX' is missing print "alternative playing" and play 'YYY',
if BGM that is not specified on list is missing play 'mute'."
Greetings :)


RE: Action if BGM is missing - MechanicalPen - 04-02-2017

The easiest way to replace background music would to use Text to RGSS to decrypt all the .rxdata files to text. Then you would find and replace your old songs' filenames with the new ones. Then use Text to RGSS to encrypt the text back into .rxdata. Make sure you backup your project before trying this in case things go wrong.


RE: Action if BGM is missing - Whisper - 04-03-2017

(04-02-2017, 06:39 PM)MechanicalPen Wrote: The easiest way to replace background music would to use Text to RGSS to decrypt all the .rxdata files to text. Then you would find and replace your old songs' filenames with the new ones. Then use Text to RGSS to encrypt the text back into .rxdata. Make sure you backup your project before trying this in case things go wrong.

That's interesting :) Thank You, i'll try that :)


RE: Action if BGM is missing - Whisper - 04-11-2017

I checked it and it's not so good idea. First - its not working and i dont know why (syntax in 343 line). Second - I have over 300 maps in game and over 30 music files to check. If i undestand how script works i think i schould decrypt every map file one by one and look for old music titles in each. I think it would take ages of very boring work :) Much better would by my original idea... so anuone think it's possible? (check first post)


RE: Action if BGM is missing - MechanicalPen - 04-14-2017

(04-11-2017, 03:15 PM)Whisper Wrote: I checked it and it's not so good idea. First - its not working and i dont know why (syntax in 343 line). Second -  I have over 300 maps in game and over 30 music files to check. If i undestand how script works i think i schould decrypt every map file one by one and look for old music titles in each. I think it would take ages of very boring work :) Much better would by my original idea... so anuone think it's possible? (check first post)

No, it decrypts .rxdata, not maps. It'd do all your maps at once. And then you'd use Notepad++ to find and replace filenames. A computer would do all the boring work in about a second.

As per the error, you are gonna have to either describe what you tried to do, or else upload your project somewhere and let me do it for you.


RE: Action if BGM is missing - Whisper - 06-10-2017

(04-14-2017, 01:00 AM)MechanicalPen Wrote: No, it decrypts .rxdata, not maps. It'd do all your maps at once. And then you'd use Notepad++ to find and replace filenames. A computer would do all the boring work in about a second.

As per the error, you are gonna have to either describe what you tried to do, or else upload your project somewhere and let me do it for you.

I tryied to decrypt a file xD i used Txt_to_RGSS.decrypt("System")
it decrypts some files and crashes on the others.
[Image: 3207OYa.png]

Here You'll find files:
https://ufile.io/9j7jp


RE: Action if BGM is missing - DerVVulfman - 06-10-2017

You may wanna check out LiTTleDRAgo's script/topic: Missing Audio Replacer. He made it last month in response to your inquiries.


RE: Action if BGM is missing - Whisper - 06-11-2017

Nice, thank You :)