• 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

gamemonkei

Novice
Member
Joined
Dec 31, 2022
Posts
12
Hello again! I'm sure this is a simple answer question but, I purposely didn't define a map in the zones because I wanted it to have a 100% defined weather (sandstorm) for example in map_metadata I did Weather = Sandstorm,100 and when loading the game in that area, nothing happens. How would I get this to work without interfering with the plugin?
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Well, an option is to give that map its own zone and have sandstorm as the only possible weather for it. I'm not sure why the map's metadata is ignored if a map isn't in a zone but I'll take a look at it.

Edit: ok, I think the problem is because I force the weather to be None if a map isn't in a zone (to clear the weather of another map in a zone) when entering another map. The problem should be solved if I delete those parts but in any case, like I said, you can have a zone be a single map and have it only have one weather for any season.
 
Last edited:

gamemonkei

Novice
Member
Joined
Dec 31, 2022
Posts
12
Well, an option is to give that map its own zone and have sandstorm as the only possible weather for it. I'm not sure why the map's metadata is ignored if a map isn't in a zone but I'll take a look at it.

Edit: ok, I think the problem is because I force the weather to be None if a map isn't in a zone (to clear the weather of another map in a zone) when entering another map. The problem should be solved if I delete those parts but in any case, like I said, you can have a zone be a single map and have it only have one weather for any season.
No worries at all. I found solution. There was an event in the Base Pokeessentials that has an NPC that forces the weather to change via a script. It works while the plugin is active as well. Thanks for the quick reply!
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Well, yes, it works because my plugin only checks and forces weather when the map is loaded. So, if you force weather in an event, it will overwrite the one forced by my plugin.

Also, commenting (or deleting) line 15 of 01 - Main Code/03 - Handler maybe makes the weather in the map metadata to work, since that is the line that forces the weather to be none if the map isn't in a zone (which I think isn't necessary and could be the cause of your problem).
 

Willix

Novice
Member
Joined
Feb 7, 2024
Posts
42
Hey, great plugin, I've set up my zones and everything seems to work fine, but I just can't find the graphics for the weather display on Town Map. Are they not included in the download zip for any reason? Where can I get them?
 

Willix

Novice
Member
Joined
Feb 7, 2024
Posts
42
Thanks, now it works perfectly! One more thing though, I was tinkering with the forecast script and found that because of the downcase method, the text is not translated when showing the message. I've tried to include both capitalized and downcased versions of the text to the translating file but it is not working. Do you happen to know how to fix it?
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
How did you try to add the capitalized and downcased versions? If you duplicate the WEATHER_NAMES hash, you have to give one of the two a new name (it can be as simple as adding another letter or symbol) or they will overwrite each other. Then you have to call the hash you want to take the names from.

In configuration:
Ruby:
Expand Collapse Copy
  WEATHER_NAMES = {
    :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")
  }

  WEATHER_NAMES_DOWNCASE = {
    :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")
  }
The forecast:
Ruby:
Expand Collapse Copy
def pbWeatherForecast(zone)
  weatherNow = WeatherConfig::WEATHER_NAMES_DOWNCASE[$WeatherSystem.actualWeather[zone].mainWeather]
  weatherNow2 = WeatherConfig::WEATHER_NAMES_DOWNCASE[$WeatherSystem.actualWeather[zone].secondWeather]
  weatherNext = WeatherConfig::WEATHER_NAMES_DOWNCASE[$WeatherSystem.nextWeather[zone].mainWeather]
  weatherNext2 = WeatherConfig::WEATHER_NAMES_DOWNCASE[$WeatherSystem.nextWeather[zone].secondWeather]
  weatherStart = $WeatherSystem.actualWeather[zone].startTime
  weatherEnd = $WeatherSystem.actualWeather[zone].endTime
  pbMessage(_INTL("The weather on the zone has been {1}, with chance of some places having {2}, since {3}:{4}.", weatherNow, weatherNow2, weatherStart.hour, weatherStart.min))
  pbMessage(_INTL("The weather will change at {1}:{2} to {3} with chance of {4} on some places.", weatherEnd.hour, weatherEnd.min, weatherNext, weatherNext2))
