Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Random Battle BGM, Allows you to have random battle bgms
breadlord
post Jun 12 2009, 11:15 AM
Post #1


What did you expect...
Group Icon

Group: Revolutionary
Posts: 461
Type: Developer
RM Skill: Intermediate




This script allows you to use a random battle bgm instead of the same one over and over again. Instructions in the script.

CODE

######################## Breadlords Random Battle BGM ##########################
## This allows the BGM in battles to be chosen randomly from the BGM's you ##
## set. You set a BGM like this : number => RPG::BGM.new("bgm name", volume, ##
## pitch)] *all on one line*, were number is the number 1 higher than the ##
## number of the previous one (starting at zero, 1 for the next bgm ect), bgm ##
## name is were you will put in the name of the BGM, volume is it's volume, I ##
## recomend that if you do not know what your doing you should just leave it ##
## at 100, the same for pitch - if you do not know what your doing leave this ##
## at 100. ##
## ##
## Finally, if you want to stop the random BGM use the command $stop_random = ##
## true, to set the random BGMs back on again use $stop_random = false ##
################################################################################
################################################################################
class Scene_Map < Scene_Base
alias add_music_battle call_battle unless $@
def call_battle
random_BGM ={ # Insert custom BGMs here
0 => RPG::BGM.new("Battle1", 100, 100), # BGM I've set up, you can remove
1 => RPG::BGM.new("Battle2", 100, 100), # BGM I've set up, you can remove
2 => RPG::BGM.new("Battle3", 100, 100), # BGM I've set up, you can remove
3 => RPG::BGM.new("Battle4", 100, 100), # BGM I've set up, you can remove
4 => RPG::BGM.new("Battle5", 100, 100), # BGM I've set up, you can remove
5 => RPG::BGM.new("Battle6", 100, 100), # BGM I've set up, you can remove
6 => RPG::BGM.new("Battle7", 100, 100), # BGM I've set up, you can remove
7 => RPG::BGM.new("Battle8", 100, 100), # BGM I've set up, you can remove
}
########################### Do not edit past here ##############################
i = random_BGM.keys
wich_one = rand(i.size - 1)
music = random_BGM[wich_one]
unless $stop_random
$game_system.battle_bgm = music
end
add_music_battle
end
end




__________________________

Check out my project http://www.rpgrevolution.com/forums/index....showtopic=29698
[Show/Hide] I thought my sig was to big so... Clicky clicky


[Show/Hide] My RRR card, Thanks Holder!!




[Show/Hide] What things am I, CLICK!!!

I taste a bit like Almonds.


Mmm, the taste of almonds - anathema to many with nut allergies, and a bad sign for many more, as my taste is not unlike that of cyanide. Am I good or am I poison? A risky thing to guess about. What Flavour Are You?



What Mystical creature are you?
Pegasus



You are a shy, night time person and you are very gentle and soft hearted. You are like the opposite from your cousin the unicorn.


Which Final Fantasy Character Are You?
Final Fantasy 7


[Show/Hide] Can you read this?
Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.


[Show/Hide] Personality things




Your answers suggest you are a Strategist

The four aspects that make up this personality type are:



Summary of Strategists

* Quiet, easy-going and intellectually curious
* Use logical, objective thinking to find original solutions to problems
* Think of themselves as bright, logical and individualistic
* May be impractical, forgetting practical issues, such as paying bills or doing the shopping

More about Strategists

Strategists are quiet people who like to get to the heart of tough problems on their own and come up with innovative solutions. They analyse situations with a sceptical eye and develop ways of measuring everything, including themselves.

Strategists are the group most likely to say they are unhappy in their job, according to a UK survey.

Strategists are generally easy-going. They are intellectually curious and enjoy abstract ideas. Sometimes they like thinking of a solution to a problem more than taking practical steps to solve it.

In situations where they can't use their talents, are unappreciated, or not taken seriously, Strategists may become negatively critical or sarcastic. Under extreme stress, Strategists could be prone to inappropriate, tearful or angry outbursts.

Strategists may be insensitive to the emotional needs of others or how their behaviour impacts the people around them.


Go to the top of the page
 
+Quote Post
   
thefuneralpyre66...
post Jun 24 2009, 02:35 PM
Post #2


Level 2
Group Icon

Group: Member
Posts: 28
Type: Writer
RM Skill: Intermediate




Why on earth would this script go overlooked? It's so short, yet adds such an amazing feature, as many games have only one battle theme, making battles boring and monotonous before the first dungeon is finished. This alleviates that pain
Go to the top of the page
 
+Quote Post
   
Lennox55
post Jun 25 2009, 05:20 AM
Post #3


Level 2
Group Icon

Group: Member
Posts: 29
Type: Event Designer
RM Skill: Skilled




Yeah, this is totally just what I needed!
Very good.
Thanks a lot biggrin.gif
Go to the top of the page
 
+Quote Post
   
Fonstw
post Aug 23 2011, 09:02 AM
Post #4


Level 3
Group Icon

Group: Member
Posts: 36
Type: Writer
RM Skill: Intermediate




I chose 18 different BGM's, so that took a while >.<

But thanks dude, really!!


__________________________
Haven't you ever noticed that "four" is the only number with the same amount of letters as it's definition in the entire English language?
Go to the top of the page
 
+Quote Post
   
TheBen
post Aug 23 2011, 06:55 PM
Post #5


Intolerable Noob
Group Icon

Group: Revolutionary
Posts: 344
Type: Developer
RM Skill: Beginner




Beautiful script. Thanks for giving us something to elegant and useful! happy.gif
(Casual note to self: Yanfly already had this script, but with the BGM hash changing depending on which actors were in the party. I prefer this for its simplicity, though.)

This post has been edited by TheBen: Aug 23 2011, 06:58 PM


__________________________
QUOTE
Great people talk about IDEAS
Average people talk about THINGS
Small people talk about OTHER PEOPLE

- A plaque on a BBQ restaurant in VA
Go to the top of the page
 
+Quote Post
   
thepurplearchmag...
post Oct 8 2011, 09:46 AM
Post #6


Level 2
Group Icon

Group: Member
Posts: 23
Type: None
RM Skill: Intermediate




One problem with this masterpiece: this also cancel's out any Change Battle BGM event commands. Anyway to stop this?
Go to the top of the page
 
+Quote Post
   
oriceles
post Nov 6 2011, 04:26 PM
Post #7



Group Icon

Group: Member
Posts: 1
Type: None
RM Skill: Beginner




QUOTE (thepurplearchmage @ Oct 8 2011, 02:46 PM) *
One problem with this masterpiece: this also cancel's out any Change Battle BGM event commands. Anyway to stop this?


unsure.gif I've seen another script just like these one that have a similar problem. But in that case after the "change battle bgm" command the script function get lost and the event music get as default. Anyway here's the link for the other script

I'm not a ascripter at all but i must say that this scripts are almost perfect.

This post has been edited by oriceles: Nov 6 2011, 04:27 PM
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 11:42 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker