Banjo

Veteran
Veteran
Joined
Jan 4, 2013
Messages
96
Reaction score
20
First Language
English
Primarily Uses
RMVXA
Shaz, would it be possible to get a "fixed" version of the alternate script (i.e. where the fog doesn't "stick" to the player) you kindly provided on page 2 (near the end of the page)?

I've been looking for a fog script to use, and yours seems the best one so far for my needs, but I find the way the fog reacts when the player moves distracting, and was hoping to try the alternate as it seems others had the same issue (and your fix fixed it for them).

The forum has apparently corrupted most posted scripts by running everything into one huge block without line breaks, making copy-pasting them impossible. :(
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,666
First Language
English
Primarily Uses
RMMV
done. I've added a second download link in the first post.
 

Sausage_Boi

Game Dev. "Artist."
Veteran
Joined
Sep 10, 2014
Messages
1,744
Reaction score
702
First Language
Americanese
Primarily Uses
RMVXA
Thanks for the cool script! I am going to try and get my iteration to function :p
 
Last edited:

Sausage_Boi

Game Dev. "Artist."
Veteran
Joined
Sep 10, 2014
Messages
1,744
Reaction score
702
First Language
Americanese
Primarily Uses
RMVXA
Hey, I got the script from the alternate download, the one that was recently updated, but when I put it into my game, and try test it I get this error before I even see the title screen:
script_problem.png


I don't have any other scripts, besides the window resize code snippet, which I have removed and tested to the same effect.
What am I doing wrong? Thank you for any and all help!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,666
First Language
English
Primarily Uses
RMMV
Did you get it working? I got a notification that you had errors.

I didn't test that after splitting it into lines - it's possible I added a line break in the wrong place, or didn't add one where I should have.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
@Shaz You got a notification because the poster started a new thread in scripts with a query. I've told them that I shall be merging the posts into this thread - but with the new forum software, I've lost the 'merge' function (having a heavy cold doesn't help me to think, either). As soon as another mod responds to my query, I'll shift it over here.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,666
First Language
English
Primarily Uses
RMMV
No, the notification was from this thread, because I'm watching it. The 'view this thread' link brought me here. I see he edited his post since, so he probably decided to start a new thread after he posted the error here.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
@Shaz I've managed to merge it now. It's in time order, so it's above your 8:06 post.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
I have hit a weird problem. The full sequence of actions is this:

I enter a map with a fog. No problem, fog shows.
I do assorted things on the map, including battles. No problem, and the fog shows on the battle screens.
I leave the map and the new one has no fog. I then return to the foggy map. No problem, fog shows.
I move on to a third map, this one with a different fog. I return to the first map. No problem, fog shows. I can do this as many times as I like, no issue.
On the third map I fight a battle, any battle. I return to the first foggy map - and now there is no fog.
If I fight a battle on that map the fog shows on the battle screen and then on the map once I finish the battle.
Alternatively, if I call up the menu on the map with the missing fog and the fog appears as soon as I leave the menu. Calling up on the menu on either of the other maps does not have the restoring effect.

My 2 script calls are as follows.
For the first map it is:
Code:
show_fog(1, "alpha_fog", 0, 150, 0, 250, 1, -1)
For the second foggy map it is:
Code:
show_fog(1, "Cave_upper", 0, 60, 0, 180, 4, 3, -1)
The negative z value on the second map is because I need the fog to show above a parallax.

I have tried all manner of combinations, and it is always to do with fighting a battle on that other map. Any ideas about what might be happening and how I can fix it?
Thanks.
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,666
First Language
English
Primarily Uses
RMMV
Could you show screenshots of the two events that have the fog scripts? Do they do anything else, are there any conditions?
Is there anything special about the battle on the third map - any troop events that get run, any script commands or switches?
You mentioned going to the second map without fog, but you don't indicate if there are any battles on that map. Are there? Does going into battle on that map cause the fog to disappear on the original map as well? (if there are no battles on that map, could you just throw one in there for testing and see if it makes a difference)?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
The events. First is the map which starts the sequence and has the problems coming back.
upload_2019-2-19_21-58-18.png

Now the second map,
upload_2019-2-19_22-0-4.png

The battle on the third map is a boss battle, fully evented. However, as a test I also tried with a copy/paste of a level 1 battle which is completely vanilla. This caused the same problem, so it appears to be independent of which battle is fought.

There are no battles on the second map, it is simply a small cave to be crossed. I have already, however, put a battle in there to see what happens, and that did not cause any problem with map 1. The fog remained.

I am about to go to bed now, so I shan't be able to answer any further queries for a few hours.

Thanks for looking into this.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,666
First Language
English
Primarily Uses
RMMV
When the fog fails to show on the original map, do the other things in the parallel process work - BGM, BGS and show picture?

So it seems to be ANY battle on the third map.

You wouldn't happen to have any kind of event that erases the fog would you?

If you just copy those three maps into a new project, remove any events not necessary for testing this, and only put in really simple battles, are you able to reproduce the issue? If you can, could you send me that new project so I can play with it? I'm a bit stumped as to what it could be.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
@Shaz I made the test project, and nothing changed, still no fog.
Thanks for your offer to look at this. I'll pm you a link.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,666
First Language
English
Primarily Uses
RMMV
thanks. I'll download it now, but it's getting late here, so I won't get to look at it tonight. It might take me a while to figure it out.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
No problem, I can wait. It's not like the game is anywhere near ready for release!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,666
First Language
English
Primarily Uses
RMMV
The negative z value on the second map is because I need the fog to show above a parallax.

Okay, that took a bit of searching, but it's got something to do with this ^^^.

I temporarily changed the script to ignore the z value passed in, and the fog displayed correctly on the first map after battling on the third. So I removed that change, and changed the show_fog command on the first map to use fog/picture 2 rather than 1 (so there wouldn't be any remnant of the -1 value around), and it also worked.

So there's something about the negative z value, the battle on the third map, and redisplaying the fog using the same array position/id without passing in a z value - maybe it retains what was there before. But that doesn't explain why leaving the map and returning, or going into a menu and exiting, fixes it.

As a workaround, you could change the "inner" area to use #2 instead of #1 (on the assumption that this is the only fog you have set to a negative z value and would be easier to change this than go through and find all the others). But I'll continue to look and see if I can find the exact cause.


Out of interest, the fog doesn't seem to be displaying during the battle in the "inner" area. It may be that giving it a negative z value is placing it behind the battle background. This may have something to do with the issue as well. Should the fog be visible during this battle?

You also have two events showing the fog on the first map - the one is in the top left corner on that map. The other is the exit event from the cave map - it also shows the fog just after the transfer command. It's probably not necessary - I removed it to see if it might have any effect, and the fog still displayed okay.


The other thing I discovered is that it's repeatedly going to the cache for the fog on every frame, and not only when a new one is loaded. This is inefficient, and might cause a little bit of lag. I don't know why I wrote it that way, unless it's just that that's what the XP fog script did so I duplicated the logic without thinking too hard about it. When I have time, I'll make a mod to the script and you can grab the updated version.
 
Last edited:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
Once again you earn Star rating. I tried it making the inner fog #2, and all is well.

It would be nice if the fog showed on the battle screen, but that would be the icing on the cake. My only real concern was getting the fog on map 1 to show up without having to delete the fog on map 3 - I do think it adds a lot to the atmosphere there.

iirc, the extra show fog command was part of my testing and trying to see if loading the fog before getting to the map made any difference. As you know for yourself, it didn't, but I seem to have forgotten to remove it.

Thank you for this, I am deeply grateful.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
And another query. I expect the answer to be "no", but just on the off chance that it's not, I thought I'd ask.

Is there any way to have a fog shown with its area determined by e.g. regions? I have a world map and want one location on it to be obscured in mist. I know it can be done with semi-transparent graphics on tiles over the area, but it looks a bit naff. I know - I used that route in another game and was never happy with it.

Thanks.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,197
Reaction score
14,666
First Language
English
Primarily Uses
RMMV
You're wanting different fogs on a single map, or fog in some places but not others? No, this plugin wouldn't do that. At least on its own. What you might be able to do (I did it in one location in my game where I wanted fog only in one area on a map but not elsewhere) is to use events (or regions with a region event script) to fade the fog in or out as you got closer to or further away from that area.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
Thanks for the suggestion. I'll try that.
 

Latest Threads

Latest Posts

Latest Profile Posts

A side story is almost getting into the next stage. Almost everything in this game has real-life references.
unfinishedbuildingwip1.jpg
Everyday life is full of absurdity. This is just a reflection.
TFW you discover how the script batching works in VNMaker... after you've had the program for almost 3 years.
Writes that the characters have to climb a mountain.

Realized that I have to draw six sets of models where characters are climbing.

At least I know how to draw something. :)
I'm currently scratching my head on how to design plains. What do I even put in plains? Some trees (but not too many or it turns into a forest)? Grass? A few bushes? That's a bit dull.
I'm looking for tutorials but Google didn't seem to find much (or maybe I have the wrong keywords). I don't know how to map plains and I don't know how to learn.

Forum statistics

Threads
111,406
Messages
1,060,897
Members
144,760
Latest member
Belphegor
Top