Project1

标题: 改坐标后的战斗窗口~~~ [打印本页]

作者: zhong    时间: 2007-5-7 02:45
标题: 改坐标后的战斗窗口~~~
这东西源之这贴http://rpg.blue/viewthread.php?t ... D5%2D6+18%3A36%3A40,只是画了4个假窗口,然后调下坐标而已~~~很简单~可能适用于45度战斗吧~~~闲着没事就发了~~~{/pz}





  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # ————————————————————————————————————

  5. # ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
  6. # by 桜雅 在土

  7. #==============================================================================
  8. # ■ Window_BattleStatus
  9. #==============================================================================
  10. class Window_BattleStatus < Window_Base
  11.   #--------------------------------------------------------------------------
  12.   # ● 公開インスタンス変数
  13.   #--------------------------------------------------------------------------
  14.   attr_accessor :update_cp_only # CPメーターのみの更新
  15.   #--------------------------------------------------------------------------
  16.   # ● オブジェクト初期化
  17.   #--------------------------------------------------------------------------
  18.   #alias xrxs_bp7_initialize initialize
  19.   def initialize
  20.     # 初期化
  21.     @previous_hp = []
  22.     @previous_sp = []
  23.     super(0, 280, 320, 340)
  24.   ###############################################  
  25.     @w = [] #描绘4个格子
  26.    for i in 0..$game_party.actors.size-1
  27.      @w[i] = Window_Base.new(0,320,140,95)
  28.      case i #角色位置分歧
  29.         when 0 #1号
  30.           actor_x = 30
  31.           actor_y = 157
  32.         when 1 #2号
  33.           actor_x = 170
  34.           actor_y = 157
  35.         when 2 #3号
  36.           actor_x = 30
  37.           actor_y = 62
  38.         when 3 #4号
  39.           actor_x = 170
  40.           actor_y = 62
  41.       end   
  42.       @w[i].x = actor_x -15
  43.       @w[i].y = actor_y +225
  44.       @w[i].back_opacity = 225
  45.       @w[i].opacity = 150 #4个的窗口透明度
  46.     end
  47. ######################################################  
  48.    self.opacity = 0
  49.     self.contents = Bitmap.new(width - 32, height - 32)
  50.    @level_up_flags = [false, false, false, false]
  51.    refresh

  52.     # 呼び戻す
  53.     #xrxs_bp7_initialize
  54.     # ↓Full-Viewの場合は下二行の # を消してください。
  55.      
  56.     #self.back_opacity = 0
  57.   end
  58. #--------------------------------------------------------------------
  59. #★定义下释放
  60. #-------------------------------------------------------------------
  61. def dispose
  62.    super
  63.    @w.dispose
  64. end


  65.   #--------------------------------------------------------------------------
  66.   # ● リフレッシュ
  67.   #--------------------------------------------------------------------------
  68.   alias xrxs_bp7_refresh refresh
  69.   def refresh
  70.     # CPメーターの更新のみ の場合
  71.     if @update_cp_only
  72.       xrxs_bp7_refresh
  73.       return
  74.     end
  75.     # 変更するものがない場合、飛ばす
  76.     @item_max = $game_party.actors.size
  77.     bool = false
  78.     for i in 0...@item_max
  79.       actor = $game_party.actors[i]
  80.       if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
  81.         bool = true
  82.       end
  83.     end
  84.     return if bool == false
  85.     # 描写を開始
  86.     self.contents.clear
  87.     for i in 0...@item_max
  88.       actor = $game_party.actors[i]
  89.     ################################################  
  90.       case i #角色位置分歧
  91.         when 0
  92.           actor_x = 30
  93.           actor_y = 140
  94.         when 1
  95.           actor_x = 170
  96.           actor_y = 140
  97.         when 2
  98.           actor_x = 30
  99.           actor_y = 45
  100.         when 3
  101.           actor_x = 170
  102.           actor_y = 45
  103.       end     
  104.       #################################################
  105.       # 歩行キャラグラフィックの描写
  106.       draw_actor_graphic(actor, actor_x - 15, actor_y)
  107.       # HP/SPメーターの描写
  108.       draw_actor_hp_meter_line(actor, actor_x,actor_y-32, 96, 12)
  109.       draw_actor_sp_meter_line(actor, actor_x, actor_y, 96, 12)
  110.       # HP数値の描写
  111.       self.contents.font.size = 24 # HP/SP数値の文字の大きさ
  112.       self.contents.font.color = Color.new(0,0,0,192)
  113.       self.contents.draw_text(actor_x, actor_y-32, 96, 24, actor.hp.to_s, 2)
  114.       self.contents.font.color = actor.hp == 0 ? knockout_color :
  115.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  116.       self.contents.draw_text(actor_x-2, actor_y-34, 96, 24, actor.hp.to_s, 2)
  117.       # SP数値の描写
  118.       self.contents.font.color = Color.new(0,0,0,192)
  119.       self.contents.draw_text(actor_x, actor_y , 96, 24, actor.sp.to_s, 2)
  120.       self.contents.font.color = actor.sp == 0 ? knockout_color :
  121.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  122.       self.contents.draw_text(actor_x-2, actor_y -2, 96, 24, actor.sp.to_s, 2)
  123.       # 用語「HP」と用語「SP」の描写
  124.       self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  125.       self.contents.font.color = Color.new(0,0,0,192)
  126.       self.contents.draw_text(actor_x-2, actor_y-32, 196, 24, $data_system.words.hp)
  127.       self.contents.draw_text(actor_x-2, actor_y , 196, 24, $data_system.words.sp)
  128.       self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  129.       self.contents.draw_text(actor_x-4, actor_y-34, 196, 24, $data_system.words.hp)
  130.       self.contents.draw_text(actor_x-4, actor_y-2, 196, 24, $data_system.words.sp)
  131.       # ステートの描写
  132.       draw_actor_state(actor, actor_x-20, actor_y+12)
  133.       # 値を更新
  134.       @previous_hp[i] = actor.hp
  135.       @previous_hp[i] = actor.hp
  136.     end
  137.   end
  138. end
  139. #==============================================================================
  140. # ■ Window_Base
  141. #==============================================================================
  142. class Window_Base < Window
  143.   #--------------------------------------------------------------------------
  144.   # ● HPメーター の描画
  145.   #--------------------------------------------------------------------------
  146.   def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  147.     w = width * actor.hp / [actor.maxhp,1].max
  148.     hp_color_1 = Color.new(255, 0, 0, 192)
  149.     hp_color_2 = Color.new(255, 255, 0, 192)
  150.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  151.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  152.     x -= 1
  153.     y += (height/4).floor
  154.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  155.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  156.     x -= 1
  157.     y += (height/4).ceil
  158.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  159.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  160.     x -= 1
  161.     y += (height/4).ceil
  162.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  163.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  164.   end
  165.   #--------------------------------------------------------------------------
  166.   # ● SPメーター の描画
  167.   #--------------------------------------------------------------------------
  168.   def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  169.     w = width * actor.sp / [actor.maxsp,1].max
  170.     hp_color_1 = Color.new( 0, 0, 255, 192)
  171.     hp_color_2 = Color.new( 0, 255, 255, 192)
  172.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  173.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  174.     x -= 1
  175.     y += (height/4).floor
  176.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  177.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  178.     x -= 1
  179.     y += (height/4).ceil
  180.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  181.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  182.     x -= 1
  183.     y += (height/4).ceil
  184.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  185.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  186.   end
  187.   #--------------------------------------------------------------------------
  188.   # ● 名前の描画
  189.   #--------------------------------------------------------------------------
  190.   alias xrxs_bp7_draw_actor_name draw_actor_name
  191.   def draw_actor_name(actor, x, y)
  192.     xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  193.   end
  194.   #--------------------------------------------------------------------------
  195.   # ● ステートの描画
  196.   #--------------------------------------------------------------------------
  197.   alias xrxs_bp7_draw_actor_state draw_actor_state
  198.   def draw_actor_state(actor, x, y, width = 120)
  199.     xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  200.   end
  201.   #--------------------------------------------------------------------------
  202.   # ● HP の描画
  203.   #--------------------------------------------------------------------------
  204.   alias xrxs_bp7_draw_actor_hp draw_actor_hp
  205.   def draw_actor_hp(actor, x, y, width = 144)
  206.     xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  207.   end
  208.   #--------------------------------------------------------------------------
  209.   # ● SP の描画
  210.   #--------------------------------------------------------------------------
  211.   alias xrxs_bp7_draw_actor_sp draw_actor_sp
  212.   def draw_actor_sp(actor, x, y, width = 144)
  213.     xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  214.   end
  215. end
  216. #==============================================================================
  217. # ■ Scene_Battle
  218. #==============================================================================
  219. class Scene_Battle
  220.   #--------------------------------------------------------------------------
  221.   # ● フレーム更新
  222.   #--------------------------------------------------------------------------
  223.   alias xrxs_bp7_update update
  224.   def update
  225.     xrxs_bp7_update
  226.     # メッセージウィンドウ表示中の場合
  227.     if $game_temp.message_window_showing
  228.       @status_window.update_cp_only = true      
  229.     else
  230.       @status_window.update_cp_only = false
  231.     end
  232.   end
  233. end
  234. #==============================================================================
  235. # ◇ 外部ライブラリ
  236. #==============================================================================
  237. class Window_Base
  238.   #--------------------------------------------------------------------------
  239.   # ● ライン描画 軽量版 by 桜雅 在土
  240.   #--------------------------------------------------------------------------
  241.   def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  242.     # 描写距離の計算。大きめに直角時の長さ。
  243.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  244.     # 描写開始
  245.     for i in 1..distance
  246.       x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  247.       y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  248.       self.contents.set_pixel(x, y, start_color)
  249.     end
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # ● ライン描画 by 桜雅 在土
  253.   #--------------------------------------------------------------------------
  254.   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  255.     # 描写距離の計算。大きめに直角時の長さ。
  256.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  257.     # 描写開始
  258.     if end_color == start_color
  259.       for i in 1..distance
  260.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  261.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  262.         if width == 1
  263.           self.contents.set_pixel(x, y, start_color)
  264.         else
  265.           self.contents.fill_rect(x, y, width, width, start_color)
  266.         end
  267.       end
  268.     else
  269.       for i in 1..distance
  270.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  271.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  272.         r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  273.         g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  274.         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  275.         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  276.         if width == 1
  277.           self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  278.         else
  279.           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  280.         end
  281.       end
  282.     end
  283.   end
  284. end


  285. #==============================================================================
  286. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  287. #==============================================================================


复制代码

作者: zhong    时间: 2007-5-7 02:45
标题: 改坐标后的战斗窗口~~~
这东西源之这贴http://rpg.blue/viewthread.php?t ... D5%2D6+18%3A36%3A40,只是画了4个假窗口,然后调下坐标而已~~~很简单~可能适用于45度战斗吧~~~闲着没事就发了~~~{/pz}





  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # ————————————————————————————————————

  5. # ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
  6. # by 桜雅 在土

  7. #==============================================================================
  8. # ■ Window_BattleStatus
  9. #==============================================================================
  10. class Window_BattleStatus < Window_Base
  11.   #--------------------------------------------------------------------------
  12.   # ● 公開インスタンス変数
  13.   #--------------------------------------------------------------------------
  14.   attr_accessor :update_cp_only # CPメーターのみの更新
  15.   #--------------------------------------------------------------------------
  16.   # ● オブジェクト初期化
  17.   #--------------------------------------------------------------------------
  18.   #alias xrxs_bp7_initialize initialize
  19.   def initialize
  20.     # 初期化
  21.     @previous_hp = []
  22.     @previous_sp = []
  23.     super(0, 280, 320, 340)
  24.   ###############################################  
  25.     @w = [] #描绘4个格子
  26.    for i in 0..$game_party.actors.size-1
  27.      @w[i] = Window_Base.new(0,320,140,95)
  28.      case i #角色位置分歧
  29.         when 0 #1号
  30.           actor_x = 30
  31.           actor_y = 157
  32.         when 1 #2号
  33.           actor_x = 170
  34.           actor_y = 157
  35.         when 2 #3号
  36.           actor_x = 30
  37.           actor_y = 62
  38.         when 3 #4号
  39.           actor_x = 170
  40.           actor_y = 62
  41.       end   
  42.       @w[i].x = actor_x -15
  43.       @w[i].y = actor_y +225
  44.       @w[i].back_opacity = 225
  45.       @w[i].opacity = 150 #4个的窗口透明度
  46.     end
  47. ######################################################  
  48.    self.opacity = 0
  49.     self.contents = Bitmap.new(width - 32, height - 32)
  50.    @level_up_flags = [false, false, false, false]
  51.    refresh

  52.     # 呼び戻す
  53.     #xrxs_bp7_initialize
  54.     # ↓Full-Viewの場合は下二行の # を消してください。
  55.      
  56.     #self.back_opacity = 0
  57.   end
  58. #--------------------------------------------------------------------
  59. #★定义下释放
  60. #-------------------------------------------------------------------
  61. def dispose
  62.    super
  63.    @w.dispose
  64. end


  65.   #--------------------------------------------------------------------------
  66.   # ● リフレッシュ
  67.   #--------------------------------------------------------------------------
  68.   alias xrxs_bp7_refresh refresh
  69.   def refresh
  70.     # CPメーターの更新のみ の場合
  71.     if @update_cp_only
  72.       xrxs_bp7_refresh
  73.       return
  74.     end
  75.     # 変更するものがない場合、飛ばす
  76.     @item_max = $game_party.actors.size
  77.     bool = false
  78.     for i in 0...@item_max
  79.       actor = $game_party.actors[i]
  80.       if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
  81.         bool = true
  82.       end
  83.     end
  84.     return if bool == false
  85.     # 描写を開始
  86.     self.contents.clear
  87.     for i in 0...@item_max
  88.       actor = $game_party.actors[i]
  89.     ################################################  
  90.       case i #角色位置分歧
  91.         when 0
  92.           actor_x = 30
  93.           actor_y = 140
  94.         when 1
  95.           actor_x = 170
  96.           actor_y = 140
  97.         when 2
  98.           actor_x = 30
  99.           actor_y = 45
  100.         when 3
  101.           actor_x = 170
  102.           actor_y = 45
  103.       end     
  104.       #################################################
  105.       # 歩行キャラグラフィックの描写
  106.       draw_actor_graphic(actor, actor_x - 15, actor_y)
  107.       # HP/SPメーターの描写
  108.       draw_actor_hp_meter_line(actor, actor_x,actor_y-32, 96, 12)
  109.       draw_actor_sp_meter_line(actor, actor_x, actor_y, 96, 12)
  110.       # HP数値の描写
  111.       self.contents.font.size = 24 # HP/SP数値の文字の大きさ
  112.       self.contents.font.color = Color.new(0,0,0,192)
  113.       self.contents.draw_text(actor_x, actor_y-32, 96, 24, actor.hp.to_s, 2)
  114.       self.contents.font.color = actor.hp == 0 ? knockout_color :
  115.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  116.       self.contents.draw_text(actor_x-2, actor_y-34, 96, 24, actor.hp.to_s, 2)
  117.       # SP数値の描写
  118.       self.contents.font.color = Color.new(0,0,0,192)
  119.       self.contents.draw_text(actor_x, actor_y , 96, 24, actor.sp.to_s, 2)
  120.       self.contents.font.color = actor.sp == 0 ? knockout_color :
  121.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  122.       self.contents.draw_text(actor_x-2, actor_y -2, 96, 24, actor.sp.to_s, 2)
  123.       # 用語「HP」と用語「SP」の描写
  124.       self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  125.       self.contents.font.color = Color.new(0,0,0,192)
  126.       self.contents.draw_text(actor_x-2, actor_y-32, 196, 24, $data_system.words.hp)
  127.       self.contents.draw_text(actor_x-2, actor_y , 196, 24, $data_system.words.sp)
  128.       self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  129.       self.contents.draw_text(actor_x-4, actor_y-34, 196, 24, $data_system.words.hp)
  130.       self.contents.draw_text(actor_x-4, actor_y-2, 196, 24, $data_system.words.sp)
  131.       # ステートの描写
  132.       draw_actor_state(actor, actor_x-20, actor_y+12)
  133.       # 値を更新
  134.       @previous_hp[i] = actor.hp
  135.       @previous_hp[i] = actor.hp
  136.     end
  137.   end
  138. end
  139. #==============================================================================
  140. # ■ Window_Base
  141. #==============================================================================
  142. class Window_Base < Window
  143.   #--------------------------------------------------------------------------
  144.   # ● HPメーター の描画
  145.   #--------------------------------------------------------------------------
  146.   def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  147.     w = width * actor.hp / [actor.maxhp,1].max
  148.     hp_color_1 = Color.new(255, 0, 0, 192)
  149.     hp_color_2 = Color.new(255, 255, 0, 192)
  150.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  151.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  152.     x -= 1
  153.     y += (height/4).floor
  154.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  155.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  156.     x -= 1
  157.     y += (height/4).ceil
  158.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  159.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  160.     x -= 1
  161.     y += (height/4).ceil
  162.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  163.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  164.   end
  165.   #--------------------------------------------------------------------------
  166.   # ● SPメーター の描画
  167.   #--------------------------------------------------------------------------
  168.   def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  169.     w = width * actor.sp / [actor.maxsp,1].max
  170.     hp_color_1 = Color.new( 0, 0, 255, 192)
  171.     hp_color_2 = Color.new( 0, 255, 255, 192)
  172.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  173.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  174.     x -= 1
  175.     y += (height/4).floor
  176.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  177.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  178.     x -= 1
  179.     y += (height/4).ceil
  180.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  181.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  182.     x -= 1
  183.     y += (height/4).ceil
  184.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  185.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  186.   end
  187.   #--------------------------------------------------------------------------
  188.   # ● 名前の描画
  189.   #--------------------------------------------------------------------------
  190.   alias xrxs_bp7_draw_actor_name draw_actor_name
  191.   def draw_actor_name(actor, x, y)
  192.     xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  193.   end
  194.   #--------------------------------------------------------------------------
  195.   # ● ステートの描画
  196.   #--------------------------------------------------------------------------
  197.   alias xrxs_bp7_draw_actor_state draw_actor_state
  198.   def draw_actor_state(actor, x, y, width = 120)
  199.     xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  200.   end
  201.   #--------------------------------------------------------------------------
  202.   # ● HP の描画
  203.   #--------------------------------------------------------------------------
  204.   alias xrxs_bp7_draw_actor_hp draw_actor_hp
  205.   def draw_actor_hp(actor, x, y, width = 144)
  206.     xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  207.   end
  208.   #--------------------------------------------------------------------------
  209.   # ● SP の描画
  210.   #--------------------------------------------------------------------------
  211.   alias xrxs_bp7_draw_actor_sp draw_actor_sp
  212.   def draw_actor_sp(actor, x, y, width = 144)
  213.     xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  214.   end
  215. end
  216. #==============================================================================
  217. # ■ Scene_Battle
  218. #==============================================================================
  219. class Scene_Battle
  220.   #--------------------------------------------------------------------------
  221.   # ● フレーム更新
  222.   #--------------------------------------------------------------------------
  223.   alias xrxs_bp7_update update
  224.   def update
  225.     xrxs_bp7_update
  226.     # メッセージウィンドウ表示中の場合
  227.     if $game_temp.message_window_showing
  228.       @status_window.update_cp_only = true      
  229.     else
  230.       @status_window.update_cp_only = false
  231.     end
  232.   end
  233. end
  234. #==============================================================================
  235. # ◇ 外部ライブラリ
  236. #==============================================================================
  237. class Window_Base
  238.   #--------------------------------------------------------------------------
  239.   # ● ライン描画 軽量版 by 桜雅 在土
  240.   #--------------------------------------------------------------------------
  241.   def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  242.     # 描写距離の計算。大きめに直角時の長さ。
  243.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  244.     # 描写開始
  245.     for i in 1..distance
  246.       x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  247.       y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  248.       self.contents.set_pixel(x, y, start_color)
  249.     end
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # ● ライン描画 by 桜雅 在土
  253.   #--------------------------------------------------------------------------
  254.   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  255.     # 描写距離の計算。大きめに直角時の長さ。
  256.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  257.     # 描写開始
  258.     if end_color == start_color
  259.       for i in 1..distance
  260.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  261.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  262.         if width == 1
  263.           self.contents.set_pixel(x, y, start_color)
  264.         else
  265.           self.contents.fill_rect(x, y, width, width, start_color)
  266.         end
  267.       end
  268.     else
  269.       for i in 1..distance
  270.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  271.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  272.         r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  273.         g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  274.         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  275.         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  276.         if width == 1
  277.           self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  278.         else
  279.           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  280.         end
  281.       end
  282.     end
  283.   end
  284. end


  285. #==============================================================================
  286. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  287. #==============================================================================


复制代码

作者: 小真·爱舞    时间: 2007-5-7 02:49
这个……当作新手教学或者思路比较好吧。
作者: zhong    时间: 2007-5-7 02:53
以下引用小真·爱舞于2007-5-6 18:49:04的发言:

这个……当作新手教学或者思路比较好吧。

差不多吧~~~反正改的地方很少~~~好像66在那贴叫转发一个,我有点空就发了~~~~{/pz}也不知道他要的是不是这个~~
作者: 帝龙    时间: 2007-5-7 03:46
提示: 作者被禁止或删除 内容自动屏蔽
作者: seeyou    时间: 2007-5-10 22:10
提示: 作者被禁止或删除 内容自动屏蔽
作者: 七夕小雨    时间: 2007-5-11 02:51
- -这个东西和我RM电子表一样……貌似都是无用的东西………………

- -|||
作者: seeyou    时间: 2007-5-11 03:14
提示: 作者被禁止或删除 内容自动屏蔽
作者: zhong    时间: 2007-5-14 01:12
以下引用seeyou于2007-5-10 14:10:43的发言:

能不能帮忙改一下5-8号角色窗口在地图右上角,和1-4号的对称?

这个其实在脚本的
self.contents.clear
    for i in 0...@item_max
      actor = $game_party.actors
    ################################################  
      case i #角色位置分歧
        when 0
          actor_x = 30
          actor_y = 140
        when 1
          actor_x = 170
          actor_y = 140
        when 2
          actor_x = 30
          actor_y = 45
        when 3
          actor_x = 170
          actor_y = 45
      end     
      #################################################

