Some weather-related questions.

Okay, I have a couple of question related to weather I was hoping I could get some input on.

Firstly, I was wondering if anyone could offer some help into a problem I've having with a thunderstorm event I've been working on. The problem is that for some reason, the player is unable to move for a period of time after the storm starts, seemingly until there is a flash of lightning on the screen, at which that point the player is able to move again.

[Edit: I can't seem to get the linked screenshot showing the thunderstorm event to appear, so I've had to post a written version instead of the event instead. I hope this works as a substitute.]

Name: Weather: Thunderstorm*
Trigger: Parallel
Switch: 0024 Weather: Thunderstorm
  • Tint Screen : (-68,-68,-68,0), 1 frame
  • Set Weather Effect : Storm, 9, 10 frames
  • Play BGS : Rain4 (100, 100, 0)
  • Control Variables : #0005 Thunder = Random 1..3
  • If : Thunder = 1
· Wait : 100 frames
· Flash Screen : (255,255,255,255), 10 frames
· Play SE : thunder (90, 100, 100)
·

: Else
· If : Thunder = 2
· Wait : 250 frames
· Flash Screen : (255,255,255,255), 10 frames
· Play SE : thunder (90, 100, 100)
·

: Else

· If : Thunder = 3
· Wait : 300 frames
· Flash Screen : (255,255,255,255), 10 frames
· Play SE : thunder (90, 100, 100)
·

: Else
·

: End
·

: End
·

: End
·

The second question I have is how to make it so that weather effects can influence elemental damage in battle (i.e. rain strengthens lightning & water-based attacks but weakens fire attacks). I've been using Yanfly's Element Core plugin, as I mentioned here, but I'm not sure how to go about implementing such a thing.

Any help on either of these issues would be greatly appreciated.
I cannot see any images, but from your description it sounds like you have an event set to autorun rather than parallel process.

You could probably set a variable to what type of weather you have, then use that variable to influence the damage for each skill.
I cannot see any images, but from your description it sounds like you have an event set to autorun rather than parallel process.
I don't why the images aren't showing up, so I decided to include a written version, hoping that will help instead. As for the event itself, is a parallel process and not a autorun.

You could probably set a variable to what type of weather you have, then use that variable to influence the damage for each skill.
Unfortunately, I have no idea how to go about doing that, my knowledge of the more complex uses of variables is very limited.
You only have one page on the event? If not, what is on the next page?

As it's a parallel process event, you only need it to run once each time the map loads, not repeatedly. So at the very end of all the commands you've got there, add an Erase Event command.

See if that fixes thing. If it doesn't, check if you can change directions or access the menu during the period the player can't move. If you can't do either, it is very definitely an autorun event that's causing the problem. What other events do you have on your map, or in Common Events, that are set to autorun?

Can't offer you more help with the battle thing - I don't have a lot of experience with battle stuff, especially with battle plugins.
As it's a parallel process event, you only need it to run once each time the map loads, not repeatedly. So at the very end of all the commands you've got there, add an Erase Event command.
Okay, I think I implemented this correctly, you did mean add Erase Event after each instance of : End, right? Anyways, it only ended up erasing the test event I was using to call upon the Weather: Thunderstorm* common event and didn't fix the temporary unresponsiveness.

See if that fixes thing. If it doesn't, check if you can change directions or access the menu during the period the player can't move. If you can't do either, it is very definitely an autorun event that's causing the problem. What other events do you have on your map, or in Common Events, that are set to autorun?
I checked, and you cannot change directions or access the menu during the period when the player cannot move. I'm not sure why this happening, as the thunderstorm event itself is a Common Event set to Parallel Process and there is not a single autorun event currently in any map within my project, nor within the Common Events. The aforementioned test event I used to summon the thunderstorm is set as triggered by the Action button and not autorun, so once again I'm at a loss as to why is problem is occurring.
No, I meant to put Erase Event at the very bottom of your event - after ALL the commands. However, that's only for a map event. If this is a parallel process event, you'd probably want to turn the switch off that's activated it. Otherwise it's just going to keep running over and over until that switch gets turned off, and it doesn't need to - is going to cause lag.

