• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Seasonal music for Essentials

tylerab01

Pokemon AquaHarmony
  • 162
    Posts
    15
    Years
    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_

    Code:
    #----------------------------------------------------------------------------
      # * 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.
     
    Good, compact script! I like it! Thank you for making this!
     
    Back
    Top