Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Professional Title Screen + weather effects?

So I'm using the Professional Title Screen V2.0 English translation, released by Sonicia, and I'm wondering how I would add rain effects (default RTP rain) to it. From what little I know of scripting, it should be fairly easy to implement, correct?

Script:
Code:
=begin

=========================================

Professional Title Screen ver. 2.0 English Translation

Script by パラ犬, Edited by Kio !! :D

[url=http://rpg.para.s3p.net/]http://rpg.para.s3p.net/[/url]

-->Released and translated by Sonicia.

Search for my name (Sonicia)for the customizing place where you can arange the 

graphics where you want them. Please credit Kio, who orginally made this script

compatable, and me for translating, releasing, and finding out how to use it.

Note, in a few rare spots there is still Japanese, since it was code I didnt

change it for fear of messing it up. All comments are translated by Sonicia.

 

Note: you need continue.png, continue_active.png, newgame.png,

newgame_active.png, shutdown.png, and shutdown_active.png in your game's

graphics\title folder. The graphics must be the same size, both active and inactive.

This means that if you have an arrow or text make that one first, duplicate, 

then erase the arrow and edit the rest of the picture or it will be set off.

=========================================

 

=========================================

Title menu picture

=========================================

=end

#===========================================

module PARA_TITLE_CUSTOM

 

# Menu command picture, (true/false)

IMG_MENU = true

 

#↓---Menu command picture Setting--- 

#Character string of menu command 

#MENU_NEWGAME = “new game” # new game 

MENU_NEWGAME = "ニューゲーム" # ニューゲーム

#MENU_LOAD = “continuing” # continuing 

MENU_LOAD = "コンティニュー" # コンティニュー

#MENU_END = “shutdown” # shutdown 

MENU_END = "シャットダウン" # シャットダウン

 

# window frame (true/false)

WINDOW_TRANS = false

#Transparency of the window frame

WINDOW_OPACITY = 160

 

#Side size (horizontal?) of # window 

WINDOW_WIDTH = 192

#Vertical position of window (0: Coordinate appointment/

#1: The left edge/2: Center/3: Right hand edge) 

WINDOW_ALIGN = 2

#When # “coordinate appointment” being, abscissa of the window 

WINDOW_POS_X = 0

#Vertical position of # window (0: Coordinate appointment/

#1: Top/2: Center/3: Bottom) 

WINDOW_VALIGN = 0

#When “coordinate appointment” being, ordinate of the window 

WINDOW_POS_Y = 288

 

 

#==========================================

=begin

Sonicia

Customize the location and the graphics make sure you change

only the numbers, 250 is approxamtely the center of

the vertical screen.

Make sure that the command pictures are in the “Graphics/Titles” folder

=end

#==========================================

=begin

#New Game Graphic

IMG_NEWGAME = ["newgame","newgame_active"]

IMG_NEWGAME_X = 100 # Horizontal position 

IMG_NEWGAME_Y = 160 # Vertical position 

#Continue Graphic

IMG_LOAD = ["continue","continue_active"]

IMG_LOAD_X = 250 # Horizontal position

IMG_LOAD_Y = 160 # Vertical position

#Shut Down Graphic

IMG_END = ["shutdown","shutdown_active"]

IMG_END_X = 400 # Horizontal position

IMG_END_Y = 160 # Vertical position

=end

#My orginal settings for reference Copy and paste if you need to

#New Game Graphic

IMG_NEWGAME = ["newgame","newgame_active"]

IMG_NEWGAME_X = 251 # Horizontal position 

IMG_NEWGAME_Y = 310 # Vertical position 

#Continue Graphic

IMG_LOAD = ["continue","continue_active"]

IMG_LOAD_X = 250 # Horizontal position

IMG_LOAD_Y = 350 # Vertical position

#Shut Down Graphic

IMG_END = ["shutdown","shutdown_active"]

IMG_END_X = 253 # Horizontal position

IMG_END_Y = 390 # Vertical position

 

 

#END CUSTOMIZABLE AREA

#============================================

#Synthetic method of picture (0: Usually/1: Addition/2: Subtraction) 

BLEND_TYPE = 0

end

 

 

#------------------------------------------------------------------------------

 

#======================================

# ■ Scene_Title

#======================================

 

class Scene_Title

#--------------------------------------------------------------------------

# - Main processing 

#--------------------------------------------------------------------------

def main

#If battle test

if $BTEST

battle_test

return

end

# Load database

$data_actors = load_data("Data/Actors.rxdata")

$data_classes = load_data("Data/Classes.rxdata")

$data_skills = load_data("Data/Skills.rxdata")

$data_items = load_data("Data/Items.rxdata")

$data_weapons = load_data("Data/Weapons.rxdata")

$data_armors = load_data("Data/Armors.rxdata")

$data_enemies = load_data("Data/Enemies.rxdata")

$data_troops = load_data("Data/Troops.rxdata")

$data_states = load_data("Data/States.rxdata")

$data_animations = load_data("Data/Animations.rxdata")

$data_tilesets = load_data("Data/Tilesets.rxdata")

$data_common_events = load_data("Data/CommonEvents.rxdata")

$data_system = load_data("Data/System.rxdata")

# Make system object

$game_system = Game_System.new

# Make title graphic

@sprite = Sprite.new

@sprite.bitmap = RPG::Cache.title($data_system.title_name)

# Make command window

s1 = PARA_TITLE_CUSTOM::MENU_NEWGAME

s2 = PARA_TITLE_CUSTOM::MENU_LOAD

s3 = PARA_TITLE_CUSTOM::MENU_END

w = PARA_TITLE_CUSTOM::WINDOW_WIDTH

@command_window = Window_Command.new(w, [s1, s2, s3])

if PARA_TITLE_CUSTOM::WINDOW_TRANS

@command_window.opacity = 0

else

@command_window.back_opacity = PARA_TITLE_CUSTOM::WINDOW_OPACITY

end

# Position of the window 

case PARA_TITLE_CUSTOM::WINDOW_ALIGN

when 0

@command_window.x = PARA_TITLE_CUSTOM::WINDOW_POS_X

when 1

@command_window.x = 0

when 2

@command_window.x = ( 640 - @command_window.width ) / 2

when 3

@command_window.x = 640 - @command_window.width

end

case PARA_TITLE_CUSTOM::WINDOW_VALIGN

when 0

@command_window.y = PARA_TITLE_CUSTOM::WINDOW_POS_Y

when 1

@command_window.y = 0

when 2

@command_window.y = ( 480 - @command_window.height ) / 2

when 3

@command_window.y = 480 - @command_window.height

end

# Continue enabled determinant

# Check if at least one save file exists

# If enabled, make @continue_enabled true; if disabled, make it false

@continue_enabled = true

for i in 0..3

if FileTest.exist?("Save#{i+1}.rxdata")

@continue_enabled = true

end

end

# If continue is enabled, move cursor to "Continue"

# If disabled, display "Continue" text in gray

if @continue_enabled

@command_window.index = 1

else

@command_window.disable_item(1)

end

# Command Picture

if PARA_TITLE_CUSTOM::IMG_MENU

@command_window.visible = false

@command_img1 = Sprite.new

@command_img1.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE

@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])

@command_img1.x = PARA_TITLE_CUSTOM::IMG_NEWGAME_X

@command_img1.y = PARA_TITLE_CUSTOM::IMG_NEWGAME_Y

@command_img2 = Sprite.new

@command_img2.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE

@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])

@command_img2.x = PARA_TITLE_CUSTOM::IMG_LOAD_X

@command_img2.y = PARA_TITLE_CUSTOM::IMG_LOAD_Y

@command_img3 = Sprite.new

@command_img3.blend_type = PARA_TITLE_CUSTOM::BLEND_TYPE

@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])

@command_img3.x = PARA_TITLE_CUSTOM::IMG_END_X

@command_img3.y = PARA_TITLE_CUSTOM::IMG_END_Y

# If continue is enabled, move cursor to "Continue"

# If disabled, display "Continue" text in gray

if @continue_enabled

@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])

@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])

else

@command_img2.opacity = 160

@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])

@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])

end

end

# Play title BGM

$game_system.bgm_play($data_system.title_bgm)

# Stop playing ME and BGS

Audio.me_stop

Audio.bgs_stop

# Execute transition

Graphics.transition

# Main loop

loop do

# Update game screen

Graphics.update

# Update input information

Input.update

# Frame update

update

# Abort loop if screen is changed

if $scene != self

break

end

end

# Prepare for transition

Graphics.freeze

# Dispose of command window

@command_window.dispose

if PARA_TITLE_CUSTOM::IMG_MENU

@command_img1.dispose

@command_img2.dispose

@command_img3.dispose

end

# Graphics Dispose

@sprite.bitmap.dispose

@sprite.dispose

end

 

 

#--------------------------------------------------------------------------

# * Frame Update

#--------------------------------------------------------------------------

def update

# Update command window

@command_window.update

# If C button was pressed

if Input.trigger?(Input::C)

# Branch by command window cursor position

case @command_window.index

when 0 # New game

command_new_game

when 1 # Continue

command_continue

when 2 # Shutdown

command_shutdown

end

end

if PARA_TITLE_CUSTOM::IMG_MENU

if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)

case @command_window.index

when 0 # New Game

@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[1])

@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])

@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])

when 1 # Continue Game

@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])

@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[1])

@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[0])

when 2 # End Game

