战斗时的设置
先祝看贴的各位你好,在编辑战斗设置的时候发现的左边在右边的上一层
问:怎么更改我方队员战斗时的前后顺序(不是改坐标,是层的前后顺序),我想做伙伴掩护
还有战斗时人物好像都是半透明的,怎么改
战斗时的菜单框怎么改,透明度怎么调
战斗时的选项怎么添加,默认是战斗和逃跑,我想添加其它选项。 我方队员战斗时的前后顺序,角色速度和技能速度决定,数据库-特技-速度修正
伙伴掩护不会 脚本中:
Window_BattleStatus是战斗窗口
Window_Selectable是战斗选择项
去修改这2个内容里面的数据显示和坐标就好了
战斗时的菜单透明度和加底图:
Spriteset_Battle
在def initialize內加
@status = Sprite.new
@status.bitmap = RPG::Cache.picture("你图片的名")
@status.y = 320
def dispose加
@status.dispose
@status.bitmap.dispose
Window_BattleStatus在def initialize內加
self.opacity = 0 #0是透明,255是不透明,半透明0~255之间的数字
战斗菜单框窗口图片决定,文件在RMXP\\工程名\\Windowskins\\ 窗口图片素材。
你可以搜索一些RMXP窗口皮肤放入,如会PS,你可以直接改原窗口皮肤 战斗时的选项怎么添加,请参考下人家的脚本
#=======================================================================
# ■ 本脚本来自 www.66rpg.com 转载和使用时请保留此信息
#-----------------------------------------------------------------------
# 脚本功能:去掉战斗开始时候的 战斗/逃跑 的选择过程.
# 脚本作者:后知后觉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_phase2 start_phase2
def start_phase2
hzhj_old_start_phase2
if @phase == 2
start_phase3
end
end
end
#=======================================================================
# ■ 本脚本来自 www.66rpg.com 转载和使用时请保留此信息
#=======================================================================
#=======================================================================
# ■ 本脚本来自 www.66rpg.com 转载和使用时请保留此信息
#-----------------------------------------------------------------------
# 脚本功能:去掉战斗开始时候的 战斗/逃跑 的选择过程.
# 并把逃跑加入到角色命令菜单当中
# 脚本作者:后知后觉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 = .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
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
$game_system.se_play($data_system.decision_se)
update_phase2_escape
return
end
end
end
end
#=======================================================================
# ■ 本脚本来自 www.66rpg.com 转载和使用时请保留此信息
#======================================================================= 战斗中的角色图像不透明
找到 Sprite_Battler 的如下一段,把红色部分的语句统统注释掉~
def update
super
# 战斗者为 nil 的情况下
if @battler == nil
self.bitmap = nil
loop_animation(nil)
return
end
# 文件名和色相与当前情况有差异的情况下
if @battler.battler_name != @battler_name or
@battler.battler_hue != @battler_hue
# 获取、设置位图
@battler_name = @battler.battler_name
@battler_hue = @battler.battler_hue
self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width / 2
self.oy = @height
# 如果是战斗不能或者是隐藏状态就把透明度设置成 0
if @battler.dead? or @battler.hidden
self.opacity = 0
end
end
# 动画 ID 与当前的情况有差异的情况下
if @battler.damage == nil and
@battler.state_animation_id != @state_animation_id
@state_animation_id = @battler.state_animation_id
loop_animation($data_animations[@state_animation_id])
end
# 应该被显示的角色的情况下
#if @battler.is_a?(Game_Actor) and @battler_visible
# 不是主状态的时候稍稍降低点透明度
# if $game_temp.battle_main_phase
# self.opacity += 3 if self.opacity < 255
# else
# self.opacity -= 3 if self.opacity > 207
# end
#end
# 明灭
#if @battler.blink
# blink_on
#else
# blink_off
#end
# 不可见的情况下
unless @battler_visible
# 出现
if not @battler.hidden and not @battler.dead? and
(@battler.damage == nil or @battler.damage_pop)
appear
@battler_visible = true
end
end
# 可见的情况下
if @battler_visible
# 逃跑
if @battler.hidden
$game_system.se_play($data_system.escape_se)
escape
@battler_visible = false
end
# 白色闪烁
if @battler.white_flash
whiten
@battler.white_flash = false
end
# 动画
if @battler.animation_id != 0
animation = $data_animations[@battler.animation_id]
animation(animation, @battler.animation_hit)
@battler.animation_id = 0
end
# 伤害
if @battler.damage_pop
damage(@battler.damage, @battler.critical)
@battler.damage = nil
@battler.critical = false
@battler.damage_pop = false
end
# korapusu
if @battler.damage == nil and @battler.dead?
if @battler.is_a?(Game_Enemy)
$game_system.se_play($data_system.enemy_collapse_se)
else
$game_system.se_play($data_system.actor_collapse_se)
end
collapse
@battler_visible = false
end
end
# 设置活动块的坐标
self.x = @battler.screen_x
self.y = @battler.screen_y
self.z = @battler.screen_z
end
多谢LS的daipeng76 ,透明度会了,
战斗窗口Spriteset_Battle加了,图片好像是在最低层啊。
战斗选项的代码是插入哪个的main
是左边栏的main里面吗,还是Window_Selectable里的,里面找不到main啊 更改战斗图的z不就好了
页:
[1]