• 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.
Resource icon

Resource [20.1+] Weather System 1.3.10

PattyOChairs

Novice
Member
Joined
Aug 2, 2024
Posts
23
Tried using that script on an event in the dark forest with the zone being "1"

Script error in event 35 (coords 80,26), map 81 (Dark Forest)
Exception: NoMethodError
Message: undefined method `mainWeather' for nil:NilClass

***Full script:
pbWeatherForecast(1)

Backtrace:
[Lin's Weather System] 02 - Forecast.rb:6:in `pbWeatherForecast'
(eval):1:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:1177:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:130:in `block in update'
Interpreter:86:in `loop'
Interpreter:86:in `update'
[Following Pokemon EX] Refresh.rb:268:in `update'
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
Mmm... It seems that the plugin didn't initialize the weather variable for some reason. If you use pbInitializeWeather before the code for the forecast you still get an error?

Also, the problems are on an existing save file, on a new game or both?
 

PattyOChairs

Novice
Member
Joined
Aug 2, 2024
Posts
23
"The weather on the zone has been none, with chance of some places having none, since 15:21. The weather will change at 0:0 to none with chance of none on some places."

I've tried a new game and an existing save

So that gave no errors, meaning the weather isn't being initialized without that script?
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
Is that for one of the maps for Dark Forest or the map for Route 2? If it's for the Dark Forest, it's weird that it picks weather with 0 probability...
 

PattyOChairs

Novice
Member
Joined
Aug 2, 2024
Posts
23
After trying the script again it's the same line but the weather has been storm with chance of some places having storm. The weather will change to none with chance of none on some places.

very strange, because the forest maps should have no chance of storm

Edit: All testing I've posted about is in relation to the forest maps. I have checked route 2, it also has no weather
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
That was an error that someone brought up some updates ago but I thought I solved it. I'll look at it again. But it seems that the plugin is working and picking the weather for the zones, which was my main worry there.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
That is not that weird. The visual display of the weather is only updated when changing maps so if you didn't change maps after forcing the game to create (or update) the weather, it will not display any changes. If your test were of you starting the game on a map and not leaving it, then that would explain why there was no weather being shown (that or you had the luck of the weather chosen to be None).
 

PattyOChairs

Novice
Member
Joined
Aug 2, 2024
Posts
23
Even with a map change I see no weather. Also I'm not sure if this is intended but the weather not changing until midnight is strange, that's 9 hours of the current weather.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
It's sort of intentional. In the configuration file, there is the CHANGE_MIDNIGHT option. If you set it to false, the plugin will use the CHANGE_TIME_MIN and CHANGE_TIME_MAX to choose a random number of hours for the weather to last. You can change those but by default is set to range between 1 and 4 hours.
 

PattyOChairs

Novice
Member
Joined
Aug 2, 2024
Posts
23
Wow you are fast with the fixes, thank you. Unfortunately that doesn't seem to have fixed my issue. I still see rain and snow in the forecast of the forest map
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
Since the problem now is only with the probabilities of the weather, the places where I have to look for that are really small so it's faster to fix. Or to try to, at least.

After checking the fix I did, I noticed that I told the plugin to check the wrong number when looking if the probability was 0. I uploaded it again so check if it fixes it.
 

PattyOChairs

Novice
Member
Joined
Aug 2, 2024
Posts
23
New update doesn't seem to have fixed it, still seeing heavy rain forecast on the map that should only have fog. I also still can't see any of the graphics for weather.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
The heavy rain is on a new game or a save file where you haven't used the pbInitializeWeather yet? If it's on a saved file where you already used it before saving, the forecast will keep mentioning it until you change the map after the weather time limit runs out.

As for the graphics, they should display if you leave and come back to the map (or go to the other forest map). I haven't changed the code for that to happen and I tested it myself a lot of times and it worked every time.

At this point, I would suggest that you upload the game somewhere and send me the link so I can try to find out what is the problem.
 

PattyOChairs

Novice
Member
Joined
Aug 2, 2024
Posts
23
I am using pbInitializeWeather before the forecast in the same event on a new game. I will try to upload the game and get you a link
 

PattyOChairs

Novice
Member
Joined
Aug 2, 2024
Posts
23
Just wanted to mention here I had to delete the "def Encounter_Type" portion of the 02 - encounter code.rb because it was overwriting all my custom encounter types. From what I can tell the Encounter_Type method defined in this plugin is exactly the same as the one in default Essentials, so I don't think it's necessary. I could be wrong, but just wanted to let you know.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
674
Ah, that code is the same as the one that already comes with Essentials v20.1. I think I copied it in case I needed to modify it to add the weather encounters and forgot to delete it when I didn't. Thanks for reminding me! I'll upload the plugin again without that bit of code.
 
Back
Top