本帖最后由 阿短 于 2016-3-5 23:30 编辑
cinderelmini 发表于 2016-3-5 22:11
放在【Sprite_Battler】下面【Main】上面任何地方,
因为默认代码结构问题,和其他战斗系统冲突可能存在、
...
谢谢大神!但是我放进去后危机时人物战斗图还是没有变化,是我图片命名出问题吗?
图像命名比如原战斗图为 1.png,位置在\Graphics\Battlers 夹里面
危机战斗图应同样在\Graphics\Battlers里面的,名字为 1_Crisis.png 吗?
@cinderelmini
会不会是我加入了 去“战斗/逃跑”选项 的代码而冲突了?
#======================================================================= # ■ 本脚本来自 [url]www.66rpg.com[/url] 转载和使用时请保留此信息 #----------------------------------------------------------------------- # 脚本功能:去掉战斗开始时候的 战斗/逃跑 的选择过程. # 并把逃跑加入到角色命令菜单当中 # 脚本作者:后知后觉 2010-8-11 13:46:59 # 使用方法:直接在 Main 前插入即可 #======================================================================= class Window_PartyCommand < Window_Selectable def visible=(value) super(false) end def active=(value) super(false) end end class Scene_Battle alias hzhj_old_start_phase1 start_phase1 def start_phase1 class << @actor_command_window attr_reader :commands def commands=(value) @commands = value @item_max = @commands.size self.height = @item_max * 32 + 32 self.y = [self.y - 32, 0].max self.contents.dispose self.contents = Bitmap.new(width - 32, height - 32) refresh end end commands = @actor_command_window.commands commands.push("撤退") @actor_command_window.commands = commands unless $game_temp.battle_can_escape @actor_command_window.disable_item(commands.size - 1) end hzhj_old_start_phase1 end alias hzhj_old_start_phase2 start_phase2 def start_phase2 hzhj_old_start_phase2 if @phase == 2 start_phase3 end end alias hzhj_old_update_phase3_basic_command update_phase3_basic_command def update_phase3_basic_command hzhj_old_update_phase3_basic_command if Input.trigger?(13) if @actor_command_window.index == @actor_command_window.commands.size - 1 unless $game_temp.battle_can_escape $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) update_phase2_escape return end end end end #======================================================================= # ■ 本脚本来自 [url]www.66rpg.com[/url] 转载和使用时请保留此信息 #=======================================================================
#=======================================================================
# ■ 本脚本来自 [url]www.66rpg.com[/url] 转载和使用时请保留此信息
#-----------------------------------------------------------------------
# 脚本功能:去掉战斗开始时候的 战斗/逃跑 的选择过程.
# 并把逃跑加入到角色命令菜单当中
# 脚本作者:后知后觉 2010-8-11 13:46:59
# 使用方法:直接在 Main 前插入即可
#=======================================================================
class Window_PartyCommand < Window_Selectable
def visible=(value)
super(false)
end
def active=(value)
super(false)
end
end
class Scene_Battle
alias hzhj_old_start_phase1 start_phase1
def start_phase1
class << @actor_command_window
attr_reader :commands
def commands=(value)
@commands = value
@item_max = @commands.size
self.height = @item_max * 32 + 32
self.y = [self.y - 32, 0].max
self.contents.dispose
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
end
commands = @actor_command_window.commands
commands.push("撤退")
@actor_command_window.commands = commands
unless $game_temp.battle_can_escape
@actor_command_window.disable_item(commands.size - 1)
end
hzhj_old_start_phase1
end
alias hzhj_old_start_phase2 start_phase2
def start_phase2
hzhj_old_start_phase2
if @phase == 2
start_phase3
end
end
alias hzhj_old_update_phase3_basic_command update_phase3_basic_command
def update_phase3_basic_command
hzhj_old_update_phase3_basic_command
if Input.trigger?(13)
if @actor_command_window.index == @actor_command_window.commands.size - 1
unless $game_temp.battle_can_escape
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
update_phase2_escape
return
end
end
end
end
#=======================================================================
# ■ 本脚本来自 [url]www.66rpg.com[/url] 转载和使用时请保留此信息
#=======================================================================
而原Sprite_Battler我修改的是下面的部分
# 不是主状态的时候稍稍降低点透明度 if $game_temp.battle_main_phase self.opacity += 3 if self.opacity < 255 else self.opacity -= 3 if self.opacity > 255 end
# 不是主状态的时候稍稍降低点透明度
if $game_temp.battle_main_phase
self.opacity += 3 if self.opacity < 255
else
self.opacity -= 3 if self.opacity > 255
end
|