Derxwna Kapsyla
Derxwna "The Badman" Kapsyla
- 437
- Posts
- 13
- Years
- Everywhere, yet Nowhere
- Seen Apr 15, 2025
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.
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!
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!