查看: 2690|回复: 4

[已经过期] 关于XP横版脚本与VX横版脚本的区别

[复制链接]
梦石
0
星屑
3181
在线时间
1439 小时
注册时间
2009-7-27
回帖
1187
发表于 2017-10-18 14:54:10 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
我玩过VX横版战斗时可以用二刀流的,而且可以做多次连击的技能,甚至可以做到随机攻击敌人,而不是全体技能,而且MISS还是分开来计算的,不是一个技能MISS了所有的动画都是MISS了。请问XP是否无法实现像VX那样的横版效果?感觉画面更喜欢XP,但是兼容和质量VX要更胜一筹。

博客:我的博客
梦石
1
星屑
24088
在线时间
3339 小时
注册时间
2011-7-8
回帖
3862

开拓者

发表于 2017-10-18 15:14:37 来自手机 | 显示全部楼层
这种效果不受引擎限制,自己花钱找人写呗。
回复

使用道具 举报

遠航の猫咪

梦石
3
星屑
26947
在线时间
2423 小时
注册时间
2005-10-15
回帖
987

开拓者

发表于 2017-10-18 17:48:15 | 显示全部楼层

2

本帖最后由 SailCat 于 2017-10-18 18:00 编辑

这和横版没有关系

二刀流:有多个脚本,比如http://rpg.blue/forum.php?mod=viewthread&tid=225786
技能多次连击:http://rpg.blue/forum.php?mod=viewthread&tid=1020
技能对象随机化:http://rpg.blue/forum.php?mod=viewthread&tid=31747 之范例2
技能多次连击的贴子好像挂了,代码在这里:
[pre lang="ruby"]#==============================================================================
# ■ 连击效果(完美版) v1.3 by SailCat
#------------------------------------------------------------------------------
# 数据库设定(特技):
#   描述:原描述 #hc=连击次数
#   例如:恢复中量HP #hc=2
#         对鸟系敌人特效 #hc=9
# 注意这是连击次数,实际攻击的回数是这个回数+1回。
# 连击次数是负数的话,将取绝对值处理。
# 视觉效果是发动动画只放1回,击中动画放N回,伤害值显示N次,
# 所以,如使用了齐时战斗的话,要修改倒数第四行,该行内容为:
#     @phase4_step = 4
# 改为@phase4_step = 3
# 其他:RTAB不适用
#==============================================================================
module Data_Note
  #--------------------------------------------------------------------------
  # ● 常量
  #--------------------------------------------------------------------------
  SEPARATOR = "#"                # 备注与正文的分隔符,可以更改为其他字符
  SEP_REGEX = /#{SEPARATOR}.+$/  # 切分用正则表达式,请不要修改
  #--------------------------------------------------------------------------
  # ● 备注值(注:不可运行时修改)
  #--------------------------------------------------------------------------
  def note
    # 如果是公共事件,用前面的注释
    if self.is_a?(RPG::CommonEvent)
      if @note.nil?
        index = 0
        index += 1 while list[index].code == 108 or list[index].code == 408
        @note = (list[0...index].collect {|x| x.parameters[0]}).join(";")
      end
    # 如果是队伍,用第1页前面的注释
    elsif self.is_a?(RPG::Troop)
      if @note.nil?
        list = pages[0].list
        index = 0
        index += 1 while list[index].code == 108 or list[index].code == 408
        @note = split((list[0...index].collect {|x| x.parameters[0]}).join(";"))
      end
    # 如果是其他,用描述或者名称来备注
    else
      @note ||= has_description? ? split(@description) : split(@name)
    end
  end
  #--------------------------------------------------------------------------
  # ● 取得备注值
  #--------------------------------------------------------------------------
  def method_missing(param_name, *args, &block)
    return get_note(param_name.to_s, args[0])
  end
  #--------------------------------------------------------------------------
  # ● 是否有描述字段(内部使用)
  #--------------------------------------------------------------------------
  def has_description?
    instance_variables.include?("@description")
  end
  #--------------------------------------------------------------------------
  # ● 切分备注用字段(内部使用)
  #--------------------------------------------------------------------------
  def split(text)
    text.slice(SEP_REGEX).to_s
  end
  #--------------------------------------------------------------------------
  # ● 取得备注参数值(内部使用或重名时使用)
  #--------------------------------------------------------------------------
  def get_note(param_name, default = nil)
    return default if note == ""
    param_regex = /^#{param_name}\b([+:=\-]?(.*?))$/
    @note_array ||= @note[1, @note.length - 1].split(";")
    @note_array.each do |x|
      if x[param_regex] != nil
        value = $1
        # 开关型(+)
        if value.strip == "" or value[0] == 43
          return true
        # 开关型(-)
        elsif value[0] == 45
          return false
        # 数值型
        elsif value[0] == 61
          return (eval($2) rescue default)
        # 字符型
        elsif value[0] == 58
          return $2
        # 不能识别
        else
          return nil
        end
      end
    end
    return default
  end
