Regional wheater effects

Hey !

I want to make it snow, but only on the yellow circled island.

Is there a way to set a wheater effect, only to certain tiles?

Spoiler
d7T8ODl.jpg
Unfortunately I can't see the image. (maybe due to slow connection here)
I get the idea though. The easiest way is to make a touchable event that activate the weather effect.
Let's say there are grassland and snowfield.
Draw barricades of mountains inbetween. But leave 2 tile as it is. (these will act as an entrance and the weather activator)
Make a touchable event in the first tile. Set it to activate the grassland weather.
Make a second one. This time, set it to activate the snowfield weather.

I hope you can get the idea. It's hard to explain it without a picture.
Hopefully this will help. 😀
Unfortunately I can't see the image.

Can you see the picture now?

d7T8ODl.jpg
Ah do you mean by snow only on the yellow like the snow there is a snow cloud hovering over the middle area and snowing around that area only but the rest of the are there isn't any?
From the picture I would say he wants the snow to be only on the water/ice part. Interesting idea. I'm not sure of a way to do it or if any scripts would help. I'll keep watching to see if a solution comes up.
I personally have never seen an existing weather script which can do this - they are all "whole map" with no option to have only a reduced area affected.
Easier than I thought. You might want to remove the tone effect though
5J6PyJr.gif

Code:
class Spriteset_Weather
  #-----------------------------------------------------------------------------
  # How to use :
  # Decide which variabled ID that determine which region ID gonna handle the
  # weather effect below
  #-----------------------------------------------------------------------------
    Weather_VarID = 99
  #-----------------------------------------------------------------------------
  # Then, set the variable ID to region ID. For example, if you want to show
  # snow weather in region 1, set variable 99 value to 1. If you set it back to
  # 0, then snow weather will be displayed everywhere
  #-----------------------------------------------------------------------------
  def screen_to_world(sprite)
    return sprite.visible = true if $game_variables[Weather_VarID] == 0
    x_map = (sprite.x - sprite.ox + $game_map.display_x * 32)/32
    y_map = (sprite.y - sprite.oy + $game_map.display_y * 32)/32
    world_visible(sprite, x_map.floor, y_map.floor)
  end
 
  def world_visible(spr, x, y)
    if $game_map.region_id(x, y) == $game_variables[Weather_VarID]
      spr.visible = true
    else
      spr.visible = false
    end
  end
 
  alias theo_regweather_update_snow update_sprite_snow
  def update_sprite_snow(sprite)
    theo_regweather_update_snow(sprite)
    screen_to_world(sprite)
  end
 
  alias theo_regweathen_new_particle create_new_particle
  def create_new_particle(sprite)
    theo_regweathen_new_particle(sprite)
    screen_to_world(sprite) if @type == :snow
  end
end
Ah do you mean by snow only on the yellow like the snow there is a snow cloud hovering over the middle area and snowing around that area only but the rest of the are there isn't any?

Inside of the yelllow circle. =)

From the picture I would say he wants the snow to be only on the water/ice part. Interesting idea. I'm not sure of a way to do it or if any scripts would help. I'll keep watching to see if a solution comes up.

Thanks, yeah. That's the idea. The ceiling of the ice ruin has collapsed many years in this area and I want the sunlight and snow coming in only from and on this spot. =)

Easier than I thought. You might want to remove the tone effect though

Wow! Thanks!
I will try it out!

May I ask you, if I doesn't fully understand the script?
Because I am still learning with scripts and Ruby. ^^"

Thanks ya all! =)
Go ahead and ask if you have a question 🙂
Go ahead and ask if you have a question 🙂

Thank you!

Do I use your script via script call or is it a script I have to implement into my scripts under "Material" ? ^^
Thank you!

Do I use your script via script call or is it a script I have to implement into my scripts under "Material" ? ^^
Implement it under material. You just have to set the variable value to a region ID you with where the snow weather will be displayed

In the script, I use variable 99. You can change the variable ID you want to use as you want. Then set the value to (for example) 1, then snow weather effect will only being displayed on region ID 1. If you put back the value to 0, it will be displayed everywhere.
Implement it under material. You just have to set the variable value to a region ID you with where the snow weather will be displayed