Okay - if you can't change directions or access the menu, you have an autorun event somewhere. Maybe check the event that turns on the thunderstorm switch - what does that look like? If it has multiple pages, and a different page is activated after the event is triggered, that's a good candidate. It will likely be an event with an Autorun trigger, with no commands.
If you can not change directions, then that means there is an active autorun.
And if that event is parallel process, then you're looking at the wrong event for that problem.

Please search the map and the common events for all autorun events, one of them activates at the same time and causes this.
If you can not change directions, then that means there is an active autorun.
And if that event is parallel process, then you're looking at the wrong event for that problem.

Please search the map and the common events for all autorun events, one of them activates at the same time and causes this.

I looked and I looked, but I couldn't find any autorun events in any my maps. As for the Common Events, of the twelve events that I currently have, all but one of them have no triggers whatsoever and the one that does is the Thunderstorm event which is triggered via Parallel process.

As an experiment I tried creating a new map consisting nothing but a floor, the player character, and an Action-button triggered event that activates the Thunderstorm common event. The same problem cropped up despite there being nothing else on the map but the player character and the Action-button triggered event.

I even created a entirely new project and tried importing the Thunderstorm event to see what would happen, and the exact same problem once again reared its ugly head despite there only being one Action-button triggered event and Parallel triggered Common Event in the entire project.

I would have to conclude based on my findings thus far, that whatever is causing the problem isn't related to the autorun trigger. If its not autorun trigger causing the issue then what is? Well, my second thought was that it might be related to the Parallel process of the Thunderstorm Common Event's trigger function, so I tried changing the trigger for the event to None to see what would happen. Once again as with past attempts, the player character was unable to move for a period of time, with the only difference being that the cycle of flashing lightning & thunder were absent when the trigger was set to Parallel process.

UPDATE EDIT:
I've finally found the source of the problem. Just as I thought, it wasn't an autorun process causing the problem, but rather the real culprit all along was the Call Common Event function. Once I removed and replaced it with a switch to trigger the thunderstorm instead, the problem went away and everything is now working as it should.
An autorun event is the only thing that I have ever seen on these forums that has caused this kind of problem. Strange that it happens in a brand new project. If it happens on multiple maps, even those with no other events, that points to a common event. Please check them all again - especially those with no commands - and see if ANY of them have an autorun trigger and could have the switch turned on.

What version of MV do you have? Might be worth seeing if there's an update (if you're on Steam, do you get updates automatically or have you turned them off? If you're on standalone, have you downloaded the latest update and have you also copied across the appropriate files into your current projects folders?)

Have you done anything with any of your audio resources? I wonder if it could just be taking a while to load the thunderstorm audio and freezing everything up?


mmm ... if you disable your thunderstorm common event and it still happens, then probably not the resource, and definitely not that common event. DO you have any plugins?
An autorun event is the only thing that I have ever seen on these forums that has caused this kind of problem. Strange that it happens in a brand new project. If it happens on multiple maps, even those with no other events, that points to a common event. Please check them all again - especially those with no commands - and see if ANY of them have an autorun trigger and could have the switch turned on.
As I said before there simply aren't any autorun events in my project, because so far I haven't had any reason to use one. Also the new project I created to test the problem consisted solely of an empty, 17 by 13 map and a single Action-triggered event to call the thunderstorm event, and that project also manifested the same problem as my main one until I replaced the Call Common Event function with a switch.

What version of MV do you have? Might be worth seeing if there's an update (if you're on Steam, do you get updates automatically or have you turned them off? If you're on standalone, have you downloaded the latest update and have you also copied across the appropriate files into your current projects folders?)
I currently have version 1.5 installed with Yanfly's RPG Maker MV 1.5.1 – Yanfly Desktop Optimized Version Update and I usually have Steam in offline mode since my brother tends to play games on his computer more often than I do on my computer.

Have you done anything with any of your audio resources? I wonder if it could just be taking a while to load the thunderstorm audio and freezing everything up?


