Last Update: 2011.01.02
Script Download
This script allows to add varied fog effects to the maps. Fogs are picutres placed above the player layer and loops. Differently from pictures the fog follows the map movement instead of the screen (this behavior can be changed). You can add various fogs to the map.
Multiple fogs in action
Requires the Victor Engine – Basic Module
Maps and Comment calls note tags:
Tags to be used on the Maps note box in the database or in events comment box, works like a script call
<fog effect> settings </fog effect>
Use this comment call to create a fog, a fog effect on the map, add the following values to the settings. The ID and name must be added, other values are optional.
id: x : fog ID
name: “x” : fog graphic filename (“filename”)
opacity: x : fog opacity (0-255)
move: x : fog screen movement (32 = fog follows the map)
zoom: x : fog zoom (100 = default size)
hue: x : fog hue (0-360)
blend: x : fog blend type (0: normal, 1: add, 2: subtract)
depth: x : fog Z axis (300 = default value)
<fog opacity id: o, d>
This tag allows to change the fog opacity gradually
id : fog ID
o : new opacity (0-255)
d : wait until complete change (60 frames = 1 second)
<fog move id: x, y>
This tag allows to adds fog continuous movement
id : fog ID
x : horizontal movement, can be positive or negative
y : vertical movement, can be positive or negative
<fog tone id: r, g, b, y, d>
This tag allows to change the fog opacity gradually
id : fog ID
r : red tone (0-255, can be negative)
g : green tone (0-255, can be negative)
b : blue tone (0-255, can be negative)
y : gray tone (0-255, can be negative)
d : wait until complete change (60 frames = 1 second)



















