• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

Weather Sound Effects Version 2

Pokémon Essentials Version
v17.2 ➖
Generic Weather Sounds


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 Maralis 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("Blizzard")
    elsif @weather_type_target == 5 # Sandstorm
         pbBGSPlay("Darude")
    elsif @weather_type_target == 6 # Sandstorm
         pbBGSPlay("HeavyRain")
    elsif @weather_type_target == 7 # Sunny
         pbBGSPlay("Sunny")
    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

Each of the weathers will need their own Audio file to accompany it. I have included a basic file that you can use with Rain, Storm, and Heavy Storm, ripped straight from Gen 3 itself. There are dedicated files for those three weathers, however they only work if you have the FModEx plugin installed into your project. All of these files go into the "Audio/BGS" folder.

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


Thunder Sound Effects


New to Version 2 of the script is the addition of thunder sound effects during the Storm weather effect, and will go off whenever a flash of lightning happens on the screen These go into the "Audio/SE" folder. The code for it is as follows. In the PField_Weather section, do a search for "# Storm flashes". Underneath that, replace that segment with this:
Code:
# Storm flashes
      if @type==PBFieldWeather::Storm
        rnd = rand(300)
        if rnd<4
          @viewport.flash(Color.new(255,255,255,230),rnd*20)
          if rand(50)<25
            pbSEPlay("OWThunder1")
          elsif rand(50)>30
            pbSEPlay("OWThunder2")
          else
            return
          end
        end
      end
Both of the audio files are pulled straight from Gen 3, and are scripted so that they will alternate depending on the random value generated. There is also a small chance that it won't play a sound, Just so it doesn't constantly barrage you with sound effects.


The script is, as expected, free to use. Make use of it how you will. Enjoy!
Credits
Maralis for making the script, as per usual

Derxwna Kapsyla for the Thunder sound effect scripts
Author
DerxwnaKapsyla
Downloads
1,565
Views
2,835
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from DerxwnaKapsyla

Back
Top