=begin ▼ 乗り物擬似3D化 for VX データベース ver. 2.1.0 RPGツクールVX用スクリプト 制作 : 木星ペンギン URL : http://woodpenguin.blog.fc2.com/ ------------------------------------------------------------------------------ 概要 □ 乗り物搭乗時の画面を、後方から視た擬似3Dで表示します。 ------------------------------------------------------------------------------ 使い方 □ 各パラメータの簡易説明 :switch_id => 乗り物搭乗時にONになるスイッチID :passage_tiles => 通行できるオートタイルの種類の配列 :passage_flag => タイルセットB〜Eを通行できるかどうか :land_denial => 乗り物から降りられないオートタイルの種類の配列 :move_speed => 移動速度(小数点以下も可能) :turning => 旋回速度 :walk_anime => 搭乗中の歩行アニメフラグ :step_anime => 搭乗中の足踏みアニメフラグ :encount => エンカウント率(100で通常と同じ) :sync_dir => 搭乗時に乗り物の向きをプレイヤーの向きに合わせるフラグ :get_here => 重なった状態で搭乗するかどうかのフラグ :dir_type => 搭乗中に表示される乗り物の向き変更タイプ :vehicle_name1 => 搭乗中に表示される乗り物の歩行グラフィックのファイル名1 :vehicle_index1 => 搭乗中に表示される乗り物の歩行グラフィックのインデックス1 :vehicle_name2 => 搭乗中に表示される乗り物の歩行グラフィックのファイル名2 :vehicle_index2 => 搭乗中に表示される乗り物の歩行グラフィックのインデックス2 :vehicle_name3 => 搭乗中に表示される乗り物の歩行グラフィックのファイル名3 :vehicle_index3 => 搭乗中に表示される乗り物の歩行グラフィックのインデックス3 :vehicle_zoom => 搭乗中に表示される歩行グラフィックの拡大率 :inp_forward1 => 前進を行うボタン1 :inp_forward2 => 前進を行うボタン2 :inp_backward => 後退を行うボタン :inp_turnleft1 => 右に旋回するボタン1 :inp_turnleft2 => 右に旋回するボタン2 :inp_turnright1 => 左に旋回するボタン1 :inp_turnright2 => 左に旋回するボタン2 :inp_up => 上昇するボタン(飛空挺のみ) :inp_down => 下降するボタン(飛空挺のみ) :inp_horz => 水平移動するボタン(このボタンと方向キーで操作) :inp_get_off => 乗り物から降りるボタン :inp_event => イベントを調べるボタン :inp_menu => メニュー画面を開くボタン □ 設定項目の詳細説明は下記のサイトを参照してください。 http://woodpenguin.web.fc2.com/rgss3/vehicle3D_VX.html =end module WdTk module Veh3D @data = [] #////////////////////////////////////////////////////////////////////////////// # # 設定項目 # #////////////////////////////////////////////////////////////////////////////// #-------------------------------------------------------------------------- # ● 背景画像 # 遠景フォルダ(Graphics/Parallaxes)を参照します。 #-------------------------------------------------------------------------- Scenery = "BlueSky" #-------------------------------------------------------------------------- # ● 背景のループ回数 #-------------------------------------------------------------------------- Repeat = 4 #-------------------------------------------------------------------------- # ● フレームレート (10 〜 60) #-------------------------------------------------------------------------- FrameRate = 40 #-------------------------------------------------------------------------- # ● 小型船の設定 #-------------------------------------------------------------------------- vehicle = {} vehicle[:passage_tiles] = [0,4,6,8,10,12,14] vehicle[:move_speed] = 4 vehicle[:turning] = 16 vehicle[:encount] = 100 vehicle[:sync_dir] = true vehicle[:get_here] = false vehicle[:inp_forward1] = :A vehicle[:inp_forward2] = :UP vehicle[:inp_backward] = :DOWN vehicle[:inp_turnleft1] = :LEFT vehicle[:inp_turnright1] = :RIGHT vehicle[:inp_get_off] = :C vehicle[:inp_event] = :C vehicle[:inp_menu] = :B @data[0] = vehicle #-------------------------------------------------------------------------- # ● 大型船の設定 #-------------------------------------------------------------------------- vehicle = {} vehicle[:passage_tiles] = [0,1,4,6,8,10,12,14] vehicle[:move_speed] = 5 vehicle[:turning] = 8 vehicle[:encount] = 50 vehicle[:sync_dir] = true vehicle[:get_here] = false vehicle[:inp_forward1] = :A vehicle[:inp_forward2] = :UP vehicle[:inp_backward] = :DOWN vehicle[:inp_turnleft1] = :LEFT vehicle[:inp_turnright1] = :RIGHT vehicle[:inp_get_off] = :C vehicle[:inp_event] = :C vehicle[:inp_menu] = :B @data[1] = vehicle #-------------------------------------------------------------------------- # ● 飛行船の設定 #-------------------------------------------------------------------------- vehicle = {} vehicle[:land_denial] = (0...48).to_a - [16,19,24,27,32,35,40,43] vehicle[:move_speed] = 6 vehicle[:turning] = 12 vehicle[:encount] = 0 vehicle[:get_here] = true vehicle[:inp_forward1] = :A vehicle[:inp_turnleft1] = :LEFT vehicle[:inp_turnleft2] = :L vehicle[:inp_turnright1] = :RIGHT vehicle[:inp_turnright2] = :R vehicle[:inp_up] = :DOWN vehicle[:inp_down] = :UP vehicle[:inp_horz] = :X vehicle[:inp_get_off] = :C vehicle[:inp_menu] = :B @data[2] = vehicle #////////////////////////////////////////////////////////////////////////////// # # 以降、変更する必要なし # #////////////////////////////////////////////////////////////////////////////// #-------------------------------------------------------------------------- # ● 最低限必要な乗り物データが設定されているかどうかチェック #-------------------------------------------------------------------------- def self.msg_non_data(i, param) unless @data[i][param] message = "乗り物 [:%s] 番のパラメータ [:%s] を設定してください。" p sprintf(message, i, param) exit end end for i in 0...@data.size msg_non_data(i, :move_speed) msg_non_data(i, :turning) if @data[i][:dir_type] && @data[i][:dir_type] == 3 msg_non_data(i, :vehicle_name3) msg_non_data(i, :vehicle_index3) end end #-------------------------------------------------------------------------- # ● 乗り物データの取得 #-------------------------------------------------------------------------- def self.data @data end end end