SOUL ENGINE ACE – CRITICAL ENEMY BATTLERS

RPG Maker VX Ace

This script allows all critical tagged enemies to change their battlers when they are under a critical condition (HP.

-

Posts

Pages: 1
when i start the game i get this error :

Script 'Critical Enemy Battler' line 47:SyntaxError occurred.
target of repeat operator is not specified: /+/
Hmm weird, that should work enough. Are you using other battle scripts?
Place it above all your other scripts. If they still don't work, tell me so I can show you a vanilla demo of how they work.
Still don't work, i am wondering if it requires other script from your engine to work.
No, it is a stand alone script. This should work without errors.

# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Soul Engine Ace - Critical Enemy Battlers
# Author: Soulpour777
# Version 1.0
# Script Category: Battle Script
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Description:
# This script allows all critical tagged enemies to change their battlers when
# they are under a critical condition (HP.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Terms of Use:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# For Non-Commercial Use:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# You are free to use the script on any non-commercial projects.
# You are free to adapt the script. Any modifications are allowed as long 
# as it is provided as a note on the script.
# Credits to SoulPour777 for the script.
# Preserve the Script Header.
# Claiming the script as your own is prohibited.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Usage:
# add a note tag <critical: battler, color>
# where battler is the Battler Picture Name (from Battlers Picture) and color
# the hue of the battler to be shown.
# example: <critical: Angel, 244>
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# -----------------------------------------------------------------------------
module Soulpour
  # Critical HP before the battler changes
  CRITICAL_HP_CONDITION = 25
end

#==============================================================================
# ** RPG::Enemy
#==============================================================================
class RPG::Enemy
  #--------------------------------------------------------------------------
  # soul_critical_image
  #--------------------------------------------------------------------------
  def soul_critical_image
    return @soul_critical_image if @soul_critical_image != nil
    @soul_critical_image = false
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when /<(?:CRITICAL|crit):[ ](.*),[ ]*(\d+)>/i
        @soul_critical_image = [$1.to_s, $2.to_i]
      end
    }
    return @soul_critical_image
  end
end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class 
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Change HP (Aliased)
  #--------------------------------------------------------------------------
  alias soulpour_critical_image_show_hp_check hp= unless $@
  def hp=(hp)
    soulpour_critical_image_show_hp_check(hp)
    soul_change_critical_image if self.is_a?(Game_Enemy)
  end
end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class 
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Change Critical Image
  #--------------------------------------------------------------------------
  def soul_change_critical_image
    return if dead?
    return if enemy.soul_critical_image == false
    return if @soul_critical_stat and mhp*Soulpour::CRITICAL_HP_CONDITION/100 > @hp
    return if !@soul_critical_stat and @hp > mhp*Soulpour::CRITICAL_HP_CONDITION/100
    if !@soul_critical_stat and mhp*Soulpour::CRITICAL_HP_CONDITION/100 > @hp
      @soul_critical_stat = true
      @battler_name = enemy.soul_critical_image[0]
      @battler_hue = enemy.soul_critical_image[1]
    elsif @soul_critical_stat and @hp > mhp*Soulpour::CRITICAL_HP_CONDITION/100
      @soul_critical_stat = false
      @battler_name = enemy.battler_name
      @battler_hue = enemy.battler_hue
    end
  end
end
:D now it works perfectly ,thanks for the help friend ,this amazing script will help me a lot ,great work!!
Pages: 1