In the script, I use variable 99. You can change the variable ID you want to use as you want. Then set the value to (for example) 1, then snow weather effect will only being displayed on region ID 1. If you put back the value to 0, it will be displayed everywhere.

I set the variable to 1, because the regional code of this area is 1 in my game.

But unfortunately its not working.

Here is the script.

I marked 3 yellow spots.

Spot 1 for the variable.
Spot 2 if I have to change this variable too?
and spot 3 if "regweathen" is a typo and it should be "regwheater" and if this makes a difference in the script?

Spoiler
9REP1hV.jpg

Spoiler
DJXaACB.jpg

PS: THANK YOU VERY MUCH FOR YOUR HELP!!!! =D
1 What you should do is set the variable value
hzu3oS91SESZ2lq8vwq9jg.png


2. No, it's ok. It just a check if your variable value is 0 (if so, snow weather wont be displayed only in region ID)

3. It's indeed typo but also happened that I copy pasted it in other line so it's irrelevant lol
1 What you should do is set the variable value
hzu3oS91SESZ2lq8vwq9jg.png

l

It works perfectly now!!

Thank you very much!

This effect will help the mood and is very satisfying for me. thanks. =D
@TheoAllen can this be adapted to all weather effects?
@Roninator2 Here universal version to all weather effect. Do note that it might incompatible with some weather effect script out these as I don't bother to double check it
Code:
class Spriteset_Weather
  #-----------------------------------------------------------------------------
  # How to use :
  # Decide which variabled ID that determine which region ID gonna handle the
  # weather effect below 
  #-----------------------------------------------------------------------------
    Weather_VarID = 99
  #-----------------------------------------------------------------------------
  # Then, set the variable value to region ID. For example, if you want to show
  # snow weather in region 1, set variable 99 value to 1. If you set it back to
  # 0, then snow weather will be displayed everywhere
  #-----------------------------------------------------------------------------
  def screen_to_world(sprite)
    return sprite.visible = true if $game_variables[Weather_VarID] == 0
    x_map = (sprite.x - sprite.ox + $game_map.display_x * 32)/32
    y_map = (sprite.y - sprite.oy + $game_map.display_y * 32)/32
    world_visible(sprite, x_map.floor, y_map.floor)
  end
 
  def world_visible(spr, x, y)
    if $game_map.region_id(x, y) == $game_variables[Weather_VarID]
      spr.visible = true
    else
      spr.visible = false
    end
  end
 
  # Overwritten
  def update_sprite(sprite)
    sprite.ox = @ox
    sprite.oy = @oy
    case @type
    when :rain
      update_sprite_rain(sprite)
    when :storm
      update_sprite_storm(sprite)
    when :snow
      update_sprite_snow(sprite)
    end
    screen_to_world(sprite)
    create_new_particle(sprite) if sprite.opacity < 64
  end
 
  alias theo_regweathen_new_particle create_new_particle
  def create_new_particle(sprite)
    theo_regweathen_new_particle(sprite)
    screen_to_world(sprite) #if @type == :snow
  end
end
Do I use your script via script call or is it a script I have to implement into my scripts under "Material" ? ^^

Implement it under material. You just have to set the variable value to a region ID you with where the snow weather will be displayed
Hey, total scripting newb here, regarding RPGMaker MV. What's "Material", and where is this script implemented? I've never seen the program below before:
1742616107192.png


Is this an IDE, like Visual Studio Code? Or is this something within the RPGMAKER MV Engine? Or is this a plugin?
Hey, total scripting newb here, regarding RPGMaker MV. What's "Material", and where is this script implemented? I've never seen the program below before:
This is ruby code specifically for Rpg Maker VX Ace. XP, VX and VX Ace use Ruby for programming code. MV and MZ use Javascript.
If you owned VX Ace then you would know more as the 'Materials' is in the script editor.
MV uses individual files for plugins that can be selected to be used. xp, vx and vx ace have all the code put in the script editor which gets saved to one file.
So short story, you can't use this in MV.
So short story, you can't use this in MV.

Oh shoot. I don't suppose you guys know of something like this script for MV then? I will, of course, begin to search myself, but if you know off the top of your head, I'd appreciate a link or something. I want this for my game!

Original thread: https://forums.rpgmakerweb.com/threads/regional-wheater-effects.88381/