• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Resource [20.1+] Weather System 1.4.0

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
There can be multiple tilesets. You have to put the "original" tilesets (the ones you will use to create the map on the RPG maker) ID (the number that is at the left of the name on the tileset tab on the database) on the OUTDOOR_TILESETS on configuration and then indicate how much the code has to add to those original tilesets ID to get to their seasonal variants on SUMMER_TILESET, AUTUMN_TILESET, WINTER_TILESET and SPRING_TILESET (one of those values can be 0 if you are using that season as the original tileset). Be aware that the program will add the same value to all the ID on OUTDOOR_TILESET to get to the same seasonal variant so keep them all at the same distance from the original one.

For example, the original IDs are for spring, are 24, 28 and 32 and you have configured it so summer adds 1, autumn 2, winter 3 and spring 0 (since it's the original tileset). The summer variants would be IDs 25, 29 and 33, the autumn variants would be IDs 26, 30 and 34 and the winter ones would be IDs 27, 31 and 35.

As a note, the original tilesets don't need to be used for a season but that would mean to have 4 tileset variants instead of 3.

I hope I have resolved all your doubts but if there are more don't hesitate to ask.
 

Kenway Rayleigh

Rookie
Member
Joined
Aug 19, 2024
Posts
2
There can be multiple tilesets. You have to put the "original" tilesets (the ones you will use to create the map on the RPG maker) ID (the number that is at the left of the name on the tileset tab on the database) on the OUTDOOR_TILESETS on configuration and then indicate how much the code has to add to those original tilesets ID to get to their seasonal variants on SUMMER_TILESET, AUTUMN_TILESET, WINTER_TILESET and SPRING_TILESET (one of those values can be 0 if you are using that season as the original tileset). Be aware that the program will add the same value to all the ID on OUTDOOR_TILESET to get to the same seasonal variant so keep them all at the same distance from the original one.

For example, the original IDs are for spring, are 24, 28 and 32 and you have configured it so summer adds 1, autumn 2, winter 3 and spring 0 (since it's the original tileset). The summer variants would be IDs 25, 29 and 33, the autumn variants would be IDs 26, 30 and 34 and the winter ones would be IDs 27, 31 and 35.

As a note, the original tilesets don't need to be used for a season but that would mean to have 4 tileset variants instead of 3.

I hope I have resolved all your doubts but if there are more don't hesitate to ask.

I was setting it up wrong.

Thank you very much.
 

Templar33

Rookie
Member
Joined
Oct 26, 2024
Posts
5
I am running into a problem. For some reason, weather doesn't want to change. All I did was change the map ID numbers (Route 1, Cendolan City and Route 2) to my maps ID's and it still shows weather changes in only those areas. So i keep getting weather at the deafult locations (2,5) but not the new location. here is the config (dont mind seasons, they have yet to be implemented):


#===============================================================================
# * Weather System Configuration
#===============================================================================

module WeatherConfig
# Set to false to use the Weather System.
NO_WEATHER = false # Default: false

# Set to true to show the weather on the Town Map.
SHOW_WEATHER_ON_MAP = true # Default: true

# Set to true to use the computer's time. Will not work without Unreal Time System.
USE_REAL_TIME = false # Default: true

# Set to true to have the weather change at midnight.
CHANGE_MIDNIGHT = false # Default: true

# Define the min and max amount of time (in hours) before the weather changes.
# Set the same number to not randomize the amount of time before the weather changes.
CHANGE_TIME_MIN = 5 # Default: 1
CHANGE_TIME_MAX = 10 # Default: 4

# Set to true to if you want to force the weather to change when interacting with certain events.
# Use pbForceUpdateWeather in an event to update all zone weathers.
# Use pbForceUpdateZoneWeather(zone) in an event to update the weather of a zone.
FORCE_UPDATE = false # Default: false

# Set to true to have the outdoor maps change with seasons.
# The map's appearance will update when leaving an indoor map.
SEASON_CHANGE = true # Default: false

# Set to true if your game starts outdoors and want to show the season splash when going somewhere indoors.
# Set to false if your game starts indoors and want to show the season splash when going somewhere outdoors.
OUTDOOR = false # Default: false

# Array with the ID of outside tilesets that will change with seasons.
OUTDOOR_TILESETS = [1, 2]

# The difference between the ID of the tileset defined for an outdoor map and it's season version.
# The difference has to be the same for any tileset defined in OUTDOOR_TILESETS.
# Use the same season tileset as the default outdoor map tileset and define the diference for that season as 0.
SUMMER_TILESET = 0
AUTUMN_TILESET = 0
WINTER_TILESET = 0
SPRING_TILESET = 0

#===============================================================================
# * Weather Substitute
#===============================================================================
# A hash with the ID of the maps that will have or not have certain weathers.
# The ID of the weather has to be of the main one you want to change with WEATHER_SUBSTITUTE.
# Use "exclude" to define a list of maps that will not use that weather when it's the main one.
# Any maps of a zone not added on the "exclude" list will use the main weather.
# Use "include" to define a list of maps that will use that weather when it's the main one.
# Any maps of a zone not added on the "include" list will use the secondary weather.
MAPS_SUBSTITUTE = {
:Snow => ["exclude", 1, 4],
:Blizzard => ["exclude", 1, 4],
:Sandstorm => ["include", 5]
}

# The ID of the weathers that will substitute the main when appropiate (conditions defined in MAPS_SUBSTITUTE).
# There has to be a hash (defined between {}) for each defined zone with weather to substitute.
# Any weather not defined in the hash for a zone will use the main weather instead.
WEATHER_SUBSTITUTE = [
{:None => :None, :Rain => :Rain, :Storm => :Storm, :Snow => :Rain, :Blizzard => :Storm, :Sandstorm => :None, :HeavyRain => :HeavyRain, :Sun => :Sun, :Fog => :Fog},
{:Snow => :Rain, :Blizzard => :Storm, :Sandstorm => :None},
{:Snow => :Rain, :Blizzard => :HeavyRain}
]

#===============================================================================
# * Weather Names
#===============================================================================
# A hash that contains the ID of weather and the name to display for each one.
# Using .downcase will make them lowercase.
def self.weather_names
return {
:None => _INTL("None"),
:Rain => _INTL("Rain"),
:Storm => _INTL("Storm"),
:Snow => _INTL("Snow"),
:Blizzard => _INTL("Blizzard"),
:Sandstorm => _INTL("Sandstorm"),
:HeavyRain => _INTL("Heavy rain"),
:Sun => _INTL("Sun"),
:Fog => _INTL("Fog")
}
end
#===============================================================================
# * Zones Configuration
#===============================================================================
# Arrays of id of the maps of each zone. Each array within the main array is a zone.
# The maps within each zone will have the same weather at the same time.
# Each zone may have a different weather than the others.
ZONE_MAPS = [
[112, 113, 114, 115, 116, 118, 124, 126, 130, 131],
[7],
[21]
]
#===============================================================================
# * Map Display
#===============================================================================
# Array of hashes to get each map's position in the Town Map. Each hash corresponds to a zone in ZONE_MAPS.
# In "Map Name" you have to put the name the Town Map displays for that point.
# In Map ID you have to put the ID of the map the name corresponds to, like in ZONE_MAPS.
MAPS_POSITIONS = [
#{"Map Name" => Map ID},
{"Metrola" => 126, "Route 1" => 5},
{"Cedolan City" => 7},
{"Route 2" => 21}
]

# A hash for the plugin to display the proper weather image on the map.
# They have to be on Graphics/Pictures/Weather (in 20+) or Graphics/UI/Weather (in 21+).
WEATHER_IMAGE = {
:Rain => "mapRain",
:Storm => "mapStorm",
:Snow => "mapSnow",
:Blizzard => "mapBlizzard",
:Sandstorm => "mapSand",
:HeavyRain => "mapRain",
:Sun => "mapSun",
:Fog => "mapFog"
}
#===============================================================================
# * Season Probability Configuration
#===============================================================================
# Arrays of probability of weather for each zone in the different seasons.
# Each array within the main array corresponds to a zone in ZONE_MAPS.
# Put 0 to weather you don't want if you define a probability after it.
# If your game doesn't use seasons, edit the probabilities of one season and copy it to the others.

# Probability of weather in summer.
# Order: None, Rain, Storm, Snow, Blizzard, Sandstorm, HeavyRain, Sun/Sunny, Fog
ZONE_WEATHER_SUMMER = [
[50, 120, 3, 0, 0, 0, 5, 30],
[40, 50],
[60]
]

# Probability of weather in autumn.
# Order: None, Rain, Storm, Snow, Blizzard, Sandstorm, HeavyRain, Sun/Sunny, Fog
ZONE_WEATHER_AUTUMN = [
[50, 120, 3, 0, 0, 0, 5, 30],
[40, 50],
[60]
]

# Probability of weather in winter.
# Order: None, Rain, Storm, Snow, Blizzard, Sandstorm, HeavyRain, Sun/Sunny, Fog
ZONE_WEATHER_WINTER = [
[50, 120, 3, 0, 0, 0, 5, 30],
[40, 50],
[60]
]

# Probability of weather in spring.
# Order: None, Rain, Storm, Snow, Blizzard, Sandstorm, HeavyRain, Sun/Sunny, Fog
ZONE_WEATHER_SPRING = [
[50, 120, 3, 0, 0, 0, 5, 30],
[40, 50],
[60]
]
end[/CODE]
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Did you test the plugin before changing the maps ID? If you did, then that may be the problem since the plugin stores the maps ID for each zone when creating the variable it needs to work. If you use $WeatherSystem.zoneMaps = WeatherConfig::ZONE_MAPS, it should update the maps that belong to each zone. You may also want to use pbInitializeWeather to update the weather so all the defined zones have one.

I'll update the plugin soon to solve that problem I didn't think about.

As a side note, I see you have changed the MAP_POSITIONS wrong. While there are a lot of maps defined for that zone that aren't added there, you have defined a map with ID 5 that is not defined on any zone. Take it out or update the map ID to the proper one.
 

Templar33

Rookie
Member
Joined
Oct 26, 2024
Posts
5
Did you test the plugin before changing the maps ID? If you did, then that may be the problem since the plugin stores the maps ID for each zone when creating the variable it needs to work. If you use $WeatherSystem.zoneMaps = WeatherConfig::ZONE_MAPS, it should update the maps that belong to each zone. You may also want to use pbInitializeWeather to update the weather so all the defined zones have one.

I'll update the plugin soon to solve that problem I didn't think about.

As a side note, I see you have changed the MAP_POSITIONS wrong. While there are a lot of maps defined for that zone that aren't added there, you have defined a map with ID 5 that is not defined on any zone. Take it out or update the map ID to the proper one.
Thank you, it works now (I know Map positions don't work since im still working on that).
 

ardicoozer

Cooltrainer
Member
Joined
Sep 29, 2020
Posts
180
I forgot to tell you about a Weather based on Month
Yeah, works like a charms.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
I could add month based weather but I think it would be too much of a hassle for a game. The seasons, as they are on vanilla essentials, rotate each month so you could achieve something similar with it.
 

ThornSide

Rookie
Member
Joined
Jun 8, 2024
Posts
2
Hi, I just had to delete the save file of my game to do a few things, but I'm regretting it 'cause now when I try to start a new game it gives me this error:

[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NoMethodError
Message: undefined method `length' for nil:NilClass

Backtrace:
[Lin's Weather System] 01 - Main.rb:131:in `block in pbInitializeWeather'
[Lin's Weather System] 01 - Main.rb:127:in `each'
[Lin's Weather System] 01 - Main.rb:127:in `pbInitializeWeather'
[Lin's Weather System] 03 - Handler.rb:10:in `block in <main>'
Event_Handlers:89:in `block in trigger'
Event_Handlers:89:in `each_value'
Event_Handlers:89:in `trigger'
Event_HandlerCollections:63:in `trigger'
Game_MapFactory:147:in `setMapChanged'
Game_MapFactory:26:in `setup'

Now I'm stuck since I can't playtest my game while using the plugin and it gives me other errors if I try to playtest without it (Because of stuff that works while the plugin is installed, that's it), Idk how to solve this, even before the error pbInitializeWeather was not working for me whenever I've tried to use it since I had trouble to make weather work on maps with the plugin, I'm also using Arcky's Region Map and I could see that there was weather somewhere using the town map... Maybe I'm dumb idk, I'm not a professional guy about these things, english isn't even my native language, so... Anyway, I hope someone can help me, sorry for ranting...
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Judging by the error it gives you, I'm guessing there's an error in the configuration of the plugin. Make sure that you configure the same number of zones for everything that uses zones (ZONE_MAPS, MAPS_POSITIONS, and the seaons' weather configuration).
 

ThornSide

Rookie
Member
Joined
Jun 8, 2024
Posts
2
Thank you so much, that was it! After I did that the game gave me another error when starting a new save, I tried to solve it and I did (essentially there was also something missing from WEATHER_SUBSTITUTE in the configuration, like it was in the seasons' weather). Anyway, thanks (again)! This plugin is something I really need for my project, it's a very nice touch to the game.
 

Proz

Rookie
Member
Joined
Oct 30, 2024
Posts
4
Thank you for the plugin. I have two questions for you if you can help me. 1) how can I make a map have just some type of weather with possibilities to weather 2) I am searching a way for a variable or switch to check the weather so a npc to appears when is raining. Thank youu
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
1) Could you explain better what you mean by that? Maybe with an example.

2) The weather is stored in [imath]WeatherSystem.actualWeather[zone].mainWeather and [/imath]WeatherSystem.actualWeather[zone].secondWeather.
If you change "zone" with the number of the zone the map is in (it starts counting at 0) then you can check if the map has rain as the active weather with [imath]WeatherSystem.actualWeather[zone].mainWeather == :Rain or [/imath]WeatherSystem.actualWeather[zone].secondWeather == :Rain. Normally, you'll be fine with using the code for the main weather since the second weather tends to be the same as the main one. If you use the secondary weather function (so some maps of the zone display some different weather, like a beach map having rain while the rest has snow) and that map happens to use it, then use the second weather.

Edit: I'm seeing "[imath]" on my message so I'll add this in case the rest see the same. [imath] is the dollar symbol. I don't know why it shows like that.[/imath]
 

ardicoozer

Cooltrainer
Member
Joined
Sep 29, 2020
Posts
180
Honestly,
I still confuse how to set a tilesets season,
This error always happen,
Code:
Expand Collapse Copy
[2024-12-10 13:22:33 +0700]
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: TypeError
Message: Array can't be coerced into Integer

Backtrace:
[Lin's Weather System] 01 - Main Code.rb:18:in `+'
[Lin's Weather System] 01 - Main Code.rb:18:in `updateTileset'
Game_Map:49:in `setup'
[TDW Berry Planting Improvements] 001_BerryPlantingImprovements.rb:1094:in `setup'
Game_MapFactory:24:in `setup'
[ENLS's Fancy Camera] 002_Method Overrides.rb:148:in `transfer_player'
Scene_Map:173:in `block in update'
Scene_Map:166:in `loop'
Scene_Map:166:in `update'
[Following Pokemon EX] Refresh.rb:178:in `update'
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
I assume that you added arrays to SUMMER_TILESET, AUTUMN_TILESET, WINTER_TILESET, and SPRING_TILESET, which caused the error. The plugin comes with an example, but I'll explain each part here.

There are two parts for that to work, one in OUTDOOR_TILESETS and another in the season tilesets.

In the OUTDOOR_TILESETS you have to put the ID of all tilesets you use when creating a map that you want to change depending on the season. And it has to look something like this: OUTDOOR_TILESETS = [1, 2, 3, 4]. The numbers don't have to be these, but they have to follow this structure.

Then, on the part of the season tilesets, you have to put a single number. That number will be added to the ID in the OUTDOOR_TILESETS to get the ID of the corresponding seasonal tileset. Following the example I put above, it could be something like this:
OUTDOOR_TILESETS = [1, 2, 3, 4]
SUMMER_TILESET = 4
AUTUMN_TILESET = 8
WINTER_TILESET = 12
SPRING_TILESET = 0

With that configuration, the plugin will do this with a map that uses the tileset with ID 1:
Spring: 1 + 0 = 1 so tileset ID 1 will be used as the spring tileset for the map.
Summer: 1 + 4 = 5 so tileset ID 5 will be used as the summer tileset for the map.
Autumn: 1 + 8 = 9 so tileset ID 9 will be used as the autumn tileset for the map.
Winter: 1 + 12 = 13 so tileset ID 13 will be used as the winter tileset for the map.

This configuration puts together the tilesets of the same season together. If you want to put together the tilesets that will transition from one to the other (so you have the spring, summer, autumn and winter tilesets for the same maps one after the other), you have to put a configuration like this one:

OUTDOOR_TILESETS = [1, 6, 11, 16]
SUMMER_TILESET = 1
AUTUMN_TILESET = 2
WINTER_TILESET = 3
SPRING_TILESET = 4

With that configuration, the plugin will do this with a map that uses tileset with ID 1:
Summer: 1 + 1 = 2 so tileset ID 2 will be used as the summer tileset for the map.
Autumn: 1 + 2 = 3 so tileset ID 3 will be used as the autumn tileset for the map.
Winter: 1 + 3 = 4 so tileset ID 4 will be used as the winter tileset for the map.
Spring: 1 + 4 = 5 so tileset ID 5 will be used as the spring tileset for the map.

You have to make sure to put all the tilesets for the same season at the same distance from the tilesets used to create maps (which should be all of the same season unless you use 4 different tilesets for the seasons) so the plugin can change them correctly.

Hope this helps understand how that part of the plugin works.
 
Back
Top