Issue regarding plugin commands/plugin script calls in common events.

Hello everyone! My issue today is regarding an error I'm having in regards to Moghunter's Weather EX plugin and (maybe) Yanfly's Engine Core.

IMPORTANT CONTEXT: I'm making a Stardew Valley inspired project (with heavy rpg elements) AND instead of using time plugins, I use common events, variables and switches for my time and weather systems. (I prefer it this way since, even if it's more work, I get to have a lot more control over everything that happens in my project) I had a similar error occur when using Galv's Tools plugin (which was solved by transfering my project to a blank one and manually transfering all my common events).

However, now that the issue happened again, I decided that, before I try to transfer my project again, I will try to get some help from the community!

The problem itself: I got MOG's WeatherEx plugin, since I want to use custom particles for a polen/fallen leaves effect. In my project, in a common event that shows weather effects, if Weather (Clima) Variable's value is ≥ 61 and ≤ 80, means it's a windy/polen weather, so I use WeatherEx's plugin command to show the particles.

I set it all up nicely in my common event and run the project to test and I get this error:

Spoiler
CommonEventProblem_5.PNG

CommonEventProblem_6.PNG

I realized that, a similar error ocurred when I was implementing Galv's Tools and Crops plugin, a few days ago when implementing a farming/mining/etc system. This is the error I got when using Galv's Plugin (which was solved by transfering my project to a blank one):

Spoiler
CommonEventProblem_7.PNG

CommonEventProblem_8.PNG

I realized both errors seem to involve Reserved Common Events, I have very little coding knowledge, however I do understand that if a property is reserved it cannot be accessed by other scripts. Is this what's causing the issues?

I am using MOG's WeatherEX plugin command in a common event:

Spoiler
CommonEventProblem_1.PNG
CommonEventProblem_2].PNG

And Galv's Tools and Crops Plugin, requires common events to work:

Spoiler
CommonEventProblem_9.PNG

This is my plugin list:

Spoiler
CommonEventProblem_3.PNG
CommonEventProblem_4.PNG

If anyone can help me solve this and/or find alternative plugins or give me directions, I would be very grateful. I am willing to share my project folders to anyone interested in helping me solve this issue.

Thank you so much in advance to anyone who can help me with this. <3
I realized both errors seem to involve Reserved Common Events
Not really. The Galv error looks like it might be calling an event that isn't valid. The Mog error has nothing to do with that, except insofar as the plugin command is in an event - it's saying it's being told to reference the mode of a weather data that doesn't exist.

For one thing, you probably shouldn't be typing the % there. The instructions say that number is a percent, but if you look at the examples in the documentation there's no percent symbol. That could be screwing up the command parser.

You also appear to be missing the first colon after the word "weather." Compare your syntax to the example in the documentation:
Code:
weather 2 : 0 : 100 : 100% : 0 : Leaf_04A
Code:
weather : 0 : 0 : 40 : 1 : 0 : Leaf_02B

So try fixing your syntax and see if it still produces an error.
Not really. The Galv error looks like it might be calling an event that isn't valid. The Mog error has nothing to do with that, except insofar as the plugin command is in an event - it's saying it's being told to reference the mode of a weather data that doesn't exist.


For one thing, you probably shouldn't be typing the % there. The instructions say that number is a percent, but if you look at the examples in the documentation there's no percent symbol. That could be screwing up the command parser.

You also appear to be missing the first colon after the word "weather." Compare your syntax to the example in the documentation:
Code:
weather 2 : 0 : 100 : 100% : 0 : Leaf_04A
Code:
weather : 0 : 0 : 40 : 1 : 0 : Leaf_02B

So try fixing your syntax and see if it still produces an error.
Thank you for the quick Reply!

I’m glad the errors occur for different reasons! (And also, thank you for addressing my concern and clarifying my misunderstanding)

I removed the % and added the weather syntax from my plugin command before posting here, I realized the typo when taking the screenshot, and it still produces the error from the post’s screenshot.
Okay...well, the error is essentially saying that there is no weather ID 2.

During the game, you can do a quick check by pressing F8, go to the Console tab, and paste this in:
Code:
$gameSystem._weatherEX_Data.length
see how many weather types it thinks it has defined.
Okay...well, the error is essentially saying that there is no weather ID 2.

During the game, you can do a quick check by pressing F8, go to the Console tab, and paste this in:
Code:
$gameSystem._weatherEX_Data.length
see how many weather types it thinks it has defined.
Hey! Sorry it took me some time to reply. I did what you asked and this is what I recieved:

CommonEventProblem_10.PNG
Hey! Sorry it took me some time to reply. I did what you asked and this is what I recieved:

View attachment 246277
I'm not sure what's causing your error, but just to clear up a misunderstanding from your earlier posts: a reserved common event is *not* the same thing as a reserved property in Javascipt. Reserving a common event is just the engine's terminology for "okay, we've flagged this common event to run as soon as the interpreter isn't busy with other stuff".

Javascript also doesn't really have "reserved" properties. The closest thing I can think of is the concept of using reserved keywords as property names, which is still something you can do.
I'm not sure what's causing your error, but just to clear up a misunderstanding from your earlier posts: a reserved common event is *not* the same thing as a reserved property in Javascipt. Reserving a common event is just the engine's terminology for "okay, we've flagged this common event to run as soon as the interpreter isn't busy with other stuff".

Javascript also doesn't really have "reserved" properties. The closest thing I can think of is the concept of using reserved keywords as property names, which is still something you can do.
Thank you for the clarification! I was looking at it with C# lens lol

I don’t know much about javascript and I don’t have much time to learn. So, it’s nice to know about these!
Hello! I've found the solution:

1670196023496.png


In the end, it was all a typo, I simply didn't add the ":" before "weather", now it works just fine.

Remember: ALWAYS check if you've written things correctly.

1670196144527.png


The plugin works just fine!
In the end, it was all a typo, I simply didn't add the ":" before "weather", now it works just fine.

Remember: ALWAYS check if you've written things correctly.
For what it's worth...I did mention that in my first reply to you 🙄

You said you'd fixed it but didn't provide an updated screenshot.

So I think the takeaway is always check you've written things correctly and make sure the information you're providing for troubleshooting is accurate 🤣

I'm glad you got it to work!

Original thread: https://forums.rpgmakerweb.com/threads/issue-regarding-plugin-commands-plugin-script-calls-in-common-events.152974/