查看: 1252|回复: 6

[已经解决] 请问下这个错误是怎么回事

[复制链接]
梦石
0
星屑
1687
在线时间
27 小时
注册时间
2014-3-6
回帖
1
发表于 2014-3-27 21:47:59 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 瀨織津姬 于 2014-3-30 16:51 编辑
  1. #==============================================================================
  2. #
  3. # リザルトウィンドウv1.5
  4. #
  5. #
  6. # ○KGC様の多人数パーティと併用できるようにしてありますが
  7. #   パーティメンバー数があまりにも多い場合、ウィンドウが画面に収まりきりません
  8. #   その場合、VIEW_STAND_BY_MEMBERSをfalseにすれば
  9. #   待機メンバーの情報は表示されません。
  10. #
  11. #==============================================================================

  12. module BBL
  13. #==============================================================================
  14. # ■ カスタマイズ
  15. #==============================================================================

  16.   # リザルト画面の早送りを禁止するなら false にしてください
  17.   SKIP_PM = true
  18.   # リザルト画面の早送りボタンです
  19.   SKIP_KEY = Input::C
  20.   # 早送り時のカウント増加数です
  21.   # ※この数値を増やすと早送り速度が上がります
  22.   #   (WAIT_TIMEと同値にすると、スキップ機能になります)
  23.   SKIP_COUNT = 1
  24.   # リザルト画面でのウェイト時間(というかループ回数です)
  25.   WAIT_TIME = 200
  26.   
  27.   #---------------------------------------------------------------------------
  28.   # リザルト画面配置設定
  29.   # ※リザルト画面のメンバーリスト部分の配置やサイズを設定できます
  30.   #   ここでの数値にあわせて、その他のウィンドウサイズも変更されます
  31.   # ※リザルトウィンドウとスキルウィンドウの横幅を画面二等分する場合の
  32.   #   数値の例を記載しておきます
  33.   #     WINDOW_WIDTH = 272
  34.   #     WINDOW_ACTOR_X = 0
  35.   #     WINDOW_ACTOR_LEVEL = 48
  36.   #     WINDOW_EXP_GAUGE_X = 112
  37.   #     WINDOW_EXP_X = 112
  38.   #---------------------------------------------------------------------------
  39.   # リザルト画面の横幅です
  40.   WINDOW_WIDTH = 304
  41.   # リザルト画面に表示するアクター画像の位置です
  42.   WINDOW_ACTOR_X = 8
  43.   # リザルト画面に表示するアクターレベルの位置です
  44.   WINDOW_ACTOR_LEVEL = 64
  45.   # リザルト画面に表示する経験値ゲージの位置です
  46.   WINDOW_EXP_GAUGE_X = 136
  47.   # リザルト画面に表示するNext経験値の位置です
  48.   WINDOW_EXP_X = 136
  49.   # アクターひとり分の縦幅です
  50.   ACTOR_HEIGHT = 40
  51.   
  52.   # EXPバーのグラデーションカラーです
  53.   # ※EXP_COLOR1(左側)からEXP_COLOR2(右側)にバーのグラデーションが流れます
  54.   EXP_COLOR1 = Color.new(105, 255, 132)
  55.   EXP_COLOR2 = Color.new(20,  180,  45)
  56.   
  57.   # レベルアップ時のLV数値描画の色です
  58.   LVUP_COLOR = Color.new(255, 220, 0)
  59.   
  60.   # リザルト画面でアクターの歩行グラフィックを表示する場合は 0
  61.   # 名前を表示する場合は 1
  62.   # ※アクターの名前が6文字以上だとLV表示と重なっちゃいます
  63.   VIEW_ACTOR = 0
  64.   
  65.   # EXPウィンドウに表示する経験値の用語です
  66.   VIEW_EXP = "Exp"
  67.   
  68.   # EXPウィンドウに表示するお金の用語です
  69.   VIEW_GOLD = "金"
  70.   
  71.   # アイテム獲得時のアイテムウィンドウに表示する用語です
  72.   VIEW_ITEM = "道具"
  73.   
  74.   # スキル習得時に表示する用語です
  75.   VIEW_SKILL = " "
  76.   
  77.   # リザルト画面更新中に音を鳴らさないなら false にしてください
  78.   EXP_SOUND = true

  79.   # レベルアップ時に音を鳴らさないなら false にしてください
  80.   LVUP_SOUND = true

  81.   # アイテム獲得時に音を鳴らさないなら false にしてください
  82.   ITEM_SOUND = true
  83.   
  84.   # リザルト画面更新中に音を鳴らす場合のSEファイル名です
  85.   # ("ファイル名", ボリューム, ピッチ)
  86.   EXP_SOUND_FILE = RPG::SE.new("Decision1", 80, 110)
  87.   
  88.   # リザルト画面更新中に音を鳴らす場合の間隔です
  89.   # ※(WAIT_TIME ÷ EXP_SOUND_COUNT)回だけ音が連続で鳴ります
  90.   EXP_SOUND_COUNT = 3
  91.   
  92.   # レベルアップ時に音を鳴らす場合のSEファイル名です
  93.   # ("ファイル名", ボリューム, ピッチ)
  94.   LVUP_SOUND_FILE = RPG::SE.new("encount", 80, 100)
  95.   
  96.   # アイテム獲得時に音を鳴らす場合のSEファイル名です
  97.   # ("ファイル名", ボリューム, ピッチ)
  98.   ITEM_SOUND_FILE = RPG::SE.new("Chime2", 80, 100)
  99.   
  100.   # KGCさんの装備スキルでAP獲得を導入している場合のみ設定してください
  101.   # スキルマスター時に表示する用語です
  102.   VIEW_SKILL_MASTER = "MASTER SKILL"
  103.   # 多人数パーティも導入してる場合は待機メンバーにAPを獲得させるか
  104.   # 設定してください
  105.   STAND_BY_GAIN_AP = true
  106.   # 待機メンバーのAP獲得率を設定できます
  107.   # 数値の意味は多人数パーティのSTAND_BY_EXP_RATEと同じです
  108.   STAND_BY_AP_RATE = 500
  109.   # スキルマスター時に音を鳴らさないなら false にしてください
  110.   SKILL_MASTER_SOUND = false
  111.   # スキルマスター時に音を鳴らす場合のSEファイル名です
  112.   # ("ファイル名", ボリューム, ピッチ)
  113.   SKILL_MASTER_SOUND_FILE = RPG::SE.new("Up", 80, 100)

  114.   #----------------------------------------------------------------------------
  115.   # 習得スキルウィンドウのアクター画像位置微調整
  116.   # ※アクターの歩行サイズ(32x32)を変更している方用です
  117.   #   通常は、編集する必要はありません
  118.   #----------------------------------------------------------------------------
  119.   # 習得スキルウィンドウ1行分の縦幅です
  120.   SKILL_ACTOR_HEIGHT = 24
  121.   # 習得スキルウィンドウに描画するアクター画像の横幅です
  122.   # ※この値によって、後に表示するスキル名のX座標も変更されます
  123.   SKILL_ACTOR_WIDTH = 40
  124.   # 習得スキルウィンドウに描画するアクター画像のX座標です
  125.   SKILL_ACTOR_X = 20
  126.   # 習得スキルウィンドウに描画するアクター画像のY座標です
  127.   SKILL_ACTOR_Y = 32
  128.   # アクター画像で表示させたくない部分のY座標です
  129.   # ※足元の座標を0として、CLEAR_ACTOR_Yより下の画像が消えます
  130.   CLEAR_ACTOR_Y = 10
  131.   
  132.   # KGCさんの多人数パーティを導入している際
  133.   # リザルト画面に待機メンバーを表示させない場合はfalseにしてください
  134.   VIEW_STAND_BY_MEMBERS = true
  135.   
  136. #==============================================================================
  137. # ☆ ここからおまけ
  138. #   
  139. #   ターンボーナス
  140. #    指定ターン以内にバトルに勝利するとEXPとGOLDにボーナスが適応されます
  141. #
  142. #   ノーダメージボーナス
  143. #     敵からダメージを受けないで勝利するとEXPとGOLDにボーナスが適応されます
  144. #
  145. #==============================================================================
  146.   
  147.   # ターンボーナスを有効にする場合は true にしてください
  148.   TURN_BONUS = false
  149.   # ターンボーナスの無効ターンです
  150.   # ※TURN_BONUS_LIMIT = 2 の場合
  151.   #   2ターン経過する前に勝利した場合ボーナスが適応されます
  152.   TURN_BONUS_LIMIT = 2
  153.   # リザルト画面でターンボーナスの条件を満たした際に表示する用語です
  154.   TURN_BONUS_WORD = "ターンボーナス"
  155.   # ターンボーナスの用語を表示する際の色です
  156.   TURN_BONUS_COLOR = Color.new(255, 255, 150)
  157.   
  158.   # ノーダメージボーナスを有効にする場合は true にしてください
  159.   # ※敵からダメージを受けないで勝利した場合、EXPとGOLDにボーナスを適応します
  160.   NO_DAMAGE_BONUS = true
  161.   # リザルト画面でノーダメージボーナスの条件を満たした際に表示する用語です
  162.   NO_DAMAGE_WORD = "No Damage Bouns"
  163.   # ノーダメージボーナスの用語を表示する際の色です
  164.   NO_DAMAGE_COLOR = Color.new(255, 255, 150)
  165.   
  166.   # ボーナスが有効な場合のEXP増加レートです
  167.   # (EXP_BONUS_RATE = 150 でEXPを通常の150%獲得します)
  168.   EXP_BONUS_RATE = 120
  169.   # ボーナスが有効な場合のGOLD増加レートです
  170.   # (GOLD_BONUS_RATE = 150 でGOLDを通常の150%獲得します)
  171.   GOLD_BONUS_RATE = 120
  172.   # ※TURN_BONUSとNO_DAMAGE_BONUSを両方有効にした上でバトル中両条件を満たした場合
  173.   #   それぞれのBONUS_RATEが倍になります

  174. #==============================================================================
  175. # ■ カスタマイズ終了
  176. #==============================================================================
  177. end

  178. #==============================================================================
  179. # ■ KGC多人数パーティ用
  180. #==============================================================================
  181. $imported = {} if $imported == nil


  182. #==============================================================================
  183. # ■ Game_Actor
  184. #==============================================================================
  185. class Game_Actor < Game_Battler
  186.   #--------------------------------------------------------------------------
  187.   # ● 公開インスタンス変数
  188.   #--------------------------------------------------------------------------
  189.   attr_accessor :level_up_flug            # レベルアップフラグ
  190.   attr_accessor :new_skills               # 新しく覚えたスキルの配列
  191.   #--------------------------------------------------------------------------
  192.   # ● オブジェクト初期化
  193.   #     actor_id : アクター ID
  194.   #--------------------------------------------------------------------------
  195.   alias initialize_BBL initialize
  196.   def initialize(actor_id)
  197.     initialize_BBL(actor_id)
  198.     @new_skills = []
  199.   end
  200.   #--------------------------------------------------------------------------
  201.   # ● 次のレベルまでの経験値の取得
  202.   #--------------------------------------------------------------------------
  203.   def next_rest_exp
  204.     return @exp_list[@level+1] > 0 ? (@exp_list[@level+1] - @exp) : 0
  205.   end
  206.   #--------------------------------------------------------------------------
  207.   # ● 次のレベルまでの経験値の最大値の取得
  208.   #--------------------------------------------------------------------------
  209.   def next_max_exp
  210.     return @exp_list[@level+1] - @exp_list[@level]
  211.   end
  212. end

  213. #==============================================================================
  214. # ■ Scene_Battle
  215. #==============================================================================
  216. class Scene_Battle < Scene_Base
  217.   #--------------------------------------------------------------------------
  218.   # ● 勝利の処理(再定義)
  219.   #--------------------------------------------------------------------------
  220.   def process_victory # 再定義
  221.     @info_viewport.visible = false
  222.     @message_window.visible = false
  223. #~     RPG::BGM.stop
  224.      $game_system.battle_end_me.play
  225.     unless $BTEST
  226. #~       $game_temp.map_bgm.play
  227.       $game_temp.map_bgs.play
  228.     end
  229.     display_result
  230.     battle_end(0)
  231.   end
  232.   #--------------------------------------------------------------------------
  233.   # ○ リザルト画面表示
  234.   #--------------------------------------------------------------------------
  235.   def display_result
  236.     members = $game_party.all_members if $imported["LargeParty"]
  237.     members = $game_party.members unless $imported["LargeParty"]
  238.     # レベルアップフラグ初期化
  239.       for actor in members
  240.         actor.level_up_flug = false
  241.       end
  242.     drop_items = $game_troop.make_drop_items
  243.     for item in drop_items
  244.       $game_party.gain_item(item, 1)
  245.     end
  246.     exp = $game_troop.exp_total
  247.     gold = $game_troop.gold_total
  248.     if $imported["EquipLearnSkill"]
  249.       ap = $game_troop.ap_total
  250.     else
  251.       ap = 0
  252.     end
  253.    
  254.     # 各ウィンドウ作成
  255.     @resultitem_window = Window_ResultItem.new(drop_items) if drop_items != []
  256.     @result_window = Window_Result.new
  257.     @resultexp_window = Window_ResultNextExp.new(exp)
  258.     @expview_window = Window_ResultExp.new(exp, gold, ap)
  259.     @result_skill_window = Window_ResultSkill.new
  260.     @result_skill_window.visible = false
  261.     # RESULT_WINDOWのY座標
  262.     @result_window.y = 208 - ((@result_window.height - @expview_window.height) / 2)
  263.     @resultexp_window.y = @result_window.y
  264.    
  265.     # ドロップアイテムがあった場合
  266.     if drop_items != []
  267.       BBL::ITEM_SOUND_FILE.play if BBL::ITEM_SOUND == true
  268.       # ITEM_WINDOWとRESULT_WINDOWの縦幅が画面の下枠を超える場合、全体の位置を上に調整
  269.       if @result_window.height + @resultitem_window.height > 416 - @result_window.y
  270.         @result_window.y = 416 - (@result_window.height + @resultitem_window.height)
  271.         @resultexp_window.y = @result_window.y
  272.       end
  273.       # RESULT_WINDOWのY座標がEXP_WINDOWの縦幅よりも少ない場合、全体の位置を下に調整
  274.       if @result_window.y < @expview_window.height
  275.         @result_window.y = @expview_window.height
  276.         @resultexp_window.y = @result_window.y
  277.       end
  278.       # アイテムウィンドウのY座標
  279.       @resultitem_window.y = @result_window.y + @result_window.height if @resultitem_window != nil
  280.       # 各ウィンドウのHEIGHTの合計が画面の枠を超える場合、全体のウィンドウ位置を調整と
  281.       # ITEM_WINDOWの横幅を調整
  282.       if @result_window.height + @resultitem_window.height + @expview_window.height > 416
  283.         @result_window.x = @resultexp_window.x = @expview_window.x = 0
  284.         @result_window.y = 208 - ((@result_window.height - @expview_window.height) / 2)
  285.         @resultexp_window.y = @result_window.y
  286.         @resultitem_window.x = @result_window.width
  287.         @resultitem_window.y = (@result_window.y + @result_window.height) - @resultitem_window.height
  288.         @resultitem_window.width = 544 - @result_window.width
  289.       else
  290.         # ITEM_WINDOWのX座標と横幅をRESULT_WINDOWにあわせる
  291.         @resultitem_window.width = @result_window.width
  292.         @resultitem_window.x = @result_window.x
  293.       end
  294.     end
  295.     # EXPウィンドウのY座標
  296.     @expview_window.y = @result_window.y - @expview_window.height
  297.     # スキルウィンドウのY座標
  298.     @result_skill_window.y = @expview_window.y
  299.    
  300.     #---------------------------------------------------------------------------
  301.     # KGC 装備スキル用
  302.     #---------------------------------------------------------------------------
  303.     if $imported["EquipLearnSkill"]
  304.       @result_skillkgc_window = Window_ResultSkill_KGC.new
  305.       @result_skillkgc_window.visible = false
  306.       skills = []
  307.       members.each { |actor|
  308.       last_full_ap_skills = actor.full_ap_skills
  309.       unless actor.dead?
  310.         member = actor.battle_member? if $imported["LargeParty"]
  311.         member = actor.exist? unless $imported["LargeParty"]
  312.         if member
  313.           actor.gain_ap(ap, false)
  314.         else
  315.           if BBL::STAND_BY_GAIN_AP
  316.             stand_by_ap = ap
  317.             stand_by_ap = ap * (BBL::STAND_BY_AP_RATE / 1000.0)
  318.             actor.gain_ap(stand_by_ap.round, false)
  319.           end
  320.         end
  321.       end
  322.       if actor.full_ap_skills != last_full_ap_skills
  323.         new_full_ap_skills = actor.full_ap_skills - last_full_ap_skills
  324.         unless new_full_ap_skills.empty?
  325.           for i in 0...new_full_ap_skills.size
  326.             skills.push([new_full_ap_skills[i].name, actor.id])
  327.           end
  328.           @result_skillkgc_window.visible = true
  329.           @result_skillkgc_window.refresh(skills)
  330.           @result_skillkgc_window.y = @expview_window.y
  331.           @result_skill_window.y = @result_skillkgc_window.y + @result_skillkgc_window.height
  332.           BBL::SKILL_MASTER_SOUND_FILE.play if BBL::SKILL_MASTER_SOUND
  333.         end
  334.       end
  335.       }
  336.     end
  337.     #---------------------------------------------------------------------------
  338.       
  339.     # リザルト画面更新
  340.     @count = 0
  341.     @se_count = 0
  342.     skills = []
  343.     loop do
  344.       if BBL::SKIP_PM == true
  345.       @count += BBL::SKIP_COUNT if Input.press?(BBL::SKIP_KEY)
  346.       end
  347.       if BBL::EXP_SOUND == true
  348.         BBL::EXP_SOUND_FILE.play if @se_count == 0 and exp != 0
  349.         @se_count += 1
  350.         @se_count = 0 if @se_count == BBL::EXP_SOUND_COUNT
  351.       end
  352.       @count += 1
  353.       @count = BBL::WAIT_TIME if @count > BBL::WAIT_TIME
  354.       @resultexp_window.update(exp, @count)
  355.       for actor in members
  356.         unless actor.new_skills.empty?
  357.           for i in 0...actor.new_skills.size
  358.             skills.push([actor.new_skills[i].name, actor.id])
  359.           end
  360.           @result_skill_window.visible = true
  361.           @result_skill_window.refresh(skills)
  362.           actor.new_skills = []
  363.         end
  364.       end
  365.       break if @count == BBL::WAIT_TIME
  366.       update_basic
  367.     end
  368.       @resultexp_window.update(exp, @count) # 補助
  369.     wait(30) if @result_skill_window.visible
  370.     # EXP獲得
  371.       $game_party.members.each { |actor|
  372.         actor.gain_exp(exp, false) if actor.exist?
  373.       }
  374.     if $imported["LargeParty"]
  375.       exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
  376.       $game_party.stand_by_members.each { |actor|
  377.       actor.gain_exp(exp, false) if actor.exist?
  378.       }
  379.     end
  380.     # ゴールド獲得
  381.     $game_party.gain_gold(gold)
  382.     loop do
  383.       update_basic
  384.       break if Input.trigger?(Input::C)
  385.     end
  386.    
  387.     # 各ウィンドウの解放
  388.     @result_window.dispose
  389.     @expview_window.dispose
  390.     @resultexp_window.dispose
  391.     @result_skill_window.dispose
  392.     @resultitem_window.dispose if @resultitem_window != nil
  393.     @result_skillkgc_window.dispose if $imported["EquipLearnSkill"]
  394.   end
  395. end
  396. #==============================================================================
  397. # ■ Window_ResultExp
  398. #    リザルト画面で獲得EXPを表示するウィンドウです
  399. #==============================================================================
  400. class Window_ResultExp < Window_Base
  401.   WIDTH = BBL::WINDOW_WIDTH   # ウィンドウの横幅
  402.   #--------------------------------------------------------------------------
  403.   # ● オブジェクト初期化
  404.   #--------------------------------------------------------------------------
  405.   def initialize(exp, gold, ap)
  406.     i = 2
  407.     if BBL::NO_DAMAGE_BONUS
  408.       i += 1 unless $game_temp.damage_flug
  409.     end
  410.     if BBL::TURN_BONUS
  411.       i += 1 if $game_temp.turn_bonus
  412.     end
  413.     if $imported["EquipLearnSkill"]
  414.       i += 1 if ap > 0
  415.     end
  416.     super(0, 0, WIDTH+80, WLH * i + 32)
  417.     self.contents = Bitmap.new(width - 32, height - 32)
  418.     refresh(exp, gold, ap)
  419.   end
  420.   #--------------------------------------------------------------------------
  421.   # ● リフレッシュ
  422.   #--------------------------------------------------------------------------
  423.   def refresh(exp, gold, ap)
  424.     self.contents.clear
  425.     i = 0
  426.     max_hit = $game_variables[152]
  427.     max_damage = $game_variables[153]
  428.     if BBL::TURN_BONUS
  429.       if $game_temp.turn_bonus
  430.         self.contents.font.color = BBL::TURN_BONUS_COLOR
  431.         self.contents.draw_text(4, WLH * i, 272, WLH, BBL::TURN_BONUS_WORD)
  432.         i += 1
  433.       end
  434.     end
  435.     if BBL::NO_DAMAGE_BONUS
  436.       unless $game_temp.damage_flug
  437.         self.contents.font.color = BBL::NO_DAMAGE_COLOR
  438.         self.contents.draw_text(4, WLH * i, 272, WLH, BBL::NO_DAMAGE_WORD)
  439.         i += 1
  440.       end
  441.     end
  442.     self.contents.font.color = system_color
  443.     exp_width = contents.text_size(BBL::VIEW_EXP).width
  444.     gold_width = contents.text_size(BBL::VIEW_GOLD).width
  445.     self.contents.draw_text(4, WLH * i, exp_width, WLH, BBL::VIEW_EXP)
  446.     self.contents.draw_text(4, WLH * i + WLH, gold_width, WLH, BBL::VIEW_GOLD)
  447.     self.contents.font.color = normal_color
  448.     x = [exp_width, gold_width].max
  449.     if BBL::TURN_BONUS || BBL::NO_DAMAGE_BONUS
  450.       exp_rate = 100
  451.       gold_rate = 100
  452.       if $game_temp.damage_flug == false && BBL::NO_DAMAGE_BONUS
  453.       exp_rate += BBL::EXP_BONUS_RATE - 100
  454.       gold_rate += BBL::GOLD_BONUS_RATE - 100
  455.       end
  456.       if $game_temp.turn_bonus && BBL::TURN_BONUS
  457.       exp_rate += BBL::EXP_BONUS_RATE - 100
  458.       gold_rate += BBL::GOLD_BONUS_RATE - 100
  459.       end
  460.       if $game_temp.damage_flug == false || $game_temp.turn_bonus
  461.         exp1 = (exp / (exp_rate / 100.0)).round
  462.         exp2 = exp - exp1
  463.         total_exp = exp1, " + ", exp2
  464.         total_exp = exp if exp == 0
  465.         gold1 = (gold / (gold_rate / 100.0)).round
  466.         gold2 = gold - gold1
  467.         total_gold = gold1, " + ", gold2
  468.         total_gold = gold if gold == 0
  469.         self.contents.draw_text(x + 16, WLH * i, 304 - 32, 24, total_exp)
  470.         self.contents.draw_text(x + 16, WLH * i + WLH, 304 - 32, 24, total_gold)
  471.       else
  472.         self.contents.draw_text(x + 16, WLH * i, 304 - 32, 24, exp)
  473.         self.contents.draw_text(x + 16, WLH * i + WLH, 304 - 32, 24, gold)
  474.       end
  475.     else
  476.       self.contents.draw_text(x + 16, WLH * i, 304 - 32, 24, exp)
  477.       self.contents.draw_text(x + 16, WLH * i + WLH, 304 - 32, 24, gold)
  478.     end
  479.     self.contents.font.color = system_color
  480.     self.contents.draw_text(x + 176, WLH * i, 304 - 32, 24, "Chain")
  481.     self.contents.draw_text(x + 176, WLH * i + WLH, 304 - 32, 24, "Damage")
  482.     self.contents.font.color = normal_color
  483.     self.contents.draw_text(x + 256, WLH * i, 304 - 32, 24, max_hit)
  484.     self.contents.draw_text(x + 256, WLH * i + WLH, 304 - 32, 24, max_damage)
  485.     if ap > 0
  486.       i += 1
  487.       self.contents.draw_text(x + 32, WLH * i + WLH, 304 - 32, 24, ap)
  488.       self.contents.font.color = system_color
  489.       self.contents.draw_text(4, WLH * i + WLH, gold_width, WLH, KGC::EquipLearnSkill::VOCAB_AP)
  490.     end
  491.   end
  492. end
  493. #==============================================================================
  494. # ■ Window_ResultItem
  495. #    リザルト画面で獲得アイテムを表示するウィンドウです
  496. #==============================================================================
  497. class Window_ResultItem < Window_Base
  498.   WIDTH = 544 - BBL::WINDOW_WIDTH
  499.   #--------------------------------------------------------------------------
  500.   # ● オブジェクト初期化
  501.   #--------------------------------------------------------------------------
  502.   def initialize(drop_items)
  503.     x = BBL::WINDOW_WIDTH
  504.     super(x, 0, WIDTH, (drop_items.size * WLH) + WLH  + 32)
  505.     refresh(drop_items)
  506.   end
  507.   #--------------------------------------------------------------------------
  508.   # ● リフレッシュ
  509.   #--------------------------------------------------------------------------
  510.   def refresh(drop_items)
  511.     self.contents.clear
  512.     x = 4
  513.     item_width = contents.text_size(BBL::VIEW_ITEM).width
  514.     self.contents.font.color = system_color
  515.     self.contents.draw_text(x, 0, item_width, WLH, BBL::VIEW_ITEM)
  516.     y = WLH
  517.     for item in drop_items
  518.       draw_item_name(item, 4, y)
  519.       y += WLH
  520.     end
  521.   end
  522.   #--------------------------------------------------------------------------
  523.   # ● アイテム名の描画
  524.   #     item    : アイテム (スキル、武器、防具でも可)
  525.   #     x       : 描画先 X 座標
  526.   #     y       : 描画先 Y 座標
  527.   #     enabled : 有効フラグ。false のとき半透明で描画
  528.   #--------------------------------------------------------------------------
  529.   def draw_item_name(item, x, y, enabled = true)
  530.     if item != nil
  531.       draw_icon(item.icon_index, x, y, enabled)
  532.       self.contents.font.color = normal_color
  533.       self.contents.font.color.alpha = enabled ? 255 : 128
  534.       self.contents.draw_text(x + 24, y, WIDTH - 56, WLH, item.name)
  535.     end
  536.   end
  537. end

  538. #==============================================================================
  539. # ■ Window_Result
  540. #    リザルト画面でアクターの情報を表示するウィンドウです
  541. #==============================================================================
  542. class Window_Result < Window_Base
  543.   HEIGHT = BBL::ACTOR_HEIGHT  # アクター1人分の高さ
  544.   WIDTH = BBL::WINDOW_WIDTH   # ウィンドウの横幅
  545.   #--------------------------------------------------------------------------
  546.   # ● オブジェクト初期化
  547.   #--------------------------------------------------------------------------
  548.   def initialize
  549.     @members = $game_party.members
  550.     if $imported["LargeParty"] && BBL::VIEW_STAND_BY_MEMBERS
  551.       @members = $game_party.all_members
  552.     end
  553.     super(0, 0, WIDTH, (@members.size * HEIGHT) + 32)
  554.     self.contents = Bitmap.new(width - 32, height - 32)
  555.     self.y = 208 - (height / 2)
  556.     refresh
  557.   end
  558.   #--------------------------------------------------------------------------
  559.   # ● リフレッシュ
  560.   #--------------------------------------------------------------------------
  561.   def refresh
  562.     self.contents.clear
  563.     name_width = []
  564.     actor_x = BBL::WINDOW_ACTOR_X
  565.     level_x = BBL::WINDOW_ACTOR_LEVEL
  566.     gauge_x = BBL::WINDOW_EXP_GAUGE_X
  567.     lv_width = contents.text_size(Vocab::level_a).width
  568.     for actor in @members
  569.       x = 4
  570.       y = actor.index * HEIGHT unless $imported["LargeParty"]
  571.       y = actor.party_index * HEIGHT if $imported["LargeParty"]
  572.       sy = (HEIGHT / 2) - 16
  573.       case BBL::VIEW_ACTOR
  574.       when 0;draw_actor_graphic(actor, actor_x + 16, y + HEIGHT - sy)
  575.       when 1;draw_actor_name(actor, actor_x, y + HEIGHT - 20 - sy)
  576.       end
  577.       self.contents.font.size = 20
  578.       self.contents.font.color = system_color
  579.       self.contents.draw_text(level_x, y + HEIGHT - 20 - sy, lv_width, WLH, Vocab::level_a)
  580.       self.contents.draw_text(gauge_x, y + HEIGHT - 28 - sy, 64, WLH, "Next")
  581.     end
  582.   end
  583. end

  584. #==============================================================================
  585. # ■ Window_ResultSkill
  586. #    リザルト画面で習得したスキルを表示するウィンドウです
  587. #==============================================================================
  588. HEIGHT = BBL::SKILL_ACTOR_HEIGHT
  589. WIDTH = 544 - BBL::WINDOW_WIDTH
  590. GWIDTH = BBL::SKILL_ACTOR_WIDTH
  591. class Window_ResultSkill < Window_Base
  592.   #--------------------------------------------------------------------------
  593.   # ● オブジェクト初期化
  594.   #--------------------------------------------------------------------------
  595.   def initialize
  596.     x = BBL::WINDOW_WIDTH
  597.     super(x, 0, WIDTH, WLH + 32)
  598.   end
  599.   #--------------------------------------------------------------------------
  600.   # ● リフレッシュ
  601.   #--------------------------------------------------------------------------
  602.   def refresh(skills)
  603.     self.contents.clear
  604.     text_width = contents.text_size(BBL::VIEW_SKILL).width
  605.     self.height = skills.size * HEIGHT + WLH + 32
  606.     self.contents = Bitmap.new(width - 32, height - 32)
  607.     x = 0
  608.     self.contents.font.color = system_color
  609.     self.contents.draw_text(x, 0, text_width, WLH, BBL::VIEW_SKILL)
  610.     last_id = 9999
  611.     text_x = x + GWIDTH
  612.     sy = BBL::SKILL_ACTOR_Y
  613.     sx = BBL::SKILL_ACTOR_X
  614.     for i in 0...skills.size
  615.       actor = $data_actors[skills[i][1]]
  616.       unless last_id == skills[i][1]
  617.       draw_actor_graphic(actor, x + sx, sy + WLH + HEIGHT * i)
  618.       end
  619.       self.contents.font.color = normal_color
  620.       self.contents.draw_text(text_x, WLH + HEIGHT * i, WIDTH - (32 + text_x), WLH, skills[i][0])
  621.       last_id = skills[i][1]
  622.     end
  623.   end
  624.   #--------------------------------------------------------------------------
  625.   # ○ 歩行グラフィックの描画 (再定義)
  626.   #     character_name  : 歩行グラフィック ファイル名
  627.   #     character_index : 歩行グラフィック インデックス
  628.   #     x               : 描画先 X 座標
  629.   #     y               : 描画先 Y 座標
  630.   #     opacity         : 不透明度
  631.   #--------------------------------------------------------------------------
  632.   def draw_character(character_name, character_index, x, y, opacity = 255)
  633.     return if character_name == nil
  634.     bitmap = Cache.character(character_name)
  635.     sign = character_name[/^[\!\$]./]
  636.     if sign != nil and sign.include?('$')
  637.       cw = bitmap.width / 3
  638.       ch = bitmap.height / 4
  639.     else
  640.       cw = bitmap.width / 12
  641.       ch = bitmap.height / 8
  642.     end
  643.     n = character_index
  644.     src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  645.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
  646.     gheight = BBL::CLEAR_ACTOR_Y
  647.     self.contents.clear_rect(x - cw / 2, y - gheight, GWIDTH, gheight)
  648.   end
  649. end
  650. #==============================================================================
  651. # ■ Window_ResultNextExp
  652. #    リザルト画面で動的な情報を表示するウィンドウです
  653. #==============================================================================
  654. class Window_ResultNextExp < Window_Base
  655.   HEIGHT = BBL::ACTOR_HEIGHT  # アクター1人分の高さ
  656.   WIDTH = BBL::WINDOW_WIDTH   # ウィンドウの横幅
  657.   #--------------------------------------------------------------------------
  658.   # ● オブジェクト初期化
  659.   #--------------------------------------------------------------------------
  660.   def initialize(exp)
  661.     @members = $game_party.all_members if $imported["LargeParty"]
  662.     @members = $game_party.members unless $imported["LargeParty"]  
  663.     super(0, 0, WIDTH, (@members.size * HEIGHT) + 32)
  664.     self.contents = Bitmap.new(width - 32, height - 32)
  665.     self.y = 208 - (height / 2)
  666.     self.opacity = 0
  667.   end
  668.   #--------------------------------------------------------------------------
  669.   # ● EXP表示更新
  670.   #--------------------------------------------------------------------------
  671.   def update(exp_s, count)
  672.     self.contents.clear
  673.     level_x = BBL::WINDOW_ACTOR_LEVEL
  674.     gauge_x = BBL::WINDOW_EXP_GAUGE_X
  675.     exp_x = BBL::WINDOW_EXP_X
  676.     for actor in @members
  677.       # 装備の経験値2倍を適応
  678.       exp = exp_s
  679.       exp = exp_s * 2 if actor.double_exp_gain
  680.       # KGC経験値&ゴールド変化適応
  681.       exp = exp_s * actor.exp_gain_rate / 100 if $imported["VariableExpGold"]
  682.       x = 56
  683.       y = actor.index * HEIGHT unless $imported["LargeParty"]
  684.       y = actor.party_index * HEIGHT if $imported["LargeParty"]
  685.       sy = (HEIGHT / 2) - 16
  686.       update_actor_level(actor, level_x, y + HEIGHT - 20 - sy) if view_member?(actor)
  687.       update_actor_nextexp(actor, exp_x, y + HEIGHT - 28 - sy, exp, count)
  688.       update_actor_exp_gauge(actor, gauge_x, y + HEIGHT - 22 - sy, exp, count) if view_member?(actor)
  689.     end
  690.   end
  691.   #--------------------------------------------------------------------------
  692.   # ○ レベル描画の更新
  693.   #     actor : アクター
  694.   #     x     : 描画先 X 座標
  695.   #     y     : 描画先 Y 座標
  696.   #--------------------------------------------------------------------------
  697.   def update_actor_level(actor, x, y)
  698.     self.contents.font.color = BBL::LVUP_COLOR if actor.level_up_flug == true
  699.     self.contents.draw_text(x + 32, y, 24, WLH, actor.level)
  700.   end
  701.   #--------------------------------------------------------------------------
  702.   # ○ NEXTEXP表示更新
  703.   #     actor : アクター
  704.   #     x     : 描画先 X 座標
  705.   #     y     : 描画先 Y 座標
  706.   #     width : 幅
  707.   #--------------------------------------------------------------------------
  708.   def update_actor_nextexp(actor, x, y, exp, count, width = 120)
  709.     if actor.level == 300
  710.       self.contents.draw_text(x, y, width, WLH, "MAX", 2)
  711.       return
  712.     end
  713.     exp = 0 if actor.dead?
  714.     if $imported["LargeParty"]
  715.       unless actor.battle_member?
  716.         exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
  717.       end
  718.     end
  719.     gwc = exp * count / BBL::WAIT_TIME
  720.     self.contents.font.color = normal_color
  721.     if actor.next_rest_exp_s - gwc <= 0
  722.       last_skills = actor.skills
  723.       # KGCスキルCP制適応
  724.       last_skills = actor.all_skills if $imported["SkillCPSystem"]
  725.       actor.level_up
  726.       actor.level_up_flug = true
  727.       BBL::LVUP_SOUND_FILE.play if BBL::LVUP_SOUND == true
  728.       actor.new_skills = actor.skills - last_skills
  729.       # KGCスキルCP制適応
  730.       actor.new_skills = actor.all_skills - last_skills if $imported["SkillCPSystem"]
  731.     end
  732.     if actor.next_max_exp > 0
  733.       self.contents.draw_text(x, y, width, WLH, actor.next_rest_exp_s - gwc, 2) if view_member?(actor)
  734.     else
  735.       xr = x + width
  736.     end
  737.   end
  738.   #--------------------------------------------------------------------------
  739.   # ☆ EXP ゲージの描画(リザルト)
  740.   #     actor : アクター
  741.   #     x     : 描画先 X 座標
  742.   #     y     : 描画先 Y 座標
  743.   #     width : 幅
  744.   #--------------------------------------------------------------------------
  745.   def update_actor_exp_gauge(actor, x, y, exp, count, width = 120)
  746.     color1 = BBL::EXP_COLOR1
  747.     color2 = BBL::EXP_COLOR2
  748.     if actor.level == 300
  749.       self.contents.gradient_fill_rect(x, y + WLH - 8, width, 6, color1, color2)
  750.       return
  751.     end
  752.     exp = 0 if actor.dead?
  753.     if $imported["LargeParty"]
  754.       unless actor.battle_member?
  755.         exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
  756.       end
  757.     end
  758.     max = actor.next_max_exp
  759.     gw = width * (max - actor.next_rest_exp) / max
  760.     exp = width * exp / max
  761.     gwc = exp * count / BBL::WAIT_TIME + gw
  762.     color1 = BBL::EXP_COLOR1
  763.     color2 = BBL::EXP_COLOR2
  764.     self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
  765.     self.contents.gradient_fill_rect(x, y + WLH - 8, gwc, 6, color1, color2)
  766.   end
  767.   #--------------------------------------------------------------------------
  768.   # ☆ 描画判定
  769.   #    KGC多人数パーティ導入時、待機メンバーの情報を描画するか判定
  770.   #--------------------------------------------------------------------------
  771.   def view_member?(actor)
  772.     if $imported["LargeParty"]
  773.       unless BBL::VIEW_STAND_BY_MEMBERS
  774.         return false unless actor.battle_member?
  775.       end
  776.     end
  777.     return true
  778.   end
  779. end

  780. if $imported["EquipLearnSkill"]
  781. #==============================================================================
  782. # ■ Window_ResultSkill_KGC
  783. #    マスターしたスキルを表示するウィンドウです
  784. #    KGC 装備スキル導入時
  785. #==============================================================================
  786. HEIGHT = BBL::SKILL_ACTOR_HEIGHT
  787. WIDTH = 544 - BBL::WINDOW_WIDTH
  788. GWIDTH = BBL::SKILL_ACTOR_WIDTH
  789. class Window_ResultSkill_KGC < Window_Base
  790.   #--------------------------------------------------------------------------
  791.   # ● オブジェクト初期化
  792.   #--------------------------------------------------------------------------
  793.   def initialize
  794.     x = BBL::WINDOW_WIDTH
  795.     super(x, 0, WIDTH, WLH + 32)
  796.   end
  797.   #--------------------------------------------------------------------------
  798.   # ● リフレッシュ
  799.   #--------------------------------------------------------------------------
  800.   def refresh(skills)
  801.     self.contents.clear
  802.     text_width = contents.text_size(BBL::VIEW_SKILL_MASTER).width
  803.     self.height = skills.size * HEIGHT + WLH + 32
  804.     self.contents = Bitmap.new(width - 32, height - 32)
  805.     x = 0
  806.     self.contents.font.color = system_color
  807.     self.contents.draw_text(x, 0, text_width, WLH, BBL::VIEW_SKILL_MASTER)
  808.     last_id = 9999
  809.     text_x = x + GWIDTH
  810.     sy = BBL::SKILL_ACTOR_Y
  811.     sx = BBL::SKILL_ACTOR_X
  812.     for i in 0...skills.size
  813.       actor = $data_actors[skills[i][1]]
  814.       unless last_id == skills[i][1]
  815.       draw_actor_graphic(actor, x + sx, sy + WLH + HEIGHT * i)
  816.       end
  817.       self.contents.font.color = normal_color
  818.       self.contents.draw_text(text_x, WLH + HEIGHT * i, WIDTH - (32 + text_x), WLH, skills[i][0])
  819.       last_id = skills[i][1]
  820.     end
  821.   end
  822.   #--------------------------------------------------------------------------
  823.   # ○ 歩行グラフィックの描画 (再定義)
  824.   #     character_name  : 歩行グラフィック ファイル名
  825.   #     character_index : 歩行グラフィック インデックス
  826.   #     x               : 描画先 X 座標
  827.   #     y               : 描画先 Y 座標
  828.   #     opacity         : 不透明度
  829.   #--------------------------------------------------------------------------
  830.   def draw_character(character_name, character_index, x, y, opacity = 255)
  831.     return if character_name == nil
  832.     bitmap = Cache.character(character_name)
  833.     sign = character_name[/^[\!\$]./]
  834.     if sign != nil and sign.include?('$')
  835.       cw = bitmap.width / 3
  836.       ch = bitmap.height / 4
  837.     else
  838.       cw = bitmap.width / 12
  839.       ch = bitmap.height / 8
  840.     end
  841.     n = character_index
  842.     src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
  843.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
  844.     gheight = BBL::CLEAR_ACTOR_Y
  845.     self.contents.clear_rect(x - cw / 2, y - gheight, GWIDTH, gheight)
  846.   end
  847. end
  848. end

  849. if BBL::TURN_BONUS || BBL::NO_DAMAGE_BONUS
  850. #==============================================================================
  851. #   ここからおまけ
  852. #==============================================================================
  853. # ■ Game_Temp
  854. #==============================================================================
  855. class Game_Temp
  856.   #--------------------------------------------------------------------------
  857.   # ● 公開インスタンス変数
  858.   #--------------------------------------------------------------------------
  859.   attr_accessor :damage_flug              # 被ダメージフラグ
  860.   attr_accessor :turn_bonus               # ターンボーナスフラグ
  861.   #--------------------------------------------------------------------------
  862.   # ● オブジェクト初期化
  863.   #--------------------------------------------------------------------------
  864.   alias initialize_BBL initialize
  865.   def initialize
  866.     initialize_BBL
  867.     @damage_flug = false
  868.     @turn_bonus = true
  869.   end
  870. end

  871. #==============================================================================
  872. # ■ Game_Battler
  873. #==============================================================================

  874. class Game_Battler
  875.   #--------------------------------------------------------------------------
  876.   # ● 通常攻撃によるダメージ計算(追加定義)
  877.   #--------------------------------------------------------------------------
  878.   alias make_attack_damage_value_BBL make_attack_damage_value
  879.   def make_attack_damage_value(attacker)
  880.     # 元の処理
  881.     make_attack_damage_value_BBL(attacker)
  882.     # ダメージフラグ
  883.     if $game_temp.damage_flug == false
  884.       if @hp_damage > 0
  885.         $game_temp.damage_flug = true unless attacker.actor?
  886.       end
  887.     end
  888.   end
  889.   #--------------------------------------------------------------------------
  890.   # ● スキルまたはアイテムによるダメージ計算(追加定義)
  891.   #--------------------------------------------------------------------------
  892.   alias make_obj_damage_value_BBL make_obj_damage_value
  893.   def make_obj_damage_value(user, obj) # 追加定義
  894.     # 元の処理
  895.     make_obj_damage_value_BBL(user, obj)
  896.     # ダメージフラグ
  897.     if $game_temp.damage_flug == false
  898.       if @hp_damage > 0
  899.         $game_temp.damage_flug = true unless user.actor?
  900.       end
  901.     end
  902.   end
  903. end

  904. #==============================================================================
  905. # ■ Game_Troop
  906. #==============================================================================
  907. class Game_Troop < Game_Unit
  908.   #--------------------------------------------------------------------------
  909.   # ● 経験値の合計計算(追加定義)
  910.   #--------------------------------------------------------------------------
  911.   alias exp_total_BBL exp_total
  912.   def exp_total # 追加定義
  913.     exp = exp_total_BBL
  914.     rate = 100
  915.     if BBL::NO_DAMAGE_BONUS
  916.       if $game_temp.damage_flug == false
  917.       rate += BBL::EXP_BONUS_RATE - 100
  918.       end
  919.     end
  920.     if BBL::TURN_BONUS
  921.       if $game_temp.turn_bonus
  922.       rate += BBL::EXP_BONUS_RATE - 100
  923.       end
  924.     end
  925.     exp = ((exp * rate) / 100).round
  926.     return exp
  927.   end
  928.   #--------------------------------------------------------------------------
  929.   # ● お金の合計計算(追加定義)
  930.   #--------------------------------------------------------------------------
  931.   alias gold_total_BBL gold_total
  932.   def gold_total # 追加定義
  933.     gold = gold_total_BBL
  934.     rate = 100
  935.     if BBL::NO_DAMAGE_BONUS
  936.       if $game_temp.damage_flug == false
  937.       rate += BBL::GOLD_BONUS_RATE - 100
  938.       end
  939.     end
  940.     if BBL::TURN_BONUS
  941.       if $game_temp.turn_bonus
  942.       rate += BBL::GOLD_BONUS_RATE - 100
  943.       end
  944.     end
  945.     gold = ((gold * rate) / 100).round   
  946.     return gold
  947.   end
  948. end

  949. #==============================================================================
  950. # ■ Scene_Battle
  951. #==============================================================================
  952. class Scene_Battle < Scene_Base
  953.   #--------------------------------------------------------------------------
  954.   # ● 戦闘終了(追加定義)
  955.   #--------------------------------------------------------------------------
  956.   alias battle_end_BBL battle_end
  957.   def battle_end(result) # 追加定義
  958.     $game_temp.damage_flug = false # ダメージフラグ初期化
  959.     $game_temp.turn_bonus = true   # ターンボーナス初期化
  960.     # 元の処理
  961.     battle_end_BBL(result)
  962.   end
  963.   #--------------------------------------------------------------------------
  964.   # ● ターン終了(追加定義)
  965.   #--------------------------------------------------------------------------
  966.   alias turn_end_BBL turn_end
  967.   def turn_end # 追加定義
  968.     if $game_troop.turn_count == BBL::TURN_BONUS_LIMIT
  969.       $game_temp.turn_bonus = false
  970.     end
  971.     # 元の処理
  972.     turn_end_BBL
  973.   end
  974. end
  975. end
