Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: jyumai on July 25, 2011, 05:40:36 pm

Title: Just need some quick help here!!!
Post by: jyumai on July 25, 2011, 05:40:36 pm
I want to modify my Scene_title and Main so that I can get fog and/or weather on the titlescreen...without using an Advanced Titlescreen script. I really dont need half the features in those XD
Title: Re: Just need some quick help here!!!
Post by: ForeverZer0 on July 25, 2011, 07:30:37 pm
Here you go.  

Spoiler: ShowHide
class Scene_Title
 
  alias zer0_title_fog_main main
  def main
    viewport = Viewport.new(0, 0, 640, 480)
    # Change the value of the next line to like 10000 to have it display "over"
    # the windows instead of behind them
    viewport.z = 100
    @fog = Plane.new(viewport)
    @weather = RPG::Weather.new(viewport)
    #---------------------------------------------------------------------------
    # Adjust your settings for the fog here
    @fog.bitmap = RPG::Cache.fog('001-Fog01', 0)  # Name of the fog
    @scroll_speed_x = 3   # Horizontal scroll speed
    @scroll_speed_y = 3   # Vertical scroll speed
    @fog.zoom_x = 1.0  # Zoom on the x-axis
    @fog.zoom_y = 1.0  # Zoom on the y-axis
    @fog.opacity = 60  # Opacity
    @fog.blend_type = 0  # Blendtype
    @fog.tone = Tone.new(0, 0, 0, 0)  # Tone to blend with the bitmal
   
   
    @weather.type = 1   # The weather type
    @weather.max = 25   # The power of the weather
    #---------------------------------------------------------------------------
    zer0_title_fog_main
    [@fog, viewport].each {|sprite| sprite.dispose }
  end
 
  alias zer0_title_fog_upd update
  def update
    @fog.ox += @scroll_speed_x
    @fog.oy += @scroll_speed_y
    @weather.update
    zer0_title_fog_upd
  end
end


EDIT: I just noticed you said you wanted weather there to.  I'll add and update it in a second.

EDIT 2:  Added the weather control.
Title: Re: Just need some quick help here!!!
Post by: jyumai on July 25, 2011, 08:00:50 pm
Quote from: ForeverZer0 on July 25, 2011, 07:30:37 pm
Here you go.  

Spoiler: ShowHide
class Scene_Title
 
  alias zer0_title_fog_main main
  def main
    viewport = Viewport.new(0, 0, 640, 480)
    # Change the value of the next line to like 10000 to have it display "over"
    # the windows instead of behind them
    viewport.z = 100
    @fog = Plane.new(viewport)
    @weather = RPG::Weather.new(viewport)
    #---------------------------------------------------------------------------
    # Adjust your settings for the fog here
    @fog.bitmap = RPG::Cache.fog('001-Fog01', 0)  # Name of the fog
    @scroll_speed_x = 3   # Horizontal scroll speed
    @scroll_speed_y = 3   # Vertical scroll speed
    @fog.zoom_x = 1.0  # Zoom on the x-axis
    @fog.zoom_y = 1.0  # Zoom on the y-axis
    @fog.opacity = 60  # Opacity
    @fog.blend_type = 0  # Blendtype
    @fog.tone = Tone.new(0, 0, 0, 0)  # Tone to blend with the bitmal
   
   
    @weather.type = 1   # The weather type
    @weather.max = 25   # The power of the weather
    #---------------------------------------------------------------------------
    zer0_title_fog_main
    [@fog, viewport].each {|sprite| sprite.dispose }
  end
 
  alias zer0_title_fog_upd update
  def update
    @fog.ox += @scroll_speed_x
    @fog.oy += @scroll_speed_y
    @weather.update
    zer0_title_fog_upd
  end
end


EDIT: I just noticed you said you wanted weather there to.  I'll add and update it in a second.

EDIT 2:  Added the weather control.


Thank you sooooo much man...Ill go test it out now  :haha:
Title: Re: Just need some quick help here!!!
Post by: ForeverZer0 on July 25, 2011, 08:07:37 pm
Just noticed a minor thing that needs fixed.  Change the last line of the "main" method to this.  I forgot to dispose the weather.

[@fog, viewport, @weather].each {|sprite| sprite.dispose }