end
#==============================================================================
# ■ RPG 模块的植入
#------------------------------------------------------------------------------
#   以下植入12个数据库内容模块
#==============================================================================
module RPG
  [Actor, Class, Enemy, State, Animation, Tileset].each do |c|
    c.send :include, Data_Note
    c.send :define_method, :name do
      @name1 ||= @name.sub(Data_Note::SEP_REGEX) {|s| ""}
    end
    c.send :define_method, :name= do |value|
      @name1 = value
      @name = value + Data_Note::SEPARATOR + note
    end
  end
  [Item, Skill, Weapon, Armor].each do |c|
    c.send :include, Data_Note
    c.send :define_method, :description do
      @description1 ||= @description.sub(Data_Note::SEP_REGEX) {|s| ""}
    end
    c.send :define_method, :description= do |value|
      @description1 = value
      @description = value + Data_Note::SEPARATOR + note
    end
  end
  [Troop, CommonEvent].each do |c|
    c.send :include, Data_Note
  end
end
#==============================================================================
# ■ 连击效果实装
#==============================================================================
module RPG
  class Skill; def hit_count; hc(0).abs; end; end
  class Sprite < ::Sprite
    def effect?
      @_whiten_duration > 0 or
      @_appear_duration > 0 or
      @_escape_duration > 0 or
      @_animation_duration > 0
    end
    def damage_effect?
      @_damage_duration > 0 or
      @_collapse_duration > 0
    end
  end
end
class Spriteset_Battle
  def damage_effect?
    for sprite in @enemy_sprites + @actor_sprites
      return true if sprite.damage_effect?
    end
    return false
  end
end  
class Scene_Battle
  unless method_defined? :sailcat_update_phase4_step1
    alias sailcat_update_phase4_step1 update_phase4_step1
    alias sailcat_make_skill_action_result make_skill_action_result
    alias sailcat_update_phase4_step5 update_phase4_step5
  end
  def update_phase4_step1
    @hit_count = 0
    sailcat_update_phase4_step1
  end
  def make_skill_action_result
    sailcat_make_skill_action_result
    @hit_count = @skill.hit_count
  end
  def update_phase4_step5
    sailcat_update_phase4_step5
    if @hit_count > 0
      for target in @target_battlers.clone
        if target.dead?
          if @target_battlers.size > 1
            @target_battlers.delete(target)
          else
            @target_battlers.delete(target)
            if target.is_a?(Game_Enemy)
              target = $game_troop.smooth_target_enemy(target.index)
            else
              target = $game_party.smooth_target_actor(target.index)
            end
            if target.is_a?(Game_Battler)
              @target_battlers.push(target)
            end
          end
        end
      end
      if @target_battlers.size == 0
        return
      end
      for target in @target_battlers
        if target.damage != nil
          @phase4_step = 5
          return
        end
        target.skill_effect(@active_battler, @skill)
      end
      # 如果你应用了23种战斗特效的公共事件版脚本请去掉下面几行的注释
      # if @common_event_id > 0
      #   common_event = $data_common_events[@common_event_id]
      #   $game_system.battle_interpreter.setup(common_event.list, 0)
      # end
      @hit_count -= 1
      @phase4_step = 4
    end
  end
end[/pre]

点评

那不是VX横板实现的,那是VX数据库默认就有的技能效果,XP的数据库没有这些效果,只能通过扩展来实现  发表于 2017-10-19 02:11
跟VX完全不是一个概念,我说的就是横版脚本VX能实现的,XP实现不了  发表于 2017-10-19 02:03
SailCat (小猫子·要开心一点) 共上站 24 次,发表过 11 篇文章 上 次 在: [2006年01月28日11:41:18 星期六] 从 [162.105.120.91] 到本站一游。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部