Jump to content
Galv

Basic Music Player

Recommended Posts

Basic Music Player - Version 1.5
Galv


Introduction
Just more doing random stuff to self-teach myself. (There are fancier music playing scripts out there).


Features
This script allows the player to bring up a list of music to play. This can be added as a menu option or called via an event call.
You can choose to add all files from a folder to this list or allow the player to collect music during the game by adding new songs with script calls in events.
Also added a script call to use in event conditional branches to check if the player has learned a song.

- The player can now set vehicle bgm and battle bgm to a song that they have learned and that will be used throughout the game.
- use a script call to return the battle bgm to the player's choice after a boss fight changed it.



Screenshot
basic-music-player2.jpg


How to Use
Place script under Materials and above Main.
Read script instructions for script calls to use.


Script
Get it here


FAQ
None yet.


Credit and Thanks
- Galv
Requested by jerm

Author's Notes
2012-01-08 - Version 1.5 - added a stop button
2012-11-03 - Version 1.4 - now able to set different music for each vehicle. Also vixed a bug I found with vehicle default restoring.
2012-10-28 - Version 1.3 - tweak to col position
2012-10-28 - Version 1.2
- added option to set battle bgm to a known track
- added option to set vehicle bgm to a known track
- more script calls for eventing purposes
2012-10-27 - Version 1.1 - Realised the regular expression I used to find the song name wasn't checking for different folder locations. Edited by Galv

Share this post


Link to post
Share on other sites

You seem to be making a decent amount of scripts lately. (Not like it's a bad thing, of course.)

Anyway, this is pretty awesome! I like how simplistic it is.

Share this post


Link to post
Share on other sites

Thanks... yeah I'm a slow learner and have to do things a -lot- to retain it to memory. So I figure I just play around with random things that someone might find useful :P

Share this post


Link to post
Share on other sites

Add the option to display the Original Composer, Duration, Title (different from filename), and maybe an image for the album it's from, and this script would be pure gold, sir. I made one once for RMXP. It was pretty awesome.

Share this post


Link to post
Share on other sites

I could add it so you can manually input all those details.

Add the option to display the Original Composer, Duration, Title (different from filename), and maybe an image for the album it's from, and this script would be pure gold, sir. I made one once for RMXP. It was pretty awesome.

 

Well, I could allow someone to manually input all that info... that doesn't sound fun for someone setting it up. The plan was basic and automatic, but I would do that if it's something people wanted.

 

And also automatically parse it from the audio object if it provides such properties. LOL now that would be something.

My skills definitely don't include automatically parsing it from the audio file... :P

Share this post


Link to post
Share on other sites

like this a lot. i was wondering how i would go about doing something like this. i'll download it and take a look. i'm sure i can learn a lot of processing BGMs by dissecting this.

Share this post


Link to post
Share on other sites

I could add it so you can manually input all those details.

Add the option to display the Original Composer, Duration, Title (different from filename), and maybe an image for the album it's from, and this script would be pure gold, sir. I made one once for RMXP. It was pretty awesome.

 

Well, I could allow someone to manually input all that info... that doesn't sound fun for someone setting it up. The plan was basic and automatic, but I would do that if it's something people wanted.

 

And also automatically parse it from the audio object if it provides such properties. LOL now that would be something.

My skills definitely don't include automatically parsing it from the audio file... :P

 

I don't mind inputting info in scripts at all. wink wink.

Share this post


Link to post
Share on other sites

When it plays does it replace the default music for that map or does it just play until you leave the map? I was thinking of adding this feature where you could either bring up a menu or use an item that lets you change the music for the map you're on & even change the default map music (like the world map) or change the default battle theme or vehicle theme music. Add I could make a side-quest out of it by hiding items around that add songs to the music player. So could I add this as a menu option for both field menu & battle menu (The fight or escape menu)?

Edited by Animebryan

Share this post


Link to post
Share on other sites

Currently it just brings up a list of songs that the player has learned that the player can play.

The music continues to play when you leave the music list.

The music will change when you transfer to a map that has an auto BGM set, but using a switch you can stop this from happening.

It doesn't change any of the default musics, but that's a cool idea. I will think about that.

 

Yes, you can make side quests that reward the player by teaching them new songs that they can play from the list.

 

Also, I haven't tried the music player in combat.

Share this post


Link to post
Share on other sites

Currently it just brings up a list of songs that the player has learned that the player can play.

The music continues to play when you leave the music list.

The music will change when you transfer to a map that has an auto BGM set, but using a switch you can stop this from happening.

It doesn't change any of the default musics, but that's a cool idea. I will think about that.

 

Yes, you can make side quests that reward the player by teaching them new songs that they can play from the list.

 

Also, I haven't tried the music player in combat.

I found a section in Scene_Battle where the music player menu option probably should be:

Share this post


Link to post
Share on other sites

I thought you were asking what it could do. I could add it to the combat menu if you like

Yeah. I was planning on using it to play customized map & battle themes. It would be perfect to have a menu option listed under 'Escape' on that 1st menu for battle. Being able to change the default themes would be awesome too along with maybe a option to reset them to their default setting too, just in case.

Share this post


Link to post
Share on other sites

Well, I wasn't sure a good way to approach changing map music (to make it flexible and easy for everyone to use at least). But I have updated it to be able to set battle bgm, vehicle bgm and be used in battle.

Share this post


Link to post
Share on other sites

Well, I wasn't sure a good way to approach changing map music (to make it flexible and easy for everyone to use at least). But I have updated it to be able to set battle bgm, vehicle bgm and be used in battle.

Tried it out, works good, just one request. Do you think you could split the vehicle bgm into the separate vehicles (set Boat bgm, set Ship bgm & set Airship bgm)? It would make more sense that way instead of setting each time or listening to the same bgm for each vehicle.

Share this post


Link to post
Share on other sites

I thought about that but didn't really think there would be a game where people got in and out of different vehicles often enough and had the burning desire to play different BGM for each vehicle to warrant doing it. :P

 

But okay, I will update this later at some point - might not be for a few days.

 

EDIT: Well, I was in the mood. I added a new menu that opens up when you select "change vehicle music" to then select which vehicle.

Let me know if any issues.

Edited by Galv

Share this post


Link to post
Share on other sites

Haven't seen that error before.

Make sure you put the script under Materials and above Main. Also check you copied the entire script. If it still doesn't work, make a backup of your game then take scripts out one by one and test each time to see if it is a conflicting script.

Share this post


Link to post
Share on other sites

Haha, that's what version 1 did... :P

 

Put this after the script in the list:

class Scene_MusicPlayer < Scene_MenuBase
 def on_music_ok
   RPG::BGM.new($game_system.last_track, 100, 100).play
 end
end
class Scene_Battle < Scene_Base
 def on_music_ok
   RPG::BGM.new($game_system.last_track, 100, 100).play
 end
end

Share this post


Link to post
Share on other sites

Why am I just seeing this now? Q.Q

 

I love you for this! This is exactly what I was looking for. Nothing fancy, just a simple music player for my game. Thanks! :D

Edited by djDarkX

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×