Project1

标题: 有没有这个脚本:去除掉战斗时下面的框框...... [打印本页]

作者: 闪电    时间: 2007-7-3 17:27
标题: 有没有这个脚本:去除掉战斗时下面的框框......
有没有这个脚本:去除掉战斗时下面的框框,只在人物下方显示血条 [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 闪电    时间: 2007-7-3 17:27
标题: 有没有这个脚本:去除掉战斗时下面的框框......
有没有这个脚本:去除掉战斗时下面的框框,只在人物下方显示血条 [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: kaze    时间: 2007-7-3 17:31

自己删
作者: 闪电    时间: 2007-7-3 17:33
战斗框具体在哪个脚本里面能告诉我一下吗
作者: kaze    时间: 2007-7-3 17:40
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
#  显示战斗画面同伴状态的窗口。
#==============================================================================

作者: patrick    时间: 2007-7-3 17:56
Q:

再度打擾各位前輩:
請問如何修改RGSS腳本,達到戰鬥時背景全畫面呢?
以及將戰鬥時下方人物的狀態框透明化?

我將window_battlestatus 內設定這視窗為透明度0 外框透明度0
可是 戰鬥時,下方會變成漆黑一塊。
原本以為是因為背景圖片的問題,將背景圖改成640x480
還是依樣,原本的狀態框會漆黑一片。
所以想請教正確的改法。
萬分感謝了......

作者: kaze    时间: 2007-7-3 17:57
什么叫背景全图
作者: 闪电    时间: 2007-7-3 17:59
谢谢了.
因为我不止想把框去掉,
默认名字什么的都要去掉,血条改小放到人的下方,这些不知道要怎么弄
作者: kaze    时间: 2007-7-3 18:02
其实我也不是很懂的{/lh}
作者: patrick    时间: 2007-7-3 18:02
  1. #==============================================================================
  2. # ■ Window_BattleStatus
  3. #------------------------------------------------------------------------------
  4. #  显示战斗画面同伴状态的窗口。
  5. #==============================================================================

  6. class Window_BattleStatus < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 320, 640, 160)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     @level_up_flags = [false, false, false, false]
  14.     refresh
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   # ● 释放
  18.   #--------------------------------------------------------------------------
  19.   def dispose
  20.     super
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 设置升级标志
  24.   #     actor_index : 角色索引
  25.   #--------------------------------------------------------------------------
  26.   def level_up(actor_index)
  27.     @level_up_flags[actor_index] = true
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● 刷新
  31.   #--------------------------------------------------------------------------
  32.   def refresh
  33.     self.contents.clear
  34.     @item_max = $game_party.actors.size
  35.     for i in 0...$game_party.actors.size
  36.       actor = $game_party.actors[i]
  37.       actor_x = i * 160 + 4
  38.       draw_actor_name(actor, actor_x, 0)
  39.       draw_actor_hp(actor, actor_x, 32, 120)
  40.       draw_actor_sp(actor, actor_x, 64, 120)
  41.       if @level_up_flags[i]
  42.         self.contents.font.color = normal_color
  43.         self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
  44.       else
  45.         draw_actor_state(actor, actor_x, 96)
  46.       end
  47.     end
  48.   end
  49.   #--------------------------------------------------------------------------
  50.   # ● 刷新画面
  51.   #--------------------------------------------------------------------------
  52.   def update
  53.     super
  54.     # 主界面的不透明度下降
  55.     if $game_temp.battle_main_phase
  56.       self.contents_opacity -= 4 if self.contents_opacity > 191
  57.     else
  58.       self.contents_opacity += 4 if self.contents_opacity < 255
  59.     end
  60.   end
  61. end
复制代码

41行draw_actor_sp(actor, actor_x, 64, 120)删掉就没名字了


再用这个
  1. # ————————————————————————————————————
  2. # 本脚本来自www.66rpg.com,转载请保留此信息
  3. # ————————————————————————————————————

  4. #==============================================================================
  5. # ■ Game_Actor
  6. #------------------------------------------------------------------------------
  7. #  处理角色的类。本类在 Game_Actors 类 ($game_actors)
  8. # 的内部使用、Game_Party 类请参考 ($game_party) 。
  9. #==============================================================================

  10. class Game_Actor < Game_Battler
  11. #--------------------------------------------------------------------------
  12. # ● 取得战斗画面的 X 坐标
  13. #--------------------------------------------------------------------------
  14. def screen_x
  15. case self.index
  16. when 0
  17.    return 350
  18. when 1
  19.    return 430
  20. when 2
  21.    return 510
  22. when 3
  23.    return 580
  24. else
  25.    return 600

  26.   end
  27. end
  28. #--------------------------------------------------------------------------
  29. # ● 取得战斗画面的 Y 坐标
  30. #--------------------------------------------------------------------------
  31. def screen_y
  32. case self.index
  33. when 0
  34.    return 430
  35. when 1
  36.    return 395
  37. when 2
  38.    return 360
  39. when 3
  40.    return 325
  41. else
  42.    return 1000
  43.   end
  44. end
  45. #--------------------------------------------------------------------------
  46. # ● 取得战斗画面的 Z 坐标
  47. #--------------------------------------------------------------------------
  48. def screen_z
  49. case self.index
  50. when 0
  51.    return 10
  52. when 1
  53.    return 9
  54. when 2
  55.    return 8
  56. when 3
  57.    return 7
  58. else
  59.    return 0
  60.    end
  61. end
  62. end


  63. #==============================================================================
  64. # ■ Window_Base
  65. #------------------------------------------------------------------------------
  66. #  游戏中全部窗口的超级类。
  67. #==============================================================================

  68. class Window_Base < Window
  69. #--------------------------------------------------------------------------
  70. # ● 描绘 HP
  71. #     actor : 角色
  72. #     x     : 描画目标 X 坐标
  73. #     y     : 描画目标 Y 坐标
  74. #     width : 描画目标的宽
  75. #--------------------------------------------------------------------------
  76. def draw_actor_hp1(actor, x, y, width = 72)
  77.    # 描绘字符串 "HP"
  78.    self.contents.font.color = system_color
  79.    self.contents.draw_text(x, y, 24, 24, $data_system.words.hp)
  80.    # 计算描绘 MaxHP 所需的空间
  81.    if width - 24 >= 32
  82.      hp_x = x + 32# + width - 24
  83.    end
  84.    # 描绘 HP
  85.    self.contents.font.color = actor.hp == 0 ? knockout_color :
  86.      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  87.    self.contents.draw_text(hp_x, y, 32, 24, actor.hp.to_s, 2)
  88. end
  89. #--------------------------------------------------------------------------
  90. # ● 描绘 SP
  91. #     actor : 角色
  92. #     x     : 描画目标 X 坐标
  93. #     y     : 描画目标 Y 坐标
  94. #     width : 描画目标的宽
  95. #--------------------------------------------------------------------------
  96. def draw_actor_sp1(actor, x, y, width = 72)
  97.    # 描绘字符串 "SP"
  98.    self.contents.font.color = system_color
  99.    self.contents.draw_text(x, y, 24, 24, $data_system.words.sp)
  100.    # 计算描绘 MaxSP 所需的空间
  101.    if width - 24 >= 32
  102.      sp_x = x + 32# + width - 24
  103.    end
  104.    # 描绘 SP
  105.    self.contents.font.color = actor.sp == 0 ? knockout_color :
  106.      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  107.    self.contents.draw_text(sp_x, y, 32, 24, actor.sp.to_s, 2)
  108. end
  109. end





  110. #==============================================================================
  111. # ■ Window_BattleStatus
  112. #------------------------------------------------------------------------------
  113. #  显示战斗画面同伴状态的窗口。
  114. #==============================================================================

  115. class Window_BattleStatus < Window_Base
  116. #--------------------------------------------------------------------------
  117. # ● 初始化对像
  118. #--------------------------------------------------------------------------
  119. #$data_system_level_up_me = "Audio/ME/升级音乐"
  120. def initialize
  121.    super(0, 0, 640, 480)
  122.    self.contents = Bitmap.new(width - 10, height - 32)
  123.    self.opacity = 0
  124.    @level_up_flags = [false, false, false, false]
  125.    refresh
  126. end
  127. #--------------------------------------------------------------------------
  128. # ● 释放
  129. #--------------------------------------------------------------------------
  130. def dispose
  131.    super
  132. end
  133. #--------------------------------------------------------------------------
  134. # ● 设置升级标志
  135. #     actor_index : 角色索引
  136. #--------------------------------------------------------------------------
  137. def level_up(actor_index)
  138.    @level_up_flags[actor_index] = true
  139. end
  140. #--------------------------------------------------------------------------
  141. # ● 刷新
  142. #--------------------------------------------------------------------------
  143. def refresh
  144.    self.contents.clear
  145.    @item_max = $game_party.actors.size
  146.     for i in 0...$game_party.actors.size
  147.      actor = $game_party.actors[i]
  148.      case i
  149.        when 0
  150.         x = 310
  151.         y = 390
  152.        when 1
  153.         x = 390
  154.         y = 340
  155.        when 2
  156.         x = 480
  157.         y = 300
  158.        when 3
  159.         x = 550
  160.         y = 270
  161.       end
  162.      if @level_up_flags[i]
  163.        self.contents.font.color = normal_color
  164.        self.contents.draw_text(x, y, 80, 24, "LEVEL UP!")
  165.        Audio.me_stop
  166. #        Audio.me_play($data_system_level_up_me)
  167.      else
  168.      draw_actor_hp1(actor, x-15, y-15, 80)
  169.      draw_actor_sp1(actor, x-15, y+5, 80)
  170.     end
  171.    end
  172. end

  173. #--------------------------------------------------------------------------
  174. # ● 刷新画面
  175. #--------------------------------------------------------------------------
  176. def update
  177.    super
  178.    # 主界面的不透明度下降
  179.    if $game_temp.battle_main_phase
  180.      self.contents_opacity -= 50 if self.contents_opacity > 1
  181.    else
  182.      self.contents_opacity += 50 if self.contents_opacity < 255
  183.    end
  184. end
  185. end





  186. #==============================================================================
  187. # ■ Window_BattleStatus
  188. #==============================================================================
  189. class Window_BattleStatus < Window_Base
  190. #--------------------------------------------------------------------------
  191. # ● 初始化
  192. #--------------------------------------------------------------------------
  193. alias xrxs_bp2_refresh refresh
  194. def refresh
  195.    xrxs_bp2_refresh
  196.    @item_max = $game_party.actors.size
  197.     for i in 0...$game_party.actors.size
  198.      actor = $game_party.actors[i]
  199.      case i
  200.        when 0
  201.         x = 310
  202.         y = 390
  203.        when 1
  204.         x = 390
  205.         y = 340
  206.        when 2
  207.         x = 480
  208.         y = 300
  209.        when 3
  210.         x = 550
  211.         y = 270
  212.       end
  213.      draw_actor_hp_meter(actor, x, y, 50)
  214.      draw_actor_sp_meter(actor, x, y + 8, 50)
  215.    end
  216. end
  217. end
  218. #==============================================================================
  219. # ■ Window_Base
  220. #==============================================================================
  221. class Window_Base < Window
  222. #--------------------------------------------------------------------------
  223. # ● HP描画
  224. #--------------------------------------------------------------------------
  225. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  226.    if type == 1 and actor.hp == 0
  227.      return
  228.    end
  229.    self.contents.font.color = system_color
  230.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 25))
  231.    w = width * actor.hp / actor.maxhp
  232.    self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
  233.    self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
  234.    self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
  235.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
  236.    
  237.    end
  238. #--------------------------------------------------------------------------
  239. # ● SP描画
  240. #--------------------------------------------------------------------------
  241. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  242.    if type == 1 and actor.hp == 0
  243.      return
  244.    end
  245.    self.contents.font.color = system_color
  246.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  247.    w = width * actor.sp / actor.maxsp
  248.    self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
  249.    self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
  250.    self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
  251.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
  252. end
  253. end
