Help with setting random weather effects outside only

I followed a pretty simple tutorial on how to set up random weather affects that trigger for a day after sleep, I set it up to function along side the bed which also triggers a " grow crops " common event. the common event for weather randomizes a variable between 1-3, ( 1= sunny, 2 = rain, 3 = storm ) only problem is, i can't seem to find a way to turn it off indoors, without also shutting it back off outdoors, once its off, its off, i have no idea how to make it turn back on to whatever weather it just happened to be for the day, the only solutions i can find will shut it off all together, and i don't know how to make it turn back on to whatever the weather randomly set to for that day, so its raining outside, but not inside -3-
If its raining outside, and i turn it off for inside, i want it to still be raining outside when i go back out. that make sense? haha. it seems to be an all or nothing sort of thing and i'm a noob and my brain is goop from working all day ;3;

Also if possible, i was wondering if there was an easier way to set it so sunny is a more common variable? stormy being the least common. i'm not really familiar with how to setup arrays yet on MZ. would i have to set up a single number from 1 - 20 each having its own weather effect and have it randomly generate one of them and have most be sunny? that seems overly convoluted, i'm sure there's gotta be a cleaner more precise way of doing it with variables or something right?

TIA!

For reference, this is the tutorial~
Yup, that absolutely makes sense. I haven't watched the video, but I think I can yet give a good example here:

By the way, I usually use invisible Events with parallel process enabled to make weather effects.

So, when you randomly decide what weather it is, the Eventing should look like this:

Code:
Set Variable "Weather" random 1..3

The Event on your field map should look like this:
Code:
Branch: If "Weather" == 1
  set Weather: none
End Branch
Branch: If "Weather" == 2
  set Weather: raining
End Branch
Branch: If "Weather" == 3
  set Weather: heavy rain
End Branch
Wait 60 Frames
The wait statement is there for performance...

The Event inside a house should look like this:
Code:
Set Weather: none
Erase Event

Now, you can simply change the Variable "weather" and the weather will change on the fields, while it stops raining inside your houses.
I would suggest placing the set weather: none command on the transfer event that goes away from the outer map, just before the transfer command itself.

that not only makes things easier on the other maps, but also keeps the entire weather process and control on the outer map without bothering the house maps itself.
I would suggest placing the set weather: none command on the transfer event that goes away from the outer map, just before the transfer command itself.

that not only makes things easier on the other maps, but also keeps the entire weather process and control on the outer map without bothering the house maps itself.
I did try this, the problem is, once i go back outside again the rain is still turned off lol. I want it so i can go in and out of the building and keep the rain outside on days its randomly generated.

the problem is I don't know how to make it come back on /only/ on the days its been generated on in the first place. I want the weather system to be similar to harvest moon games, where its one type of weather the entire day and it changes randomly when you go to sleep.
the problem is I don't know how to make it come back on /only/ on the days its been generated on in the first place. I want the weather system to be similar to harvest moon games, where its one type of weather the entire day and it changes randomly when you go to sleep.
This is why you want to have Variables, as I already explained above.
I did try this, the problem is, once i go back outside again the rain is still turned off lol. I want it so i can go in and out of the building and keep the rain outside on days its randomly generated.

the problem is I don't know how to make it come back on /only/ on the days its been generated on in the first place. I want the weather system to be similar to harvest moon games, where its one type of weather the entire day and it changes randomly when you go to sleep.
Would it work to create a 2nd variable called environment?
0 = no weather
1 = weather
___don't copy my code. it is just showing the logic__
Branch: If "Weather" == 1
OR If "Environment" == 0
set Weather: none
End Branch
Branch: If "Weather" == 2
AND if "Environment" == 1
set Weather: raining
End Branch
Branch: If "Weather" == 3
AND if "Environment" == 1
set Weather: heavy rain
End Branch
Wait 60 Frames
Would it work to create a 2nd variable called environment?
There doesn't really need to be a second variable if the weather is turned off when transferring to an indoors map, as suggested above.

Also, if you find you're using a variable but only ever setting it to two values, you could just use a switch instead. 😉
Yup, that absolutely makes sense. I haven't watched the video, but I think I can yet give a good example here:

By the way, I usually use invisible Events with parallel process enabled to make weather effects.

So, when you randomly decide what weather it is, the Eventing should look like this:

Code:
Set Variable "Weather" random 1..3

The Event on your field map should look like this:
Code:
Branch: If "Weather" == 1
  set Weather: none
End Branch
Branch: If "Weather" == 2
  set Weather: raining
End Branch
Branch: If "Weather" == 3
  set Weather: heavy rain
End Branch
Wait 60 Frames
The wait statement is there for performance...

The Event inside a house should look like this:
Code:
Set Weather: none
Erase Event

Now, you can simply change the Variable "weather" and the weather will change on the fields, while it stops raining inside your houses.
Wow i'm dumb, probably doesn't help i just woke up lol. I already had those variables setup in the common event that triggered by sleeping, i wasn't quite picking up on how this would KEEP the weather the same outside and not randomly generate it again every time i went outside xD
I didn't think to copy ONLY the branching and NOT the generation code for weather to the doors, while still keeping my common event intact and unedited, called by interacting with the bed.
tsm it was such a simple fix, can't believe i couldn't figure that one out. i have dyslexia and a small brain injury and if ANY small amount of context is missing from an explanation sometimes my brain just doesn't put the pieces together properly. totally not anyone else's fault people explain good enough for most people i'm just dumb with that stuff sometimes lol. thanks again :0

Original thread: https://forums.rpgmakerweb.com/threads/help-with-setting-random-weather-effects-outside-only.166559/