Project1

标题: 谁有融合版RTAB战斗系统用的血条脚本? [打印本页]

作者: 叛逃の妖精    时间: 2009-1-7 02:25
标题: 谁有融合版RTAB战斗系统用的血条脚本?
问同标题.
由于源生RTAB系统把原始脚本替换了很多,刚学到的血条显示方式无法使用,所以来问问不知道这里有没人有,还有,请不要问我是不是真的...{/gg}


又或者,谁告诉我,应该在什么地方插入调用
定义部分是这样的

def HP(actor,x,y,w=96)
    self.contents.fill_rect(x-2,y+26,w+4,8,Color.new(150, 150, 55, 255))
    self.contents.fill_rect(x-1,y+27,w+2,6,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y+28,w,4,Color.new(173,233,177,255))
    w1 = w * actor.hp / actor.maxhp
    self.contents.fill_rect(x,y+28,w1,2,Color.new(255,0,0,255))
    self.contents.fill_rect(x,y+28,w1,3,Color.new(255,0,0,150))
    self.contents.fill_rect(x,y+28,w1,4,Color.new(255,0,0,100))
  end  
  
  
  
def MP(actor,x,y,w=96)
    self.contents.fill_rect(x-2,y+56,w+4,8,Color.new(150, 150, 55, 255))
    self.contents.fill_rect(x-1,y+57,w+2,6,Color.new(0,0,0,255))
    self.contents.fill_rect(x,y+58,w,4,Color.new(173,233,177,255))
    w1 = w * actor.sp / actor.maxsp
    self.contents.fill_rect(x,y+58,w1,2,Color.new(255,0,0,255))
    self.contents.fill_rect(x,y+58,w1,3,Color.new(255,0,0,150))
    self.contents.fill_rect(x,y+58,w1,4,Color.new(255,0,0,100))
  end  
  



恩,,,对,需要找一个地方插入,但是源生RTAB系统的Window_BattleStatus栏里内容已经被完全替换.样式如下
#==============================================================================
# ■ Window_DetailsStatus
#------------------------------------------------------------------------------
#  バトル画面でアクターのステータスを個々に表示するウィンドウです。
#==============================================================================

class Window_DetailsStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(actor, id, x)
    @status_id = id
    super(x, 320 + id * 26, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    self.back_opacity = 0
    refresh(actor, false)
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    super
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh(actor, level_up_flags = false)
    self.contents.clear
    case @status_id
    when 0
      draw_actor_name(actor, 4, 0)
    when 1
      draw_actor_hp(actor, 4, 0, 120)
    when 2
      draw_actor_sp(actor, 4, 0, 120)
    when 3
      if level_up_flags
        self.contents.font.color = normal_color
        self.contents.draw_text(4, 0, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, 4, 0)
      end
    when 4
      draw_actor_atg(actor, 4, 0, 120)
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # メインフェーズのときは不透明度をやや下げる
    if $game_temp.battle_main_phase
      self.contents_opacity -= 4 if self.contents_opacity > 191
    else
      self.contents_opacity += 4 if self.contents_opacity < 255
    end
  end
end



------------------------------------------------------------
本应在Window_BattleStatus内插入的样式如下

  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors
      actor_x = i * 160 + 4
      draw_actor_name(actor, actor_x, 0)
      HP(actor,actor_x,10+8,w=90)#调用了被定义的"HP"######################
      MP(actor,actor_x,10+8,w=70)#调用了被定义的"MP"######################
      draw_actor_hp(actor, actor_x, 32, 120)
      draw_actor_sp(actor, actor_x, 64, 120)
      if @level_up_flags
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
      else
        draw_actor_state(actor, actor_x, 96)
      end
    end
  end



源生RTAB系统下载地址:
http://rpg.blue/web/htm/news49.htm [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 人品高    时间: 2009-1-7 05:51
提示: 作者被禁止或删除 内容自动屏蔽
作者: 叛逃の妖精    时间: 2009-1-7 06:26
3KS,已经解决,现在调试坐标中...




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