PDA

View Full Version : [Essentials script] Seasonal music for Essentials


tylerab01
July 3rd, 2012, 10:57 AM
In Pokemon Black and White, GameFreak introduced seasonal music. I was playing around with my project and I was able to come up with this script that is working to play a certain bgm during a specific season.

Install:
Just place this script below Line 97 in Game_Map_


#----------------------------------------------------------------------------
# * Autoplays background music (seasonal)
# Plays music dependending on the season if it exists
#----------------------------------------------------------------------------
def autoplayAsCue
case Time.now.mon
when 1
@season=w
when 2
@season=w
when 3
@season=w
when 4
@season=sp
when 5
@season=sp
when 6
@season=sp
when 7
@season=su
when 8
@season=su
when 9
@season=su
when 10
@season=a
when 11
@season=a
when 12
@season=a
end
if @map.autoplay_bgm
if FileTest.audio_exist?("Audio/BGM/"+ @map.bgm.name+ "{@season}")
pbCueBGM(@map.bgm.name+"{@season}",1.0,@map.bgm.volume,@map.bgm.pitch)
else
pbCueBGM(@map.bgm,1.0)
end
end
if @map.autoplay_bgs
pbBGSPlay(@map.bgs)
end
end


It is working on my project, but if you need help feel free to post.

Dying Light
July 5th, 2012, 01:56 PM
Good, compact script! I like it! Thank you for making this!

tylerab01
July 6th, 2012, 04:29 PM
No problem. It was really not that hard to make, essentials has most if it there.