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.

Title Screen New Game problem

I have a Custom Title now but i think I f*cked something up somewhere, because now..when I hit New Game...nothing happens. How the hell I did this, I don't know. Hopefully somebody on here does becuase my title is really good, but I cant even test any further than that. Here's the script:

you have to make another Scene_Title thats why there's a"Scene_Title2" and "Scene_Title"..hope this helps anybody trying to help me.

Code:
#============================================================================== 
# Pour que la map s'affiche directement, créé par Corbaque 
#============================================================================== 

class Scene_Title 

  def main 
    if $BTEST 
      battle_test 
      return 
    end 
    $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") 
    $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 
    $game_party.setup_starting_members 
    $game_map.setup($data_system.start_map_id) 
    $game_player.moveto($data_system.start_x, $data_system.start_y) 
    $game_player.refresh 
    $game_map.autoplay 
    $game_map.update 
    $scene = Scene_Map.new 
  def 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") 
    Graphics.frame_count = 0 
    $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 
    $game_party.setup_battle_test_members 
    $game_temp.battle_troop_id = $data_system.test_troop_id 
    $game_temp.battle_can_escape = true 
    $game_map.battleback_name = $data_system.battleback_name 
    $game_system.se_play($data_system.battle_start_se) 
    $game_system.bgm_play($game_system.battle_bgm) 
    $scene = Scene_Battle.new 
  end 
end 
end

Code:
#============================================================================== 
# ■ Scene_Title2, modifié pas Corbaque 
#------------------------------------------------------------------------------ 
#  タイトル画面の処理を行うクラスです。 
#============================================================================== 

class Scene_Title2 
  #-------------------------------------------------------------------------- 
  # ● メイン処理 
  #-------------------------------------------------------------------------- 
  def main 
    # 戦闘テストの場合 
    if $BTEST 
      battle_test 
      return 
    end 
    # データベースをロード 
    $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") 
    # システムオブジェクトを作成 
    $game_system = Game_System.new 
    # タイトルグラフィックを作成 
    @sprite = Sprite.new 
    @sprite.bitmap = RPG::Cache.title($data_system.title_name) 
    # コマンドウィンドウを作成 
    s1 = "New Game" 
    s2 = "Continue" 
    s3 = "Quit" 
    @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 を true、無効なら false にする 
    @continue_enabled = false 
    for i in 0..3 
      if FileTest.exist?("Save#{i+1}.rxdata") 
        @continue_enabled = true 
      end 
    end 
    # コンティニューが有効な場合、カーソルをコンティニューに合わせる 
    # 無効な場合、コンティニューの文字をグレー表示にする 
    if @continue_enabled 
      @command_window.index = 1 
    else 
      @command_window.disable_item(1) 
    end 
    # タイトル BGM を演奏 
    $game_system.bgm_play($data_system.title_bgm) 
    # ME、BGS の演奏を停止 
    Audio.me_stop 
    Audio.bgs_stop 
    # トランジション実行 
    Graphics.transition 
    # メインループ 
    loop do 
      # ゲーム画面を更新 
      Graphics.update 
      # 入力情報を更新 
      Input.update 
      # フレーム更新 
      update 
      # 画面が切り替わったらループを中断 
      if $scene != self
        break 
      end 
    end 
    # トランジション準備 
    Graphics.freeze 
    # コマンドウィンドウを解放 
    @command_window.dispose 
    # タイトルグラフィックを解放 
    @sprite.bitmap.dispose 
    @sprite.dispose 
  end 
  #-------------------------------------------------------------------------- 
  # ● フレーム更新 
  #-------------------------------------------------------------------------- 
  def update 
    # コマンドウィンドウを更新 
    @command_window.update 
    # C ボタンが押された場合 
    if Input.trigger?(Input::C) 
      # コマンドウィンドウのカーソル位置で分岐 
      case @command_window.index 
      when 0  # ニューゲーム 
        command_new_game 
      when 1  # コンティニュー 
        command_continue 
      when 2  # シャットダウン 
        command_shutdown 
      end 
    end 
  end 
  #-------------------------------------------------------------------------- 
  # ● コマンド : ニューゲーム 
  #-------------------------------------------------------------------------- 
  def command_new_game 
    $scene = Scene_Map.new 
    $game_temp.player_transferring = true 
      $game_temp.player_new_map_id = 1 
      $game_temp.player_new_x = 10 
      $game_temp.player_new_y = 10 
      end 
  #-------------------------------------------------------------------------- 
  # ● コマンド : コンティニュー 
  #-------------------------------------------------------------------------- 
  def command_continue 
    # コンティニューが無効の場合 
    unless @continue_enabled 
      # ブザー SE を演奏 
      $game_system.se_play($data_system.buzzer_se) 
      return 
    end 
    # 決定 SE を演奏 
    $game_system.se_play($data_system.decision_se) 
    # ロード画面に切り替え 
    $scene = Scene_Load.new 
  end 
  #-------------------------------------------------------------------------- 
  # ● コマンド : シャットダウン 
  #-------------------------------------------------------------------------- 
  def command_shutdown 
    # 決定 SE を演奏 
    $game_system.se_play($data_system.decision_se) 
    # BGM、BGS、ME をフェードアウト 
    Audio.bgm_fade(800) 
    Audio.bgs_fade(800) 
    Audio.me_fade(800) 
    # シャットダウン 
    $scene = nil 
  end 
  #-------------------------------------------------------------------------- 
  # ● 戦闘テスト 
  #-------------------------------------------------------------------------- 
  def 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") 
    # プレイ時間計測用のフレームカウントをリセット 
    Graphics.frame_count = 0 
    # 各種ゲームオブジェクトを作成 
    $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 
    # 戦闘テスト用のパーティをセットアップ 
    $game_party.setup_battle_test_members 
    # トループ ID、逃走可能フラグ、バトルバックを設定 
    $game_temp.battle_troop_id = $data_system.test_troop_id 
    $game_temp.battle_can_escape = true 
    $game_map.battleback_name = $data_system.battleback_name 
    # バトル開始 SE を演奏 
    $game_system.se_play($data_system.battle_start_se) 
    # バトル BGM を演奏 
    $game_system.bgm_play($game_system.battle_bgm) 
    # バトル画面に切り替え 
    $scene = Scene_Battle.new 
  end 
end
 
I don't get it either. Your edited version only defines battle test?? I'm surprised you get a new game command window at all!
Is main calling $scene = Scene_Title or $scene = Scene_Title2?
 
Main is calling Scene_Title, not Scene_Title2. But the thing is I didnt do ANYTHING to my original Scene_Title. My new improved title, works just like Kingdom Hearts 2's title screen..if you've ever played it that is, it moves and everything.

Here's the "demo" to show you what I mean:
Distant Light Title Problem

And I finally got an error when I switched the Main script call, to Scene_Title2
http://img338.imageshack.us/img338/4699 ... rorlv7.png[/img]

Line 112 states:
$game_temp.player_transferring = true
 
Prefix;167970 said:
Jesus christ at the file size.

See what i mean?:p

However, I downloaded it and I will see what I can do.

Edit; Found it, you need to press Shift instead of Enter (lol). To fix this, change ;

Code:
if Input.trigger?(Input::A)
To ;
Code:
if Input.trigger?(Input::C)

I do not know where to edit since I don't have access to your scripts.
 

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