Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Reply
 
Thread Tools
  #1    
Old November 28th, 2013 (2:58 AM).
Derxwna Kapsyla's Avatar
Derxwna Kapsyla Derxwna Kapsyla is offline
[Primal Despair] Derxwna "The Badman" Kapsyla
     
    Join Date: Jun 2011
    Location: Margate, FL
    Age: 24
    Gender: Male
    Nature: Lax
    Posts: 397
    Like in the Pokemon games proper, this script modification will allow you to have background sound for when weather is going on. After hours of Trial and Error, we got it working decently. Credit goes to Mugendai for getting the script working.

    To get the script working, go to the Script Section "Game_Screen", and look for the following line: def weather(type, power, duration). Once you find it, that entire section needs to be overwritten with the following code.
    Code:
    def weather(type, power, duration)
        @weather_type_target = type
        if @weather_type_target == 0 # None
          pbBGSFade(duration)
        elsif @weather_type_target == 1 # Rain
          pbBGSPlay("Rain")
        elsif @weather_type_target == 2 # Storm
          pbBGSPlay("Storm")
        elsif @weather_type_target == 3 # Snow
          pbBGSPlay("Snow")
        elsif @weather_type_target == 4 # Sandstorm
          pbBGSPlay("Sandstorm")
        elsif @weather_type_target == 5 # Sunny
          pbBGSPlay("Sunny") # is this one honestly even necessary? What could possibly play for Sunny Weather? Ah well, it's there if needed.
        end
        if @weather_type_target != 0
          @weather_type = @weather_type_target
        end
        if @weather_type_target == 0
          @weather_max_target = 0.0
        else
          @weather_max_target = (power + 1) * 4.0
        end
        @weather_duration = duration
        if @weather_duration == 0
          @weather_type = @weather_type_target
          @weather_max = @weather_max_target
        end
      end
    Do note, you will need sound files for "Rain", "Storm", "Snow", "Sandstorm", and "Sunny". I've provided a download link to the Rain audio file I have. It's free to use, made off an online generator. This way you can test it in-game proper without needing to create a new file.

    I would suggest putting a fade in for the audio file, as the audio starts playing right away as soon as the map loads. However, due to it being BGS, the audio file will loop.

    Small defect: it may cause some lag on older machines when transitioning between maps. On newer machines, no errors were reported.

    I don't think I forgot anything. If I did, I'll be sure to have Mugendai include it in a follow-up post.

    The script is, as expected, free to use. Make use of it how you will. Enjoy!
    __________________
    Development Blog:
    For more information future news and updates to any projects, the following blogs are where I post information. You can usually hit me with a message there when it comes to bug reports or feedback, or general conversation about something.
    Game Projects:
    In Progress:
    Reply With Quote

    Relevant Advertising!

      #2    
    Old November 28th, 2013 (7:48 AM).
    Worldslayer608's Avatar
    Worldslayer608 Worldslayer608 is offline
    ಥдಥ
    • Silver Tier
     
    Join Date: Mar 2008
    Location: San Diego
    Age: 28
    Gender: Male
    Nature: Calm
    Posts: 892
    Very nice of you to transfer your answered question into a resource for others
    __________________



    SMEARGLE SOLO CHALLENGE
    HARDCORE EDITION
    To vanquish without peril is to triumph without glory...
    Voted Best Game Designer 2011 on PC
    Reply With Quote
      #3    
    Old November 28th, 2013 (8:29 AM).
    Derxwna Kapsyla's Avatar
    Derxwna Kapsyla Derxwna Kapsyla is offline
    [Primal Despair] Derxwna "The Badman" Kapsyla
       
      Join Date: Jun 2011
      Location: Margate, FL
      Age: 24
      Gender: Male
      Nature: Lax
      Posts: 397
      Coincidentally enough, Luka answered the thread after I posted the tutorial. I even told Mugendai about it last night, and we laughed it off:
      [07:13:46] <Derxwna> Wow
      [07:13:49] <Derxwna> Mugendai
      [07:13:56] <Derxwna> An alternate method to getting weather working
      [07:14:01] <Derxwna> AFTER I post the tutorial

      So when I posted it, it was still unanswered. Nevertheless, it would be wrong to amend this post with Luka's idea, since it was his method. Mugendai devised this method of his own time and knowledge, and gave me permission to post it up here.
      [05:45:56] <Derxwna> Mugendai
      [05:46:02] <Mugendai> ?
      [05:46:12] <Derxwna> You don't mind if I post the tutorial about how to get Weather Sounds working, do you?
      [05:46:21] <Mugendai> go ahead

      Honestly, for me, I just like giving back to the community. If I have an answer to one of my own questions, even if it's not a big deal, I like to post the answer for people who may potentially run across the scenario in the future. This seemed like a potential thing people would be curious about, so I dropped the method Mugendai crafted here on the forums to benefit others.
      Sorry if I seemed a bit defensive in this post, I probably misinterpreted the tone of your post, but I also don't want people to think I'm taking credit for something Luka came up with - the last thing I want to do is be branded a thief in this community!
      __________________
      Development Blog:
      For more information future news and updates to any projects, the following blogs are where I post information. You can usually hit me with a message there when it comes to bug reports or feedback, or general conversation about something.
      Game Projects:
      In Progress:
      Reply With Quote
        #4    
      Old November 28th, 2013 (9:19 AM).
      Luka S.J.'s Avatar
      Luka S.J. Luka S.J. is offline
      Jealous Croatian
         
        Join Date: Dec 2008
        Location: Croatia
        Age: 24
        Gender: Male
        Nature: Adamant
        Posts: 1,102
        Quote:
        Originally Posted by Derxwna Kapsyla View Post
        Sorry if I seemed a bit defensive in this post, I probably misinterpreted the tone of your post, but I also don't want people to think I'm taking credit for something Luka came up with - the last thing I want to do is be branded a thief in this community!
        Timestamps prove everything man. I didn't see this thread when I posted the stuff in your Question thread. I did see it later though, and I saw that you posted this like an hour before I gave my answer, I just left my post up anyway. So don't worry, it's all good
        Reply With Quote
          #5    
        Old November 28th, 2013 (10:34 AM).
        Derxwna Kapsyla's Avatar
        Derxwna Kapsyla Derxwna Kapsyla is offline
        [Primal Despair] Derxwna "The Badman" Kapsyla
           
          Join Date: Jun 2011
          Location: Margate, FL
          Age: 24
          Gender: Male
          Nature: Lax
          Posts: 397
          Quote:
          Originally Posted by Luka S.J. View Post
          Timestamps prove everything man. I didn't see this thread when I posted the stuff in your Question thread. I did see it later though, and I saw that you posted this like an hour before I gave my answer, I just left my post up anyway. So don't worry, it's all good
          I like to keep things timestamped for good reason, documentation of events and chronicling purposes. They also come in handy when proving events dd happen when they happened.
          Your method you posted on the thread was a valid suggestion. Had we not already figured something out, I'd probably have given it a whirl. Didn't wanna make a comment about how we already figured it out, I thought it'd be rude if I pointed it out. Nevertheless, more than one method is always good.
          __________________
          Development Blog:
          For more information future news and updates to any projects, the following blogs are where I post information. You can usually hit me with a message there when it comes to bug reports or feedback, or general conversation about something.
          Game Projects:
          In Progress:
          Reply With Quote
          Reply
          Quick Reply

          Sponsored Links
          Thread Tools

          Posting Rules
          You may not post new threads
          You may not post replies
          You may not post attachments
          You may not edit your posts

          BB code is On
          Smilies are On
          [IMG] code is On
          HTML code is Off

          Forum Jump


          All times are GMT -8. The time now is 8:16 AM.