| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2017-10-26 |
| 在线时间 | 91 小时 |
- 梦石
- 0
- 星屑
- 80
- 在线时间
- 91 小时
- 注册时间
- 2017-2-4
- 回帖
- 15
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 uoar 于 2017-9-13 20:13 编辑
小弟使用了以下扩展脚本,按照指示在防具上打上<装备タイプ:5>,可是新增的装备栏却没有可装备的防具,请问是什么原因呢?
- #==============================================================================
- # ■ RGSS3 新装備拡張&装備拡張画面 Ver1.04 by 星潟
- #------------------------------------------------------------------------------
- # 装備スロットの内容を変更すると共に、装備画面を大幅に変更して
- # 多数のステータスの表示に対応した物にします。
- # 拡張スクリプトを含めた旧版の機能を継承しつつ
- # 表示内容の拡張性を向上させています。
- #==============================================================================
- # 防具のメモ欄に記述。
- #------------------------------------------------------------------------------
- # <装備タイプ:5>
- #
- # この防具の装備タイプは5になります。(装飾品が4)
- # 以下の物にも言える事ですが、基本的に拡張部分に設定する為の機能です。
- #==============================================================================
- # 特徴を有する項目のメモ欄に記述。
- #------------------------------------------------------------------------------
- # <装備タイプ固定:6>
- #
- # 装備タイプ6の部位を固定します。
- #------------------------------------------------------------------------------
- # <装備タイプ固定:6,7>
- #
- # 装備タイプ6と7の部位を固定します。
- #------------------------------------------------------------------------------
- # <装備タイプ封印:8>
- #
- # 装備タイプ8の部位を封印します。
- #------------------------------------------------------------------------------
- # <装備タイプ封印:8,9,10>
- #
- # 装備タイプ8と9と10の部位を封印します。
- #==============================================================================
- # イベントコマンドのスクリプトで記述。
- #------------------------------------------------------------------------------
- # change_equip(1, 2, 3)
- #
- # アクターID1のスロット2番(0が最初)に該当する装備ID3の装備を試みます。
- #------------------------------------------------------------------------------
- # ch_eq(1, 2, 3)
- #
- # アクターID1のスロット2番(0が最初)に該当する装備ID3の装備を試みます。
- # (真上と同じです。旧バージョンから乗り換えた際に
- # イベントを修正しないでいいように残してあります)
- #------------------------------------------------------------------------------
- # clear_equip(1)
- #
- # アクターID1の装備を全解除します。(装備画面の全解除コマンドと同じです)
- #------------------------------------------------------------------------------
- # ar_eq(1)
- #
- # アクターID1の装備を全解除します。(装備画面の全解除コマンドと同じです)
- # (真上と同じです。旧バージョンから乗り換えた際に
- # イベントを修正しないでいいように残してあります)
- #------------------------------------------------------------------------------
- # optimize_equipments(1)
- #
- # アクターID1に最強装備を適用します。
- #==============================================================================
- # イベントコマンドの条件分岐のスクリプトで記述。
- #------------------------------------------------------------------------------
- # actor_equips_exist?(1,2)
- #
- # アクターID1のスロット2番に何かが装備されているかを判定します。
- #==============================================================================
- module SceneEquipNextType
-
- #空のハッシュ群を用意。(変更不要)
-
- BaseSlot = {}
- ActorSlot = {}
- Page = {}
- XParam = {}
- SParam = {}
- Debuff = {}
- Element = {}
- State = {}
-
- #ステータス欄の最大ページ数指定。
-
- StatusPageMax = 5
-
- #ページ数に応じたページデータを用意。(変更不要)
-
- StatusPageMax.times {|i|
- Page[i] = {:col => 1,:line => 4,:title => 96,:space => 4,:ids => []}}
-
- #ステータス欄の最大行数指定。
-
- StatusLineMaxNumber = 4
-
- #ステータス欄のフォントサイズ指定。
-
- StatusFontSize = 20
-
- #ステート無効の際の評価値を指定。(極端に大きい値を推奨)
-
- StateResist = 1000000000000
-
- #ステータス欄右上に表示する補助テキストを指定。
-
- StatusText = "Xボタン:前のページへ Yボタン:次のページへ"
-
- #ステータス欄右上に表示するテキストカラーIDを指定。
-
- StatusTextColor = 3
-
- #ステート無効の際の表示内容を指定。
-
- StateResistWord = "無効"
-
- #装備スロット欄の桁数を指定。
-
- SlotColMax = 2
-
- #装備スロット欄の桁数2以上の時、横に項目が並ぶときの空白の幅を取得
-
- SlotSpacing = 16
-
- #スロット欄名称の描写幅を指定。
-
- SlotNameWidth = 72
-
- #装備タイプID5以降の名称を指定。
-
- SlotName = ["肩","靴","魔法書","技術書","宝珠"]
-
- #装備タイプ指定用キーワードを指定。
-
- ETypeWord1 = "装備タイプ"
-
- #装備固定用キーワードを指定。
-
- ETypeWord2 = "装備タイプ固定"
-
- #装備封印用キーワードを指定。
-
- ETypeWord3 = "装備タイプ封印"
-
- #コマンドウィンドウを削除するかを指定。
- #戦闘中装備変更等のスクリプトと併用する場合はfalse推奨。
-
- CommandWindowDelete = true
-
- #ページ切り替え用ボタンシンボルを指定。
- #1つ目が前のページへ。2つ目が次のページへ。
-
- PageKey = [:X,:Y]
-
- #装備解除用ボタンシンボルを指定。無効にする場合はnilにしてください。
-
- ReleaseKey = :A
-
- #最強装備用ボタンシンボルを指定。無効にする場合はnilにしてください。
-
- OptimizeKey = :CTRL
-
- #装備全解除用ボタンシンボルを指定。無効にする場合はnilにしてください。
-
- AllReleaseKey = :ALT
-
- #ロード時に装備欄の異常を解消するかを指定。
- #(負荷増加)
-
- LoadNilBreak = false
-
- #基本スロット情報を指定。
-
- #通常スロットを指定。
- #0が武器、1が盾~4が装飾品。以降の数字が追加分。
- #並べたい順に指定。(最初は0、次は1を推奨)
-
- BaseSlot[1] = [0,1,2,3,5,6,7,8,4,4]
-
- #二刀流スロットを指定。
- #0が武器、1が盾~4が装飾品。以降の数字が追加分。
- #並べたい順に指定。(最初と次は0を推奨)
-
- BaseSlot[2] = [0,0,2,3,5,6,7,8,4,4]
-
- #各アクターで個別にスロットを指定。
- #個別設定が不要な場合は設定しないで下さい。
-
- #例.アクター1のスロットを個別設定。最後に装備タイプ9を2つ追加する。
- #ActorSlot[1] = {}
- #ActorSlot[1][1] = [0,1,2,3,5,6,7,8,4,4,9,9]
- #ActorSlot[1][2] = [0,0,2,3,5,6,7,8,4,4,9,9]
-
- #※アクタースロットは必要とされる方が
- #少ないと思われるのでデフォルトでは設定していません。
-
- #ページ別表示ステータス情報を指定。
-
- #例.
- #Page[0][:col] = 3
- #Page[0][:line] = 4
- #Page[0][:title] = 72
- #Page[0][:space] = 4
- #Page[0][:ids] = [0,1,2,3,4,5,6,7,100,101,102,103]
- #ページ数0の桁数は3、行数は4、項目名描写幅は72、横に並んだ際の空白は4、
- #描写ステータスIDは0,1,2,3,4,5,6,7,100,101,102,103となる。
-
- #描写ステータス0~7は最大HP~運。100~109は命中率~TP再生率。
- #200~209は狙われ率~経験効率。300~307は最大HP弱体有効度~運弱体有効度。
- #10001~19999は属性有効度(10000を引いたID)。
- #20001~29999はステート有効度(20000を引いたID)。
-
- Page[0][:col] = 3
- Page[0][:line] = 4
- Page[0][:title] = 72
- Page[0][:space] = 4
- Page[0][:ids] = [0,1,2,3,4,5,6,7,100,101,102,103]
-
- Page[1][:col] = 3
- Page[1][:line] = 4
- Page[1][:title] = 72
- Page[1][:space] = 4
- Page[1][:ids] = [104,105,106,107,108,109,200,201,202,203,204,205]
-
- Page[2][:col] = 3
- Page[2][:line] = 4
- Page[2][:title] = 72
- Page[2][:space] = 4
- Page[2][:ids] = [206,207,208,209,300,301,302,303,304,305,306,307]
-
- Page[3][:col] = 3
- Page[3][:line] = 4
- Page[3][:title] = 72
- Page[3][:space] = 4
- Page[3][:ids] = [10001,10002,10003,10004,10005,10006,10007,10008,10009,10010]
-
- Page[4][:col] = 3
- Page[4][:line] = 4
- Page[4][:title] = 72
- Page[4][:space] = 4
- Page[4][:ids] = [20001,20002,20003,20004,20005,20006,20007,20008]
-
- #追加能力値の名称、乗算値、加算値、優劣反転フラグを指定。
- #名称はそのまま名前に。
- #乗算値は実数に対して乗算する値。
- #(例えば命中率は100%でも1.00になる為、100倍した上で切り上げにする必要がある)
- #加算値は実数に対して加算する値。
- #(例えば物理ダメージ率は低ければ低いほど有効だが
- # 見栄えの関係上、乗算値で-100倍した上で加算値で+100とする事で
- # 大きければ大きいほど価値のある【物理軽減率】として扱える)
- #優劣反転フラグは低いほど優秀と判定される項目の為の物。
- #0で通常の判定、1で優劣反転での判定、2で常に通常色(優劣判定なし)。
-
- XParam[0] = ["命中率",100,0,0]
- XParam[1] = ["回避率",100,0,0]
- XParam[2] = ["会心率",100,0,0]
- XParam[3] = ["会心回避",100,0,0]
- XParam[4] = ["魔法回避",100,0,0]
- XParam[5] = ["魔法反射",100,0,0]
- XParam[6] = ["反撃率",100,0,0]
- XParam[7] = ["HP再生",100,0,0]
- XParam[8] = ["MP再生",100,0,0]
- XParam[9] = ["TP再生",100,0,0]
-
- #特殊能力値の名称、乗算値、加算値、優劣反転フラグを指定。
-
- SParam[0] = ["狙われ率",100,-100,2]
- SParam[1] = ["防御効果",100,-100,0]
- SParam[2] = ["回復効果",100,-100,0]
- SParam[3] = ["薬の知識",100,-100,0]
- SParam[4] = ["MP節約",-100,100,0]
- SParam[5] = ["TPC",100,-100,0]
- SParam[6] = ["物理軽減",-100,100,0]
- SParam[7] = ["魔法軽減",-100,100,0]
- SParam[8] = ["床D軽減",-100,100,0]
- SParam[9] = ["経験効率",100,-100,0]
-
- #弱体有効度の名称、乗算値、加算値、優劣反転フラグを指定。
-
- Debuff[0] = ["HP低下",-100,100,0]
- Debuff[1] = ["MP低下",-100,100,0]
- Debuff[2] = ["攻撃低下",-100,100,0]
- Debuff[3] = ["防御低下",-100,100,0]
- Debuff[4] = ["魔法低下",-100,100,0]
- Debuff[5] = ["魔防低下",-100,100,0]
- Debuff[6] = ["敏捷低下",-100,100,0]
- Debuff[7] = ["運低下",-100,100,0]
-
- #属性有効度の名称、乗算値、加算値、優劣反転フラグを指定。
-
- Element[1] = ["物理耐性",-100,100,0]
- Element[2] = ["吸収耐性",-100,100,0]
- Element[3] = ["炎耐性",-100,100,0]
- Element[4] = ["氷耐性",-100,100,0]
- Element[5] = ["雷耐性",-100,100,0]
- Element[6] = ["水耐性",-100,100,0]
- Element[7] = ["大地耐性",-100,100,0]
- Element[8] = ["風耐性",-100,100,0]
- Element[9] = ["暗黒耐性",-100,100,0]
- Element[10] = ["神聖耐性",-100,100,0]
-
- #ステート有効度の名称、乗算値、加算値、優劣反転フラグを指定。
-
- State[1] = ["即死耐性",-100,100,0]
- State[2] = ["毒耐性",-100,100,0]
- State[3] = ["暗闇",-100,100,0]
- State[4] = ["沈黙",-100,100,0]
- State[5] = ["混乱",-100,100,0]
- State[6] = ["睡眠",-100,100,0]
- State[7] = ["麻痺",-100,100,0]
- State[8] = ["スタン",-100,100,0]
-
- end
- class RPG::System::Terms
- #--------------------------------------------------------------------------
- # 装備タイプ
- #--------------------------------------------------------------------------
- alias etypes_expansion etypes unless $!
- def etypes
- etypes_expansion + SceneEquipNextType::SlotName
- end
- end
- if SceneEquipNextType::LoadNilBreak
- class Game_System
- #--------------------------------------------------------------------------
- # ロード後の処理
- #--------------------------------------------------------------------------
- alias on_after_load_equips_nil_break on_after_load
- def on_after_load
- on_after_load_equips_nil_break
- $data_actors.size.times {|i|
- a = $game_actors[i]
- a.equips_nil_break if a}
- end
- end
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # 装備品オブジェクトの配列取得
- #--------------------------------------------------------------------------
- def equips_nil_break
- equip_slots.size.times {|i| @equips[i] = Game_BaseItem.new unless @equips[i]}
- end
- end
- end
- class Game_BattlerBase
- #--------------------------------------------------------------------------
- # 装備封印の判定
- #--------------------------------------------------------------------------
- alias equip_type_sealed_object_check? equip_type_sealed?
- def equip_type_sealed?(etype_id)
- (equip_type_sealed_object_check?(etype_id) or ex_equip_type_sealed?(etype_id)) && equip_slots.include?(etype_id)
- end
- #--------------------------------------------------------------------------
- # 装備固定の判定
- #--------------------------------------------------------------------------
- alias equip_type_fixed_object_check? equip_type_fixed?
- def equip_type_fixed?(etype_id)
- (equip_type_fixed_object_check?(etype_id) or ex_equip_type_fixed?(etype_id)) && equip_slots.include?(etype_id)
- end
- #--------------------------------------------------------------------------
- # 装備封印の判定2
- #--------------------------------------------------------------------------
- def ex_equip_type_sealed?(etype_id)
- (feature_objects.inject([]) {|r,f| r += f.etype_seal_ids}).uniq.include?(etype_id)
- end
- #--------------------------------------------------------------------------
- # 装備固定の判定2
- #--------------------------------------------------------------------------
- def ex_equip_type_fixed?(etype_id)
- (feature_objects.inject([]) {|r,f| r += f.etype_fix_ids}).uniq.include?(etype_id)
- end
- end
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # 装備スロットの配列を取得
- #--------------------------------------------------------------------------
- def equip_slots
- dw = dual_wield? ? 2 : 1
- h = SceneEquipNextType::ActorSlot[id]
- if h && h[dw]
- h[dw]
- else
- SceneEquipNextType::BaseSlot[dw]
- end
- end
- #--------------------------------------------------------------------------
- # 装備配列のnil防止
- #--------------------------------------------------------------------------
- def equip_slot_object_rescue
- equip_slots.size.times {|i| @equips[i] ||= Game_BaseItem.new}
- end
- #--------------------------------------------------------------------------
- # 装備できない装備品を外す
- #--------------------------------------------------------------------------
- alias release_unequippable_items_object_check release_unequippable_items
- def release_unequippable_items(item_gain = true)
- release_unequippable_items_object_check(item_gain)
- es = equip_slots.size
- if @equips.size > es
- @equips.each_with_index {|e,i|
- if i > es - 1
- trade_item_with_party(nil, e.object) if item_gain
- e.object = nil
- end}
- @equips = @equips[0,@equips.size - 1]
- end
- end
- #--------------------------------------------------------------------------
- # 装備の変更
- #--------------------------------------------------------------------------
- alias change_equip_object_check change_equip
- def change_equip(slot_id, item)
- @equips[slot_id] ||= Game_BaseItem.new
- change_equip_object_check(slot_id, item)
- end
- #--------------------------------------------------------------------------
- # 装備の強制変更
- #--------------------------------------------------------------------------
- alias force_change_equip_object_check force_change_equip
- def force_change_equip(slot_id, item)
- @equips[slot_id] ||= Game_BaseItem.new
- force_change_equip_object_check(slot_id, item)
- end
- #--------------------------------------------------------------------------
- # 装備が指定スロットに存在するか
- #--------------------------------------------------------------------------
- def equips_exist?(slot_id)
- return false unless @equips[slot_id]
- !@equips[slot_id].is_nil?
- end
- end
- class Scene_Equip < Scene_MenuBase
- #--------------------------------------------------------------------------
- # 開始処理
- #--------------------------------------------------------------------------
- alias start_page_change_handle start
- def start
- start_page_change_handle
- [@command_window,@slot_window,@item_window].each {|w|
- [:prev_page,:next_page].each {|s| w.set_handler(s,method(s))}}
- if SceneEquipNextType::ReleaseKey
- s = :release_equip
- @slot_window.set_handler(s,method(s))
- end
- if SceneEquipNextType::OptimizeKey
- s = :command_optimize_slot
- @slot_window.set_handler(s,method(s))
- end
- if SceneEquipNextType::AllReleaseKey
- s = :command_clear_slot
- @slot_window.set_handler(s,method(s))
- end
- if SceneEquipNextType::CommandWindowDelete
- @slot_window.set_handler(:pagedown, method(:next_actor))
- @slot_window.set_handler(:pageup, method(:prev_actor))
- @command_window.deactivate
- @slot_window.activate
- @slot_window.select(0)
- end
- end
- #--------------------------------------------------------------------------
- # ステータスウィンドウの作成
- #--------------------------------------------------------------------------
- alias create_status_window_temp_actor_window create_status_window
- def create_status_window
- create_status_window_temp_actor_window
- @temp_actor_status_window = Window_EquipStatusTemp.new(0, @help_window.height)
- t = @temp_actor_status_window
- s = @status_window
- t.viewport = @viewport
- t.actor = @actor
- t.opacity = 0
- t.contents_opacity = 255
- s.temp_actor_window = t
- t.temp_actor_window = s
- end
- #--------------------------------------------------------------------------
- # コマンドウィンドウの作成
- #--------------------------------------------------------------------------
- alias create_command_window_move_position create_command_window
- def create_command_window
- @status_window.ow_creating = true
- create_command_window_move_position
- @status_window.ow_creating = nil
- c = @command_window
- return c.hide if SceneEquipNextType::CommandWindowDelete
- s = @status_window
- x = 0
- y = s.y + s.height
- c = @command_window
- c.move(x,y,Graphics.width,c.height)
- c.create_contents
- c.refresh
- c.activate
- end
- #--------------------------------------------------------------------------
- # スロットウィンドウの作成
- #--------------------------------------------------------------------------
- alias create_slot_window_move_position create_slot_window
- def create_slot_window
- @actor.equip_slot_object_rescue if @actor
- @status_window.ow_creating = true
- create_slot_window_move_position
- @status_window.ow_creating = nil
- s1 = @status_window
- a = slot_item_window_rect_array
- s2 = @slot_window
- s2.move(a[0],a[1],a[2],a[3])
- s2.create_contents
- s2.refresh
- end
- #--------------------------------------------------------------------------
- # アイテムウィンドウの作成
- #--------------------------------------------------------------------------
- alias create_item_window_move_position create_item_window
- def create_item_window
- create_item_window_move_position
- y = @status_window.y + @status_window.height
- a = slot_item_window_rect_array
- @item_window.move(a[0],a[1],a[2],a[3])
- @item_window.create_contents
- @item_window.refresh
- @item_window.hide
- end
- #--------------------------------------------------------------------------
- # スロット・アイテムウィンドウの矩形配列
- #--------------------------------------------------------------------------
- def slot_item_window_rect_array
- w = SceneEquipNextType::CommandWindowDelete ? @status_window : @command_window
- y = w.y + w.height
- [0,y,Graphics.width,Graphics.height - y]
- end
- if SceneEquipNextType::CommandWindowDelete
- #--------------------------------------------------------------------------
- # スロット[キャンセル]
- #--------------------------------------------------------------------------
- alias on_slot_cancel_command_delete on_slot_cancel
- def on_slot_cancel
- on_slot_cancel_command_delete
- return_scene
- end
- end
- #--------------------------------------------------------------------------
- # スロット[決定]
- #--------------------------------------------------------------------------
- alias on_slot_ok_slot_item_switch on_slot_ok
- def on_slot_ok
- on_slot_ok_slot_item_switch
- @item_window.show
- @slot_window.hide
- end
- #--------------------------------------------------------------------------
- # アイテム[決定]
- #--------------------------------------------------------------------------
- alias on_item_ok_slot_item_switch on_item_ok
- def on_item_ok
- on_item_ok_slot_item_switch
- @slot_window.show
- @item_window.hide
- @status_window.refresh
- end
- #--------------------------------------------------------------------------
- # アイテム[キャンセル]
- #--------------------------------------------------------------------------
- alias on_item_cancel_slot_item_switch on_item_cancel
- def on_item_cancel
- on_item_cancel_slot_item_switch
- @slot_window.show
- @item_window.hide
- end
- #--------------------------------------------------------------------------
- # アクターの切り替え
- #--------------------------------------------------------------------------
- alias on_actor_change_slot_item_switch on_actor_change
- def on_actor_change
- f = SceneEquipNextType::CommandWindowDelete
- @slot_window.unselect if f
- on_actor_change_slot_item_switch
- @actor.equip_slot_object_rescue if @actor
- if SceneEquipNextType::CommandWindowDelete
- @command_window.deactivate
- @slot_window.activate
- @slot_window.index = 0
- end
- end
- #--------------------------------------------------------------------------
- # 次のページへ
- #--------------------------------------------------------------------------
- def next_page
- @status_window.next_page
- @temp_actor_status_window.next_page
- end
- #--------------------------------------------------------------------------
- # 前のページへ
- #--------------------------------------------------------------------------
- def prev_page
- @status_window.prev_page
- @temp_actor_status_window.prev_page
- end
- #--------------------------------------------------------------------------
- # 装備を外す
- #--------------------------------------------------------------------------
- def release_equip
- @actor.change_equip(@slot_window.index, nil)
- @slot_window.refresh
- @item_window.refresh
- @status_window.refresh
- @temp_actor_status_window.refresh
- end
- #--------------------------------------------------------------------------
- # ワンタッチ最強装備
- #--------------------------------------------------------------------------
- def command_optimize_slot
- command_optimize
- @command_window.deactivate
- @slot_window.activate
- @item_window.refresh
- end
- #--------------------------------------------------------------------------
- # ワンタッチ全解除
- #--------------------------------------------------------------------------
- def command_clear_slot
- command_clear
- @command_window.deactivate
- @slot_window.activate
- @item_window.refresh
- end
- end
- class Window_EquipStatus < Window_Base
- attr_accessor :temp_actor_window
- attr_accessor :param_data
- attr_accessor :ow_creating
- #--------------------------------------------------------------------------
- # オブジェクト初期化
- #--------------------------------------------------------------------------
- alias initialize_temp_actor_window initialize
- def initialize(x, y)
- @page_number = 0
- @param_data = {}
- initialize_temp_actor_window(x, y)
- end
- #--------------------------------------------------------------------------
- # ウィンドウ幅の取得
- #--------------------------------------------------------------------------
- def window_width
- Graphics.width
- end
- #--------------------------------------------------------------------------
- # ウィンドウ幅の取得
- #--------------------------------------------------------------------------
- def width
- @ow_creating ? 208 : super
- end
- #--------------------------------------------------------------------------
- # 表示行数の取得
- #--------------------------------------------------------------------------
- def visible_line_number
- SceneEquipNextType::StatusLineMaxNumber + 1
- end
- #--------------------------------------------------------------------------
- # 次のページへ
- #--------------------------------------------------------------------------
- def next_page
- @page_number += 1
- page_control
- end
- #--------------------------------------------------------------------------
- # 前のページへ
- #--------------------------------------------------------------------------
- def prev_page
- @page_number -= 1
- page_control
- end
- #--------------------------------------------------------------------------
- # ページ限界値を調整
- #--------------------------------------------------------------------------
- def page_control
- m = SceneEquipNextType::StatusPageMax - 1
- @page_number = m if @page_number < 0
- @page_number = 0 if @page_number > m
- refresh
- end
- #--------------------------------------------------------------------------
- # リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- return unless @actor
- contents.font.size = SceneEquipNextType::StatusFontSize
- draw_actor_name(@actor, 4, 0)
- draw_status_text
- draw_all_items
- end
- #--------------------------------------------------------------------------
- # 右上の補助テキスト描写
- #--------------------------------------------------------------------------
- def draw_status_text
- change_color(text_color(SceneEquipNextType::StatusTextColor))
- draw_text(0,0,contents_width,line_height,SceneEquipNextType::StatusText,2)
- change_color(normal_color)
- end
- #--------------------------------------------------------------------------
- # 全項目描写
- #--------------------------------------------------------------------------
- def draw_all_items
- h = SceneEquipNextType::Page[@page_number]
- space = h[:space]
- col = h[:col]
- title = h[:title]
- line = h[:line]
- ids = h[:ids]
- aw = contents_width / col
- ids.each_with_index {|c,i|
- draw_item(aw * (i / line),(i % line + 1) * line_height,aw - space,line_height,title,c)}
- end
- #--------------------------------------------------------------------------
- # 項目描写
- #--------------------------------------------------------------------------
- def draw_item(x,y,w,h,t,c)
- case c
- when 0..99
- i = c
- d = @actor.param(i)
- a = [$data_system.terms.params[i],1,0,false]
- when 100..109
- i = c - 100
- d = @actor.xparam(i)
- a = SceneEquipNextType::XParam[i]
- when 200..209
- i = c - 200
- d = @actor.sparam(i)
- a = SceneEquipNextType::SParam[i]
- when 300..307
- i = c - 300
- d = @actor.debuff_rate(i)
- a = SceneEquipNextType::Debuff[i]
- when 10001..19999
- i = c - 10000
- d = @actor.element_rate(i)
- a = SceneEquipNextType::Element[i]
- when 20001..29999
- i = c - 20000
- d = @actor.state_resist?(i) ? SceneEquipNextType::StateResist : @actor.state_rate(i)
- a = SceneEquipNextType::State[i]
- else;return
- end
- d1 = a ? a[0] : nil
- return unless d1
- if c > 20000 && d == SceneEquipNextType::StateResist
- d2 = SceneEquipNextType::StateResistWord
- else
- d2 = (d * a[1]).round + a[2]
- end
- @param_data[c] = d2
- change_color(system_color)
- draw_text(x,y,t,h,d1)
- change_color(normal_color)
- draw_text(x + t,y,(w - t - 24) / 2,h,d2,2)
- end
- #--------------------------------------------------------------------------
- # 装備変更後の一時アクター設定
- #--------------------------------------------------------------------------
- def set_temp_actor(temp_actor)
- temp_actor_window.set_temp_actor(temp_actor)
- end
- end
- class Window_EquipStatusTemp < Window_EquipStatus
- #--------------------------------------------------------------------------
- # 項目描写
- #--------------------------------------------------------------------------
- def draw_item(x,y,w,h,t,c)
- return unless @temp_actor
- case c
- when 0..99
- i = c
- d = @temp_actor.param(c)
- a = ["",1,0,false]
- when 100..109
- i = c - 100
- d = @temp_actor.xparam(i)
- a = SceneEquipNextType::XParam[i]
- when 200..209
- i = c - 200
- d = @temp_actor.sparam(i)
- a = SceneEquipNextType::SParam[i]
- when 300..307
- i = c - 300
- d = @temp_actor.debuff_rate(i)
- a = SceneEquipNextType::Debuff[i]
- when 10001..19999
- i = c - 10000
- d = @temp_actor.element_rate(i)
- a = SceneEquipNextType::Element[i]
- when 20001..29999
- i = c - 20000
- d = @temp_actor.state_resist?(i) ? SceneEquipNextType::StateResist : @temp_actor.state_rate(i)
- a = SceneEquipNextType::State[i]
- else;return
- end
- if c > 20000 && d == SceneEquipNextType::StateResist
- d2 = SceneEquipNextType::StateResistWord
- else
- d = (d * a[1]).round + a[2]
- d2 = d
- end
- w2 = (w - t - 24) / 2
- x2 = x + t + w2
- change_color(system_color)
- draw_text(x2,y,24,h,"→")
- o = @temp_actor_window.param_data[c]
- if a[3] == 2
- change_color(normal_color)
- else
- flag = o == SceneEquipNextType::StateResistWord
- true_o = flag ? SceneEquipNextType::StateResist : o
- color = param_change_color((d - true_o) * (a[3] == 1 ? -1 : 1))
- change_color(color)
- end
- draw_text(x2 + 24,y,w2,h,d2,2)
- end
- #--------------------------------------------------------------------------
- # 装備変更後の一時アクター設定
- #--------------------------------------------------------------------------
- def set_temp_actor(temp_actor)
- return if @temp_actor == temp_actor
- @temp_actor = temp_actor
- refresh
- end
- #--------------------------------------------------------------------------
- # 名前の描画
- #--------------------------------------------------------------------------
- def draw_actor_name(actor, x, y, width = 112)
- end
- #--------------------------------------------------------------------------
- # 右上の補助テキスト描写
- #--------------------------------------------------------------------------
- def draw_status_text
- end
- end
- module WindowEquipPage
- #--------------------------------------------------------------------------
- # 前のページへ移行するハンドリング処理
- #--------------------------------------------------------------------------
- def process_prev_page
- if handle?(:prev_page)
- Sound.play_cursor
- call_handler(:prev_page)
- end
- activate
- end
- #--------------------------------------------------------------------------
- # 次のページへ移行するハンドリング処理
- #--------------------------------------------------------------------------
- def process_next_page
- if handle?(:next_page)
- Sound.play_cursor
- call_handler(:next_page)
- end
- activate
- end
- end
- class Window_EquipSlot < Window_Selectable
- include WindowEquipPage
- #--------------------------------------------------------------------------
- # 桁数を取得
- #--------------------------------------------------------------------------
- def col_max
- SceneEquipNextType::SlotColMax
- end
- #--------------------------------------------------------------------------
- # 横に項目が並ぶときの空白の幅を取得
- #--------------------------------------------------------------------------
- def spacing
- SceneEquipNextType::SlotSpacing
- end
- #--------------------------------------------------------------------------
- # 項目の描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- return unless @actor
- w = SceneEquipNextType::SlotNameWidth
- rect = item_rect_for_text(index)
- change_color(system_color, enable?(index))
- draw_text(rect.x, rect.y, w, line_height, slot_name(index))
- draw_item_name(@actor.equips[index], rect.x + w, rect.y, enable?(index))
- end
- #--------------------------------------------------------------------------
- # 決定やキャンセルなどのハンドリング処理
- #--------------------------------------------------------------------------
- unless method_defined?(:process_handling_page_change)
- alias process_handling_page_change process_handling
- def process_handling
- return unless open? && active
- ks = SceneEquipNextType::PageKey
- return process_prev_page if Input.trigger?(ks[0])
- return process_next_page if Input.trigger?(ks[1])
- return process_release_equip if Input.trigger?(SceneEquipNextType::ReleaseKey)
- return process_optimize if Input.trigger?(SceneEquipNextType::OptimizeKey)
- return process_all_release if Input.trigger?(SceneEquipNextType::AllReleaseKey)
- process_handling_page_change
- end
- end
- #--------------------------------------------------------------------------
- # 装備解除のハンドリング処理
- #--------------------------------------------------------------------------
- def process_release_equip
- if handle?(:release_equip)
- if current_item_enabled? && item
- Sound.play_equip
- call_handler(:release_equip)
- else
- Sound.play_buzzer
- end
- end
- activate
- end
- #--------------------------------------------------------------------------
- # 最強装備のハンドリング処理
- #--------------------------------------------------------------------------
- def process_optimize
- if handle?(:command_optimize_slot)
- Sound.play_equip
- call_handler(:command_optimize_slot)
- end
- activate
- end
- #--------------------------------------------------------------------------
- # 全装備解除のハンドリング処理
- #--------------------------------------------------------------------------
- def process_all_release
- if handle?(:command_clear_slot)
- Sound.play_equip
- call_handler(:command_clear_slot)
- end
- activate
- end
- end
- class Window_EquipCommand < Window_HorzCommand
- include WindowEquipPage
- #--------------------------------------------------------------------------
- # 決定やキャンセルなどのハンドリング処理
- #--------------------------------------------------------------------------
- alias process_handling_page_change process_handling unless $!
- def process_handling
- return unless open? && active
- ks = SceneEquipNextType::PageKey
- return process_prev_page if Input.trigger?(ks[0])
- return process_next_page if Input.trigger?(ks[1])
- process_handling_page_change
- end
- end
- class Window_EquipItem < Window_ItemList
- include WindowEquipPage
- #--------------------------------------------------------------------------
- # 決定やキャンセルなどのハンドリング処理
- #--------------------------------------------------------------------------
- alias process_handling_page_change process_handling unless $!
- def process_handling
- return unless open? && active
- ks = SceneEquipNextType::PageKey
- return process_prev_page if Input.trigger?(ks[0])
- return process_next_page if Input.trigger?(ks[1])
- process_handling_page_change
- end
- end
- class Game_Interpreter
- #--------------------------------------------------------------------------
- # 装備の変更
- #--------------------------------------------------------------------------
- def change_equip(aid, sid, iid)
- actor = $game_actors[aid]
- actor.change_equip_by_id(sid, iid) if actor
- end
- #--------------------------------------------------------------------------
- # 装備の全解除
- #--------------------------------------------------------------------------
- def clear_equip(aid)
- actor = $game_actors[aid]
- actor.clear_equipments if actor
- end
- #--------------------------------------------------------------------------
- # 最強装備
- #--------------------------------------------------------------------------
- def optimize_equipments(aid)
- actor = $game_actors[aid]
- actor.optimize_equipments if actor
- end
- #--------------------------------------------------------------------------
- # 装備が指定スロットに存在するか
- #--------------------------------------------------------------------------
- def actor_equips_exist?(aid,sid)
- actor = $game_actors[aid]
- actor.equips_exist?(sid) if actor
- end
- #--------------------------------------------------------------------------
- # 装備の変更(旧バージョン互換用)
- #--------------------------------------------------------------------------
- def ch_eq(aid, sid, iid)
- change_equip(aid, sid, iid)
- end
- #--------------------------------------------------------------------------
- # 装備の全解除(旧バージョン互換用)
- #--------------------------------------------------------------------------
- def ar_eq(aid)
- clear_equip(aid)
- end
- end
- class RPG::EquipItem < RPG::BaseItem
- #--------------------------------------------------------------------------
- # 装備タイプ
- #--------------------------------------------------------------------------
- def etype_id
- @true_etype_id ||= /<#{SceneEquipNextType::ETypeWord1}[::](\d+)>/ =~ note ? $1.to_i : @etype_id
- end
- end
- class RPG::BaseItem
- #--------------------------------------------------------------------------
- # 装備固定タイプID
- #--------------------------------------------------------------------------
- def etype_fix_ids
- @etype_fix_ids ||= create_etype_fix_ids
- end
- #--------------------------------------------------------------------------
- # 装備固定タイプID作成
- #--------------------------------------------------------------------------
- def create_etype_fix_ids
- a = /<#{SceneEquipNextType::ETypeWord2}[::](\S+)>/ =~ note ? $1.to_s : ""
- a.split(/\s*,\s*/).inject([]) {|r,i| r.push(i.to_i)}
- end
- #--------------------------------------------------------------------------
- # 装備封印タイプID
- #--------------------------------------------------------------------------
- def etype_seal_ids
- @etype_seal_ids ||= create_etype_seal_ids
- end
- #--------------------------------------------------------------------------
- # 装備封印タイプID作成
- #--------------------------------------------------------------------------
- def create_etype_seal_ids
- a = /<#{SceneEquipNextType::ETypeWord3}[::](\S+)>/ =~ note ? $1.to_s : ""
- a.split(/\s*,\s*/).inject([]) {|r,i| r.push(i.to_i)}
- end
- end
复制代码 |
|