CraneSoft

Filthy Degenerate
Veteran
Joined
Apr 16, 2016
Messages
287
Reaction score
434
First Language
Not English
Primarily Uses
RMVXA
Just discovered that if I use fogs but without assigning them movement with Version 2, the "stationary" fogs are effectively "anchored" into the map instead of the screen creating a looping series of the fog image across the map, making the usage of stationary fogs pretty much impossible.

Interestingly this isn't the case for the original version, so I'd imagine the logic behind 'fog no longer sticks to player' has also prevented non-moving fogs from following the player (and the screen), while this can obviously be circumvented by simply using pictures instead of fogs, is there any chance that can be fixed?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
Can you please show a screenshot of (or copy/paste) your fog command, as well as your map properties? I'll take a look.
 

CraneSoft

Filthy Degenerate
Veteran
Joined
Apr 16, 2016
Messages
287
Reaction score
434
First Language
Not English
Primarily Uses
RMVXA
The fog command:
show_fog(1, "Fog_sun01", 0, 255, 0, 100)

I am basically using a non-scrolling fog (ie. sunlight) with the size of 640x480 on an empty, blank map straight out of a fresh project so there are no map properties, and yes this is tested on a new project just to be sure.
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
So you want it to not move with the map at all? Why not just use a picture?

It's anchored to the map intentionally. Would require a rewrite to anchor it to the screen, and then your fogs on other maps would be the same.
 

CraneSoft

Filthy Degenerate
Veteran
Joined
Apr 16, 2016
Messages
287
Reaction score
434
First Language
Not English
Primarily Uses
RMVXA
So that was intended behavior? That's fine then. Thought it was weird since the first version was able to do it, guess I'll make due with the picture method instead. Thanks.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
The changes between the two versions is very minor, to fix the "stick with player" issue. It added the offset based on the map display position, and nothing else. If you don't want that behaviour, why not just use the original?
 

CraneSoft

Filthy Degenerate
Veteran
Joined
Apr 16, 2016
Messages
287
Reaction score
434
First Language
Not English
Primarily Uses
RMVXA
I simply preferred the fog movement of the 2nd version as it looked more natural for my fogs under normal circumstances and will work regardless of movement speed, and several other fog scripts I've tested before also works that way but does not anchor stationary fogs to the map. Further testing may prove me wrong however.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
No, because one version used the map and the other didn't. I might be able to write a little mod for you to use both versions and just issue a command when you want to use the less-frequent one.
 

CraneSoft

Filthy Degenerate
Veteran
Joined
Apr 16, 2016
Messages
287
Reaction score
434
First Language
Not English
Primarily Uses
RMVXA
Thanks for considering that option, I'm deeply grateful for this.