复制代码


这个脚本是这样的
问题就是出在升满级的时候
比如99升100的时候就会出现这个错误
请问下应该怎么解决
QQ图片20140327214531.jpg

评分

参与人数 1星屑 -43 收起 理由
怪蜀黍 -43 以擅自编辑帖子标签的违规方式结帖.

查看全部评分

梦石
0
星屑
34511
在线时间
5096 小时
注册时间
2012-11-19
回帖
4715

开拓者

发表于 2014-3-30 08:25:23 | 显示全部楼层
方法未定义错误
没有找到字符串“-------” 的 “—”(减法)运算方法。

也就是说,当角色超过 99 级时,其升到下一级的经验为“-------”(等级限制,详见 Game_Actor 第 417 行左右。)
字符串“-------”不能用于数值运算。

解决办法:可搜索一个破限脚本试试。或者更改 Game_Actor 第 417 行,把“-------”改为可运算的数值。

评分

参与人数 2星屑 +115 收起 理由
怪蜀黍 + 85 认可答案
瀨織津姬 + 30 太感谢了 问题解决了!

查看全部评分

xp vx va mv  va mz 各类型脚本/插件定制
回复

使用道具 举报

梦石
0
星屑
782
在线时间
3431 小时
注册时间
2011-6-10
回帖
6325
发表于 2014-3-30 09:45:48 | 显示全部楼层
把你整个工程传上来
长名公主玩家群:372588926 攻略娱乐应有尽有
了解更多新RM游戏,游戏制作请加入RPGmaker支援群:113622890
回复

使用道具 举报

梦石
0
星屑
70
在线时间
0 小时
注册时间
2014-4-3
回帖
1
发表于 2014-4-3 15:08:52 | 显示全部楼层
111111111111

评分

参与人数 3星屑 -65 收起 理由
fux2 -50 扣分太少
怪蜀黍 -10 不是广告机别这样发帖,是的话立刻封掉.
铃仙·优昙华院·因幡 -5 查水表

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部