幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2542|回复: 6

[RMXP] 战斗时的设置

[复制链接]

30

主题

154

帖子

1552

积分

⑥精研

积分
1552
发表于 2011-6-3 10:39:36 | 显示全部楼层 |阅读模式
先祝看贴的各位你好,在编辑战斗设置的时候发现的

左边在右边的上一层

问:怎么更改我方队员战斗时的前后顺序(不是改坐标,是层的前后顺序),我想做伙伴掩护

还有战斗时人物好像都是半透明的,怎么改

战斗时的菜单框怎么改,透明度怎么调

战斗时的选项怎么添加,默认是战斗和逃跑,我想添加其它选项。
给游戏制作者空间,还你一个乐趣无穷的网络。
回复

使用道具 举报

14

主题

60

帖子

1万

积分

⑧专业

积分
13647
发表于 2011-6-3 13:23:30 | 显示全部楼层
我方队员战斗时的前后顺序,角色速度和技能速度决定,数据库-特技-速度修正

伙伴掩护不会
回复 支持 反对

使用道具 举报

14

主题

60

帖子

1万

积分

⑧专业

积分
13647
发表于 2011-6-3 13:35:42 | 显示全部楼层
脚本中:
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,你可以直接改原窗口皮肤
回复 支持 反对

使用道具 举报

14

主题

60

帖子

1万

积分

⑧专业

积分
13647
发表于 2011-6-3 14:08:26 | 显示全部楼层
战斗时的选项怎么添加,请参考下人家的脚本
#=======================================================================
# ■ 本脚本来自 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 = [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
    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 转载和使用时请保留此信息
#=======================================================================
回复 支持 反对

使用道具 举报

14

主题

60

帖子

1万

积分

⑧专业

积分
13647
发表于 2011-6-3 14:36:22 | 显示全部楼层
战斗中的角色图像不透明
[table=757px][tr][td]找到 Sprite_Battler 的如下一段,把红色部分的语句统统注释掉~

[blockquote]  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[/blockquote]

[/td][/tr][/table]
回复 支持 反对

使用道具 举报

30

主题

154

帖子

1552

积分

⑥精研

积分
1552
 楼主| 发表于 2011-6-5 01:05:29 | 显示全部楼层
多谢LS的daipeng76 ,透明度会了,

战斗窗口Spriteset_Battle加了,图片好像是在最低层啊。

战斗选项的代码是插入哪个的main

是左边栏的main里面吗,还是Window_Selectable里的,里面找不到main啊
给游戏制作者空间,还你一个乐趣无穷的网络。
回复 支持 反对

使用道具 举报

24

主题

117

帖子

1274

积分

⑥精研

积分
1274
QQ
发表于 2011-6-6 01:36:54 | 显示全部楼层
更改战斗图的z不就好了
Tamashii是啥意思? 魂! ======================= 我真是败给C++的面向对象了啊……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2024-3-29 19:53 , Processed in 0.022939 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表