@command_img1.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_NEWGAME[0])

@command_img2.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_LOAD[0])

@command_img3.bitmap = RPG::Cache.title(PARA_TITLE_CUSTOM::IMG_END[1])

end

end

end

end

def command_new_game

# Play decision SE

$game_system.se_play($data_system.decision_se)

# Stop BGM

Audio.bgm_stop

# Reset frame count for measuring play time

Graphics.frame_count = 0

# Make each type of game object

$game_temp = Game_Temp.new

$game_system = Game_System.new

$game_switches = Game_Switches.new

$game_variables = Game_Variables.new

$game_self_switches = Game_SelfSwitches.new

$game_screen = Game_Screen.new

$game_actors = Game_Actors.new

$game_party = Game_Party.new

$game_troop = Game_Troop.new

$game_map = Game_Map.new

$game_player = Game_Player.new

# Set up initial party

$game_party.setup_starting_members

# Set up initial map position

$game_map.setup($data_system.start_map_id)

# Move player to initial position

$game_player.moveto($data_system.start_x, $data_system.start_y)

# Refresh player

$game_player.refresh

# Run automatic change for BGM and BGS set with map

$game_map.autoplay

# Update map (run parallel process event)

$game_map.update

# Switch to map screen

$scene = Scene_Map.new

end

#--------------------------------------------------------------------------

# * Command: Continue

#--------------------------------------------------------------------------

def command_continue

# If continue is disabled

unless @continue_enabled

# Play buzzer SE

$game_system.se_play($data_system.buzzer_se)

return

end

# Play decision SE

$game_system.se_play($data_system.decision_se)

# Switch to load screen

$scene = Scene_Load.new

end

#--------------------------------------------------------------------------

# * Command: Shutdown

#--------------------------------------------------------------------------

def command_shutdown

# Play decision SE

$game_system.se_play($data_system.decision_se)

# Fade out BGM, BGS, and ME

Audio.bgm_fade(800)

Audio.bgs_fade(800)

Audio.me_fade(800)

# Shutdown

$scene = nil

end

#--------------------------------------------------------------------------

# * Battle Test

#--------------------------------------------------------------------------

def battle_test

# Load database (for battle test)

$data_actors = load_data("Data/BT_Actors.rxdata")

$data_classes = load_data("Data/BT_Classes.rxdata")

$data_skills = load_data("Data/BT_Skills.rxdata")

$data_items = load_data("Data/BT_Items.rxdata")

$data_weapons = load_data("Data/BT_Weapons.rxdata")

$data_armors = load_data("Data/BT_Armors.rxdata")

$data_enemies = load_data("Data/BT_Enemies.rxdata")

$data_troops = load_data("Data/BT_Troops.rxdata")

$data_states = load_data("Data/BT_States.rxdata")

$data_animations = load_data("Data/BT_Animations.rxdata")

$data_tilesets = load_data("Data/BT_Tilesets.rxdata")

$data_common_events = load_data("Data/BT_CommonEvents.rxdata")

$data_system = load_data("Data/BT_System.rxdata")

# Reset frame count for measuring play time

Graphics.frame_count = 0

# Make each game object

$game_temp = Game_Temp.new

$game_system = Game_System.new

$game_switches = Game_Switches.new

$game_variables = Game_Variables.new

$game_self_switches = Game_SelfSwitches.new

$game_screen = Game_Screen.new

$game_actors = Game_Actors.new

$game_party = Game_Party.new

$game_troop = Game_Troop.new

$game_map = Game_Map.new

$game_player = Game_Player.new

# Set up party for battle test

$game_party.setup_battle_test_members

# Set troop ID, can escape flag, and battleback

$game_temp.battle_troop_id = $data_system.test_troop_id

$game_temp.battle_can_escape = true

$game_map.battleback_name = $data_system.battleback_name

# Play battle start SE

$game_system.se_play($data_system.battle_start_se)

# Play battle BGM

$game_system.bgm_play($game_system.battle_bgm)

# Switch to battle screen

$scene = Scene_Battle.new

end

end
 
make a new page above the 'Title Screen V2.0 script'
and paste this:
[rgss]class Window_Weather < Window_Base
 
  def initialize
    super(0, 0, 640, 480)
    @viewport1 = Viewport.new(0, 0, 640, 480)
    @viewport1.z = 5000
    self.opacity = 0
    $game_temp = Game_Temp.new
    $game_screen = Game_Screen.new
    $game_screen.weather(1,5,200)
    @weather = RPG::Weather.new(@viewport1)
  end
 
  def update
    super
    $game_screen.update
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.ox = 0 #$game_map.display_x / 4
    @weather.oy = 0 #$game_map.display_y / 4
    @weather.update
  end
 
end
[/rgss]

Then, add this in line 135:
@window = Window_Weather.new