复制代码

如果不是45度战斗系统的话再删掉坐标
作者: 闪电    时间: 2007-7-3 18:07
谢谢楼上,不过偶的战斗是45度的全动画战斗{/ll}
作者: 海的那边    时间: 2007-7-3 18:12
不要紧的,不管是什么战斗,只要在那脚本的 ■ Window_BattleStatus改就行的。
作者: patrick    时间: 2007-7-3 18:12
  1. #==============================================================================
  2. # ■ Window_Base
  3. #------------------------------------------------------------------------------
  4. #  游戏中全部窗口的超级类。
  5. #==============================================================================

  6. class Window_Base < Window
  7. #--------------------------------------------------------------------------
  8. # ● 描绘 HP
  9. #     actor : 角色
  10. #     x     : 描画目标 X 坐标
  11. #     y     : 描画目标 Y 坐标
  12. #     width : 描画目标的宽
  13. #--------------------------------------------------------------------------
  14. def draw_actor_hp1(actor, x, y, width = 72)
  15.    # 描绘字符串 "HP"
  16.    self.contents.font.color = system_color
  17.    self.contents.draw_text(x, y, 24, 24, $data_system.words.hp)
  18.    # 计算描绘 MaxHP 所需的空间
  19.    if width - 24 >= 32
  20.      hp_x = x + 32# + width - 24
  21.    end
  22.    # 描绘 HP
  23.    self.contents.font.color = actor.hp == 0 ? knockout_color :
  24.      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  25.    self.contents.draw_text(hp_x, y, 32, 24, actor.hp.to_s, 2)
  26. end
  27. #--------------------------------------------------------------------------
  28. # ● 描绘 SP
  29. #     actor : 角色
  30. #     x     : 描画目标 X 坐标
  31. #     y     : 描画目标 Y 坐标
  32. #     width : 描画目标的宽
  33. #--------------------------------------------------------------------------
  34. def draw_actor_sp1(actor, x, y, width = 72)
  35.    # 描绘字符串 "SP"
  36.    self.contents.font.color = system_color
  37.    self.contents.draw_text(x, y, 24, 24, $data_system.words.sp)
  38.    # 计算描绘 MaxSP 所需的空间
  39.    if width - 24 >= 32
  40.      sp_x = x + 32# + width - 24
  41.    end
  42.    # 描绘 SP
  43.    self.contents.font.color = actor.sp == 0 ? knockout_color :
  44.      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  45.    self.contents.draw_text(sp_x, y, 32, 24, actor.sp.to_s, 2)
  46. end
  47. end





  48. #==============================================================================
  49. # ■ Window_BattleStatus
  50. #------------------------------------------------------------------------------
  51. #  显示战斗画面同伴状态的窗口。
  52. #==============================================================================

  53. class Window_BattleStatus < Window_Base
  54. #--------------------------------------------------------------------------
  55. # ● 初始化对像
  56. #--------------------------------------------------------------------------
  57. #$data_system_level_up_me = "Audio/ME/升级音乐"
  58. def initialize
  59.    super(0, 0, 640, 480)
  60.    self.contents = Bitmap.new(width - 10, height - 32)
  61.    self.opacity = 0
  62.    @level_up_flags = [false, false, false, false]
  63.    refresh
  64. end
  65. #--------------------------------------------------------------------------
  66. # ● 释放
  67. #--------------------------------------------------------------------------
  68. def dispose
  69.    super
  70. end
  71. #--------------------------------------------------------------------------
  72. # ● 设置升级标志
  73. #     actor_index : 角色索引
  74. #--------------------------------------------------------------------------
  75. def level_up(actor_index)
  76.    @level_up_flags[actor_index] = true
  77. end
  78. #--------------------------------------------------------------------------
  79. # ● 刷新
  80. #--------------------------------------------------------------------------
  81. def refresh
  82.    self.contents.clear
  83.    @item_max = $game_party.actors.size
  84.     for i in 0...$game_party.actors.size
  85.      actor = $game_party.actors[i]
  86.      case i
  87.        when 0
  88.         x = 310
  89.         y = 390
  90.        when 1
  91.         x = 390
  92.         y = 340
  93.        when 2
  94.         x = 480
  95.         y = 300
  96.        when 3
  97.         x = 550
  98.         y = 270
  99.       end
  100.      if @level_up_flags[i]
  101.        self.contents.font.color = normal_color
  102.        self.contents.draw_text(x, y, 80, 24, "LEVEL UP!")
  103.        Audio.me_stop
  104. #        Audio.me_play($data_system_level_up_me)
  105.      else
  106.      draw_actor_hp1(actor, x-15, y-15, 80)
  107.      draw_actor_sp1(actor, x-15, y+5, 80)
  108.     end
  109.    end
  110. end

  111. #--------------------------------------------------------------------------
  112. # ● 刷新画面
  113. #--------------------------------------------------------------------------
  114. def update
  115.    super
  116.    # 主界面的不透明度下降
  117.    if $game_temp.battle_main_phase
  118.      self.contents_opacity -= 50 if self.contents_opacity > 1
  119.    else
  120.      self.contents_opacity += 50 if self.contents_opacity < 255
  121.    end
  122. end
  123. end





  124. #==============================================================================
  125. # ■ Window_BattleStatus
  126. #==============================================================================
  127. class Window_BattleStatus < Window_Base
  128. #--------------------------------------------------------------------------
  129. # ● 初始化
  130. #--------------------------------------------------------------------------
  131. alias xrxs_bp2_refresh refresh
  132. def refresh
  133.    xrxs_bp2_refresh
  134.    @item_max = $game_party.actors.size
  135.     for i in 0...$game_party.actors.size
  136.      actor = $game_party.actors[i]
  137.      case i
  138.        when 0
  139.         x = 310
  140.         y = 390
  141.        when 1
  142.         x = 390
  143.         y = 340
  144.        when 2
  145.         x = 480
  146.         y = 300
  147.        when 3
  148.         x = 550
  149.         y = 270
  150.       end
  151.      draw_actor_hp_meter(actor, x, y, 50)
  152.      draw_actor_sp_meter(actor, x, y + 8, 50)
  153.    end
  154. end
  155. end
  156. #==============================================================================
  157. # ■ Window_Base
  158. #==============================================================================
  159. class Window_Base < Window
  160. #--------------------------------------------------------------------------
  161. # ● HP描画
  162. #--------------------------------------------------------------------------
  163. def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
  164.    if type == 1 and actor.hp == 0
  165.      return
  166.    end
  167.    self.contents.font.color = system_color
  168.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 25))
  169.    w = width * actor.hp / actor.maxhp
  170.    self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
  171.    self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
  172.    self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
  173.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
  174.    
  175.    end
  176. #--------------------------------------------------------------------------
  177. # ● SP描画
  178. #--------------------------------------------------------------------------
  179. def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
  180.    if type == 1 and actor.hp == 0
  181.      return
  182.    end
  183.    self.contents.font.color = system_color
  184.    self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
  185.    w = width * actor.sp / actor.maxsp
  186.    self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
  187.    self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
  188.    self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
  189.    self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
  190. end
  191. end
复制代码



这个显示血条和全动画应该不冲突吧? [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~




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