Just need some quick help here!!!

Started by jyumai, July 25, 2011, 05:40:36 pm

Previous topic - Next topic

jyumai

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

ForeverZer0

July 25, 2011, 07:30:37 pm #1 Last Edit: July 25, 2011, 07:37:56 pm by ForeverZer0
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.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

jyumai

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:

ForeverZer0

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 }
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.