Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Relatively Simple Fogs, Un-laggy :D
miget man12
post Jul 31 2009, 08:55 PM
Post #1


Making a Comeback
Group Icon

Group: Revolutionary
Posts: 393
Type: Musician
RM Skill: Intermediate




Relatively Simple Fogs

Version 1.5b
Author: Miget man12
Release Date: July 31, 2009
V1.5: August 1, 2009
V1.5b: August 7, 2009 (bug fix)



Introduction
This script takes a different approach to fogs. Instead of having you enter a script call to make a fog appear, it will draw a different fog every time you transfer. In other words, each map has it's own fog that is automatically drawn. I originally made it for use in Twilight1300's Legend of Zelda: Realm of the Gods, then I decided to use it in my own project. I eventually edited it quite a bit, and I did some research, and I found that Woratana's is one of the few working fog scripts. I don't know about every one else, but that script creates a ton of lag for me biggrin.gif. Anyway, I decided to post this for others. Version 1.5 gives you the ability to use multiple fogs!


Features
-Each map gets it's own fog that is automatically drawn
-You can draw a new fog while in a map (but it will be erased when you transfer!)
-Lots of customization for fogs
-Up to 9999 fogs (but it's a really bad idea to have that many biggrin.gif )

Script
[Show/Hide] 180 Lines
CODE
#==============================================================================
# Miget man12's Relatively Simple Fogs V 1.5
#
#  This script takes a different approach to fogs. Instead of having you enter
# a script call to make a fog appear, it will draw a different fog every time
# you transfer. In other words, each map has it's own fog that is automatically
# drawn. Version 1.5 allows you to have multiple fogs!
#-----------------------------------------------------------------------------
#Methods you can use::
# To pause a Fog, put a script command:
#  $game_map.fog_frozen[id] = true
#
# To change the Opacity of fog while in a map, put:
#  $game_map.fog[id].opacity = (0~255)
#
# To change the Blend of fog while in a map, put:
#  $game_map.fog[id].blend_type = 0, 1, or 2 (normal, additive, or subtractive)
#
# To change the X movement speed of fog while in a map, put:
#  $game_map.fog[id].sx = number (e.g.: 0.02, 348, 20.7 :P)
#
# To change the Y movement speed of fog while in a map, put:
#  $game_map.fog[id].sy = number (e.g.: 0.4, 4731, 48.29)
#
# To change the Zoom of fog while in a map, put:
#  $game_map.fog_zoom[id] = number (e.g.: 0.1, 674, 381.594)
#
# To change the Filename of a fog while in a map, put:
#  $game_map.fog_filename[id] = "filename" (in quotes!)
#
# To create a Fog in a map that does not have a preset fog or change the fog,
# put:
#  $game_map.setup_fog(See Fog Data Setup)
# Example::
#  $game_map.setup_fog(["BlueSky",95,2,1.5,4,2])
#==============================================================================
module Mm12
  #Customization::
  MAP_FOGS = {} # DO NOT DELETE OR CHANGE THIS! #
#Instructions::
# To set up, put
# MAP_FOGS[map ID]=["fog filename",fog opacity(0~255),
# blend type(0:norm,1:add,2:sub),zoom level(1 is normal),
# move speed on X Axis(1/8 pixel/frame),move speed on Y Axis(1/8 pixel / frame)]
# Example:
#  MAP_FOGS[1] = ["BlueSky",125,0,2,0,0]
#   Explanation:
#    MAP001 will have a fog with the BlueSky parallax with 125 opacity that has
#   normal blend. It will be twice as big as the real file, and no movement.
#  MAP_FOGS[2] = ["BlueSky",95,2,1.5,4,2]
#   Explanation:
#    MAP002 will have a fog with the BlueSky parallax with 95 opacity that has
#   Sub. blend. It will be 1 1/2 times as big as the real file. It will move 1/2
#   a pixel right every frame, and 1/4 a pixel down every frame.
#(V1.5)
# To have more than one fog per map, just put 2 fogs in brackets, seperated by
# commas:
#  MAP_FOGS[3] = [["CloudySky",45,0,1.3,2,0],["BlueSky",45,2,1.5,3,5]]
################
# Actual Setup::
  MAP_FOGS[1] = ["BlueSky",165,0,2,0,0]
  MAP_FOGS[2] = ["BlueSky",145,2,1.5,4,2]
  MAP_FOGS[3] = [["CloudySky",75,0,1.3,2,0],["BlueSky",65,2,1.5,3,5]]
# Folder where fogs reside
  FOGS_FOLDER = "Parallaxes"
end
module Cache
  #--------------------------------------------------------------------------
  # * Get System Graphic
  #     filename : Filename
  #--------------------------------------------------------------------------
  def self.fog(filename)
    load_bitmap("Graphics/#{Mm12::FOGS_FOLDER}/", filename) rescue Bitmap.new(200,200)
  end
end
class Game_Map
  attr_accessor :fog, :fog_frozen, :fog_hidden, :fog_opacity, :fog_ox, :fog_oy,
      :fog_zoom, :fog_filename
  alias mm12_fog_gm_mp_setup setup
  alias mm12_fog_gm_mp_update update
  alias mm12_fog_gm_mp_init initialize
  def initialize
    mm12_fog_gm_mp_init
    @fogox = Array.new(9999,0)
    @fogoy = Array.new(9999,0)
    @fog_ox = []
    @fog_oy = []
    @fog = []
    @filename = []
    @fog_filename = []
    @fog_zoom = []
    @fog_hidden = []
    @fog_frozen = Array.new(9999,false)
  end
  def setup(map_id)
    mm12_fog_gm_mp_setup(map_id)
    setup_fog
  end
  def setup_fog(fog_data=nil)
    for i in 0..(@fog.size-1)
      if @fog_hidden[i]
        @fog[i].opacity = @fog_opacity
        @fog_hidden[i] = false
        return
      end
      @fog[i].dispose unless @fog[i] == nil
      @fog[i] = nil
    end
    @fog = []
    if fog_data == nil
      fog_data = Mm12::MAP_FOGS[@map_id]
      if fog_data.nil?
        @fog_used = false
        return
      end
      if !fog_data[0].is_a?(Array)
        fog_data = [fog_data]
      end
      i = 0
      for data in fog_data
        @fog[i] = Plane.new
        @fog[i].ox=0
        @fog[i].oy=0
        @fog[i].ox = @fog_ox[i] unless @fog_ox[i].nil?
        @fog[i].oy = @fog_oy[i] unless @fog_oy[i].nil?
        @fog_ox[i] = nil
        @fog_oy[i] = nil
        @fog[i].bitmap = Cache.fog(data[0])
        @fog[i].z = 30
        @fog[i].opacity = data[1]
        @fog[i].blend_type = data[2]
        @fog[i].zoom_x = data[3]
        @fog[i].zoom_y = data[3]
        @fog_zoom[i] = data[3]
        @fog[i].sx = data[4]#.to_f
        @fog[i].sy = data[5]#.to_f
        @filename[i] = data[0]
        @fog_filename[i] = data[0]
        i += 1
      end
    else
      if !fog_data[0].is_a?(Array)
        fog_data = [fog_data]
      end
      i = 0
      for data in fog_data
        @fog_used = true
        @fog[i] = Plane.new
        @fog[i].bitmap = Cache.fog(data[0])
        @fog[i].opacity = data[1]
        @fog[i].blend_type = data[2]
        @fog[i].zoom_x = data[3]
        @fog[i].zoom_y = data[3]
        @fog_zoom[i] = data[3]
        @fog[i].sx = data[4]
        @fog[i].sy = data[5]
        @filename[i] = data[0]
        @fog_filename[i] = data[0]
        i += 1
      end
    end
  end
  def update
    mm12_fog_gm_mp_update
    for i in 0..(@fog.size-1)
      return if @fog[i].nil?
      @fog[i].zoom_x = @fog[i].zoom_y = @fog_zoom[i] if @fog[i].zoom_x != @fog_zoom[i]
      if @fog_filename[i] != @filename[i]
        @filename[i] = @fog_filename[i]
        @fog[i].bitmap = Cache.fog(@filename)
      end
      if @fog_frozen[i]
        @fog[i].ox = ($game_map.display_x/8.0)+@fogox[i] unless @fog[i].nil?# or @fog_frozen or @fog.ox == ($game_map.display_y/8.0)+(@fog.sx/8.0)
      else
        @fogox[i] -= @fog[i].sx/8.0 unless @fogox[i].nil?
        @fog[i].ox = ($game_map.display_x/8.0)+@fogox[i] unless @fog[i].nil?# or @fog_frozen or @fog.ox == ($game_map.display_y/8.0)+(@fog.sx/8.0)
      end
      if @fog_frozen[i]
        @fog[i].oy = ($game_map.display_y/8.0)+@fogoy[i] unless @fog[i].nil?# or @fog_frozen or @fog.oy == ($game_map.display_y/8.0)+(@fog.sy/8.0)
      else
        @fogoy[i] -= @fog[i].sy/8.0 unless @fogoy[i].nil?
        @fog[i].oy = ($game_map.display_y/8.0)+@fogoy[i] unless @fog[i].nil?# or @fog_frozen or @fog.oy == ($game_map.display_y/8.0)+(@fog.sy/8.0)
      end
    end
  end
end
class Scene_Map
  alias mm12_fog_scn_mp_terminate terminate
  alias mm12_fog_scn_mp_start start
  def start
    mm12_fog_scn_mp_start
    $game_map.setup_fog
  end
  def terminate
    mm12_fog_scn_mp_terminate
    for i in 0..9999
      next if $game_map.fog[i].nil?
      $game_map.fog_ox[i] = $game_map.fog[i].ox
      $game_map.fog_oy[i] = $game_map.fog[i].oy
      $game_map.fog[i].dispose unless $game_map.fog[i].nil?
      $game_map.fog[i] = nil
    end
  end
end
class Plane
  attr_accessor :sx, :sy
end


Customization
QUOTE
CODE
  #Customization::
  MAP_FOGS = {} # DO NOT DELETE OR CHANGE THIS! #
#Instructions::
# To set up, put
# MAP_FOGS[map ID]=["fog filename",fog opacity(0~255),
# blend type(0:norm,1:add,2:sub),zoom level(1 is normal),
# move speed on X Axis(1/8 pixel/frame),move speed on Y Axis(1/8 pixel / frame)]
# Example:
#  MAP_FOGS[1] = ["BlueSky",125,0,2,0,0]
#   Explanation:
#    MAP001 will have a fog with the BlueSky parallax with 125 opacity that has
#   normal blend. It will be twice as big as the real file, and no movement.
#  MAP_FOGS[2] = ["BlueSky",95,2,1.5,4,2]
#   Explanation:
#    MAP002 will have a fog with the BlueSky parallax with 95 opacity that has
#   Sub. blend. It will be 1 1/2 times as big as the real file. It will move 1/2
#   a pixel right every frame, and 1/4 a pixel down every frame.
#(V1.5)
# To have more than one fog per map, just put 2 fogs in brackets, seperated by
# commas:
#  MAP_FOGS[3] = [["CloudySky",45,0,1.3,2,0],["BlueSky",45,2,1.5,3,5]]
################
# Actual Setup::
  MAP_FOGS[1] = ["BlueSky",165,0,2,0,0]
  MAP_FOGS[2] = ["BlueSky",145,2,1.5,4,2]
  MAP_FOGS[3] = [["CloudySky",75,0,1.3,2,0],["BlueSky",65,2,1.5,3,5]]
# Folder where fogs reside
  FOGS_FOLDER = "Parallaxes"


Compatibility
Should have pretty good compatibility. Only edits a couple methods(all of which are aliased).

Screenshot
[Show/Hide] kind-of-big


DEMO
http://www.mediafire.com/download.php?mmzmykeymwu

Installation
Place script above 'Main', but below 'Materials.' Edit customization/fog setup.

FAQ
n/a

Terms and Conditions
Credits. As always (it's nice knowing that people are using your script) I'd appreciate that you could post here saying your gonna use it.

Credits
Miget man12
Woratana(Fog Movement formula)


__________________________
By the way:


I'm bored because it's summer so I decided to drop by for a bit.
Go to the top of the page
 
+Quote Post
   
reijubv
post Aug 1 2009, 04:06 AM
Post #2


It's been awhile lol
Group Icon

Group: Revolutionary
Posts: 168
Type: Artist
RM Skill: Advanced




Nice script you have here, Miget Man12!
Can this script uses more than 1 kind of fog for each map?

Off topic :
I really want to play your Zelda game, have you finished it?


__________________________
I'll be back again :P
Go to the top of the page
 
+Quote Post
   
Xeyla
post Aug 1 2009, 09:06 AM
Post #3


Keeper of the RMVX FAQ
Group Icon

Group: Revolutionary
Posts: 706
Type: Mapper
RM Skill: Intermediate




Thanks for making this one. i had soo much lag form Wora's script too. and I think this one is better/easier to use.


__________________________


QUOTE (Albino Parakeet @ Apr 1 2011, 05:46 PM) *
i need to know exactly how to put a penis inside someone's butt.
do you have the technical knowledge to tell me how?
QUOTE (Albino Parakeet @ Apr 2 2011, 01:20 PM) *
QUOTE (Shadyone @ Apr 2 2011, 06:29 AM) *
I see the keet likes anal.

im trying to get into it but people aren't answering my question
Go to the top of the page
 
+Quote Post
   
miget man12
post Aug 1 2009, 09:16 AM
Post #4


Making a Comeback
Group Icon

Group: Revolutionary
Posts: 393
Type: Musician
RM Skill: Intermediate




@Rei: If you want I'll add that feature.
(off-topic) The demo is planned to be released in September. here's the topic: http://www.rpgrevolution.com/forums/index....showtopic=29997

@xeyla: Thanks! happy.gif

~Miget man12


__________________________
By the way:


I'm bored because it's summer so I decided to drop by for a bit.
Go to the top of the page
 
+Quote Post
   
SuperMega
post Aug 1 2009, 09:57 AM
Post #5


Public memberTitle(String n)
Group Icon

Group: Revolutionary
Posts: 683
Type: Developer
RM Skill: Skilled




Geez, what's with all the great scripts this morning!? wacko.gif

I've been looking for a fog system that's incredibly simple, not semi-simple. This is exactly what I was waiting for. Thanks a ton, midget man!

Would it be alright if you made a demo?


__________________________
Translated Scripts:
Diagonal Movement (Eight Direction) and Smooth Jumping
Attack Party, Heal Enemies
Display Party Status On Map (DQ Style)
Display Maps Under Maps
Save Screen Customization
Subtitled Menus

If you want to suggest a translation for something, PM me, and I'll take a look. I AM TRYING TO GIVE AWAY LOCKERZ.com INVITES, SO PLEASE LET ME KNOW IF YOU WANT ONE.
Currently Working on 2 RPG Maker VX Projects. They are very unique, and have a different kind of style then the usual RPGs. So don't think of them as just another RPG. Did that sound rude? :D Not sure if I want them to go public yet, but we'll see how it goes.
Need a script translated? Come talk to me, and I'll see what I can do.
Go to the top of the page
 
+Quote Post
   
miget man12
post Aug 1 2009, 11:06 AM
Post #6


Making a Comeback
Group Icon

Group: Revolutionary
Posts: 393
Type: Musician
RM Skill: Intermediate




Updated to V1.5!
Now features ability to have multiple fogs!

@SuperMega: Okay, sorry, it took me a little while to add the multiple fogs feature wink.gif

Here it is: http://www.mediafire.com/download.php?4zgtaydzizw

~Miget man12


__________________________
By the way:


I'm bored because it's summer so I decided to drop by for a bit.
Go to the top of the page
 
+Quote Post
   
Khev
post Aug 1 2009, 11:12 AM
Post #7


I'm sorry.. What?
Group Icon

Group: Revolutionary
Posts: 217
Type: Event Designer
RM Skill: Skilled




Wow, pretty good ! ohmy.gif
I was actually looking forward to a fog system like this.
I was pretty annoyed at creating an event in every map, not to mention the lag it caused ;/


__________________________

Go to the top of the page
 
+Quote Post
   
SuperMega
post Aug 1 2009, 11:37 AM
Post #8


Public memberTitle(String n)
Group Icon

Group: Revolutionary
Posts: 683
Type: Developer
RM Skill: Skilled




Thanks for the demo and the multi-fog feature!


__________________________
Translated Scripts:
Diagonal Movement (Eight Direction) and Smooth Jumping
Attack Party, Heal Enemies
Display Party Status On Map (DQ Style)
Display Maps Under Maps
Save Screen Customization
Subtitled Menus

If you want to suggest a translation for something, PM me, and I'll take a look. I AM TRYING TO GIVE AWAY LOCKERZ.com INVITES, SO PLEASE LET ME KNOW IF YOU WANT ONE.
Currently Working on 2 RPG Maker VX Projects. They are very unique, and have a different kind of style then the usual RPGs. So don't think of them as just another RPG. Did that sound rude? :D Not sure if I want them to go public yet, but we'll see how it goes.
Need a script translated? Come talk to me, and I'll see what I can do.
Go to the top of the page
 
+Quote Post
   
miget man12
post Aug 7 2009, 03:10 PM
Post #9


Making a Comeback
Group Icon

Group: Revolutionary
Posts: 393
Type: Musician
RM Skill: Intermediate




Bug fix!
This will fix the error of having it so that if you open the menu and close it you get a no method error.
[Show/Hide] The Fixed Script
CODE
#==============================================================================
# Miget man12's Relatively Simple Fogs V 1.5
#
#  This script takes a different approach to fogs. Instead of having you enter
# a script call to make a fog appear, it will draw a different fog every time
# you transfer. In other words, each map has it's own fog that is automatically
# drawn. Version 1.5 allows you to have multiple fogs!
#-----------------------------------------------------------------------------
#Methods you can use::
# To pause a Fog, put a script command:
#  $game_map.fog_frozen[id] = true
#
# To change the Opacity of fog while in a map, put:
#  $game_map.fog[id].opacity = (0~255)
#
# To change the Blend of fog while in a map, put:
#  $game_map.fog[id].blend_type = 0, 1, or 2 (normal, additive, or subtractive)
#
# To change the X movement speed of fog while in a map, put:
#  $game_map.fog[id].sx = number (e.g.: 0.02, 348, 20.7 :P)
#
# To change the Y movement speed of fog while in a map, put:
#  $game_map.fog[id].sy = number (e.g.: 0.4, 4731, 48.29)
#
# To change the Zoom of fog while in a map, put:
#  $game_map.fog_zoom[id] = number (e.g.: 0.1, 674, 381.594)
#
# To change the Filename of a fog while in a map, put:
#  $game_map.fog_filename[id] = "filename" (in quotes!)
#
# To create a Fog in a map that does not have a preset fog or change the fog,
# put:
#  $game_map.setup_fog(See Fog Data Setup)
# Example::
#  $game_map.setup_fog(["BlueSky",95,2,1.5,4,2])
#==============================================================================
module Mm12
  #Customization::
  MAP_FOGS = {} # DO NOT DELETE OR CHANGE THIS! #
#Instructions::
# To set up, put
# MAP_FOGS[map ID]=["fog filename",fog opacity(0~255),
# blend type(0:norm,1:add,2:sub),zoom level(1 is normal),
# move speed on X Axis(1/8 pixel/frame),move speed on Y Axis(1/8 pixel / frame)]
# Example:
#  MAP_FOGS[1] = ["BlueSky",125,0,2,0,0]
#   Explanation:
#    MAP001 will have a fog with the BlueSky parallax with 125 opacity that has
#   normal blend. It will be twice as big as the real file, and no movement.
#  MAP_FOGS[2] = ["BlueSky",95,2,1.5,4,2]
#   Explanation:
#    MAP002 will have a fog with the BlueSky parallax with 95 opacity that has
#   Sub. blend. It will be 1 1/2 times as big as the real file. It will move 1/2
#   a pixel right every frame, and 1/4 a pixel down every frame.
#(V1.5)
# To have more than one fog per map, just put 2 fogs in brackets, seperated by
# commas:
#  MAP_FOGS[3] = [["CloudySky",45,0,1.3,2,0],["BlueSky",45,2,1.5,3,5]]
################
# Actual Setup::
  MAP_FOGS[1] = ["BlueSky",165,0,2,0,0]
  MAP_FOGS[2] = ["BlueSky",145,2,1.5,4,2]
  MAP_FOGS[3] = [["CloudySky",75,0,1.3,2,0],["BlueSky",65,2,1.5,3,5]]
# Folder where fogs reside
  FOGS_FOLDER = "Parallaxes"
end
module Cache
  #--------------------------------------------------------------------------
  # * Get System Graphic
  #     filename : Filename
  #--------------------------------------------------------------------------
  def self.fog(filename)
    load_bitmap("Graphics/#{Mm12::FOGS_FOLDER}/", filename) rescue Bitmap.new(200,200)
  end
end
class Game_Map
  attr_accessor :fog, :fog_frozen, :fog_hidden, :fog_opacity, :fog_ox, :fog_oy,
      :fog_zoom, :fog_filename
  alias mm12_fog_gm_mp_setup setup
  alias mm12_fog_gm_mp_update update
  alias mm12_fog_gm_mp_init initialize
  def initialize
    mm12_fog_gm_mp_init
    @fogox = Array.new(9999,0)
    @fogoy = Array.new(9999,0)
    @fog_ox = []
    @fog_oy = []
    @fog = []
    @filename = []
    @fog_filename = []
    @fog_zoom = []
    @fog_hidden = []
    @fog_frozen = Array.new(9999,false)
  end
  def setup(map_id)
    mm12_fog_gm_mp_setup(map_id)
    setup_fog
  end
  def setup_fog(fog_data=nil)
    for i in 0..(@fog.size-1)
      if @fog_hidden[i]
        @fog[i].opacity = @fog_opacity
        @fog_hidden[i] = false
        return
      end
      @fog[i].dispose unless @fog[i] == nil
      @fog[i] = nil
    end
    @fog = []
    if fog_data == nil
      fog_data = Mm12::MAP_FOGS[@map_id]
      if fog_data.nil?
        @fog_used = false
        return
      end
      if !fog_data[0].is_a?(Array)
        fog_data = [fog_data]
      end
      i = 0
      for data in fog_data
        @fog[i] = Plane.new
        @fog[i].ox=0
        @fog[i].oy=0
        @fog[i].ox = @fog_ox[i] unless @fog_ox[i].nil?
        @fog[i].oy = @fog_oy[i] unless @fog_oy[i].nil?
        @fog_ox[i] = nil
        @fog_oy[i] = nil
        @fog[i].bitmap = Cache.fog(data[0])
        @fog[i].z = 30
        @fog[i].opacity = data[1]
        @fog[i].blend_type = data[2]
        @fog[i].zoom_x = data[3]
        @fog[i].zoom_y = data[3]
        @fog_zoom[i] = data[3]
        @fog[i].sx = data[4]#.to_f
        @fog[i].sy = data[5]#.to_f
        @filename[i] = data[0]
        @fog_filename[i] = data[0]
        i += 1
      end
    else
      if !fog_data[0].is_a?(Array)
        fog_data = [fog_data]
      end
      i = 0
      for data in fog_data
        @fog_used = true
        @fog[i] = Plane.new
        @fog[i].bitmap = Cache.fog(data[0])
        @fog[i].opacity = data[1]
        @fog[i].blend_type = data[2]
        @fog[i].zoom_x = data[3]
        @fog[i].zoom_y = data[3]
        @fog_zoom[i] = data[3]
        @fog[i].sx = data[4]
        @fog[i].sy = data[5]
        @filename[i] = data[0]
        @fog_filename[i] = data[0]
        i += 1
      end
    end
  end
  def update
    mm12_fog_gm_mp_update
    for i in 0..(@fog.size-1)
      return if @fog[i].nil?
      @fog[i].zoom_x = @fog[i].zoom_y = @fog_zoom[i] if @fog[i].zoom_x != @fog_zoom[i]
      if @fog_filename[i] != @filename[i]
        @filename[i] = @fog_filename[i]
        @fog[i].bitmap = Cache.fog(@filename)
      end
      if @fog_frozen[i]
        @fog[i].ox = ($game_map.display_x/8.0)+@fogox[i] unless @fog[i].nil?# or @fog_frozen or @fog.ox == ($game_map.display_y/8.0)+(@fog.sx/8.0)
      else
        @fogox[i] -= @fog[i].sx/8.0 unless @fogox[i].nil?
        @fog[i].ox = ($game_map.display_x/8.0)+@fogox[i] unless @fog[i].nil?# or @fog_frozen or @fog.ox == ($game_map.display_y/8.0)+(@fog.sx/8.0)
      end
      if @fog_frozen[i]
        @fog[i].oy = ($game_map.display_y/8.0)+@fogoy[i] unless @fog[i].nil?# or @fog_frozen or @fog.oy == ($game_map.display_y/8.0)+(@fog.sy/8.0)
      else
        @fogoy[i] -= @fog[i].sy/8.0 unless @fogoy[i].nil?
        @fog[i].oy = ($game_map.display_y/8.0)+@fogoy[i] unless @fog[i].nil?# or @fog_frozen or @fog.oy == ($game_map.display_y/8.0)+(@fog.sy/8.0)
      end
    end
  end
end
class Scene_Map
  alias mm12_fog_scn_mp_terminate terminate
  alias mm12_fog_scn_mp_start start
  def start
    mm12_fog_scn_mp_start
    $game_map.setup_fog
  end
  def terminate
    mm12_fog_scn_mp_terminate
    for i in 0..9999
      next if $game_map.fog[i].nil?
      $game_map.fog_ox[i] = $game_map.fog[i].ox
      $game_map.fog_oy[i] = $game_map.fog[i].oy
      $game_map.fog[i].dispose unless $game_map.fog[i].nil?
      $game_map.fog[i] = nil
    end
  end
end
class Plane
  attr_accessor :sx, :sy
end

Fixed Demo: http://www.mediafire.com/download.php?mmzmykeymwu

~Miget man12


__________________________
By the way:


I'm bored because it's summer so I decided to drop by for a bit.
Go to the top of the page
 
+Quote Post
   
FauxMask
post Aug 9 2009, 08:10 PM
Post #10


Level 7
Group Icon

Group: Member
Posts: 96
Type: None
RM Skill: Beginner




Great script! I love the lag-freeness. The only problem I found was that when I went into the menu, after I went out of it again, the fog disappeared huh.gif
Go to the top of the page
 
+Quote Post
   
miget man12
post Aug 9 2009, 08:33 PM
Post #11


Making a Comeback
Group Icon

Group: Revolutionary
Posts: 393
Type: Musician
RM Skill: Intermediate




Hm, that's odd. I'm not getting that error. My guess would be a compatibility issue, try placing this script below all your other scripts.

~Miget man12


__________________________
By the way:


I'm bored because it's summer so I decided to drop by for a bit.
Go to the top of the page
 
+Quote Post
   
FauxMask
post Aug 9 2009, 08:53 PM
Post #12


Level 7
Group Icon

Group: Member
Posts: 96
Type: None
RM Skill: Beginner




QUOTE (miget man12 @ Aug 9 2009, 09:33 PM) *
Hm, that's odd. I'm not getting that error. My guess would be a compatibility issue, try placing this script below all your other scripts.

~Miget man12

Yep, that was the problem. Thanks it works now happy.gif
Go to the top of the page
 
+Quote Post
   
Pinky
post Sep 2 2009, 08:25 AM
Post #13


Level 13
Group Icon

Group: Revolutionary
Posts: 227
Type: Developer
RM Skill: Skilled




This is a good script, but I cannot turn the fog off. Yes I read the instractions and it doean't say how to turn the fog off. I only want Map3 in my game to have fog so I do I turn it off on Map1 and Map2?
Go to the top of the page
 
+Quote Post
   
miget man12
post Sep 2 2009, 04:12 PM
Post #14


Making a Comeback
Group Icon

Group: Revolutionary
Posts: 393
Type: Musician
RM Skill: Intermediate




I'm confused. The fogs stays on when you transfer maps? The fogs automatically disappear if the map does not have a fog set. If it stays there, that's most likely some sort of compatibility issue. also, you can just call this to get rid of the fog:
CODE
$game_map.setup_fog(["",0,0,0,0,0])
Hope that's helpful some -- I'm not sure I understood the question fully.

~Miget man12


__________________________
By the way:


I'm bored because it's summer so I decided to drop by for a bit.
Go to the top of the page
 
+Quote Post
   
Pinky
post Sep 2 2009, 05:08 PM
Post #15


Level 13
Group Icon

Group: Revolutionary
Posts: 227
Type: Developer
RM Skill: Skilled




It worked thanks. May I suggest something. I think in the next update you should make it so the fogs appear in battle. I'm using Mr. Anonymous's in battle weather and screen tone script. It would look a little weird if all the weather and screen tone effects appeared in battle and not the fog. This is just a suggestion by the way.

This post has been edited by Pinky: Sep 2 2009, 05:08 PM
Go to the top of the page
 
+Quote Post
   
miget man12
post Sep 2 2009, 05:48 PM
Post #16


Making a Comeback
Group Icon

Group: Revolutionary
Posts: 393
Type: Musician
RM Skill: Intermediate




Ooh, that's actually a good idea! Hm I never thought of that:D I'll do that when I'm done with my homework(shouldn't be too long; pretty light load today) But yeah, definitely something I should add. Probably wont matter the battle system that much either:D
Expect it within the next hour or two:)