mmm ... if you disable your thunderstorm common event and it still happens, then probably not the resource, and definitely not that common event. DO you have any plugins?
Not particularly, I did use imported audio files in my main project for the rain and thunder sound effects, and does have a lot of plugins, but as I stated above, the project I created solely to test the problem manifested the same error, and it used nothing but the default resources and not a single plugin.
You don't have any other plugins at all?

Would you care to zip up your project (exclude audio and image resources if you're only using the defaults) and put it on dropbox? I can take a look at it and see if I can figure it out. I've run out of likely causes as well as guesses - only way to figure it out now, for me, is some good old debugging, and that's not something I can walk you through.


Actually, there is one more thing you can try. Use a different switch for the common event and to turn on in the event that triggers it. Use a switch far, far away from any you've used before - one with a much higher number - to make sure it's not being used by anything else.
You don't have any other plugins at all?

Would you care to zip up your project (exclude audio and image resources if you're only using the defaults) and put it on dropbox? I can take a look at it and see if I can figure it out. I've run out of likely causes as well as guesses - only way to figure it out now, for me, is some good old debugging, and that's not something I can walk you through.


Actually, there is one more thing you can try. Use a different switch for the common event and to turn on in the event that triggers it. Use a switch far, far away from any you've used before - one with a much higher number - to make sure it's not being used by anything else.

Actually I fixed the problem yesterday, I'm not sure if you missed the update I made four posts up:

UPDATE EDIT:
I've finally found the source of the problem. Just as I thought, it wasn't an autorun process causing the problem, but rather the real culprit all along was the Call Common Event function. Once I removed and replaced it with a switch to trigger the thunderstorm instead, the problem went away and everything is now working as it should.

As stated above, the problem was fixed when I removed the Call Common Event function and replaced it with a switch instead. As to why the Call Common Event function was causing problems, I have no idea why, just that using a switch to call the Common Event instead doesn't cause any momentary loss of control.

Now the only issue is whether or not I should replace the other Call Common Event functions for the other weather effects I've made as well. None of the other ones I've tested have shown any problems whatsoever, so I'm not sure if its completely unnecessary or if I should do it anyways just to be on the safe side in case that it does cause problems later on.
There is an other thing that might be involved here.

Call common event should only be targeted at common events that have no trigger, but I learned a while ago that under MV it is possible to call common events that are set to autorun or parallel process. But if you do that, strange effects may appear.
Is it possible that the CE you originally tried to call had a trigger?
There is an other thing that might be involved here.

Call common event should only be targeted at common events that have no trigger, but I learned a while ago that under MV it is possible to call common events that are set to autorun or parallel process. But if you do that, strange effects may appear.
Is it possible that the CE you originally tried to call had a trigger?

Yes, the Thunderstorm Common Event is set as a Parallel trigger in order for the cycle of lightning & thunder effects to work properly. Turning off the Parallel trigger results in the cycle of effects running once and then never repeating the cycle.

I tried turning off the trigger and simply using Call Common Event function to initiate the event, resulting in the player being unresponsive for a period of time until there is a flash of lightning, in addition to the effects cycle not working properly.

The only way I've found so far for the whole thing to work is to have it set as a Parallel Process trigger called by a switch. None of the other weather effects I've made so far have had the the same problem. I'd guess the reason why is related to the fact that the other weather effects are no where near as complex as the thunderstorm event, they generally just change the screen tint, use the Set Weather Effects function, and play BGSes. The thunderstorm weather effect on the other hand requires the use of sound effects, variables, the Wait function, and conditional branches for the whole thing to work. In particular, since the unresponsiveness only lasts until the lightning & thunder effects are triggered, that the problem originates from the Wait function used to space out the periods between flashes of lightning. I can't say for certain, as I'm not really a big technical guy, but it's the best guess I can make given the variables at play.

Of course, for me none of this really a big deal, as simply triggering the event via switch as an alternative to the Call Common Event works perfectly fine, with no noticeable issues so far.

As for the second question of my initial post, there aren't any plugins that one can use to alter elemental damage via Common Event or anything else like that?

Original thread: https://forums.rpgmakerweb.com/threads/some-weather-related-questions.87734/