Regional wheater effects

Wasserteufel

Batman
Veteran
Joined
Sep 24, 2017
Messages
74
Reaction score
7
First Language
German, English
Primarily Uses
RMVXA
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?

 

EpicFILE

Epic Member
Veteran
Joined
Sep 27, 2017
Messages
441
Reaction score
1,405
First Language
Indonesia
Primarily Uses
RMMV
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. :D
 
Joined
Sep 1, 2017
Messages
105
Reaction score
52
First Language
English
Primarily Uses
RMMV
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?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,675
Reaction score
566
First Language
English
Primarily Uses
RMVXA
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.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
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.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Easier than I thought. You might want to remove the tone effect though

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
 

Wasserteufel

Batman
Veteran
Joined
Sep 24, 2017
Messages
74
Reaction score
7
First Language
German, English
Primarily Uses
RMVXA
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! =)
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Go ahead and ask if you have a question :)
 

Wasserteufel

Batman
Veteran
Joined
Sep 24, 2017
Messages
74
Reaction score
7
First Language
German, English
Primarily Uses
RMVXA
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" ? ^^
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
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.
 

Wasserteufel

Batman
Veteran
Joined
Sep 24, 2017
Messages
74
Reaction score
7
First Language
German, English
Primarily Uses
RMVXA
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?



PS: THANK YOU VERY MUCH FOR YOUR HELP!!!! =D
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
1 What you should do is set the variable value


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
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,600
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
@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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top