=begin ▼ 不具合修正 2014/08/26 更新 RPGツクールVXAce用スクリプト 制作 : 木星ペンギン URL : http://woodpenguin.blog.fc2.com/ ------------------------------------------------------------------------------ 概要 RGSS3内の不具合を修正するスクリプトです。 大したものは含まれていないので、導入しなくてもおそらく問題ありません。 必要のないものはコメントアウトしてください。 ------------------------------------------------------------------------------ 内容 01 : 自律移動タイプがカスタムのキャラクターを移動ルート設定で操作すると、 移動ルートが元に戻った時の挙動がおかしくなる不具合の修正。 02 : ループをしていないマップで、遠景の同期がとれていない不具合の修正。 03 : 乗り物搭乗時、極希にフォロワーの挙動がおかしくなる不具合の修正。 04 : 基準位置が画面のアニメーションを複数の対象に行なった場合、 アニメーションが重なって表示される不具合の修正。 05 : コモンイベントの呼び出しで、実行内容終了時にウェイトをいれないように修正。 06 : 並列処理終了時に発生するラグの修正。 07 : コモンイベントの呼び出し中に実行内容がセーブされない不具合の修正。 08 : 戦闘中に文章表示を行った場合、ページを切り替えるたびにウィンドウが 閉じる不具合の修正。 09 : 乗り物搭乗中に場所移動した際、BGMが変わったり、降りた時のBGMが 前のマップのものになる不具合の修正。 10 : 画面のスクロール中、イベントの表示位置がぶれる不具合の修正。 =end #============================================================================== # 01 : 自律移動タイプがカスタムのキャラクターを移動ルート設定で操作すると、 # 移動ルートが元に戻った時の挙動がおかしくなる不具合の修正。 #============================================================================== class Game_Character #-------------------------------------------------------------------------- # ◯ 移動ルートの復帰 #-------------------------------------------------------------------------- alias _wdtk_sp_restore_move_route restore_move_route def restore_move_route _wdtk_sp_restore_move_route @move_route_index -= 1 end end #============================================================================== # 02 : ループをしていないマップで、遠景の同期がとれていない不具合の修正。 #============================================================================== class Game_Map #-------------------------------------------------------------------------- # ☆ 遠景表示の原点 X 座標の計算 #-------------------------------------------------------------------------- def parallax_ox(bitmap) if @parallax_loop_x @parallax_x * 16 else w1 = [bitmap.width - Graphics.width, 0].max w2 = [width * 32 - Graphics.width, 1].max @parallax_x * 32 * w1 / w2 end end #-------------------------------------------------------------------------- # ☆ 遠景表示の原点 Y 座標の計算 #-------------------------------------------------------------------------- def parallax_oy(bitmap) if @parallax_loop_y @parallax_y * 16 else h1 = [bitmap.height - Graphics.height, 0].max h2 = [height * 32 - Graphics.height, 1].max @parallax_y * 32 * h1 / h2 end end end #============================================================================== # 03 : 乗り物搭乗時、極希にフォロワーの挙動がおかしくなる不具合の修正。 #============================================================================== class Game_Player #-------------------------------------------------------------------------- # ☆ フレーム更新 #-------------------------------------------------------------------------- def update last_real_x = @real_x last_real_y = @real_y last_moving = moving? move_by_input super @followers.update update_scroll(last_real_x, last_real_y) update_vehicle update_nonmoving(last_moving) unless moving? end end #============================================================================== # 04 : 基準位置が画面のアニメーションを複数の対象に行なった場合、 # アニメーションが重なって表示される不具合の修正。 #============================================================================== class Sprite_Base #-------------------------------------------------------------------------- # ● チェッカーのクリア #-------------------------------------------------------------------------- def self.clear_checker @@ani_checker.clear @@ani_spr_checker.clear end #-------------------------------------------------------------------------- # ☆ フレーム更新 #-------------------------------------------------------------------------- def update super update_animation end end class Spriteset_Battle #-------------------------------------------------------------------------- # ◯ フレーム更新 #-------------------------------------------------------------------------- alias _wdtk_sp_update update def update _wdtk_sp_update Sprite_Base.clear_checker end end #============================================================================== # 05 : コモンイベントの呼び出しで、実行内容終了時にウェイトをいれないように修正。 #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ☆ 実行 #-------------------------------------------------------------------------- def run wait_for_message while @list[@index] do execute_command @index += 1 end Fiber.yield if @depth == 0 @fiber = nil end end #============================================================================== # 06 : 並列処理終了時に発生するラグの修正。 #============================================================================== class Game_CommonEvent #-------------------------------------------------------------------------- # ◯ フレーム更新 #-------------------------------------------------------------------------- alias _wdtk_sp_update update def update _wdtk_sp_update if @interpreter && !@interpreter.running? @interpreter.setup(@event.list) @interpreter.update end end end class Game_Event #-------------------------------------------------------------------------- # ◯ フレーム更新 #-------------------------------------------------------------------------- alias _wdtk_sp_update update def update _wdtk_sp_update if @interpreter && !@interpreter.running? @interpreter.setup(@list, @event.id) @interpreter.update end end end #============================================================================== # 07 : コモンイベントの呼び出し中に実行内容がセーブされない不具合の修正。 #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ◯ クリア #-------------------------------------------------------------------------- alias _wdtk_sp_clear clear def clear _wdtk_sp_clear @child = nil end #-------------------------------------------------------------------------- # ◯ オブジェクトのダンプ #-------------------------------------------------------------------------- alias _wdtk_sp_marshal_dump marshal_dump def marshal_dump obj = _wdtk_sp_marshal_dump << @child obj[4] -= 1 if @child obj end #-------------------------------------------------------------------------- # ◯ オブジェクトのロード #-------------------------------------------------------------------------- alias _wdtk_sp_marshal_load marshal_load def marshal_load(obj) @child = obj.pop _wdtk_sp_marshal_load(obj) end #-------------------------------------------------------------------------- # ☆ コモンイベント #-------------------------------------------------------------------------- def command_117 common_event = $data_common_events[@params[0]] if common_event @child = Game_Interpreter.new(@depth + 1) @child.setup(common_event.list, same_map? ? @event_id : 0) @child.run @child = nil end end end #============================================================================== # 08 : 戦闘中に文章表示を行った場合、ページを切り替えるたびにウィンドウが # 閉じる不具合の修正。 #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ☆ メッセージ表示が終わるまでウェイト #-------------------------------------------------------------------------- def wait_for_message @message_window.update while $game_message.visible update_for_wait $game_troop.interpreter.update end end end #============================================================================== # 09 : 乗り物搭乗中に場所移動した際、BGMが変わったり、降りた時のBGMが # 前のマップのものになる不具合の修正。 #============================================================================== class Game_Map #-------------------------------------------------------------------------- # ◯ BGM / BGS 自動切り替え #-------------------------------------------------------------------------- alias _wdtk_sp_autoplay autoplay def autoplay if $game_player.vehicle $game_player.vehicle.walking_bgm = @map.bgm if @map.autoplay_bgm @map.bgs.play if @map.autoplay_bgs else _wdtk_sp_autoplay end end end class Game_Vehicle #-------------------------------------------------------------------------- # ● 歩行中 BGM の設定 #-------------------------------------------------------------------------- def walking_bgm=(bgm) @walking_bgm = bgm end end #============================================================================== # 10 : 画面のスクロール中、イベントの表示位置がぶれる不具合の修正。 #============================================================================== class Spriteset_Map #-------------------------------------------------------------------------- # ☆ タイルマップの更新 #-------------------------------------------------------------------------- def update_tilemap @tilemap.map_data = $game_map.data @tilemap.ox = ($game_map.display_x * 32).ceil @tilemap.oy = ($game_map.display_y * 32).ceil @tilemap.update end end class Game_CharacterBase #-------------------------------------------------------------------------- # ● 画面 X 座標の取得 #-------------------------------------------------------------------------- def screen_x $game_map.adjust_x(@real_x) * 32 + 16 end #-------------------------------------------------------------------------- # ● 画面 Y 座標の取得 #-------------------------------------------------------------------------- def screen_y $game_map.adjust_y(@real_y) * 32 + 32 - shift_y - jump_height end end