~Miget man12


__________________________
By the way:


I'm bored because it's summer so I decided to drop by for a bit.
Go to the top of the page
 
+Quote Post
   
GlengroveG
post Sep 29 2009, 04:27 PM
Post #17


Level 1
Group Icon

Group: Member
Posts: 13
Type: Developer
RM Skill: Intermediate




Sweet looking script! I'll download the demo when I get home.
Thanks for making this! I was looking for a lag-free way to do this! smile.gif
Go to the top of the page
 
+Quote Post
   
nathkyo
post Dec 19 2009, 10:47 PM
Post #18


Level 2
Group Icon

Group: Member
Posts: 18
Type: None
RM Skill: Intermediate




this is a really cool script however is there any way to make it only appear on certain maps. Maybe by putting something in the map's name that triggers the fog
Go to the top of the page
 
+Quote Post
   
SuperMega
post Dec 20 2009, 02:25 PM
Post #19


Public memberTitle(String n)
Group Icon

Group: Revolutionary
Posts: 683
Type: Developer
RM Skill: Skilled




QUOTE (nathkyo @ Dec 20 2009, 12:47 AM) *
this is a really cool script however is there any way to make it only appear on certain maps. Maybe by putting something in the map's name that triggers the fog

There's a configuration in the script that allows you to choose which maps you want to use the fogs for. It's near the top of the script.


