• 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
LinKazamine submitted a new resource:

[20.1+] Weather System - Add weather that changes over time in your game

Compatibility
The plugin has been tested to work in both v20.1 and v21.1 of Pokémon Essentials. It has also been tested to work with Unreal Time System plugin.

I made this plugin after Zaldar asked for some help with some trouble adding weather to his game. My weather system, unlike what I understood theirs does, works with time.
The weather will update automatically when changing maps (only on outside maps) if a certain amount of...

Read more about this resource...
 

Jedahjony

Novice
Member
Joined
Aug 27, 2023
Posts
40
Hi, Lin!!
I'm getting an error when the weather change!

205 - 01 -Main.rb
secondType = pbValidSecondWeather(i, mainType)

"i" is not defined.
I guess it must be "zone", isnt?
secondType = pbValidSecondWeather(zone, mainType)
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Yes, it should be "zone". I copied the code from further up in the code, where the zone was defined in "i" instead.

Thank you for noticing!
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
As far as I know, the code that sets the weather only allows one at a time. It's the same code that one of the NPC in route 7 of vanilla Essentials uses to put some weather.
 

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
129
Thanks for your plugin! Unfortunately, I encounter the following error right after I started a new game and went through the tutorial dialogue (right before being transferred to the starting map):

Code:
Expand Collapse Copy
=================

[2023-10-18 17:14:57 +0200]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `gsubPN' for #<Game_Map>

Backtrace:
091:Messages:266:in `pbGetMapNameFromId'
042:Game_Map:102:in `name'
246:Overworld_RoamingPokemon:96:in `block in <main>'
035:Event_Handlers:89:in `block in trigger'
035:Event_Handlers:89:in `each_value'
035:Event_Handlers:89:in `trigger'
036:Event_HandlerCollections:63:in `trigger'
044:Game_MapFactory:147:in `setMapChanged'
044:Game_MapFactory:26:in `setup'
032:Scene_Map:72:in `transfer_player'
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Why do you think it's because of my plugin? It's not even mentioned in the backtrace. And it doesn't make use of "PbGetMapNameFromId" or "gsubPN".
 

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
129
I made a backup of my game to test your plugin. I was also confused why it does not show in the backtrace and thought maybe you have an idea what could cause this. It COULD also be caused by the "Weather Encounter" plugin that I installed together with your plugin, however I isolated them both after this error occured and it still happened. I might have to dive a little deeper. I am using a lot of plugins and maybe some things are weirdly intersecting.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Well, I would suggest testing both of those plugins alone. I don't think the problem comes from my plugin, at least not on its own. I tested it a lot to have it working, and I never got this error. It could be a compatibility issue, tough.
 

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
129
Yeah I will have to test it a bit after I am done with some other stuff - thank you for your quick feedback! I just wanted to bring it up in case it helps you make the plugin better and/or you have a quick idea in mind where this error might come from :)
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
The Weather Encounters plugin you mentioned could be this one by any chance?
Weather Encounters Plugin

If it is, the problem could be that it's for Pokemon Essentials v19.1 and is not compatible. There are plugins that are compatible with multiple versions of Pokemon Essentials because they add or touch things that aren't changed between those versions but I think that encounters were changed between v19.1 and v20.1.
 

OkunoShio

Cooltrainer
Member
Joined
Oct 22, 2022
Posts
129
Yes that is the one! I read in the discussion section that it should be compatible with v20.1 by deleting the "encounter chance" line from every new encounter, though.

I made a new backup of my project to test your plugin again - and this time it worked flawlessly! I think the issue came from my old save file that was still located in my folder. The first time I tested (with both plugins installed), it told me my the save is corrupt, and I suppose this messed up something somehow, which was still messed up after I removed the save file from the folder.

Only after I now also install the Weather Encounter Plugin, I get the following error

Code:
Expand Collapse Copy
[2023-10-19 17:11:28 +0200]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `[]' for nil:NilClass

Backtrace:
[Lin's Weather System] 01 - Main.rb:89:in `pbValidSecondWeather'
[Lin's Weather System] 01 - Main.rb:138:in `block in pbInitializeWeather'
[Lin's Weather System] 01 - Main.rb:118:in `each'
[Lin's Weather System] 01 - Main.rb:118:in `pbInitializeWeather'
[Lin's Weather System] 03 - Handler.rb:16:in `block in <main>'
035:Event_Handlers:89:in `block in trigger'
035:Event_Handlers:89:in `each_value'
035:Event_Handlers:89:in `trigger'
036:Event_HandlerCollections:63:in `trigger'
044:Game_MapFactory:147:in `setMapChanged'

I suppose at this point there IS a compatibility issue somewhere (that has nothing to do with your plugin though).
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
683
Well, if it worked before without problems, yes, it's a compatibility issue. Don't know why, though, since I don't touch encounters and that plugin shouldn't conflict with overworld weather.
 
Back
Top