New account registration is temporarily disabled.

[RMVX ACE] DAY/NIGHT AND WEATHER SYSTEM

Posts

Pages: 1
Hi I'm relatively new to all this I've started creating a game and had a go at using common event/variables and switches to create a day and night cycle with randomly generated weather patterns. Not having much luck and would really appreciate it if someone could help me out, like a simple step by step guide or something so I can get off and running. Tia
Marrend
Guardian of the Description Thread
21806
I think the way I'd do this is two Common Events. One would probably be set to a Parallel Process that's activated with a switch at the very beginning of the game. It would increment a variable, and go through a number of Conditional Branches to determine the overall tint/lighting of maps. You'd either reset that variable to 0 after a "day" is done, or possibly use the modulus operator (ie: divide by a number, returning the remainder).

The other Common Event might use a different variable, and go through it's own set of Conditional Branches to determine the weather effect. However, I feel this event would have to be expressly called on a by-map basis. Though, weather effects tend to keep running until they are expressly stopped, so you should watch out for that with your map transitions. Or, erase the weather with each map transition, allowing the Common Event to determine if there is one or not?
I have a blank map set up with all my events which I'll be using on a regular basis throughout my game so putting the random weather generator on each map (apart from interiors which will just be to stop the weather effect) so having to do it map to map isn't a problem. Just need help understanding how to write this event out, and when entering an interior then exiting again, or changing maps (exterior) how do i continue the weather to where it left off on previous map? Thanks for reply
Marrend
Guardian of the Description Thread
21806
Well, I don't know if you can continue a weather effect animation at the express moment it stopped. At least, not within the context of typical event-commands. Maybe with scripting, but, I personally wouldn't feel it's worth messing with. If you're talking about re-applying the weather effect after going back outdoors, though, that shouldn't bee that much of a problem?

Like, the thought in my head is to switch off the weather effect with each map transition. As I may have mentioned before, whenever you set up an event that does a map transition, you place a "Weather Effect - none: 0 frames" event-command, then use the Transfer Player event-command. Let the Common Event dictate if there is a weather effect on the map.


As for the actual Common Event to determine the weather effect, that can vary greatly. For starters, I would probably only set the weather variable once per in-game day. The Weather Effect event-command, itself, has four basic weather types that it can animate, None, Rain, Storm, Snow, with the latter three allowing degrees of power/intensity. So, how much you want to vary your weather effects will determine how many Conditional Branches you're going to have to make. Perhaps, as a test, you'd only set four: one for each basic weather type, setting the intensity value to, I dunno, 3, when it's relevant. The event-code might look something like...


CONDITIONAL BRANCH: Variable [0001: num] == 0
SET WEATHER EFFECT: None @0 frames, wait
CONDITIONAL BRANCH: Variable [0001: num] == 1
SET WEATHER EFFECT: Rain (Power 3) @0 frames, wait
CONDITIONAL BRANCH: Variable [0001: num] == 2
SET WEATHER EFFECT: Storm (Power 3) @0 frames, wait
CONDITIONAL BRANCH: Variable [0001: num] == 3
SET WEATHER EFFECT: Snow (Power 3) @0 frames, wait


...this.
Thanks for the help everyone just need a hand sorting the weather when leaving an interior map. I know how to stop all weather and effects and sounds ect upon entering but when exiting I would like the weather to pick up where it was before going inside. Tia
Marrend
Guardian of the Description Thread
21806
author=Russthehustler, emphasis mine
I know how to stop all weather and effects and sounds ect upon entering but when exiting I would like the weather to pick up where it was before going inside.

Didn't I already answer this?

author=Marrend
Like, the thought in my head is to switch off the weather effect with each map transition. As I may have mentioned before, whenever you set up an event that does a map transition, you place a "Weather Effect - none: 0 frames" event-command, then use the Transfer Player event-command. Let the Common Event dictate if there is a weather effect on the map.

Maybe I wasn't quite clear on this point.


# Transfer to outside event
SET WEATHER EFFECT: None @0 frames, wait
CALL COMMON EVENT: Weather effect
TRANSFER PLAYER: [map_id: "Map_Name"], (X, Y), Retain facing
# The above event-code would need to be altered with actual values for where you're teleporting to.

# Transfer to indoor map
SET WEATHER EFFECT: None @0 frames, wait
TRANSFER PLAYER: [map_id: "Map_Name"], (X, Y), Retain facing
# The above event-code would need to be altered with actual values for where you're teleporting to.


#Common event: Weather effect
CONDITIONAL BRANCH: Variable [0001: num] == 0
SET WEATHER EFFECT: None @0 frames, wait
CONDITIONAL BRANCH: Variable [0001: num] == 1
SET WEATHER EFFECT: Rain (Power 3) @0 frames, wait
CONDITIONAL BRANCH: Variable [0001: num] == 2
SET WEATHER EFFECT: Storm (Power 3) @0 frames, wait
CONDITIONAL BRANCH: Variable [0001: num] == 3
SET WEATHER EFFECT: Snow (Power 3) @0 frames, wait

*Edit: This would likely be the bare-bones of it, I think.

*Edit2: I'm also largely assuming...

author=Marrend
...I would probably only set the weather variable once per in-game day.

...that the "weather variable" is "rolled" once per in-game day.
But that won't allow the weather to pick up where it left off will it? I want it so that if it's raining and you go inside, it's raining still when you come back out... If it's sunny when you go in, it's sunny when you come out?
Marrend
Guardian of the Description Thread
21806
I'm mostly sure doing it this way would have the weather effect would re-apply after going back outside. Like, you can test it yourself. If you have a blank map set aside to for testing purposes, use it! Setup an even that RNGs the "weather variable" and few transfer events!

Just remember to reset the player starting position to be where it's supposed to be when you release the game to the public!
Pages: 1