Multi Layer Fog

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,120
Reaction score
11,479
First Language
English
Primarily Uses
RMVXA
Thanks for the fix, works for me too.

To see the problem, if you look at the video at e.g. 0.23-0.27 you will see the cloud moving from left to right over the roof.  The sprite changes direction and you can see the cloud is now moving from right to left.  It's even clearer around 0.33 where you can see the cloud reverse direction so that the roof is no longer covered with cloud.  In that section it's also easier to see that when the sprite moves from left to right (i.e. the same direction as the cloud), the cloud covers the roof more quickly because it is combining the speed of the sprite with the speed of the cloud movement itself.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,674
Reaction score
13,298
First Language
English
Primarily Uses
RMMV
That's interesting ... it looks almost like what happens to me sometimes when I've used a script call to change the screen size, but haven't changed the map accordingly. But that is not the same problem I was describing above, and is not quite what you originally described either - from your description I got the impression that it ALWAYS does it.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,120
Reaction score
11,479
First Language
English
Primarily Uses
RMVXA
 from your description I got the impression that it ALWAYS does it.
Yes it did, insofar as it always stuck with the player when moving left or right.  It also stuck when moving up and down before the partial fix.

EDIT

Post #32 on the previous page describes what was happening very clearly, probably more clearly than I did.
 
Last edited by a moderator:

Candacis

Pixel Pusher
Restaff
Joined
May 2, 2012
Messages
1,529
Reaction score
2,182
First Language
German
Primarily Uses
For me it doesn't matter if I look veery closely, that the fog is still moving. You may be right and it is no problem at all, but that the fog "seems" to be sticking with the player, irritates me a lot and I fear my players would irritate it, too. No matter if the fog is moving independently, for me it just doesn't look that way with the slow moving fog. Fog should add a bit of depth and light variance to a game, but it shouldn't distract from the actual game. It should feel natural. Even if the updated version isn't natural, for me it does the trick.

But in the end, it comes down to personal taste. So thanks for the alternate version and I think, we'll leave it at that :)

Maybe it is like this illusion picture. Some people see a duck, some people see a rabbit. Nothing wrong with both, just personal preference ^^
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,120
Reaction score
11,479
First Language
English
Primarily Uses
RMVXA
Different question altogether.

If I have read the script correctly, the choice of having fogs show in battle is a global choice i.e. all or nothing.  Is that correct?  If that isn't correct, then I can't work out how to make it selective.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,674
Reaction score
13,298
First Language
English
Primarily Uses
RMMV
Yes, it's all battles or no battles.


If you wanted to do a bit of modding, you could probably make it dependent on a switch (you'd have to change the logic though, as switches don't exist at the time the current logic checks).


Or, if you want the fog on the map to be brought through to most battles, but the ones where you DON'T want the fog showing are called by events, you could just remove the fog (or change the opacity to 0) prior to the Battle Processing command, and change it back again immediately after. Might be worth experimenting that way a bit, if it suits those particular battles, before looking at script changes.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,120
Reaction score
11,479
First Language
English
Primarily Uses
RMVXA
Or, if you want the fog on the map to be brought through to most battles, but the ones where you DON'T want the fog showing are called by events, you could just remove the fog (or change the opacity to 0) prior to the Battle Processing command, and change it back again immediately after. Might be worth experimenting that way a bit, if it suits those particular battles, before looking at script changes.
This looks like it might do it.  I'm all for experimenting with events before looking at scripts.

thanks
 

Allerka

Veteran
Veteran
Joined
Dec 31, 2012
Messages
289
Reaction score
71
First Language
English
Primarily Uses
New question. I'm trying to do some parallax mapping, and I've noticed the picture part of the map for things that would go over the player show above the fogs I set for my map, no matter what I set the Z value of the fog. Is there anything that can be done about that? Far as I can tell, pictures don't actually have a Z value, they're just automatically on top of everything (which I can understand in some ways, but it's kind of annoying it's not even an option).
 

flimbo

Villager
Member
Joined
Nov 10, 2013
Messages
23
Reaction score
2
First Language
Portuguese
Primarily Uses
Hey there, thanks for this amazing script!

Just wondering, when the map scrolls, the fog moves with it (even if I set a x or y speed).. is it the expected behavior? Is it possible to keep the fog independent of the map´s movement?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,674
Reaction score
13,298
First Language
English
Primarily Uses
RMMV
Read the posts above yours.
 