__________________________
Translated Scripts:
Diagonal Movement (Eight Direction) and Smooth Jumping
Attack Party, Heal Enemies
Display Party Status On Map (DQ Style)
Display Maps Under Maps
Save Screen Customization
Subtitled Menus

If you want to suggest a translation for something, PM me, and I'll take a look. I AM TRYING TO GIVE AWAY LOCKERZ.com INVITES, SO PLEASE LET ME KNOW IF YOU WANT ONE.
Currently Working on 2 RPG Maker VX Projects. They are very unique, and have a different kind of style then the usual RPGs. So don't think of them as just another RPG. Did that sound rude? :D Not sure if I want them to go public yet, but we'll see how it goes.
Need a script translated? Come talk to me, and I'll see what I can do.
Go to the top of the page
 
+Quote Post
   
nathkyo
post Dec 21 2009, 12:08 AM
Post #20


Level 2
Group Icon

Group: Member
Posts: 18
Type: None
RM Skill: Intermediate




QUOTE (SuperMega @ Dec 20 2009, 02:25 PM) *
QUOTE (nathkyo @ Dec 20 2009, 12:47 AM) *
this is a really cool script however is there any way to make it only appear on certain maps. Maybe by putting something in the map's name that triggers the fog

There's a configuration in the script that allows you to choose which maps you want to use the fogs for. It's near the top of the script.

hey thanks I found it it works great
Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 08:35 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker