Project1

标题: 1vip求血槽绘制教学! [打印本页]

作者: 索非亚    时间: 2008-9-22 21:04
提示: 作者被禁止或删除 内容自动屏蔽
作者: 浩气青天    时间: 2008-9-22 21:08
汗,我要是在家就绝对帮得到。试试多用几次迅雷和旋风下载。 [LINE]1,#dddddd[/LINE]系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者: 苏菲娅    时间: 2008-9-22 21:12
顺便谁帮我看看这个脚本,游戏里有4个人战斗,可是只有两个人有血槽...{/gg}
  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.     # 呼び戻す
  24.     xrxs_bp7_initialize
  25.     # ↓Full-Viewの場合は下二行の # を消してください。
  26.     #self.opacity = 0
  27.     #self.back_opacity = 0
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● リフレッシュ
  31.   #--------------------------------------------------------------------------
  32.   alias xrxs_bp7_refresh refresh
  33.   def refresh
  34.     # CPメーターの更新のみ の場合
  35.     if @update_cp_only
  36.       xrxs_bp7_refresh
  37.       return
  38.     end
  39.     # 変更するものがない場合、飛ばす
  40.     @item_max = $game_party.actors.size
  41.     bool = false
  42.     for i in 0...@item_max
  43.       actor = $game_party.actors[i]
  44.       if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
  45.         bool = true
  46.       end
  47.     end
  48.     return if bool == false
  49.     # 描写を開始
  50.     self.contents.clear
  51.     for i in 0...@item_max
  52.       actor = $game_party.actors[i]
  53.       actor_x = i * 160 + 12
  54.       # 歩行キャラグラフィックの描写
  55.       # HP/SPメーターの描写
  56.       draw_actor_hp_meter_line(actor, actor_x, 59, 96, 12)
  57.       draw_actor_sp_meter_line(actor, actor_x, 84, 96, 12)
  58.       x = i * 170
  59. a = actor.id.to_s
  60. bitmap=Bitmap.new("Graphics/pictures/#{a}")  
  61. src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  62. self.contents.blt(x, 0, bitmap, src_rect)

  63.       # HP数値の描写
  64.       self.contents.font.size = 24 # HP/SP数値の文字の大きさ
  65.       self.contents.font.color = Color.new(0,0,0,192)
  66.       self.contents.draw_text(actor_x, 40, 96, 24, actor.hp.to_s, 2)
  67.       self.contents.font.color = actor.hp == 0 ? knockout_color :
  68.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  69.       self.contents.draw_text(actor_x-2, 38, 96, 24, actor.hp.to_s, 2)
  70.       # SP数値の描写
  71.       self.contents.font.color = Color.new(0,0,0,192)
  72.       self.contents.draw_text(actor_x, 72, 96, 24, actor.sp.to_s, 2)
  73.       self.contents.font.color = actor.sp == 0 ? knockout_color :
  74.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  75.       self.contents.draw_text(actor_x-2, 70, 96, 24, actor.sp.to_s, 2)
  76.       # 用語「HP」と用語「SP」の描写
  77.       self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
  78.       self.contents.font.color = Color.new(0,0,0,192)
  79.       self.contents.draw_text(actor_x+2, 32, 196, 24, $data_system.words.hp)
  80.       self.contents.draw_text(actor_x+2, 64, 196, 24, $data_system.words.sp)
  81.       self.contents.font.color = system_color # 用語「HP/SP」の文字の色
  82.       self.contents.draw_text(actor_x, 30, 196, 24, $data_system.words.hp)
  83.       self.contents.draw_text(actor_x, 62, 196, 24, $data_system.words.sp)
  84.       # ステートの描写
  85.       draw_actor_state(actor, actor_x, 100)
  86.       # 値を更新
  87.       @previous_hp[i] = actor.hp
  88.       @previous_hp[i] = actor.hp
  89.     end
  90.   end
  91. end
  92. #==============================================================================
  93. # ■ Window_Base
  94. #==============================================================================
  95. class Window_Base < Window
  96.   #--------------------------------------------------------------------------
  97.   # ● HPメーター の描画
  98.   #--------------------------------------------------------------------------
  99.   def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
  100.     w = width * actor.hp / [actor.maxhp,1].max
  101.     hp_color_1 = Color.new(255, 0, 0, 192)
  102.     hp_color_2 = Color.new(255, 255, 0, 192)
  103.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  104.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  105.     x -= 1
  106.     y += (height/4).floor
  107.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  108.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  109.     x -= 1
  110.     y += (height/4).ceil
  111.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  112.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  113.     x -= 1
  114.     y += (height/4).ceil
  115.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  116.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● SPメーター の描画
  120.   #--------------------------------------------------------------------------
  121.   def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
  122.     w = width * actor.sp / [actor.maxsp,1].max
  123.     hp_color_1 = Color.new( 0, 0, 255, 192)
  124.     hp_color_2 = Color.new( 0, 255, 255, 192)
  125.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  126.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  127.     x -= 1
  128.     y += (height/4).floor
  129.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  130.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  131.     x -= 1
  132.     y += (height/4).ceil
  133.     self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
  134.     draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
  135.     x -= 1
  136.     y += (height/4).ceil
  137.     self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
  138.     draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
  139.   end
  140.   #--------------------------------------------------------------------------
  141.   # ● 名前の描画
  142.   #--------------------------------------------------------------------------
  143.   alias xrxs_bp7_draw_actor_name draw_actor_name
  144.   def draw_actor_name(actor, x, y)
  145.     xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
  146.   end
  147.   #--------------------------------------------------------------------------
  148.   # ● ステートの描画
  149.   #--------------------------------------------------------------------------
  150.   alias xrxs_bp7_draw_actor_state draw_actor_state
  151.   def draw_actor_state(actor, x, y, width = 120)
  152.     xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
  153.   end
  154.   #--------------------------------------------------------------------------
  155.   # ● HP の描画
  156.   #--------------------------------------------------------------------------
  157.   alias xrxs_bp7_draw_actor_hp draw_actor_hp
  158.   def draw_actor_hp(actor, x, y, width = 100)
  159.     xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
  160.   end
  161.   #--------------------------------------------------------------------------
  162.   # ● SP の描画
  163.   #--------------------------------------------------------------------------
  164.   alias xrxs_bp7_draw_actor_sp draw_actor_sp
  165.   def draw_actor_sp(actor, x, y, width = 144)
  166.     xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
  167.   end
  168. end
  169. #==============================================================================
  170. # ■ Scene_Battle
  171. #==============================================================================
  172. class Scene_Battle
  173.   #--------------------------------------------------------------------------
  174.   # ● フレーム更新
  175.   #--------------------------------------------------------------------------
  176.   alias xrxs_bp7_update update
  177.   def update
  178.     xrxs_bp7_update
  179.     # メッセージウィンドウ表示中の場合
  180.     if $game_temp.message_window_showing
  181.       @status_window.update_cp_only = true      
  182.     else
  183.       @status_window.update_cp_only = false
  184.     end
  185.   end
  186. end
  187. #==============================================================================
  188. # ◇ 外部ライブラリ
  189. #==============================================================================
  190. class Window_Base
  191.   #--------------------------------------------------------------------------
  192.   # ● ライン描画 軽量版 by 桜雅 在土
  193.   #--------------------------------------------------------------------------
  194.   def draw_lineght(start_x, start_y, end_x, end_y, start_color)
  195.     # 描写距離の計算。大きめに直角時の長さ。
  196.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  197.     # 描写開始
  198.     for i in 1..distance
  199.       x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  200.       y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  201.       self.contents.set_pixel(x, y, start_color)
  202.     end
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # ● ライン描画 by 桜雅 在土
  206.   #--------------------------------------------------------------------------
  207.   def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
  208.     # 描写距離の計算。大きめに直角時の長さ。
  209.     distance = (start_x - end_x).abs + (start_y - end_y).abs
  210.     # 描写開始
  211.     if end_color == start_color
  212.       for i in 1..distance
  213.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  214.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  215.         if width == 1
  216.           self.contents.set_pixel(x, y, start_color)
  217.         else
  218.           self.contents.fill_rect(x, y, width, width, start_color)
  219.         end
  220.       end
  221.     else
  222.       for i in 1..distance
  223.         x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
  224.         y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
  225.         r = start_color.red * (distance-i)/distance + end_color.red * i/distance
  226.         g = start_color.green * (distance-i)/distance + end_color.green * i/distance
  227.         b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
  228.         a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
  229.         if width == 1
  230.           self.contents.set_pixel(x, y, Color.new(r, g, b, a))
  231.         else
  232.           self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
  233.         end
  234.       end
  235.     end
  236.   end
  237. end


  238. #==============================================================================
  239. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  240. #==============================================================================
复制代码



作者: 浩气青天    时间: 2008-9-22 21:15
看着好麻烦,况且也不是很会,看看里面有没有设置错误了? [LINE]1,#dddddd[/LINE]系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者: redant    时间: 2008-9-22 21:20
  1. #图片血槽显示Ver 1.0(清爽版)
  2. #              by逐月

  3. #描画HP槽
  4. def HP (actor,x,y)         
  5. @bitmap3 = Bitmap.new("Graphics/Pictures/底")
  6. @src_rect3 = Rect.new(0,0,@bitmap3.width, @bitmap3.height)
  7. self.contents.blt(x,y, @bitmap3, @src_rect3)
  8. #HP显示
  9. @bitmap3 = Bitmap.new("Graphics/Pictures/hp")
  10. w3 = @bitmap3.width * actor.hp/actor.maxhp
  11. @src_rect3 = Rect.new(0,0,w3, @bitmap3.height)
  12. self.contents.blt(x+4,y+2, @bitmap3, @src_rect3)
  13. end
  14. #描画SP槽
  15. def SP (actor,x,y)
  16. @bitmap1 = Bitmap.new("Graphics/Pictures/底")
  17. @src_rect1 = Rect.new(0,0,@bitmap1.width, @bitmap1.height)
  18. self.contents.blt(x,y, @bitmap1, @src_rect1)
  19. #SP显示           
  20. @bitmap1 = Bitmap.new("Graphics/Pictures/sp")
  21. w1 = @bitmap1.width * actor.sp/actor.maxsp
  22. @src_rect1 = Rect.new(0,0,w1, @bitmap1.height)
  23. self.contents.blt(x+4,y+2, @bitmap1, @src_rect1)
  24. end

  25. #==============================================================================
  26. # ■ Window_BattleStatus
  27. #==============================================================================
  28. class Window_BattleStatus < Window_Base
  29. #--------------------------------------------------------------------------
  30. # ● 初始化
  31. #--------------------------------------------------------------------------
  32. alias xrxs_bp2_refresh refresh
  33. def refresh
  34.    xrxs_bp2_refresh
  35.    @item_max = $game_party.actors.size
  36.     for i in 0...$game_party.actors.size
  37.      actor = $game_party.actors[i]
  38.      case i
  39.        when 0
  40.         x = 145
  41.         y = 259
  42.        when 1
  43.         x = 145
  44.         y = 339
  45.        when 2
  46.         x = 145
  47.         y = 419
  48.        when 3
  49.         x = 145
  50.         y = 499
  51.       end
  52.       ###########################一切自改##############################
  53.      HP(actor, x-10, y)
  54.      SP(actor, x-10, y + 18)
  55.      #######################################一切自改###############
  56.    end
  57. end

  58. end
复制代码


http://rpg.blue/upload_program/goods/1_102518339.rar

把图放进去

那个录像50M 大了点

这是清爽版血条 6r里下的 有删节 你先试试 [LINE]1,#dddddd[/LINE]系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者: 殲滅天使·玲    时间: 2008-9-22 21:31
索非亚姐啊..那视频 好象 70多M..ORZ..
但 迅雷是能接上..只是速度orz...

值槽绘制的话..
def HP(actor, actor_x, w = 96)
self.contents.fill_rect(x-2, y+16, w+4, 8, Color.new(255,255,255,255)) #底色白底
self.contents.fill_rect(x-1, y+17, w+2, 6, Color.new(0,0,0,255)) #底色黑底
w1 = w * actor.hp/actor.maxhp # 计算血条宽   W1宽度是血条的w * 角色当前HP 除掉 角色最大HP
#下面是描绘血条, 为了立体感所以他描绘了几次
self.contents.fill_rect(x, y+18, w1, 1, Color.new(150,0,0,255))
self.contents.fill_rect(x, y+19, w1, 1, Color.new(255,0,0,255))
self.contents.fill_rect(x, y+20, w1, 1, Color.new(150,0,0,255))
end

上述是 用脚本来描绘...

图片的话, 比较简单...也会比较华丽
def SP(actor,x,y)
@bitmap1 = Bitmap.new("Graphics/Pictures/底槽图片")
@src_rect1 = Rect.new(0,0,@bitmap1.width,@bitmap1.height)
self.contents.blt(x,y,@bitmap1,@src_rect1)
@bitmap2 = Bitmap.new("Graphics/Pictures/蓝的图片")
w2 = @bitmap2.width * actor.sp/actor.maxsp
@src_rect2 = Rect.new(0,0, w2, @bitmap1.height)
self.contents.blt(x+1,y+1,@bitmap2,@src_rect2)
end


以上是视频的内容.....
把这些给覆盖 BASE里的 HP , SP的所有内容 就行了吧..

[LINE]1,#dddddd[/LINE]系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者: 索非亚    时间: 2008-9-22 21:32
提示: 作者被禁止或删除 内容自动屏蔽
作者: 索非亚    时间: 2008-9-22 21:47
提示: 作者被禁止或删除 内容自动屏蔽
作者: seles    时间: 2008-9-22 21:52
提示: 作者被禁止或删除 内容自动屏蔽
作者: redant    时间: 2008-9-22 21:55
  1. #==============================================================================
  2. # ■ Window_BattleStatus
  3. #------------------------------------------------------------------------------
  4. #  显示战斗画面同伴状态的窗口。
  5. #==============================================================================

  6. class Window_BattleStatus < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 0, 640, 480)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     @level_up_flags = [false, false, false, false]
  14.     #........................................................................
  15.     self.opacity = 0
  16.     @sta_back = []
  17.     @sta_output = []
  18.    # @cp_output = []
  19.    # @hp_bitmap = RPG::Cache.picture("../system/battle/hmcp/hp_bar.png")
  20.     #@mp_bitmap = RPG::Cache.picture("../system/battle/hmcp/mp_bar.png")
  21.    # @bitmap3 = RPG::Cache.picture("../system/battle/hmcp/底.png")
  22.     # @cp_bitmap = RPG::Cache.picture("../system/battle/hmcp/cp_bar.png")
  23.    # @cp_output = []
  24.    # @cp_back_bar = Sprite.new
  25.     #@cp_back_bar.bitmap = Bitmap.new("Graphics/system/battle/hmcp/cp_back_bar")
  26.    ## @cp_back_bar.x = 450
  27.    # @cp_back_bar.y = 25
  28.     #@cp_back_bar.z = self.z + 1
  29.    # @actor_cp_sprite = []
  30.    # @actor_cp_sprite_back = []

  31.     for actor_index in 1..$game_party.actors.size
  32. #      @cp_output[actor_index] = Sprite.new
  33.      # @cp_output[actor_index].bitmap = Bitmap.new(133, 78)
  34.     #  @cp_output[actor_index].x = 100 + (actor_index - 1) * 133
  35.     #  @cp_output[actor_index].y = 480 - 78 - 10
  36.     #  @cp_output[actor_index].z = self.z + 2
  37. #      @cp_output[actor_index].bitmap.clear
  38.       @sta_back[actor_index] = Sprite.new
  39.       @sta_back[actor_index].bitmap = Bitmap.new("Graphics/System/Battle/sta_back/" + $game_party.actors[actor_index - 1].name + "战斗.png")
  40.       @sta_back[actor_index].x = 10
  41.       @sta_back[actor_index].y = 220 + (actor_index - 1) * 80
  42.       @sta_back[actor_index].z = self.z + 1
  43.       @sta_output[actor_index] = Sprite.new
  44.       @sta_output[actor_index].bitmap = Bitmap.new(133, 78)
  45.       @sta_output[actor_index].x = 75
  46.       @sta_output[actor_index].y = 232 + (actor_index - 1) * 80
  47.       @sta_output[actor_index].z = self.z + 2
  48.       @sta_output[actor_index].bitmap.clear
  49.       @sta_output[actor_index].bitmap.font.size = 10
  50.       @sta_output[actor_index].bitmap.font.name = "黑体"
  51.      # hp_width = $game_party.actors[actor_index - 1].hp * @hp_bitmap.width/$game_party.actors[actor_index - 1].maxhp
  52.      # hp_rect = Rect.new(0, 0, hp_width, 5)
  53.      # mp_width = $game_party.actors[actor_index - 1].sp * @mp_bitmap.width/$game_party.actors[actor_index - 1].maxsp
  54.     #  mp_rect = Rect.new(0, 0, mp_width, 5)
  55.       
  56.      # @src_rect3 = Rect.new(0,0,@bitmap3.width, @bitmap3.height)
  57.      # self.contents.blt(10,220, @bitmap3, @src_rect3)
  58.       
  59.      # @sta_output[actor_index].bitmap.blt(66, 44, @hp_bitmap, hp_rect)
  60.      # @sta_output[actor_index].bitmap.blt(66, 64, @mp_bitmap, mp_rect)
  61.      # @sta_output[actor_index].bitmap.blt(66, 54, @bitmap3, @src_rect3)
  62.       
  63.       @sta_output[actor_index].bitmap.font.color.set(255, 0, 0)
  64.       @sta_output[actor_index].bitmap.draw_text(80, 31, 77, 11,$game_party.actors[actor_index - 1].hp.to_s + "/" + $game_party.actors[actor_index - 1].maxhp.to_s)
  65.       @sta_output[actor_index].bitmap.font.color.set(0, 0, 255)
  66.       @sta_output[actor_index].bitmap.draw_text(80, 51, 77, 11,$game_party.actors[actor_index - 1].sp.to_s + "/" + $game_party.actors[actor_index - 1].maxsp.to_s)
  67.     end
  68.     #........................................................................
  69.     refresh
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● 释放
  73.   #--------------------------------------------------------------------------
  74.   def dispose
  75.     super
  76. #    @hp_bitmap.bitmap.dispose
  77.    # @hp_bitmap.dispose
  78.   #  @mp_bitmap.bitmap.dispose
  79.    # @mp_bitmap.dispose
  80.     #@cp_bitmap.bitmap.dispose
  81.    # @cp_bitmap.dispose
  82.     for actor_index in 1..$game_party.actors.size
  83.       @sta_back[actor_index].bitmap.dispose
  84.       @sta_back[actor_index].dispose
  85.       @sta_output[actor_index].bitmap.dispose
  86.       @sta_output[actor_index].dispose
  87.      # @cp_output[actor_index].bitmap.dispose
  88.      # @cp_output[actor_index].dispose
  89.     end
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # ● 设置升级标志
  93.   #     actor_index : 角色索引
  94.   #--------------------------------------------------------------------------
  95.   def level_up(actor_index)
  96.     @level_up_flags[actor_index] = true
  97.   end
  98.   #......................................................................
  99.   #--------------------------------------------------------------------------
  100.   # ● 设置正在攻击标志
  101.   #     actor_index : 角色索引
  102.   #--------------------------------------------------------------------------
  103.   def in_atk(actor_index)
  104.     @sta_back[actor_index + 1].bitmap = Bitmap.new("Graphics/System/Battle/sta_back/" + $game_party.actors[actor_index].name + "战斗1.png")
  105.   end
  106.   #--------------------------------------------------------------------------
  107.   # ● 设置不在攻击标志
  108.   #     actor_index : 角色索引
  109.   #--------------------------------------------------------------------------
  110.   def out_atk(actor_index)
  111.     @sta_back[actor_index + 1].bitmap = Bitmap.new("Graphics/System/Battle/sta_back/" + $game_party.actors[actor_index].name + "战斗.png")
  112.   end
  113.   #......................................................................
  114.   #--------------------------------------------------------------------------
  115.   # ● 刷新
  116.   #--------------------------------------------------------------------------
  117.   def refresh
  118.     self.contents.clear
  119.     @item_max = $game_party.actors.size
  120.     for i in 0...$game_party.actors.size
  121.       actor = $game_party.actors[i]
  122.       #......................................................................
  123.        actor_x = i * 160 + 145
  124.        actor_y = i * 80 + 220
  125.       @sta_output[i + 1].bitmap.clear
  126. #      hp_width = $game_party.actors[i].hp * @hp_bitmap.width/$game_party.actors[i].maxhp
  127.      # hp_rect = Rect.new(0, 0, hp_width, 5)
  128.     #  mp_width = $game_party.actors[i].sp * @mp_bitmap.width/$game_party.actors[i].maxsp
  129.     #  mp_rect = Rect.new(0, 0, mp_width, 5)
  130. #      @sta_output[i + 1].bitmap.blt(66, 44, @hp_bitmap, hp_rect)
  131.     #  @sta_output[i + 1].bitmap.blt(66, 64, @mp_bitmap, mp_rect)
  132.       @sta_output[i + 1].bitmap.font.color.set(255, 0, 0)
  133.       @sta_output[i + 1].bitmap.draw_text(80, 31, 77, 11,$game_party.actors[i].hp.to_s + "/" + $game_party.actors[i].maxhp.to_s)
  134.       @sta_output[i + 1].bitmap.font.color.set(0, 0, 255)
  135.       @sta_output[i + 1].bitmap.draw_text(80, 51, 77, 11,$game_party.actors[i].sp.to_s + "/" + $game_party.actors[i].maxsp.to_s)
  136.       #......................................................................
  137.       if @level_up_flags[i]
  138.         self.contents.font.color = normal_color
  139.         self.contents.draw_text(0, 0, 640 , 480, "LEVEL UP!")
  140.       else
  141.         draw_actor_state(actor, 120, actor_y)
  142.       end
  143.     end
  144.   end
  145.   #--------------------------------------------------------------------------
  146.   # ● 刷新画面
  147.   #--------------------------------------------------------------------------
  148.   def update
  149.     super
  150. #     主界面的不透明度下降
  151.     if $game_temp.battle_main_phase
  152.       self.contents_opacity = 255 #if self.contents_opacity > 1
  153.     else
  154.       self.contents_opacity = 255 #if self.contents_opacity < 255
  155.     end
  156.   end
  157. end
复制代码


#掉了hp sp 部分
你再改回来吧 (能看出来吧{/gg})


再弄主角名字+战斗 和战斗1 的 两张图
放在Graphics\System\Battle\sta_back 里


system/battle/hmcp里弄上/hp_bar.png 的图片 等

[LINE]1,#dddddd[/LINE]系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~ [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: seles    时间: 2008-9-22 21:59
提示: 作者被禁止或删除 内容自动屏蔽
作者: 索非亚    时间: 2008-9-22 22:22
提示: 作者被禁止或删除 内容自动屏蔽
作者: redant    时间: 2008-9-22 22:40


  1. #==============================================================================
  2. # ■ Window_BattleStatus
  3. #------------------------------------------------------------------------------
  4. #  显示战斗画面同伴状态的窗口。
  5. #==============================================================================

  6. class Window_BattleStatus < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 320, 640, 480) #changed
  12.     self.opacity =0 # 透明度更改
  13.     self.contents = Bitmap.new(width - 32, height - 32)
  14.     @level_up_flags = [false, false, false, false]
  15.     refresh
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 释放
  19.   #--------------------------------------------------------------------------
  20.   def dispose
  21.     super
  22.   end
  23.   #--------------------------------------------------------------------------
  24.   # ● 设置升级标志
  25.   #     actor_index : 角色索引
  26.   #--------------------------------------------------------------------------
  27.   def level_up(actor_index)
  28.     @level_up_flags[actor_index] = true
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 刷新
  32.   #--------------------------------------------------------------------------
  33.   def refresh
  34.     self.contents.clear
  35.     @item_max = $game_party.actors.size
  36.     for i in 0...$game_party.actors.size
  37.       actor = $game_party.actors[i]
  38.       actor_x = i * 160 + 4
  39.       actor = $game_party.actors[i]
  40.       case i
  41.       when 0
  42.       testname = actor.id.to_s+"-4"#1号角色头像
  43.       bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
  44.       src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
  45.       self.contents.blt(0,0, bitmap, src_rect)
  46.       draw_actor_name(actor, actor_x, 0)
  47.       draw_actor_hp(actor, actor_x, 32, 120)
  48.       draw_actor_sp(actor, actor_x, 64, 120)
  49.       draw_actor_state(actor, actor_x, 95)
  50.       when 1
  51.       testname = actor.id.to_s+"-4"#2号角色头像
  52.       bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
  53.       src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height) #——可自己调整大小
  54.       self.contents.blt(100, 0, bitmap, src_rect)
  55.       draw_actor_name(actor, actor_x, 0)
  56.       draw_actor_hp(actor, actor_x, 32, 120)
  57.       draw_actor_sp(actor, actor_x, 64, 120)
  58.       draw_actor_state(actor, actor_x, 95)
  59.         when 2
  60.       testname = actor.id.to_s+"-4"#1号角色头像
  61.       bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
  62.       src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
  63.       self.contents.blt(200,0, bitmap, src_rect)
  64.       draw_actor_name(actor, actor_x, 0)
  65.       draw_actor_hp(actor, actor_x, 32, 120)
  66.       draw_actor_sp(actor, actor_x, 64, 120)
  67.       draw_actor_state(actor, actor_x, 95)      

  68. end
  69.     end
  70.   end

  71.   #--------------------------------------------------------------------------
  72.   # ● 刷新画面
  73.   #--------------------------------------------------------------------------
  74.   def update
  75.    super
  76.     # 主界面的不透明度下降
  77.     if $game_temp.battle_main_phase
  78.       self.contents_opacity -= 4 if self.contents_opacity > 191
  79.     else
  80.       self.contents_opacity += 4 if self.contents_opacity < 255
  81.     end
  82.   end
  83. end
复制代码


应该是这样吧{/hx}
[LINE]1,#dddddd[/LINE]
另外不是when3 和when4
是when2 和when3

这个其实错在 def initialize
    super(0, 320, 640, 480) #changed
填上了有 但是窗口小 看不到而已 {/gg}

我只填上了when2 就是说3个人了 图上看得见
4个人同理把 when2 复制 坐标稍改
[LINE]1,#dddddd[/LINE]系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
作者: 索非亚    时间: 2008-9-22 22:43
提示: 作者被禁止或删除 内容自动屏蔽
作者: redant    时间: 2008-9-22 22:48
  1. #==============================================================================
  2. # ■ Window_BattleStatus
  3. #------------------------------------------------------------------------------
  4. #  显示战斗画面同伴状态的窗口。
  5. #==============================================================================

  6. class Window_BattleStatus < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 320, 640, 480) #changed
  12.     self.opacity =0 # 透明度更改
  13.     self.contents = Bitmap.new(width - 32, height - 32)
  14.     @level_up_flags = [false, false, false, false]
  15.     refresh
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 释放
  19.   #--------------------------------------------------------------------------
  20.   def dispose
  21.     super
  22.   end
  23.   #--------------------------------------------------------------------------
  24.   # ● 设置升级标志
  25.   #     actor_index : 角色索引
  26.   #--------------------------------------------------------------------------
  27.   def level_up(actor_index)
  28.     @level_up_flags[actor_index] = true
  29.   end
  30.   #--------------------------------------------------------------------------
  31.   # ● 刷新
  32.   #--------------------------------------------------------------------------
  33.   def refresh
  34.     self.contents.clear
  35.     @item_max = $game_party.actors.size
  36.     for i in 0...$game_party.actors.size
  37.       actor = $game_party.actors[i]
  38.       actor_x = i * 160 + 4
  39.       actor = $game_party.actors[i]
  40.       case i
  41.       when 0
  42.       testname = actor.id.to_s+"-4"#1号角色头像
  43.       bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
  44.       src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
  45.       self.contents.blt(0,0, bitmap, src_rect)
  46.       draw_actor_name(actor, actor_x, 0)
  47.       draw_actor_hp(actor, actor_x, 32, 120)
  48.       draw_actor_sp(actor, actor_x, 64, 120)
  49.       draw_actor_state(actor, actor_x, 95)
  50.       when 1
  51.       testname = actor.id.to_s+"-4"#2号角色头像
  52.       bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
  53.       src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height) #——可自己调整大小
  54.       self.contents.blt(100, 0, bitmap, src_rect)
  55.       draw_actor_name(actor, actor_x, 0)
  56.       draw_actor_hp(actor, actor_x, 32, 120)
  57.       draw_actor_sp(actor, actor_x, 64, 120)
  58.       draw_actor_state(actor, actor_x, 95)
  59. when 2
  60.       testname = actor.id.to_s+"-4"#1号角色头像
  61.       bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
  62.       src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
  63.       self.contents.blt(200,0, bitmap, src_rect)
  64.       draw_actor_name(actor, actor_x, 0)
  65.       draw_actor_hp(actor, actor_x, 32, 120)
  66.       draw_actor_sp(actor, actor_x, 64, 120)
  67.       draw_actor_state(actor, actor_x, 95)     
  68. when 3
  69.       testname = actor.id.to_s+"-4"#1号角色头像
  70.       bitmap=Bitmap.new("Graphics/Pictures/#{testname}")
  71.       src_rect = Rect.new(0 ,0 , bitmap.width, bitmap.height)#——可自己调整大小
  72.       self.contents.blt(300,0, bitmap, src_rect)
  73.       draw_actor_name(actor, actor_x, 0)
  74.       draw_actor_hp(actor, actor_x, 32, 120)
  75.       draw_actor_sp(actor, actor_x, 64, 120)
  76.       draw_actor_state(actor, actor_x, 95)  

  77. end
  78.     end
  79.   end

  80.   #--------------------------------------------------------------------------
  81.   # ● 刷新画面
  82.   #--------------------------------------------------------------------------
  83.   def update
  84.    super
  85.     # 主界面的不透明度下降
  86.     if $game_temp.battle_main_phase
  87.       self.contents_opacity -= 4 if self.contents_opacity > 191
  88.     else
  89.       self.contents_opacity += 4 if self.contents_opacity < 255
  90.     end
  91.   end
  92. end
复制代码

囧全了

既然如此 你是发过 素材的索菲亚吧

那我只要这200分好了 V 你留着吧{/wx}
[LINE]1,#dddddd[/LINE]
[LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: 索非亚    时间: 2008-9-22 22:54
提示: 作者被禁止或删除 内容自动屏蔽
作者: redant    时间: 2008-9-22 22:58
你那个素材 如果早点出的话 我就用你的了
被迫改别的素材  现在懒得改回来……

非常感谢你的素材共享 尽管我没用到 囧
作者: 索非亚    时间: 2008-9-22 23:01
提示: 作者被禁止或删除 内容自动屏蔽
作者: redant    时间: 2008-9-22 23:03
大话 8方向的

已经认可
并且还两个 10分1个 190分1个{/fd}






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