On the topic of Custom Music on PS

Pikachuun

the entire waruda machine
is a Pre-Contributor
#1
This is a really popular suggestion that I've seen like 50 billion times now (exaggeration I know but it gets the point across). It will never be implemented officially due to the costs associated with hosting the music files themselves on the simulator.

But unofficially, thanks to the power of based TamperMonkey, I implemented it.

You're probably asking "butt choon, hao dos i da custum moosic?" to which I reply "Use better English." I think I see what you mean though, so here's a simple way to use this script.

Step 1: Get TamperMonkey (the stable one, it's the black and white icon) and reopen your browser if you have to, then enable it by clicking the shiny new icon that will appear on the upper-right corner of your browser.
Step 2: Same icon, but this time click the "Add a new script button." If a new tab opens with "My Fancy New Userscript" on it, you did it right. I am very proud of you.
Step 3: In the box with all of the "My Fancy New Userscript" text, delete all the things! When you have done this, grab the script and place it in the box [If you can't use pastebin I'll include the code at the bottom of this post]. Then save the script.
Step 4: If something pops up with a box on it, check it. If a drop-down menu appears with something asking for you to choose an option, enable it.
Step 5: ???
Step 100: Profit.

I've included "3" examples for demonstration purposes. The quotes around the 3 are due to the easter egg case being there. Don't edit the thing below the line with all caps on it. That's pretty much needed for the thing to work. The rest you can feel free to edit as you wish to add your own custom music; I even left a bunch of notes so that way you don't get confused part-way in.

Thanks for reading, and happy custum moosicing! (.3.)/

EDIT: Ninety Nine has asked about how to get music files directly. If you're that kind of guy who reads only the OP (even though it's literally right below this post), here's basically what you have to do: In the case of most music files, you just need to view the source code of the website and find the mp3/wav/whatever file (This is how I got the second example). Some music files allow you to also view them in Resources (JS Console) but those are rarer by comparison. Some other music files allow you to simply copy the download link for you to get them as well (1st example). Just pick one of these 3 methods and you should be good to go. If one doesn't work, you have the other two.

(pst you can click on "the script" for the code)
 
Last edited:
#2
Great work! Could you also include a guide on how to obtain the URL for the actual song instead of the website that hosts it. I assume that'd be the biggest issue with something like this. Other than that, amazing stuff :]
 

Pikachuun

the entire waruda machine
is a Pre-Contributor
#3
Great work! Could you also include a guide on how to obtain the URL for the actual song instead of the website that hosts it. I assume that'd be the biggest issue with something like this. Other than that, amazing stuff :]
In the case of most music files, you just need to view the source code of the website and find the mp3/wav/whatever file (This is how I got the second example). Some music files allow you to also view them in Resources (JS Console) but those are rarer by comparison. Some other music files allow you to simply copy the download link for you to get them as well (1st example). Really, it's just a matter of using one of these 3 methods, but I've found the first one is the most reliable.
 
#4
I know this is an old post, but I've been trying to get this to work recently with no luck. It says the variables 'Battle', 'BattleSound', 'BattleSoundLibrary' and 'SoundManager' are not defined. It also complains that the return statement should not contain assignment on line 51 of the code.
 

Pikachuun

the entire waruda machine
is a Pre-Contributor
#5
I know this is an old post, but I've been trying to get this to work recently with no luck. It says the variables 'Battle', 'BattleSound', 'BattleSoundLibrary' and 'SoundManager' are not defined. It also complains that the return statement should not contain assignment on line 51 of the code.
updated the pastebin with code that should work now, sorry for the delay
 
#7
I'm no good at coding and scripts, but I've gotten the first case and default songs to work fine (I added two different pokemon songs). How do you add more songs (cases), and what number case would they be? Do you have to change the "n" in line 14? I've tried but the best I can get is first case and default to play.
 

Pikachuun

the entire waruda machine
is a Pre-Contributor
#8
I'm no good at coding and scripts, but I've gotten the first case and default songs to work fine (I added two different pokemon songs). How do you add more songs (cases), and what number case would they be? Do you have to change the "n" in line 14? I've tried but the best I can get is first case and default to play.
you can do something like
Code:
    case 0:
        BattleSound.loadBgm('that first song or whatever you want to replace it with.mp3', 0, 205749);
        this.bgm = 'that first song or whatever you want to replace it with.mp3';
        break;
    case 1:
        BattleSound.loadBgm('you get the idea in terms of what goes here i hope.mp3', 333, 234234234);
        this.bgm = 'you get the idea in terms of what goes here i hope.mp3';
        break;
    case 2:
        //etc. i think you get it by now
then change the number in ( these parentheses, you know, the ones with a space in between them ), aka the n you mentioned on line 14
remember that the highest case number should be n - 2 so if you just wanted to add 1 extra song, you'd set the n to 3

audacity is your friend in terms of finding loop points if you were confused about that too just to throw it out there
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top