Simply a way to toggle between the two "versions" would be a nice addition to the script (As long as it doesn't require you to rewrite the thing or do too many modifications). I'm sorry if this sounds nitpicky but that's all it really needs for now to address the drawback of each version (if possible).
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
Okay, I haven't tested this, but give it a go ...

Install version 2 of the script.
Find this method:

Code:
    def update_move
        @sx2 -= @sx / 8.0
        @sy2 -= @sy / 8.0
        @ox = $game_map.display_x * 32 + @sx2
        @oy = $game_map.display_y * 32 + @sy2
    end

and replace it with this:
Code:
    def update_move
        if $game_switches[15]
            @ox = @sx / 8.0
            @oy = @sy / 8.0
        else
            @sx2 -= @sx / 8.0
            @sy2 -= @sy / 8.0
            @ox = $game_map.display_x * 32 + @sx2
            @oy = $game_map.display_y * 32 + @sy2
        end
    end

Replace 15 with an available switch number. Then prior to each show_fog call, turn switch 15 (or whatever number you use) on to activate version 1, or turn it off to activate version 2. If you only want to use version 1 for a single map, you could just turn the switch on before the show_fog on that one map, then turn it off whenever you leave the map, and not have to worry about it on any other map.

Let me know how it goes.
 

CraneSoft

Filthy Degenerate
Veteran
Joined
Apr 16, 2016
Messages
287
Reaction score
434
First Language
Not English
Primarily Uses
RMVXA
Sorry for the late reply, finally managed to get some time to open RPGMaker again after two consecutive busy workdays (heh)..

Your method works as expected, though I needed to make a little correction by also including the switch check on the def show method (on line 174), else it pops up an error when you try to toggle the switch back to off again when the fog is in place (probably not necessary since fogs are disposed of upon map change but just to be on the safe side) I feel so dumb now for not realizing the minor differences between each versions and just opt to combine the two with a simple if-else statement...:kaoswt:

Anyways, wonderful script and thanks so much for your support again! A mere like couldn't express my gratitude here.
 

BrokenAnkle21

Warper
Member
Joined
Feb 25, 2021
Messages
4
Reaction score
3
First Language
English
Primarily Uses
RMVXA
I don't know if anyone else was having this problem, but for me, when I'd transfer between two maps with fog, the new fog's blend type wouldn't update until the scene changed; it would be the same as the previous fog's. I eventually fixed this by editing the script slightly. I thought I'd post my edit here, just for the sake of anyone else who's having this problem.

The tiny edit I made is clearly labelled with "#EDIT".
Hope Shaz doesn't mind.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
Hope Shaz doesn't mind.


I don't mind at all! What do you mean, "until the scene changed"?

Did you post something? I don't see it. If you let me know, I can throw it into the original script.

@Kes, this might be the real solution to your old problem.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,132
Reaction score
706
First Language
English
Primarily Uses
RMVXA
"until the scene changed"?
I understand this. It's the same as another script I had a problem with a long time ago.
The effect doesn't update until the scene changes, that means something like opening the menu and exiting. Going from scene_map to scene_menu.
The tiny edit I made is clearly labelled with "#EDIT".
Please share, I would like to know as well.
 

BrokenAnkle21

Warper
Member
Joined
Feb 25, 2021
Messages
4
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Huh... I swore I attached the file, but it looks like I didn't!
And yes, it's just like Roninator2 said, about the scene changing.

All I did was add this line at 339:
self.blend_type = @fog.blend_type #EDIT

EDIT
Well it looks like I'm having some trouble attaching a file to this post.
I'll do this instead:

#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
update_bitmap
update_move
update_tone
update_opacity
self.blend_type = @fog.blend_type #EDIT
end
 
Last edited:

BrokenAnkle21

Warper
Member
Joined
Feb 25, 2021
Messages
4
Reaction score
3
First Language
English
Primarily Uses
RMVXA

@Kes

You're very welcome. I sort of figured I couldn't have been the only one with this issue.
Believe it or not it actually took me an entire afternoon to figure this out.
Bug fixing can be a real migraine.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,462
Reaction score
14,816
First Language
English
Primarily Uses
RMMV
Fix added to both versions. Thank you again for this.
 

BrokenAnkle21

Warper
Member
Joined
Feb 25, 2021
Messages
4
Reaction score
3
First Language
English
Primarily Uses
RMVXA
@Shaz
You're quite welcome.
I've been stalking the forums from the shadows for years now; it was about time I gave something back.
 

Latest Threads

Latest Posts

Latest Profile Posts

The full estate map(include 1F,2F,3F and backyard), yes the backyard is a small labyrinth as well as an entrance to a real labyrinth!
Sometimes you Just need to realise someone is beyond help... Still hard to walk away tho :(
100 Horror/Tragedy Sample Maps, Penguin Mech Sprite, & TileD Templates | RPG Maker News #70

Continuing working on abs. So far I have done the workout twice. I am excited to see the results after a couple of weeks. How is everyone doing? :)
MZ: oh boy imma work today
Me, excited: Really?
MZ, doesn't do what I tell It too
Me: I Thought-
MZ: I am Working!

Forum statistics

Threads
112,227
Messages
1,066,701
Members
145,835
Latest member
Silverizer
Top