and this in line 256:
@window.update
 
That's weird. I tested my script before I posted and double-checked now. I don't get syntax error. Seems like the error is from some other script. Search the script editor for for pages with no name, as it says script ' '. try naming them all, so you can track which one is it.
 

Star

Sponsor

silver wind":y8u84mrg said:
That's weird. I tested my script before I posted and double-checked now. I don't get syntax error. Seems like the error is from some other script. Search the script editor for for pages with no name, as it says script ' '. try naming them all, so you can track which one is it.
It's because he tried inserting the script without taking the LineNumber Off.

@Nickster, Click LineNumber OFF before copying the script into the script editor, all those red numbers will just give you a syntax error.
 
so there's a slight problem, I'm using the animate save file as well, and when i go from title screen to "continue" the rain freezes. then when i go right back to the title screen, its still frozen but new rain just goes right over the top of it. Any idea's on that?
 
You're right. Apparently the weather needs to be disposed too.
In a new page, paste this :
[rgss]class Window_Weather < Window_Base
 
  def initialize
    super(0, 0, 640, 480)
    @viewport1 = Viewport.new(0, 0, 640, 480)
    @viewport1.z = 5000
    #self.opacity = 50
    $game_temp = Game_Temp.new
    $game_screen = Game_Screen.new
    $game_screen.weather(1,5,200)
    @weather = RPG::Weather.new(@viewport1)
  end
 
  def update
    super
    $game_screen.update
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.ox = 0
    @weather.oy = 0
    @weather.update
  end
 
  def dispose
    $game_screen.weather(0, 0, 20)
    @weather.dispose
    super
  end
 
end
[/rgss]

in line 135, add: @window = Window_Weather.new

in line 256, add: @window.update

in line 246, add: @window.dispose

If anyone wants weather with the default Title screen, here's the code (new page, above main)
[rgss] 
class Window_Weather < Window_Base
 
  def initialize
    super(0, 0, 640, 480)
    @viewport1 = Viewport.new(0, 0, 640, 480)
    @viewport1.z = 5000
    #self.opacity = 50
    $game_temp = Game_Temp.new
    $game_screen = Game_Screen.new
    $game_screen.weather(1,5,200)
    @weather = RPG::Weather.new(@viewport1)
  end
 
  def update
    super
    $game_screen.update
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.ox = 0
    @weather.oy = 0
    @weather.update
  end
 
  def dispose
    $game_screen.weather(0, 0, 20)
    @weather.dispose
    super
  end
 
end
 
class Scene_Title
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # If battle test
    if $BTEST
      battle_test
      return
    end
    # Load database
    $data_actors        = load_data("Data/Actors.rxdata")
    $data_classes       = load_data("Data/Classes.rxdata")
    $data_skills        = load_data("Data/Skills.rxdata")
    $data_items         = load_data("Data/Items.rxdata")
    $data_weapons       = load_data("Data/Weapons.rxdata")
    $data_armors        = load_data("Data/Armors.rxdata")
    $data_enemies       = load_data("Data/Enemies.rxdata")
    $data_troops        = load_data("Data/Troops.rxdata")
    $data_states        = load_data("Data/States.rxdata")
    $data_animations    = load_data("Data/Animations.rxdata")
    $data_tilesets      = load_data("Data/Tilesets.rxdata")
    $data_common_events = load_data("Data/CommonEvents.rxdata")
    $data_system        = load_data("Data/System.rxdata")
    # Make system object
    $game_system = Game_System.new
    # Make title graphic
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title($data_system.title_name)
    # ----------------- my edit----------------- #
    @window = Window_Weather.new
    @window.opacity = 0
    # ----------------------------------------- #
    # Make command window
    s1 = "New Game"
    s2 = "Continue"
    s3 = "Shutdown"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.back_opacity = 160
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 288
    # Continue enabled determinant
    # Check if at least one save file exists
    # If enabled, make @continue_enabled true; if disabled, make it false
    @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end
    # If continue is enabled, move cursor to "Continue"
    # If disabled, display "Continue" text in gray
    if @continue_enabled
      @command_window.index = 1
    else
      @command_window.disable_item(1)
    end
    # Play title BGM
    $game_system.bgm_play($data_system.title_bgm)
    # Stop playing ME and BGS
    Audio.me_stop
    Audio.bgs_stop
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of command window
    @command_window.dispose
    # Dispose of title graphic
    @sprite.bitmap.dispose
    @sprite.dispose
    @window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # ------ my edit ------ #
    @window.update
    # ------ my edit ------ #
    # Update command window
    @command_window.update
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # New game
        command_new_game
      when 1  # Continue
        command_continue
      when 2  # Shutdown
        command_shutdown
      end
    end
  end
 
end
[/rgss]
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top