分歧下就行了~~~~如第五号角色,就在下面加一行
when 4
actor_x = 5号角色横坐标
actor_y = 5号角色纵坐标
~~这是角色行走图什么的位置,如果你有用到那个框框,那么
还要到以下这个地方下面按照上述方法把框也移上去,反正主要就是调坐标麻烦点~~~~
@w = [] #描绘4个格子
   for i in 0..$game_party.actors.size-1
     @w = Window_Base.new(0,320,140,95)
     case i #角色位置分歧

作者: 无忧    时间: 2007-5-14 03:31
提示: 作者被禁止或删除 内容自动屏蔽
作者: seeyou    时间: 2007-5-15 14:52
提示: 作者被禁止或删除 内容自动屏蔽
作者: 上官展玉    时间: 2007-6-22 18:33
提示: 作者被禁止或删除 内容自动屏蔽
作者: 上官展玉    时间: 2007-6-22 18:34
提示: 作者被禁止或删除 内容自动屏蔽
作者: seeyou    时间: 2007-6-23 00:15
提示: 作者被禁止或删除 内容自动屏蔽
作者: 上官展玉    时间: 2007-6-23 19:01
提示: 作者被禁止或删除 内容自动屏蔽
作者: 4262130    时间: 2007-6-23 22:20
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1