赞 | 0 |
VIP | 258 |
好人卡 | 2 |
积分 | 0 |
经验 | 11030 |
最后登录 | 2016-8-20 |
在线时间 | 36 小时 |
Lv1.梦旅人 ~琉璃の雪~<
- 梦石
- 0
- 星屑
- 49
- 在线时间
- 36 小时
- 注册时间
- 2008-11-6
- 帖子
- 3678
|
我这上传速度就像渣一样,算了,我把脚本贴出来,坐标只能你自己调了。
首先,给战斗背景换张大图片(640*480)。
怪物血量显示41-42行替换成:- x = @battler.screen_x - width / 2
- y = @battler.screen_y - height + PLAN_HPSP_DRAW::DRAW_Y
复制代码 然后以下脚本插入main之前,放到最后:- # ————————————————————————————————————
- # 本脚本来自http://rpg.blue/web/,转载请保留此信息
- # ————————————————————————————————————
- #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # 游戏中全部窗口的超级类。
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● 描绘 HP
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def draw_actor_hp1(actor, x, y, width = 72)
- # 描绘字符串 "HP"
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 24, 24, $data_system.words.hp)
- # 计算描绘 MaxHP 所需的空间
- if width - 24 >= 32
- hp_x = x + 32# + width - 24
- end
- # 描绘 HP
- self.contents.font.color = actor.hp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
- self.contents.draw_text(hp_x, y, 32, 24, actor.hp.to_s, 2)
- end
- #--------------------------------------------------------------------------
- # ● 描绘 SP
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- # width : 描画目标的宽
- #--------------------------------------------------------------------------
- def draw_actor_sp1(actor, x, y, width = 72)
- # 描绘字符串 "SP"
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 24, 24, $data_system.words.sp)
- # 计算描绘 MaxSP 所需的空间
- if width - 24 >= 32
- sp_x = x + 32# + width - 24
- end
- # 描绘 SP
- self.contents.font.color = actor.sp == 0 ? knockout_color :
- actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
- self.contents.draw_text(sp_x, y, 32, 24, actor.sp.to_s, 2)
- end
- end
-
- #==============================================================================
- # ■ Window_BattleStatus
- #------------------------------------------------------------------------------
- # 显示战斗画面同伴状态的窗口。
- #==============================================================================
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- #$data_system_level_up_me = "Audio/ME/升级音乐"
- def initialize
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 10, height - 32)
- self.opacity = 0
- @level_up_flags = [false, false, false, false]
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 释放
- #--------------------------------------------------------------------------
- def dispose
- super
- end
- #--------------------------------------------------------------------------
- # ● 设置升级标志
- # actor_index : 角色索引
- #--------------------------------------------------------------------------
- def level_up(actor_index)
- @level_up_flags[actor_index] = true
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- case i
- when 0
- x = 500
- y = 100
- when 1
- x = 500
- y = 140
- when 2
- x = 500
- y = 180
- when 3
- x = 500
- y = 220
- when 4
- x = 500
- y = 260
- when 5
- x = 500
- y = 300
- when 6
- x = 500
- y = 340
- when 7
- x = 500
- y = 380
- when 8
- x = 500
- y = 420
- when 9
- x = 500
- y = 460
- end
- if @level_up_flags[i]
- self.contents.font.color = normal_color
- self.contents.draw_text(x, y, 80, 24, "LEVEL UP!")
- Audio.me_stop
- # Audio.me_play($data_system_level_up_me)
- else
- draw_actor_hp1(actor, x-15, y-15, 80)
- draw_actor_sp1(actor, x-15, y+5, 80)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- super
- end
- end
-
-
- #==============================================================================
- # ■ Window_BattleStatus
- #==============================================================================
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化
- #--------------------------------------------------------------------------
- alias xrxs_bp2_refresh refresh
- def refresh
- xrxs_bp2_refresh
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- case i
- when 0
- x = 500
- y = 100
- when 1
- x = 500
- y = 140
- when 2
- x = 500
- y = 180
- when 3
- x = 500
- y = 220
- when 4
- x = 500
- y = 260
- when 5
- x = 500
- y = 300
- when 6
- x = 500
- y = 340
- when 7
- x = 500
- y = 380
- when 8
- x = 500
- y = 420
- when 9
- x = 500
- y = 460
- end
- draw_actor_hp_meter(actor, x, y, 50)
- draw_actor_sp_meter(actor, x, y + 8, 50)
- end
- end
- end
- #==============================================================================
- # ■ Window_Base
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● HP描画
- #--------------------------------------------------------------------------
- def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
- if type == 1 and actor.hp == 0
- return
- end
- self.contents.font.color = system_color
- self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 25))
- w = width * actor.hp / actor.maxhp
- self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
- self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
- self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
- self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
- end
-
- #--------------------------------------------------------------------------
- # ● SP描画
- #--------------------------------------------------------------------------
- def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
- if type == 1 and actor.hp == 0
- return
- end
- self.contents.font.color = system_color
- self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
- w = width * actor.sp / actor.maxsp
- self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
- self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
- self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
- self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
- end
- end
复制代码 |
|