flimbo

Villager
Member
Joined
Nov 10, 2013
Messages
23
Reaction score
2
First Language
Portuguese
Primarily Uses
Sorry! I misunderstood that the posts were about the fog following the player, not the map when it scrolls. It's working flawlessly, thanks!
 

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
186
Reaction score
26
First Language
German
Primarily Uses
RMMV
I'm also wondering about putting the fog above my picture I use for parallax mapping. Hope this is possible somehow.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,674
Reaction score
13,298
First Language
English
Primarily Uses
RMMV
That would depend on your parallax script. If it uses the same viewport and z value as the actual map tiles, you should just be able to set the z in the show_fog command to make the fog appear above (or behind) your parallax.
 

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
186
Reaction score
26
First Language
German
Primarily Uses
RMMV
Right now I'm just showing my overlay using "show picture" so I guess it won't work that way?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,674
Reaction score
13,298
First Language
English
Primarily Uses
RMMV
No. Pictures go on a higher viewport than the map, so will always be above the fog, no matter what you do with their z values.


If you're using a picture for parallax mapping, rather than just setting it as the map's parallax in the map properties, you must be using a script? In that case, maybe post a new thread in RGSSx Script Support with links to both scripts to see if someone can make them compatible? I might even have time to look at it myself, if your parallax script isn't a complicated one (but still in a new thread).
 

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
186
Reaction score
26
First Language
German
Primarily Uses
RMMV
Thanks so far Shaz! I have been able to find a working download for Yamis Overlay Script so the fog finally covers all of the map.

The problem I have encountered now is the following: While Im on the map, the fog doesn't scroll at all but as soon as I enter battle, it scrolls as it should.

What could possibly cause this problem?
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,674
Reaction score
13,298
First Language
English
Primarily Uses
RMMV
If you are moving in the same direction as the fog, it could look like it's not moving. That's the only thing I can think of.


You might try starting a new project and JUST adding that script and calling it the same way as you do in your current project. See if the issue is still there. If it's not, it could indicate a script compatibility issue.
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
420
Reaction score
206
First Language
Finnish
Primarily Uses
I like this script but it has errors. The fog works weirdly when moving towards the fog. You can easily check this yourself by this simple trick:

- Make a map where you draw square on it with anything

- Make a fog which is easily seen, like a red dot.

- Make the fog appear using speed values x=20, y=30.

- Make the player stand inside the square and start the game.

Stand still and count the time the red dot takes to travel over the square you've drawn. 

Then start running in circles and count the time again. It's different because when moving towards the fog it stops moving. The time which the fog takes to travel over the square shouldn't change when the character moves. Character movement shouldn't affect it at all.

That's why it looks weird. If it gets fixed I'll definitely will be using this script since its so easy to use.

EDIT: It seems there was a fix for it already in the post #37. With that script it works properly. And oh my good, it is so awesome, thank you! :)
 
Last edited by a moderator:

flimbo

Villager
Member
Joined
Nov 10, 2013
Messages
23
Reaction score
2
First Language
Portuguese
Primarily Uses
Hello,

 I'm using Vlue's Advanced Climate System, and I´d like to use the Multiple Layer Fog script to replace the default rain effect.. so I was wondering if is there a way  functions like show_fog, erase_fog, etc,  could be called from another class/script, instead of from inside an event.

 Thanks!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,674
Reaction score
13,298
First Language
English
Primarily Uses
RMMV
Sure :)


All the information you need is in the Game_Interpreter class of the script. It has methods that accept arguments from your Script event command, and then calls the appropriate Fog method to do what you need. Each of those methods only has one command. So you can basically copy the command, substitute the values, and replace screen with the appropriate variable - either $game_map.screen or $game_troop.screen (the former for on a map, the latter for in battle).
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Did some animated message faces. But why not animate menu faces too?

Confession: I don't know how to make a custom intro screen. I've tried a plugin, but I want...something more. Something dynamic!
Ksi
Looking forward to messing around with MZ when it comes out in little over a week. Anyone else amped? What's the first thing you're gonna look at/try to do?
by now, I think most people know that I hate misanthropic bad guys, but I realize one more reason I hate them so much is because the motive is easy and takes no thought to come up with. It's actually more challenging to create a villain that doesn't have that motive.

Forum statistics

Threads
100,749
Messages
979,106
Members
132,381
Latest member
kientrucarcviet
Top