Multi Layer Fog

Now my problem is that the fix just does nothing.
You probably did not fix it properly.
Ruby:
class Game_Screen 
  def create_fog   
    @fogs = Game_Fogs.new 
  end
end
class Spriteset_Map 
  alias save_fix_update_fogs update_fogs 
  def update_fogs   
    $game_map.screen.create_fog if !$game_map.screen.fogs   
    @fog_planes = [] if !@fog_planes   
    save_fix_update_fogs 
  end
end
You probably did not fix it properly.
Ruby:
class Game_Screen
  def create_fog  
    @fogs = Game_Fogs.new
  end
end
class Spriteset_Map
  alias save_fix_update_fogs update_fogs
  def update_fogs  
    $game_map.screen.create_fog if !$game_map.screen.fogs  
    @fog_planes = [] if !@fog_planes  
    save_fix_update_fogs
  end
end
You're probably right that I didn't fix it properly because now I'm getting a completely new error entirely.
1660270737843.png
a completely new error entirely.
Where are you putting it?
It has to go below Shaz's Fog script
Sorry for dragging up a decade old post. Long time lurker first time caller.
Is there any way to add to the "existing game fix" to include battles? Either with or without the fog in battle. Doesn't matter to me. The fix works great for just standard use but once battle processing starts I get this. It works fine with a new game but its around ~20 hours in-game time for my tester so I'm trying to save him from starting over outright.
This pops up regardless of if fog is currently on the map or not, so it's sort of bricked any combat.


1700169084269.png
It’s all gravy. Only support and request threads are really vulnerable to the dark arts.
try this.
It should have been fixed if fogs were used on the map before a battle occured, but this should fix it the same as the map.
Ruby:
class Game_Screen
  def create_fog   
    @fogs = Game_Fogs.new
  end
end
class Spriteset_Map
  alias save_fix_update_fogs update_fogs
  def update_fogs   
    $game_map.screen.create_fog if !$game_map.screen.fogs   
    @fog_planes = [] if !@fog_planes   
    save_fix_update_fogs
  end
end
class Spriteset_Battle
  alias save_fix_update_battle_fogs update_fogs
  def update_fogs   
    $game_map.screen.create_fog if !$game_map.screen.fogs   
    @fog_planes = [] if !@fog_planes   
    save_fix_update_battle_fogs
  end
end
I think it's really close. I was trying to do similar but I'm garbage at raw code. This pops up at the startup. line 17 being "alias save_fix_update_battle_fogs update_fogs". This is when the Battle_Fogs = false in the primary script. if it's true, there's no change and the original error still exists.

1700172124380.png

This is when the Battle_Fogs = false in the primary script. if it's true, there's no change and the original error still exists.
Where are you putting it?
It has to go below Shaz's Fog script

Did you do the same thing as thepuffpuff30?
Where are you putting it?
It has to go below Shaz's Fog script
1700178304200.png

Yeah, popped the temp fix right under the Primary Shaz's script. It is strange that we're getting similar errors just under different classes.
Yeah, popped the temp fix right under the Primary Shaz's script. It is strange that we're getting similar errors just under different classes.
So then why is your game tester getting errors in battle if you have battle fogs off.
  1. BATTLE_FOGS = true
No idea.
1. BATTLE_FOGS=true
-Starts up fine, fogs appear fine, can tint no issues. When entering combat-
Error: "Script 'fog' line 96L NoMethodError occured.
undefined method 'each' for nil:NilClass"
Vs
1. BATTLE_FOGS=False
-upon play test startup before even picking a save/new file-
Error: "Script 'temp fog fix' line 15: NameError occurred
undefined method 'update_fogs' for class 'Spriteset_Battle'

That's all I know.

Again, totally fine with the fogs NOT being in the battle.
No idea.
1. BATTLE_FOGS=true
-Starts up fine, fogs appear fine, can tint no issues. When entering combat-
Error: "Script 'fog' line 96L NoMethodError occured.
undefined method 'each' for nil:NilClass"
Vs
1. BATTLE_FOGS=False
-upon play test startup before even picking a save/new file-
Error: "Script 'temp fog fix' line 15: NameError occurred
undefined method 'update_fogs' for class 'Spriteset_Battle'

That's all I know.

Again, totally fine with the fogs NOT being in the battle.
Yes the second one will happen with the fix I just posted. The original one farther up won't have that issue with battle fogs off.
It should not give you an error for the first option.
The script does a check for if the variables exists and if it doesn't, make it.

Are you willing to share your project for me to look at?

Or you could try this
Ruby:
class Game_Screen
  def create_fog   
    @fogs = Game_Fogs.new
  end
end
class Spriteset_Map
  alias save_fix_update_fogs update_fogs
  def update_fogs   
    $game_map.screen.create_fog if !$game_map.screen.fogs   
    @fog_planes = [] if !@fog_planes   
    save_fix_update_fogs
  end
end
class Spriteset_Battle
  alias save_fix_update_battle_fogs update_fogs
  def update_fogs   
    $game_map.screen.create_fog if !$game_map.screen.fogs     
    save_fix_update_battle_fogs
  end
end
Just removed the one line.
Yes the second one will happen with the fix I just posted. The original one farther up won't have that issue with battle fogs off.
It should not give you an error for the first option.
The script does a check for if the variables exists and if it doesn't, make it.
Hmm, i might be out of luck then.
The project is fairly large, and like I said, there's no issues with new games. That new script also had the same errors.
Hi there, I'm another longtimelurker I can't believe I just found this script, it's really cool!

I'd like to use it for overlay mapping, but I'm running into problems when I try to make static fogs. It looks like whenever the screen pans around, the fogs will follow by 1 or 2 pixels, and then snap back into place once the screen stops scrolling.

For testing purposes, the gif attached is from a brand new project with no other scripts, on a 23x23 map, with about 6 events on it, and showing between 59-60fps. I've tested with multiple fogs (up to 7), and with only 1 or 2, but I still observe the shifting.

Is this a known issue? Is there something I'm doing wrong, or is there a fix for this?
I hope I'm not bothering anyone in this thread, but at the time of writing this, I'm trying to make a Silent Hill inspired system for myself, and the only thing left I needed was the fog. However, when using this script, I keep getting this error. Is there any way to fix it?

EDIT: Found a fix! I just added a wait command before the script activated

Original thread: https://forums.rpgmakerweb.com/threads/multi-layer-fog.18835/