赞 | 0 |
VIP | 1 |
好人卡 | 11 |
积分 | 1 |
经验 | 4602 |
最后登录 | 2012-11-20 |
在线时间 | 28 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 28 小时
- 注册时间
- 2011-1-14
- 帖子
- 262
|
本帖最后由 赤夜玄魔 于 2012-1-11 00:23 编辑
銀藍色的零 发表于 2012-1-10 21:57
回-赤夜玄魔
這樣改連人物狀態的能力值都變血條了~我只要戰鬥時出現能力值血條就好
以附上原腳本 ...
你可能会比较喜欢这个款式吧……
给你吧……早给我们这个原版,你不就早解决了嘛……- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- # ————————————————————————————————————
- # ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
- # by 桜雅 在土
- #==============================================================================
- # ■ Window_BattleStatus
- #==============================================================================
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # ● 公開インスタンス変数
- #--------------------------------------------------------------------------
- attr_accessor :update_cp_only # CPメーターのみの更新
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- alias xrxs_bp7_initialize initialize
- def initialize
- # 初期化
- @previous_hp = []
- @previous_sp = []
- # 呼び戻す
- xrxs_bp7_initialize
- # ↓Full-Viewの場合は下二行の # を消してください。
- #self.opacity = 0
- #self.back_opacity = 0
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- alias xrxs_bp7_refresh refresh
- def refresh
- # CPメーターの更新のみ の場合
- if @update_cp_only
- xrxs_bp7_refresh
- return
- end
- # 変更するものがない場合、飛ばす
- @item_max = $game_party.actors.size
- bool = false
- for i in 0...@item_max
- actor = $game_party.actors[i]
- if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
- bool = true
- end
- end
- return if bool == false
- # 描写を開始
- self.contents.clear
- for i in 0...@item_max
- actor = $game_party.actors[i]
- actor_x = i * 160 + 82 #修改hp&mp血條的x座標位置
- # 歩行キャラグラフィックの描写 - 修改臉圖位置
- #draw_actor_face(actor, actor_x - 9, 60)
- # HP/SPメーターの描写 - 修改hp&mp血條位置
- draw_actor_hp_meter_line(actor, actor_x, 76, 46, 8)
- draw_actor_sp_meter_line(actor, actor_x, 99, 46, 8)
- draw_actor_str(actor, actor_x, 122, 46, 8)
- # HP数値の描写
- self.contents.font.size = 15 # HP/SP数値の文字の大きさ
- self.contents.font.color = Color.new(0,0,0,192)
- self.contents.draw_text(actor_x-51, 65, 96, 24, actor.hp.to_s, 2)
- self.contents.font.color = actor.hp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
- self.contents.draw_text(actor_x-50, 64, 96, 24, actor.hp.to_s, 2)
- # SP数値の描写
- self.contents.font.color = Color.new(0,0,0,192)
- self.contents.draw_text(actor_x-49, 88, 96, 24, actor.sp.to_s, 2)
- self.contents.font.color = actor.sp == 0 ? knockout_color :
- actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
- self.contents.draw_text(actor_x-50, 87, 96, 24, actor.sp.to_s, 2)
- # 用語「HP」と用語「SP」の描写
- # self.contents.font.size = 10 # 用語「HP/SP」の文字の大きさ
- # self.contents.font.color = Color.new(100,50,50,192)
- # self.contents.draw_text(actor_x-8, 77, 196, 24, $data_system.words.hp)
- # self.contents.draw_text(actor_x-8, 91, 196, 24, $data_system.words.sp)
- # self.contents.font.color = system_color # 用語「HP/SP」の文字の色
- # self.contents.draw_text(actor_x-10, 89, 196, 24, $data_system.words.hp)
- # self.contents.draw_text(actor_x-10, 93, 196, 24, $data_system.words.sp)
- # ステートの描写
- self.contents.font.color = Color.new(0,0,0,192)
- self.contents.draw_text(actor_x-49, 111, 96, 24, actor.str.to_s, 2)
- self.contents.font.color = actor.str == 0 ? knockout_color :
- actor.str <= 999 / 4 ? crisis_color : normal_color
- self.contents.draw_text(actor_x-50, 110, 96, 24, actor.str.to_s, 2)
- draw_actor_state(actor, actor_x, 100)
- # 値を更新
- @previous_hp[i] = actor.hp
- @previous_hp[i] = actor.hp
- end
- end
- end
- #==============================================================================
- # ■ Window_Base
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● HPメーター の描画
- #--------------------------------------------------------------------------
- def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
- w = width * actor.hp / [actor.maxhp,1].max
- hp_color_1 = Color.new(255, 0, 0, 192)
- hp_color_2 = Color.new(255, 255, 0, 192)
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- x -= 1
- y += (height/4).floor
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- end
- #--------------------------------------------------------------------------
- # ● SPメーター の描画
- #--------------------------------------------------------------------------
- def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
- w = width * actor.sp / [actor.maxsp,1].max
- hp_color_1 = Color.new( 0, 0, 255, 192)
- hp_color_2 = Color.new( 0, 255, 255, 192)
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- x -= 1
- y += (height/4).floor
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- end
- #--------------------------------------------------------------------------
- # ● STRメーター の描画
- #--------------------------------------------------------------------------
- def draw_actor_str(actor, x, y, width = 156, height = 4)
- w = width * actor.str / 999
- hp_color_1 = Color.new( 0, 255, 0, 192)
- hp_color_2 = Color.new( 255, 255, 0, 192)
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- x -= 1
- y += (height/4).floor
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- end
- #--------------------------------------------------------------------------
- # ● 名前の描画
- #--------------------------------------------------------------------------
- alias xrxs_bp7_draw_actor_name draw_actor_name
- def draw_actor_name(actor, x, y)
- xrxs_bp7_draw_actor_name(actor, x, y) if @draw_ban != true
- end
- #--------------------------------------------------------------------------
- # ● ステートの描画
- #--------------------------------------------------------------------------
- alias xrxs_bp7_draw_actor_state draw_actor_state
- def draw_actor_state(actor, x, y, width = 120)
- xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
- end
- #--------------------------------------------------------------------------
- # ● HP の描画
- #--------------------------------------------------------------------------
- alias xrxs_bp7_draw_actor_hp draw_actor_hp
- def draw_actor_hp(actor, x, y, width = 144)
- xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
- end
- #--------------------------------------------------------------------------
- # ● SP の描画
- #--------------------------------------------------------------------------
- alias xrxs_bp7_draw_actor_sp draw_actor_sp
- def draw_actor_sp(actor, x, y, width = 144)
- xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
- end
- end
- #==============================================================================
- # ■ Scene_Battle
- #==============================================================================
- class Scene_Battle
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- alias xrxs_bp7_update update
- def update
- xrxs_bp7_update
- # メッセージウィンドウ表示中の場合
- if $game_temp.message_window_showing
- @status_window.update_cp_only = true
- else
- @status_window.update_cp_only = false
- end
- end
- end
- #==============================================================================
- # ◇ 外部ライブラリ
- #==============================================================================
- class Window_Base
- #--------------------------------------------------------------------------
- # ● ライン描画 軽量版 by 桜雅 在土
- #--------------------------------------------------------------------------
- def draw_lineght(start_x, start_y, end_x, end_y, start_color)
- # 描写距離の計算。大きめに直角時の長さ。
- distance = (start_x - end_x).abs + (start_y - end_y).abs
- # 描写開始
- for i in 1..distance
- x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
- y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
- self.contents.set_pixel(x, y, start_color)
- end
- end
- #--------------------------------------------------------------------------
- # ● ライン描画 by 桜雅 在土
- #--------------------------------------------------------------------------
- def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
- # 描写距離の計算。大きめに直角時の長さ。
- distance = (start_x - end_x).abs + (start_y - end_y).abs
- # 描写開始
- if end_color == start_color
- for i in 1..distance
- x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
- y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
- if width == 1
- self.contents.set_pixel(x, y, start_color)
- else
- self.contents.fill_rect(x, y, width, width, start_color)
- end
- end
- else
- for i in 1..distance
- x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
- y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
- r = start_color.red * (distance-i)/distance + end_color.red * i/distance
- g = start_color.green * (distance-i)/distance + end_color.green * i/distance
- b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
- a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
- if width == 1
- self.contents.set_pixel(x, y, Color.new(r, g, b, a))
- else
- self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
- end
- end
- end
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
复制代码 好吧,这个是完全脱离了那不相干的CP……- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- # ————————————————————————————————————
- # ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
- # by 桜雅 在土
- #==============================================================================
- # ■ Window_BattleStatus
- #==============================================================================
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- alias xrxs_bp7_initialize initialize
- def initialize
- # 初期化
- @previous_hp = []
- @previous_sp = []
- @previous_str = []
- # 呼び戻す
- xrxs_bp7_initialize
- # ↓Full-Viewの場合は下二行の # を消してください。
- #self.opacity = 0
- #self.back_opacity = 0
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- alias xrxs_bp7_refresh refresh
- def refresh
- # 如果数值更变的话执行描绘
- @item_max = $game_party.actors.size
- bool = false
- for i in 0...@item_max
- actor = $game_party.actors[i]
- if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp) or (@previous_str[i] != actor.str)
- bool = true
- end
- end
- return if bool == false
- # 描写を開始
- self.contents.clear
- for i in 0...@item_max
- actor = $game_party.actors[i]
- actor_x = i * 160 + 82 #修改hp&mp血條的x座標位置
- # 歩行キャラグラフィックの描写 - 修改臉圖位置
- #draw_actor_face(actor, actor_x - 9, 60)
- # HP/SPメーターの描写 - 修改hp&mp血條位置
- draw_actor_hp_meter_line(actor, actor_x, 76, 46, 8)
- draw_actor_sp_meter_line(actor, actor_x, 99, 46, 8)
- draw_actor_str(actor, actor_x, 122, 46, 8)
- # HP数値の描写
- self.contents.font.size = 15 # HP/SP数値の文字の大きさ
- self.contents.font.color = Color.new(0,0,0,192)
- self.contents.draw_text(actor_x-51, 65, 96, 24, actor.hp.to_s, 2)
- self.contents.font.color = actor.hp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
- self.contents.draw_text(actor_x-50, 64, 96, 24, actor.hp.to_s, 2)
- # SP数値の描写
- self.contents.font.color = Color.new(0,0,0,192)
- self.contents.draw_text(actor_x-49, 88, 96, 24, actor.sp.to_s, 2)
- self.contents.font.color = actor.sp == 0 ? knockout_color :
- actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
- self.contents.draw_text(actor_x-50, 87, 96, 24, actor.sp.to_s, 2)
- # 用語「HP」と用語「SP」の描写 显示能力的名称而已,不要就删
- # self.contents.font.size = 10 # 用語「HP/SP」の文字の大きさ
- # self.contents.font.color = Color.new(100,50,50,192)
- # self.contents.draw_text(actor_x-8, 77, 196, 24, $data_system.words.hp)
- # self.contents.draw_text(actor_x-8, 91, 196, 24, $data_system.words.sp)
- # self.contents.font.color = system_color # 用語「HP/SP」の文字の色
- # self.contents.draw_text(actor_x-10, 89, 196, 24, $data_system.words.hp)
- # self.contents.draw_text(actor_x-10, 93, 196, 24, $data_system.words.sp)
- # STRの描写
- self.contents.font.color = Color.new(0,0,0,192)
- self.contents.draw_text(actor_x-49, 111, 96, 24, actor.str.to_s, 2)
- self.contents.font.color = actor.str == 0 ? knockout_color :
- actor.str <= 999 / 4 ? crisis_color : normal_color
- self.contents.draw_text(actor_x-50, 110, 96, 24, actor.str.to_s, 2)
- draw_actor_state(actor, actor_x, 100)
- # 更新一下记录数值
- @previous_hp[i] = actor.hp
- @previous_sp[i] = actor.sp
- @previous_str[i] = actor.str
- end
- end
- end
- #==============================================================================
- # ■ Window_Base
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● HPメーター の描画
- #--------------------------------------------------------------------------
- def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
- w = width * actor.hp / [actor.maxhp,1].max
- hp_color_1 = Color.new(255, 0, 0, 192)
- hp_color_2 = Color.new(255, 255, 0, 192)
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- x -= 1
- y += (height/4).floor
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- end
- #--------------------------------------------------------------------------
- # ● SPメーター の描画
- #--------------------------------------------------------------------------
- def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
- w = width * actor.sp / [actor.maxsp,1].max
- hp_color_1 = Color.new( 0, 0, 255, 192)
- hp_color_2 = Color.new( 0, 255, 255, 192)
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- x -= 1
- y += (height/4).floor
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- end
- #--------------------------------------------------------------------------
- # ● STRメーター の描画
- #--------------------------------------------------------------------------
- def draw_actor_str(actor, x, y, width = 156, height = 4)
- w = width * actor.str / 999
- hp_color_1 = Color.new( 0, 255, 0, 192)
- hp_color_2 = Color.new( 255, 255, 0, 192)
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- x -= 1
- y += (height/4).floor
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).ceil , Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
- x -= 1
- y += (height/4).ceil
- self.contents.fill_rect(x+0, y+0, width, (height/4).floor, Color.new(0, 0, 0, 128))
- draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
- end
- end
- #==============================================================================
- # ◇ 外部ライブラリ
- #==============================================================================
- class Window_Base
- #--------------------------------------------------------------------------
- # ● ライン描画 by 桜雅 在土
- #--------------------------------------------------------------------------
- def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
- # 描写距離の計算。大きめに直角時の長さ。
- distance = (start_x - end_x).abs + (start_y - end_y).abs
- # 描写開始
- if end_color == start_color
- for i in 1..distance
- x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
- y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
- if width == 1
- self.contents.set_pixel(x, y, start_color)
- else
- self.contents.fill_rect(x, y, width, width, start_color)
- end
- end
- else
- for i in 1..distance
- x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
- y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
- r = start_color.red * (distance-i)/distance + end_color.red * i/distance
- g = start_color.green * (distance-i)/distance + end_color.green * i/distance
- b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
- a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
- if width == 1
- self.contents.set_pixel(x, y, Color.new(r, g, b, a))
- else
- self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
- end
- end
- end
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
复制代码 之前的我可去编辑掉了。 |
|