end
 

Willix

Novice
Member
Joined
Feb 7, 2024
Posts
42
I tried as you suggest but no luck, it just does not translate any of the weather variables defined in pbWeatherForecast, although it does translate the message itself. If I can't do it properly I guess I'll just type the translated words directly inside the _INTL clauses
 

Willix

Novice
Member
Joined
Feb 7, 2024
Posts
42
The new update works fantastic, thanks for being so quick with it. Now it is translated and everything is ok. Thanks again 😄
 

Willix

Novice
Member
Joined
Feb 7, 2024
Posts
42
Hey, it's me again, sorry to bother you 😅. I just think I don't understand how weather substitution works. I'm trying to have a specific map inside a zone have storm when the rest of the zone has rain or heavy rain, but I am not able to make it work, it rains on the map too. The weather forecast seems to detect the secondary weather (it says chance of storm in some areas) but when I go to the map or look it in the Town Map, the weather is the same as the rest of the zone. It also happens for the other maps that I want to have sun instead of storm in another zone. This is what I have:
tktZpzy.png
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
First, I'm surprised you aren't getting any error for having a "," at the end of each array.

Second, the problem is only the weather display on the Town Map? The weather on the overworld are the ones that should be? I'll look at the code for the weather display on the town map but I want to know if I have to look at the code for the overworld as well.

Edit: the maps ID you added on the MAPS_SUBSTITUTE are the ones that will display the secondary weather on the zone? If you change it to "exclude", does it solve the problem? I'll reupload the plugin with a description of what "exclude" and "include" implies here, but I want to know if it's merely a problem of confusion or if I have to fix something within the code.
 
Last edited:

Willix

Novice
Member
Joined
Feb 7, 2024
Posts
42
First, I'm surprised you aren't getting any error for having a "," at the end of each array.

Second, the problem is only the weather display on the Town Map? The weather on the overworld are the ones that should be? I'll look at the code for the weather display on the town map but I want to know if I have to look at the code for the overworld as well.

Edit: the maps ID you added on the MAPS_SUBSTITUTE are the ones that will display the secondary weather on the zone? If you change it to "exclude", does it solve the problem? I'll reupload the plugin with a description of what "exclude" and "include" implies here, but I want to know if it's merely a problem of confusion or if I have to fix something within the code.
The problem is both the display on the Town Map and the weather itself in the overworld. All the maps in the zone have rain or heavy rain, even the one I want to have storm instead (map 5, in the MAPS_SUBSTITUTE array in this case). Changing it to "exclude" did nothing, it also makes all maps have the same weather.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Oh, wait, I see what the problem is. In the MAPS_SUBSTITUTE, you don't use the secondary weather. The code uses the primary weather to see if a map should not have the primary weather (exclude) or if it is the only map in a zone with that weather (include). So, you should change it to something like this:
Ruby:
Expand Collapse Copy
  MAPS_SUBSTITUTE = {
    #:Snow => ["exclude", 1, 4],
    #:Blizzard => ["exclude", 1, 4],
    #:Sandstorm => ["include", 5]
    :Rain => ["exclude", 5],
    :HeavyRain => ["exclude", 5],
    :Storm => ["exclude", 59, 60, 127]
  }

I'll add the explanation to the configuration file so people can understand how to configure it. I don't know why I didn't include it before.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Hey, it's me again, sorry to bother you 😅. I just think I don't understand how weather substitution works. I'm trying to have a specific map inside a zone have storm when the rest of the zone has rain or heavy rain, but I am not able to make it work, it rains on the map too. The weather forecast seems to detect the secondary weather (it says chance of storm in some areas) but when I go to the map or look it in the Town Map, the weather is the same as the rest of the zone. It also happens for the other maps that I want to have sun instead of storm in another zone. This is what I have:
tktZpzy.png
Also, the zone for map 86 has one less 0 in the summer probabilities. You may want to fix that unless you are fine having sandstorms while having no sun on summer for that zone.
 
Back
Top