There seems to be a bug in this script whenever you change map, the fog doesn’t disappear, it keeps even in a map where the fog isn’t set in the Map Notetag.
Thanks, updated the script and fixed that.
There seems to be a bug in this script whenever you transfer on the same map, there’s an error message.
can you post a image of the error? i’ve made serveral tests here and i’ve got no errors.
Here:
http://i44.tinypic.com/2ni422d.jpg
Here is my fog setting\s:
id: 1
name: “fog1″
id: 2
name: “fog2″
^ The settings was messed-up; The greater and less than signs were removed
You surely using an outdated version, of both the Basic Module and the Fog scripts. Update both and the error probably will be fixed.
You were right, Victor! Amazing! It’s fixed now.
I just had an error with this and taken me half a day to figure it out! I’ll post it here in case others mistakenly do it.
Basically I copied the example, copy and paste
“id: x : fog ID
name: “x” : fog graphic filename (“filename”)
… etc …”
Then I edited it to suit my needs, this way I didn’t have to look back at this page for each line. Turns out the quotation marks I copied aren’t normal quotation marks. The “ I copied is different to a normal “. I did not receive any error what so ever though, just that the entire script simply was non-existent in the game!
4, maybe 5, hours it took me to realise that!
Awesome script though Victor.
Good to know that, these damn auto corrections that i didn’t even ask for u.u
I should have read this 2 hours ago xD Thanks!
i’m upgrading the script so it won’t have any more problems with these different quotations;
It was an interesting bug to track down (I use the term ‘bug’ loosely, as it was the website that caused it rather than the script) – nevertheless, it’s saved others having the same issue and I thank you.
Sir Victor, there’s another thing I would like to ask.
I placed a negative value for the fog movement, but it didn’t move at all. Is there a way to make the script recognize negative values for fog movement (x and y)?
are you using the latest version? i tested here with negative values and everything worked fine
v1.06 basic mod – v1.04 Fog fx
I have 2 fogs. the second fog has this move:
fog move 2: -5, -5
I used the console to debug the script, and I found out that indeed, the script doesn’t recognize negative (and even positive) symbols. (+ and -) (regexp fault?)
Positive sign it don’t really works since i forget to add them in all scripts -.-’, but i checked here and it works with negative.
Okay, I am having an issue where the folders I add to the project don’t show up in the editor…any idea what’s going on? Is there something special I have to do or is my pc just being wacky? I have tried time and time again.
But folders added was never displayed on the editor… anyway why you need them on the editor?
Ohhh, okay. I thought I needed it to appear in the resources tab to get its ID.
Heya,
Just wondering if it’s possible to make the fog move continuously, even while the player is idle? I have played around and can only get it to move when the character moves. Just want to know i that’s how it’s meant to be or if I’m doing something wrong.
This tag allows to adds fog continuous movement
id : fog ID
x : horizontal movement, can be positive or negative
y : vertical movement, can be positive or negative
It’s in the script comment instructions and it’s also in this post o___o
This tag:
Yeah, I have done that and it only works when I move. It never actually says anywhere in this thread or the comments that it moves on its own, only that it moves, which it technically does in my game, hence the question
Must be something bad on my end then.
<fog move id: x, y>
This tag allows to adds fog continuous movement
id : fog ID
x : horizontal movement, can be positive or negative
y : vertical movement, can be positive or negative
This tag do this, if not working you’re using it wrong
The negative values now work with the latest version. Told you there was a problem! Good Job on the fix, Victor!
However, now the depth setting doesn’t work…?
try it now, it was a silly typo
I tried this with parralax mapping using the overlaying script yami made . Well the fog is not added to the parralax layer !!!???
It’s something called incompatibility
well, i don’t see a point in using another script, since you can add various layers with the fog script, as stated on the instructions, you can even change the fog Z cood to place it bellow characters.
Yeah thanks for your help but it still doesn’t. I looked and the z value for parralax is 8 and for fog is 300 by default so i dont think its the problem. They are just incompatible as you said . Thanks for your help again
Simply don’t use the overlay script, the fog already have the same functions of the overlay script, just set the fog z lower and make the fog not move to use it as extras parallaxes.
oh I’m such an idiot thank you very much!!!
Is there a way to make the fog not move at all? Meaning it won’t even follow the map.
# <fog effect># settings
# </fog effect>
# Create a fog effect on the map, add the following values to the info
# the ID and name must be added, other values are optional.
# id: x : fog ID
# name: "x" : fog graphic filename ("filename")
# opacity: x : fog opacity (0-255)
# move: x : fog screen movement (32 = fog follows the map)
Yes, but when i set the move: x, what should i write for the fog so it won’t move? 32 follows the map, i tried with other numbers, but it negative numbers make it move in another direction. I need it to stay still.
did you try 0?
Yes. Fog still moves with 0.
You setting something worng, because i just tested here, the fog follows the screen like a picture if move is set 0.
Exactly, the fog follows the screen. I don’t want the fog to follow it, but stay fixed. As if it was a parallax.
…
for that, use the default value 32…
thats what it meas by “follow the map”.
Hi,
I tried to test your script, I did everyhting you said to do and even took the values in your example but the fog isn’t appearing at all on my map. I put the values in the maps’notes.
You probably missing something on the settings, i just tested it here and it work fine.
There’s no additional info besides the ones on the instructions
Hi,
I uploaded a picture of my map’s note : http://uppix.net/9/c/d/1e9739e8367401893e110e6efa7bb.png
I still can’t make it work but I will keep trying, I hope you will help me ^^
I tried the example that Thiago gave me and it works!
Could it be that having that your script wasn’t working because there were 2 lines ?
odd, i setup the fog with the same setting from the screen shot (except by the filename) and it worked fine.
Hi,
I think my notebox is too small.
Example : the line with fog opacity is not written on a single line but it is written with 2 line (sorry for my bad english but you can see what I mean when you look at my picture).
I removed the tags where they were written with 2 lines and you scripts worked perfectly.
Well, I am pround after 1 day and half of trying to make it work, the result
http://uprapide.com/image/50752-first-steps
Thank you very much for this script, it is easy to set multiple fogs which I did! I also tried your script “Light effects”. I will show you the result tomorow and what I though about it ^^ If my stalker mode bother you, please tell me. I will stop,spaming you.
Just create an event in your map, with parallel process and put this on an comment in the event commands:
id: 1
name: “name of the file in your game folder \graphics\fogs”
opacity: 100
zoom: 100
There’s no need to make it a parallel process event, just add the tag to the map notebox, unless the fog effect isn’t permanent.
Thank you, it works.
I put your example in the map notebox though ^^
Great script but the fog doesn’t move… Can you help me?
Here’s a picture of my customization:
http://i44.tinypic.com/iw59xg.png
I’ve tried with more number: 0, 1, 32…
But nothing!
your tag isn’t closed, you missing the last >
<fog move 1: 0, 0>
Thanks very much… Now it work!!!
Sorry for the double post…
Can you help me with the map or comment note tags of the “Actor Lantern”?
I don’t understand what i put in the notetags…
Man, didn’t you notice that this is the FOG script post?
Pleas if you have any question about other script, post these questions on the other script post -.-
I already removed your question once, and if you can’t even cooperate with keeping the blog clean i will block your posts -.-’
hello,
how can turn off the script if i enter a house on the same map
imagine an open house, on the same map, so when i enter the house the fog is still running through said house, so i want to know how i can turn off the fog, when i enter it, as its still on the same map (the ceiling disappears)
Reading the instructions would be a great start.
The comment calls can be used with events to change the state of the fogs.
the assumption that i didnt read the instructions is typical.
After encountering error message after error message i have decided to do it the old school way, before i ask again.
thanks
Hi,
Can you help me to fix my fog please ? I don’t want it to follow the map, I written this but it still follow the map :
id: 1
name: “lum”
opacity: 70
move: 0
I would like it to not move at all and not follow the map.
I even typed this :
id: 1
name: “lum”
opacity: 70
move: 32
and the fog still follow the map.
It bugs when the map is scrolling or even when I go to close near the end of a map.
Sorry for my bad english.
The creepy ghost in the screenshot is definitely a stalker. XD
[ontopic now]
The script has worked wonders for me! Amazing work Victor, and thank you for the awesome script [again!]
Hello… just a simple question
I have a forest map, where it’s night-time and foggy. I have 2 “fog” layers, which work fine. However, after I realized Yami’s Overlay Mapping script isn’t really compatible with yours, I decided to use this script to map my parallax trees also.
When I “fog” in the parallax trees though, they don’t seem to line up with the map at all. And the fog that should be all over the map appears under them. I realize the 2nd problem is something to do with the depth, but I tried changing the depth off all 3 fogs (2 fogs, 1 tree parallax) and it didn’t work.
How would I go about fixing these 2 problems? (I already have a parallax for the maps background, the forest floor).
I have the same problem. The parallax overlay/fog doesn’t line up. It is strangely set off like about one or two tiles left.
Is there a way to move the starting point of the fog?
Don’t know what have I done wrong.
I’ve made an event
id:1
name:”001-Fog01″
blend:1
And when I get to the map where the fog should be it gives me an error.
“Script ‘Game_Interpreter’ line 1409:SyntaxError occurred.
unexpacted ‘<'
Put those in the Note of the Map Properties.
Also put too so it should looks like
id:1
name:”001-Fog01″
blend:1
Did you use COMMENT box?
It’s look like you used the Script Call instead….
Hey Victor,I’m having a problem,I have set the move value to 32,however,the map still won’t follow the map.
It looks like this.
http://imgur.com/HlwXo
Victor…I try using “move: 32″ but the fogs still follow player if player going down or right..
It’s follows the map when the player move up or left…but not work when player going down or right
Have a same problem here…
Help us please Victor
Same Here T_T
Help US PLEASE!
HELLO THERE VICTOR!
WHY DO MY FOG STILL FOLLOW ME EVEN IF I SET TO 32?
CAN YOU HELP ME PLEASE?
AND SORRY THAT I TALK WITH CAPS BECAUSE MY KEYBOARD IS LITTLE ERROR…
SORRY AGAIN AND PLEASE HELP ME
Victor what’s happen here?
The fogs still moves even if I set it to 32
Is thisa bug?
Got it working!
Question though: Is there a way to alter the starting point of the fog? I’m trying to usse the script as an overlay parallax map.
Thanks.
Can Anyone help me?
I don’t know why my move still follow my character even If I set it to 32
Anyone help me?
I cant seem to figure out how to work your light or fog scripts D: