Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - koktengri

1
Sadly, I dont know how to do this.
I want the stateanimations to not show up only on the user of the skills configurated with the term (HIDE/STATEANIMATION)
So, the hero/enemy who is using the skill.
But it should only last until the skill is finished. Afterwards it should be visible again.
2
Script Troubleshooting / Hidestates animation ATOA ACBS
February 26, 2017, 07:33:18 am
Yes, its me again and I've a question regarding Atoas ACBS (RPG XP) (What else could it be).
In his script "ACBS | Config 2 - Advanced" its possible to give skills special settings. For example the term "HIDE/BATTLER" will hide the battler casting the skill. It would look like this in the script:
Skill_Settings[99] = ["HIDE/BATTLER"]
It basicially hides the battler while hes doing the skill id 99.

I want another term like that called "Hide/stateanimation" which should disable the stateanimations like poison or blind when hes using a skill that has a configuration like that.
So, if the skill setting would read as the following:
Skill_Settings[299] = ["HIDE/STATEANIMATION"]
The statesanimations like poison who normally show up should be not shown while the skill 299 is used.
But, I really dont know how to formulate that.

Im pretty sure that something must be editted somwhere in ACBS | Scene Battle 4, line 1127-1154.

#--------------------------------------------------------------------------
  # * Set invisibility for battlers
  #     battler : battler
  #--------------------------------------------------------------------------
  def set_invisible_battler(battler)
    ext = check_extension(battler_action(battler), "HIDE/")
    return if ext.nil?
    battler.invisible_action = true
    battler.wait_time = 12
    ext.slice!("HIDE/")
    case ext
    when "BATTLER"
      battler.invisible = true
    when "PARTY","ENEMIES"
      party = battler.actor? ? $game_party.actors : $game_troop.enemies if ext == "PARTY"
      party = battler.actor? ? $game_troop.enemies : $game_party.actors if ext == "ENEMIES"
      for member in party
        member.invisible = true
      end
    when "OTHERS","ACTIVE","ALL"
      party = $game_party.actors + $game_troop.enemies
      for member in party
        member.invisible = true if ext == "OTHERS" and member != battler
        member.invisible = true if ext == "ACTIVE" and not (member == battler or battler.target_battlers.include?(member))
        member.invisible = true if ext == "ALL"
      end
    end
  end


Thanks in advance.
3
Thank you for the advice. I think I just keep the 500 limitation, because if I would change that, then I would need to change many other things do. 500 is enough for me :))
4
You're very fast. :) Thanks.
Worked perfectly. The problem was also, that there was no configuration from the very beginning. It was me who did the configuration. I copied the cast cancel configuration and just renamed it. I remember it now.
Last question: Since, the max CTB bar is 500, do you think I can use a number beyond 500?
Would that work or would that cause trouble? I experiemented with values like 1000 and more and I didint got en error message.
5
Yes, it seemed to work, but I didint know if something was missing that could ruin my project. Also I really didint know if the places where I put the things were at the right place. To be honest, it was more luck that I had the right place. Id like to prevent problems before they even appear. I hope that was okay.
And since we're talking about the script, heres what also bothers me which I havent found a solution for.
Atoa has a nice CTBlike script that I use. He has made a thing called CTB_Delay, (skills can do a delay on the CTB Bar when damage is received). It is determinable how strong a skill can delay the ctb bar.

The configuration sections is as following. (im going to quote in parts because the script itself is too big.)
#--------------------------------------------------------------------------
  # Delay on the CTB bar when recive damage
  # This value is used for all actions that don't have individual definition.
  Base_CTB_Delay = 0
   
  # Set here the actions that will cause CTB delay
  # 
  #   Cast_Cancel[Action_Type] = {Action_ID => Delay}
  #     Action_Type = 'Skill' for skills, 'Item' for items, 'Weapon' for weapons
  #     Action_ID = ID of the skill, item or weapon
  #     Delay = CTB delay value, increases with damage caused.
  #
  # Important: if the action is an physical skill, the weapon delay is also calculated
CTB_Delay['Skill'] = {417 => 100},
CTB_Delay['Skill'] = {430 => 200},
CTB_Delay['Skill'] = {431 => 350},
CTB_Delay['Skill'] = {432 => 450},
CTB_Delay['Skill'] = {401 => 250}


end

According to that the skills that are mentioned there should cause some ctb delay on the enemies. But nothing happens. I mean really nothing. The last numbers are the values that should effect the CTB bar. As far as I've understood, the higher the value, the higher the delay on the CTB bar.  Oh, the  max CTB Bar value is 500. Also, my skills do damage.

And here are the parts where things are determined for the whole CTB delay function. Im only quoting parts that are related to CTB delay function, not the whole script.
line 533 - 550

 #--------------------------------------------------------------------------
  # * Set CTB delay action
  #     user   : user
  #     action : action
  #--------------------------------------------------------------------------
  def set_delay_action(user, action)
    if action != nil and CTB_Delay[action.type_name] != nil and
       CTB_Delay[action.type_name][action.id] != nil
      delay_action(user, CTB_Delay[action.type_name][action.id], action)
      if action.type_name == 'Skill' and not action.magic?
        for weapon in weapons
          delay_action(user, CTB_Delay['Weapon'][weapon.id], action)
        end
      end
    else
      delay_action(user, Base_CTB_Delay, action)
    end
  end


from line  576 till 586

#--------------------------------------------------------------------------
  # * Set ATB delay
  #     user   : user
  #     delay  : delay value
  #     action : action
  #--------------------------------------------------------------------------
  def delay_action(user, delay, action)
    return if cant_delay(user, action)
    rate =  delay + (delay * (user.target_damage[self] * 50.0 / self.maxhp) / 100.0)
    self.ctb -= rate.to_i
  end


504-514

#--------------------------------------------------------------------------
  # * Final damage setting
  #     user   : user
  #     action : action
  #--------------------------------------------------------------------------
  alias set_damage_ctb set_damage
  def set_damage(user, action = nil)
    set_damage_ctb(user, action)
    set_cast_cancel(user, action)
    set_delay_action(user, action)
  end


Thats it. Theres a "cast cancel function" (skills can cancel other casting skills) which works, lets say, similar and functions without problems. But, this is somehow doesnt want to work despite being coded similar. I compared both codes over and over again but didint find any bugs that could cause the error

Any ideas?
Thanks.
6
Evenin'.
Yes, thanks for reading this.
let me first say, that I am not a scripter. I've made a small edit on atoas acbs battlesystem script. So I want someone else to check if the edits are correct or not because my scripting skills are VERY VERY limited.
What I wanted to make: I wanted to create a state like Lex aeterna from the MMORPG Ragnarok online. When you dont know what it does: When a certain enemy or hero is infected with the Lex aeterna state, the next attack (regardless of whether it is normal attacking or a skill), will do double the damage. After the attack/skill is done, the state will vanish. The state 87 is the LEX Aeterna state I mentioned.
Heres what I did:

The original line from 406-428 untouched
#--------------------------------------------------------------------------
  # * Applying Normal Attack Effects
  #     attacker : battler
  #--------------------------------------------------------------------------
  def attack_effect(attacker)
    self.sp_damage = false
    hit_result = set_attack_hit_result(attacker)
    if hit_result
      set_sp_damage(attacker, attacker.actor? ? attacker.weapons[0] : nil)
      set_attack_damage_value(attacker)
      if attacker.target_damage[self] > 0
        attacker.target_damage[self] /= 2 if self.guarding?
        set_critical_damage(attacker, attacker.weapon_critical_damage) if self.critical
        apply_variance(attacker.weapon_variance, attacker)
      end
      set_attack_state_change(attacker)
    else
      attacker.target_damage[self] = Miss_Message
      self.critical = false
    end
    set_attack_damage(attacker)
    return true
  end


Under the line attacker.target_damage[self] /= 2 if self.guarding?
I put the following line:
Quoteattacker.target_damage[self] *= 2 if self.states.include?(87)



The original Line 592-623 reads as:
#--------------------------------------------------------------------------
  # * Set skill result
  #     user      : user
  #     skill     : skill
  #     effective : effective skill
  #--------------------------------------------------------------------------
  def set_skill_result(user, skill, effective)
    set_sp_damage(user, skill)
    set_skill_damage_value(user, skill)
    if user.target_damage[self].abs > 0
      user.target_damage[self] /= 2 if self.guarding?
      if self.critical
        if check_include(skill, 'CRITICALDAMAGE')
          ext = check_extension(skill, 'CRITICALDAMAGE/')
          rate = ext.nil? ? Base_Critical_Damage : Base_Critical_Damage + ext.to_i
        elsif check_include(skill, 'CRITICALWEAPONDAMAGE')
          ext = checkextension(skill, 'CRITICALWEAPONDAMAGE/')
          rate = user.weapon_critical_damage
          rate +=  ext.to_i unless ext.nil?
        end
        set_critical_damage(user, rate)
      end
      apply_variance(skill.variance, user)
      apply_variance(user.weapon_variance, user) if check_include(skill, 'WEAPONVARIANCE')
    end
    effective |= set_skill_state_change(user, skill, effective)
    if effective and not $game_temp.in_battle
      set_damage(user, skill)
      apply_damage(user.target_damage[self], self.sp_damage)
    end
    return effective
  end


under the line
user.target_damage[self] /= 2 if self.guarding?
I created the following line
user.target_damage[self] *= 2 if self.states.include?(87)

Thanks for reading me, I hope for feedback.
7
Thanks, it seemed to work.
Thank you really much.
8
Well, it would be good if the character agility would be considered too in the formular, but if its not possible to make a certain skill give a 100% chance of stealing with it, you can take it out if you like so. Its not that important.
I configurate my steal items different each. Of course, they also have %. Some items can be stolen by 50% chance, some 90%. I'd want to keep the possibility to have different items at different chances.

btw. the items can be configurated at ACBS | Config 2 - Advance
example:
#¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
  # STEAL ITEMS
  #¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
  # Enemy_Steal[ID] = {'ITEM' => RATE}
  #
  # ID = Enemy ID
  # ITEM = Item type and ID. Must be expressed as 'xY'
  #  where x = item type and Y = item ID
  #  x must be 'a' for armors, 'w' for weapons, 'i' for items, 'g' for money
  #  E.g.: 'a12' = Armor ID 12
  # RATE = Item drop %. An value between 0 and 100, can be decimals
  #  E.g.: '5.4' = 5.4% drop rate
  #
  # E.g.: Enemy_Drops[15] = {'w6' => 22.5, 'g900' => 12}
  # That means enemy ID 15 (Enemy_Drops[15])
  # has 22,5% of dropping the weapon ID 6 ('w6' => 22.5) when stole,
  # and have 12% of dropping 900 gold ('g900' => 12) when stole.
  #
  # Repeated items won't be considered
  #
  Enemy_Steal[1] = {'g100' => 50, 'w1' => 50, 'a1' => 15}
9
Thanks.
Thats a help for now. But my problem is not solved. The problem is even if I set the steal rate to 100% for skillid 550, sometimes the steal still doesnt work, especially if the Item steal chance is set to low like 10%. I basically want the steals success to be 100% for the skill id 550. Even in the #code it says: "Even if the rate is 100%, that dont't grants 100% of chance of getting an item"
10
I've posted this in another forum but I forgot that it was pretty much dead. So, Im taking this here.
Yes, how do I make myself clear in the best way?
In my project, Im using atoa aka known as victor sants ATOA ACBS.
Theres a steal skill implemented that I use.
The rate for success of stealing is definable on ACBS | Config 1 - Basic line 501:
Steal_Rate = 50
So the steal rate is 50.

Problem is, that Im planning to have two different steal skills with different success rates.
The first steal skills success rate is listed above.
However, I want to add another steal skill which success should ALWAYS 100%. The problem is that the rate applies for all steal skills.

On ACBS | Game Enemy line 120 the succes rate is defined. At least I think its the right line, Im not 100% sure.
steal_success = rand(100) < (Steal_Rate + self.steal_attempt) * user.agi / self.agi

Can somebody edit the script so that the steal rate will ALWAYS be 100% if the using skills ID is 550? 550 is basically the skills ID Im going to use. I mean the skill that will/should always steal 100%.


And heres the demo of the full script:
https://workupload.com/start/OOmU2prO
the full code:

#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
#  This class handles enemies. It's used within the Game_Troop class
#  ($game_troop).
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :steal_items     # steal item list
  attr_accessor :steal_attempt   # steal attempts value
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     troop_id     : troop ID
  #     member_index : troop member index
  #     enemy_id     : enemy ID
  #--------------------------------------------------------------------------
  def initialize(troop_id, member_index, enemy_id = nil)
    super()
    @troop_id = troop_id
    @member_index = member_index
    troop = $data_troops[@troop_id]
    @enemy_id = enemy_id.nil? ? troop.members[@member_index].enemy_id : enemy_id
    enemy = $data_enemies[@enemy_id]
    @battler_name = enemy.battler_name
    @battler_hue = enemy.battler_hue
    @maxhp = maxhp
    @maxsp = maxsp
    @hp = @maxhp
    @sp = @maxsp
    @str = base_str
    @dex = base_dex
    @agi = base_agi
    @int = base_int
    @gold = gold
    @exp = exp
    @hidden = enemy_id.nil? ? troop.members[@member_index].hidden : false
    @immortal = enemy_id.nil? ? troop.members[@member_index].immortal : false
    @steal_items = Enemy_Steal[@enemy_id].to_a
    @steal_attempt = 0
    @moving = @sp_damage = false
    battler_position_setup
  end
  #--------------------------------------------------------------------------
  # * Check if battler is an actor
  #--------------------------------------------------------------------------
  def actor?
    return false
  end
  #--------------------------------------------------------------------------
  # * Decide if Command is Inputable
  #--------------------------------------------------------------------------
  def inputable?
    return super
  end
  #--------------------------------------------------------------------------
  # * Type string setting
  #--------------------------------------------------------------------------
  def type_name
    return 'Enemy'
  end
  #--------------------------------------------------------------------------
  # Definição de arma atual
  #--------------------------------------------------------------------------
  def current_weapon
    return nil
  end
  #--------------------------------------------------------------------------
  # * Set initial position
  #--------------------------------------------------------------------------
  def battler_position_setup
    base_x = @troop_id == 0 ? 0 : self.screen_x
    base_y = @troop_id == 0 ? 0 : self.screen_y
    @base_x = @original_x = @actual_x = @target_x = @initial_x = @hit_x = @damage_x = base_x
    @base_y = @original_y = @actual_y = @target_y = @initial_y = @hit_y = @damage_y = base_y
  end
  #--------------------------------------------------------------------------
  # * Set multi drop items
  #--------------------------------------------------------------------------
  def multi_drops
    drop_items = []
    return drop_items if Enemy_Drops[@enemy_id].nil?
    Enemy_Drops[@enemy_id].each do |item, drop_rate|
      item = item.split('')
      if item[0] == 'i'
        item = item.join
        item.slice!('i')
        if (rand(1000) < (drop_rate * 10).to_i) and not
           (item_id == $data_items[item.to_i].id)
          drop_items << $data_items[item.to_i]
        end
      elsif item[0] == 'a'
        item = item.join
        item.slice!('a')
        if (rand(1000) < (drop_rate * 10).to_i) and not
           (armor_id == $data_armors[item.to_i].id)
          drop_items << $data_armors[item.to_i]
        end
      elsif item[0] == 'w'
        item = item.join
        item.slice!('w')
        if (rand(1000) < (drop_rate * 10).to_i) and not
           (weapon_id == $data_weapons[item.to_i].id)
          drop_items << $data_weapons[item.to_i]
        end
      end
    end
    return drop_items
  end
  #--------------------------------------------------------------------------
  # * Set steal items
  #     user : user
  #     ext  : steal action extensio
  #--------------------------------------------------------------------------
  def stole_item_set(user, ext)
    return false unless ext != nil
    @item_stole = @item_to_steal = @stole_item_index = nil
    steal_success = rand(100) < (Steal_Rate + self.steal_attempt) * user.agi / self.agi
    #steal_success = 100 if
    self.steal_attempt += 1
    return nil if self.steal_items.nil? or self.steal_items == []
    return false unless steal_success
    @item_stole = []
    ext.slice!('STEAL/')
    self.steal_items.each do |item, steal_rate|
      item = item.split('')
      if item[0] == 'i' and not ext == 'GOLD'
        item = item.join
        item.slice!('i')
        @item_stole << $data_items[item.to_i] if rand(1000) < (steal_rate * 10).to_i
      elsif item[0] == 'a' and not ext == 'GOLD'
        item = item.join
        item.slice!('a')
        @item_stole << $data_armors[item.to_i] if rand(1000) < (steal_rate * 10).to_i
      elsif item[0] == 'w' and not ext == 'GOLD'
        item = item.join
        item.slice!('w')
        @item_stole << $data_weapons[item.to_i] if rand(1000) < (steal_rate * 10).to_i
      elsif item[0] == 'g' and not ext == 'ITEM'
        item = item.join
        item.slice!('g')
        @item_stole << item.to_i if rand(1000) < (steal_rate * 10).to_i
      end
    end
    return false if @item_stole == []
    self.steal_attempt = 0
    @stole_item_index = rand(@item_stole.size)
    @item_to_steal = @item_stole[@stole_item_index]
    if Multi_Steal
      self.steal_items.delete_at(@stole_item_index)
    else
      self.steal_items = []
    end
    return @item_to_steal
  end
  #--------------------------------------------------------------------------
  # * Make Action
  #--------------------------------------------------------------------------
  def make_action
    self.current_action.clear
    return unless self.movable?
    available_actions = []
    rating_max = 0
    for action in self.actions
      n = get_battle_turn
      a = action.condition_turn_a
      b = action.condition_turn_b
      next if (b == 0 and n != a) or (b > 0 and (n < 1 or n < a or n % b != a % b))
      next if self.hp * 100.0 / self.maxhp > action.condition_hp
      next if $game_party.max_level < action.condition_level
      switch_id = action.condition_switch_id
      next if switch_id > 0 and $game_switches[switch_id] == false
      next if action.kind == 1 and not skill_can_use?(action.skill_id) and Enemy_Dont_Skip_Action
      available_actions.push << action
      rating_max = [rating_max, action.rating].max
    end
    ratings_total = 0
    for action in available_actions
      ratings_total += action.rating - (rating_max - 3)  if action.rating > rating_max - 3
    end
    if ratings_total > 0
      value = rand(ratings_total)
      for action in available_actions
        if action.rating > rating_max - 3
          if value < action.rating - (rating_max - 3)
            self.current_action.kind = action.kind
            self.current_action.basic = action.basic
            self.current_action.skill_id = action.skill_id
            self.current_action.decide_random_target_for_enemy
            return
          else
            value -= action.rating - (rating_max - 3)
          end
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Get Battle Turn
  #--------------------------------------------------------------------------
  def get_battle_turn
    return $game_temp.battle_turn
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen X-Coordinate
  #--------------------------------------------------------------------------
  def screen_x
    return $data_troops[@troop_id].members[@member_index].x + Enemy_Position_AdjustX
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen Y-Coordinate
  #--------------------------------------------------------------------------
  def screen_y
    return $data_troops[@troop_id].members[@member_index].y + Enemy_Position_AdjustY
  end
  #--------------------------------------------------------------------------
  # * Get Battle Screen Z-Coordinate
  #--------------------------------------------------------------------------
  def screen_z
    return screen_y
  end
end
11
Oh I see.
Well, thank you really much for your help so far, It would took me much longer without you.
However, I request not to close this topic or mark this is resolved since Im still stuck with some issues.
Maybe some folks here by chance have a solution. And Im also going make some tests which will take some time. If I have the solution, then Im going to post it here.
12
Thanks, it worked again. I know that Im killing your nerves right now, but I've one final issue where I am stuck.
Its regarding the Battle Camera addon. It basically installs a camera that zooms in and out during certain actions. Almost everything with that works except for some issues.
I wanted to check if your added adjusts work with the Battle Camera addon since Im using it in my project anyway, but even before I can do that theres a problem. Because even If I dont use adjust or center command, the animations such as status animations on battlers like poison and things like timemeter from the ATB addon "slide" when the game zooms in and out which is wrong and kinda looks odd. The animations and the timemeter are not fixed in their position which they should be, they slide when the game zooms.
The Timemeter bar is from the Atoa ATB - also one of his addons.
If you dont know what I mean, I've prepared a picture.
Spoiler: ShowHide


Do you have a solution for that?
Thanks. For everything.
Koktengri.

I can't post Atoas ATB because its too long. So this is a direct link then:
https://workupload.com/file/ZkpZ4CJ


#==============================================================================
# Battle Camera
# by Atoa
#==============================================================================
# This script allow you to add an camera movement and zoom system
# during battle
#
# Don't work with the Add-On 'Chrono Trigger Battle'
#==============================================================================

module Atoa
 
  # Do not remove these lines
  Zoom_Actions = {}
  Zoom_Skills = {}
  Zoom_Items = {}
  Zoom_Weapons = {}
  # Do not remove these lines
 
  # Add zoom effect to target arrows?
  Arrow_Zoom = false
 
  # Add zoom effect to damage exhibition?
  Damage_Zoom = false
 
  # Zoom transition speed, the lower, the faster
  Zoom_Speed = 10.0
 
  #=============================================================================
  # Basic Camera Movement Settings
  #=============================================================================
  # Here you can set the default movement and zoom settings
  # These settings are applied to *all* actions of an set type, unless it
  # has it's own settings
  #
  # Zoom_Actions['Condition'] = ['Type', intensity, adjust x, adjust y]
  #
  # 'Condition' = Condition that the zoom will be applied
  #    Must be one of the following values:
  #    'reset' = Default Setting, uConfiguração padrão, usado quando nenhuma ação está sendo feita.
  #    'active_battler' = used during the actor action selection
  #    'select_ally' = used during the selection of single target actor
  #    'select_enemy' = used during the selection of single target enemy
  #    'select_self' = used during the selection of user
  #    'select_all_allies' = used during the selection of all allies
  #    'select_all_enemies' = used during the selection of all enemies
  #    'select_all_battlers' = used during the selection of all battlers
  #    'action_active' = used during the battler action start
  #    'action_ally' = used during actions wich the target is a single ally
  #    'action_enemy' = used during actions wich the target is a single enemy
  #    'action_self' = used during action wich the target is the user
  #    'action_all_allies' = used during action wich the targets are all allies
  #    'action_all_enemies' = used during action wich the targets are all enemies
  #    'action_all_battlers' = used during action wich the targets are all battlers
  #    'intro_lock_on' = used during the battle intro, centering the camera on an battler
  #    'victory_lock_on' = used during the battle end, centering the camera on an battler
  #
  # 'Type' = type of zoom applied
  #    Must be one of the following value:
  #    'lock_on_screen' = center the move on the screen
  #    'lock_on_group' = center the move on the group (allies on enemies) depending
  #       on the action
  #    'lock_on_battler' = center the move on the battler, using as reference the
  #       "base" of the battler, don't following him during jumps or lauchs.
  #    'lock_on_move' = center the move on the battler, following all movements.
  #
  # intensity = zoom intensity. Numeric value, can be decilams. Defualt = 1.0
  #    if the value is 1.0, the camera returns to the original size
  #    values lower than 1.0 reduces the sprites size, causing an zoom out.
  #    values higher than 1.0 increases the sprites size, causing an zoom in.
  #
  # adjust x = camera movement X position adjust
  # adjust y = camera movement Y position adjust
  #
  # IMPORTANTE: Don't remove any of these settings.
  # If you don't want that an zoom effect to be used, change the valoe of the
  # setting to: Zoom_Actions['type'] = nil
 
  Zoom_Actions['reset'] = ['lock_on_screen', 1.0, 0, 0]
  Zoom_Actions['active_battler'] = ['lock_on_battler', 1, 0, 0]
  Zoom_Actions['select_ally'] = ['lock_on_battler', 1.2, 0, 0]
  Zoom_Actions['select_enemy'] = ['lock_on_battler', 1.2, 0, 0]
  Zoom_Actions['select_self'] = ['lock_on_battler', 1.5, 0, 0]   #eig 1.5
  Zoom_Actions['select_all_allies'] = ['lock_on_group', 0.8, 0, 0]
  Zoom_Actions['select_all_enemies'] = ['lock_on_group', 0.8, 0, 0]
  Zoom_Actions['select_all_battlers'] = ['lock_on_screen', 0.7, 0, 0]
  Zoom_Actions['action_active'] = ['lock_on_battler', 1.1, 0, 0]
  Zoom_Actions['action_ally'] = ['lock_on_battler', 1.1, 0, 0]
  Zoom_Actions['action_enemy'] = ['lock_on_battler', 1.1, 0, 0]
  Zoom_Actions['action_self'] = ['lock_on_battler', 1.5, 0, 0]
  Zoom_Actions['action_all_allies'] = ['lock_on_group', 0.8, 0, 0]
  Zoom_Actions['action_all_enemies'] = ['lock_on_group', 0.8, 0, 0]
  Zoom_Actions['action_all_battlers'] = ['lock_on_screen', 0.7, 0, 0]
  Zoom_Actions['intro_lock_on'] = nil
  Zoom_Actions['victory_lock_on'] = nil
 
  # OBS.: the options 'intro_lock_on' and 'victory_lock_on', if used together with
  #   the "Battle Cry" functions, will make the camera center on the battler
  #   selected to execute the battle cry, otherwise the battler will be random.
  #   You can use 'Script Calls' to specify one battler to be the target or
  #   cancel this effect for the next battle.
  #
  #   Lock the camera on the battle intro on the actor with ID = X
  #   $game_temp.lock_actor_intro = X
  #
  #   Lock the camera on the battle end on the actor with ID = X
  #   $game_temp.lock_actor_victory = X
  #
  #   Lock the camera on the battle intro on the actor with INDEX = X
  #   $game_temp.lock_enemy_intro = X
  #
  #   Travar movimento de câmera  de vitória no inimigo de INDEX igual a X
  #   $game_temp.lock_enemy_victory = X
  #
  #  OBS.: for enemies, the value are NOT the enemy ID, it's the INDEX.
  #   the value according to his position on the Enemy Troop
  #
  #  Cancel the battle intro camera movement
  #   $game_temp.no_intro_lock = true
  #
  #  Cancel the battle end camera movement
  #   $game_temp.no_victory_lock = true

  #=============================================================================

  #=============================================================================
  # Specific Camera Movement Settings
  #=============================================================================
  # Here you can set specific camera movement for each action.
  # The values here igonres the settings of the basic settings.
  # You only need to add the values that will be changed, for the values not added
  # the default values will be used
  #
  # Zoom_Skills[ID da Skill] = { 'Condition' => ['Type', intensity, adjust x, adjust y] }
  # Zoom_Items[ID da Skill] = { 'Condition' => ['Type', intensity, adjust x, adjust y] }
  # Zoom_Weapons[ID da Skill] = { 'Condition' => ['Type', intensity, adjust x, adjust y] }
 
 
  Zoom_Skills[57] = {'action_active'=> ['lock_on_battler', 2.0, 0, 0],
                      'action_enemy' => ['lock_on_battler', 2.0, 0, 0]}
  Zoom_Skills[126] = {'action_active'=> ['lock_on_battler', 2.0, 0, -48],
                       'action_enemy' => ['lock_on_move', 2.0, 0, -48]}
  Zoom_Skills[127] = {'action_active'=> ['lock_on_battler', 2.0, 0, -48],
                       'action_enemy' => ['lock_on_move', 2.0, 0, -48]}
  Zoom_Skills[128] = {'action_active'=> ['lock_on_battler', 2.0, 0, -48],
                       'action_enemy' => ['lock_on_move', 2.0, 0, -48]}
                       
  Zoom_Weapons[17] = {'action_active'=> nil}
  Zoom_Weapons[18] = {'action_active'=> nil}
  Zoom_Weapons[19] = {'action_active'=> nil}
  Zoom_Weapons[20] = {'action_active'=> nil}
  Zoom_Weapons[21] = {'action_active'=> nil}
  Zoom_Weapons[22] = {'action_active'=> nil}
  Zoom_Weapons[23] = {'action_active'=> nil}
                       
  #=============================================================================

  #=============================================================================
  # Settings for Camera Movement Priority
  #=============================================================================
  # To avoid tha certain camera movements cancel other movements that
  # you might consider more important, this settings was added.
  # Effects with values higher or equal to the current effect overlaps it.
  # If the value is lower, the current movement effect isn't applied
  Zoom_Priority = {
    'reset' => 10,
    'active_battler' => 4,
    'select_ally' => 5,
    'select_enemy' => 5,
    'select_self' => 8,
    'select_all_allies' => 6,
    'select_all_enemies' => 6,
    'select_all_battlers' => 6,
    'action_active' => 1,
    'action_ally' => 2,
    'action_enemy' => 2,
    'action_self' => 5,
    'action_all_allies' => 3,
    'action_all_enemies' => 3,
    'action_all_battlers' => 3,
    'intro_lock_on' => 7,
    'victory_lock_on' => 7
  }

end
 
#==============================================================================
# ** Atoa Module
#==============================================================================
$atoa_script = {} if $atoa_script.nil?
$atoa_script['Atoa Battle Camera'] = true

#==============================================================================
# ** RPG::Sprite
#------------------------------------------------------------------------------
# Class that manages Sprites exhibition
#==============================================================================

class RPG::Sprite < ::Sprite
  #--------------------------------------------------------------------------
  # * Set animation frame info
  #     sprite      : animation sprite
  #     cell_data   : cell info
  #     index       : index
  #     anim_mirror : invert animation
  #--------------------------------------------------------------------------
  def set_sprite_cell_data(sprite, cell_data, index, anim_mirror = false)
    sprite.x += (anim_mirror ? - cell_data[index, 1] : cell_data[index, 1])  * $game_temp.temp_zoom_value
    sprite.y += cell_data[index, 2] * $game_temp.temp_zoom_value
    sprite.zoom_x = (cell_data[index, 3] / 100.0) * $game_temp.temp_zoom_value
    sprite.zoom_y = (cell_data[index, 3] / 100.0) * $game_temp.temp_zoom_value
    sprite.angle = cell_data[index, 4]
    sprite.mirror = (cell_data[index, 5] == 1)
    sprite.opacity = cell_data[index, 6] * self.opacity / 255.0
    sprite.blend_type = cell_data[index, 7]
  end 
end

#==============================================================================
# ** Object
#------------------------------------------------------------------------------
# Superclass of all other classes.
#==============================================================================

class Object
  #--------------------------------------------------------------------------
  # * Adjust position X according to the Zoom
  #     value : adjust value
  #--------------------------------------------------------------------------
  def adjust_x_to_zoom(value)
    return (value * $game_temp.temp_zoom_value) + $game_temp.temp_zoom_adj_x - ($game_temp.center_adj_x / 2)
  end
  #-------------------Y according to the Zoom
  #     value : adjust value
  #--------------------------------------------------------------------------
  def adjust_y_to_zoom(value)
    return (value * $game_temp.temp_zoom_value) + $game_temp.temp_zoom_adj_y - ($game_temp.center_adj_y / 2)
  end
end

#==============================================================================
# ** Sprite_Damage
#------------------------------------------------------------------------------
# Classe que gerencia a exibição de dano
#==============================================================================

class Sprite_Damage < Sprite
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     sprite   : damage sprite
  #     init_x   : initial X postion
  #     init_y   : initial Y position
  #     duration : damage duration
  #     mirror   : invert movement
  #     index    : index
  #--------------------------------------------------------------------------
  alias initialize_zoom initialize
  def initialize(sprite, init_x, init_y, duration, mirror, index)
    initialize_zoom(sprite, init_x, init_y, duration, mirror, index)
    adj_x = Damage_Zoom ? sprite.x - index *  Dmg_Space : sprite.x
    @sprite_x = (adj_x - $game_temp.temp_zoom_adj_x + ($game_temp.center_adj_x / 2)) / $game_temp.temp_zoom_value
    @sprite_y = (sprite.y - $game_temp.temp_zoom_adj_y + ($game_temp.center_adj_y / 2)) / $game_temp.temp_zoom_value
    self.zoom_x = $game_temp.temp_zoom_value if Damage_Zoom
    self.zoom_y = $game_temp.temp_zoom_value if Damage_Zoom
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias update_zoom update
  def update
    update_zoom
    unless self.nil? or self.disposed?
      self.zoom_x = $game_temp.temp_zoom_value if Damage_Zoom
      self.zoom_y = $game_temp.temp_zoom_value if Damage_Zoom
      adj_x = Damage_Zoom ? @sprite_x + @index * Dmg_Space : @sprite_x
      self.x = adjust_x_to_zoom(adj_x)
      self.y = adjust_y_to_zoom(@sprite_y)
    end
  end
end

#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
#  Refer to "$game_temp" for the instance of this class.
#==============================================================================

class Game_Temp
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :zoom_value
  attr_accessor :zoom_adj_x
  attr_accessor :zoom_adj_y
  attr_accessor :temp_zoom_value
  attr_accessor :temp_zoom_adj_x
  attr_accessor :temp_zoom_adj_y
  attr_accessor :center_adj_x
  attr_accessor :center_adj_y
  attr_accessor :zoom_plus_x
  attr_accessor :zoom_plus_y
  attr_accessor :zoom_plus_z
  attr_accessor :lock_actor_intro
  attr_accessor :lock_enemy_intro
  attr_accessor :lock_actor_victory
  attr_accessor :lock_enemy_victory
  attr_accessor :no_intro_lock
  attr_accessor :no_victory_lock
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias initialize_zoom initialize
  def initialize
    @zoom_value = 1.0
    @zoom_adj_x = 0
    @zoom_adj_y = 0
    @temp_zoom_value = 1.0
    @temp_zoom_adj_x = 0
    @temp_zoom_adj_y = 0
    @center_adj_x = 0
    @center_adj_y = 0
    @zoom_plus_x = 0
    @zoom_plus_y = 0
    @zoom_plus_z = 0
    initialize_zoom
  end
end

#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  This class brings together battle screen sprites. It's used within
#  the Scene_Battle class.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :zoom_value
  attr_accessor :zoom_adj_x
  attr_accessor :zoom_adj_y
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias initialize_zoom initialize
  def initialize
    @zoom_value = $game_temp.zoom_value
    @zoom_adj_x = $game_temp.zoom_adj_x
    @zoom_adj_y = $game_temp.zoom_adj_y
    $game_temp.zoom_value = 1.0
    $game_temp.zoom_adj_x = 0
    $game_temp.zoom_adj_y = 0
    initialize_zoom
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias update_zoom update
  def update
    zoom_update
    update_zoom
  end
  #--------------------------------------------------------------------------
  # * Update Zoom
  #--------------------------------------------------------------------------
  def zoom_update
    update_zoom_value
    @battleback_sprite.zoom_x = @zoom_value
    @battleback_sprite.zoom_y = @zoom_value
    @battleback_sprite.x = @zoom_adj_x - ($game_temp.center_adj_x / 2)
    @battleback_sprite.y = @zoom_adj_y - ($game_temp.center_adj_y / 2)
    if @panorama != nil
      @panorama.zoom_x = @zoom_value
      @panorama.zoom_y = @zoom_value
      @panorama.x = @zoom_adj_x - ($game_temp.center_adj_x / 2)
      @panorama.y = @zoom_adj_y - ($game_temp.center_adj_y / 2)
    end
    if @fog != nil
      @fog.zoom_x = $game_map.fog_zoom *  @zoom_value / 100.0
      @fog.zoom_y = $game_map.fog_zoom *  @zoom_value / 100.0
      @fog.x = @zoom_adj_x - ($game_temp.center_adj_x / 2)
      @fog.y = @zoom_adj_y - ($game_temp.center_adj_y / 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Update zoom values
  #--------------------------------------------------------------------------
  def update_zoom_value
    if @zoom_value < $game_temp.zoom_value
      @zoom_value = [@zoom_value + $game_temp.zoom_plus_z, $game_temp.zoom_value].min
    elsif @zoom_value > $game_temp.zoom_value
      @zoom_value = [@zoom_value - $game_temp.zoom_plus_z, $game_temp.zoom_value].max
    end
    if @zoom_adj_x < $game_temp.zoom_adj_x
      @zoom_adj_x = [@zoom_adj_x + $game_temp.zoom_plus_x, $game_temp.zoom_adj_x].min
    elsif @zoom_adj_x > $game_temp.zoom_adj_x
      @zoom_adj_x = [@zoom_adj_x - $game_temp.zoom_plus_x, $game_temp.zoom_adj_x].max
    end
    if @zoom_adj_y < $game_temp.zoom_adj_y
      @zoom_adj_y = [@zoom_adj_y + $game_temp.zoom_plus_y, $game_temp.zoom_adj_y].min
    elsif @zoom_adj_y > $game_temp.zoom_adj_y
      @zoom_adj_y = [@zoom_adj_y - $game_temp.zoom_plus_y, $game_temp.zoom_adj_y].max
    end
    $game_temp.temp_zoom_value = @zoom_value
    $game_temp.temp_zoom_adj_x = @zoom_adj_x
    $game_temp.temp_zoom_adj_y = @zoom_adj_y
    $game_temp.center_adj_x = 640 * (@zoom_value - 1.0)
    $game_temp.center_adj_y = 560 * (@zoom_value - 1.0)
  end
  #--------------------------------------------------------------------------
  # * Battleback update
  #--------------------------------------------------------------------------
  alias update_battleback_zoom update_battleback
  def update_battleback
    update_battleback_zoom
    if @battleback_sprite.bitmap != nil
      @battleback_sprite.ox = (@battleback_width  - 640) / 2
      @battleback_sprite.oy = (@battleback_height - 480) / 2
    end
  end
end

#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
#  This sprite is used to display the battler.It observes the Game_Character
#  class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Battler < RPG::Sprite
  #--------------------------------------------------------------------------
  # * Battler position update
  #--------------------------------------------------------------------------
  alias update_position_zoom update_position
  def update_position
    self.zoom_x = $game_temp.temp_zoom_value
    self.zoom_y = $game_temp.temp_zoom_value
    update_position_zoom
    if @shadow != nil
      @shadow.x = adjust_x_to_zoom(@battler.actual_x)
      @shadow.y = adjust_y_to_zoom(@battler.actual_y)
      @shadow.zoom_x = (@frame_width * 0.5 / @shadow.bitmap.width) * $game_temp.temp_zoom_value
      @shadow.zoom_y = $game_temp.temp_zoom_value
    end
  end
  #--------------------------------------------------------------------------
  # * Get battler real X postion
  #--------------------------------------------------------------------------
  def actual_x_position
    return adjust_x_to_zoom(@actual_x + set_adjust[0])
  end
  #--------------------------------------------------------------------------
  # * Get battler real Y postion
  #--------------------------------------------------------------------------
  def actual_y_position
    return adjust_y_to_zoom(@actual_y + set_adjust[1])
  end
end

#==============================================================================
# ** Throw_Sprite
#------------------------------------------------------------------------------
#  This sprite is used to display throw animations.
#==============================================================================

class Throw_Sprite < RPG::Sprite
  #--------------------------------------------------------------------------
  # * Current position update
  #--------------------------------------------------------------------------
  def update_current_position
    self.x = adjust_x_to_zoom(@actual_x)
    actual_y = adjust_y_to_zoom(@actual_y)
    arc_ajdust = (@arc_ajdust * $game_temp.temp_zoom_value).to_i
    if @boomerang
      self.y = [actual_y + arc_ajdust, actual_y].max
    else
      self.y = [actual_y - arc_ajdust, actual_y].min
    end
    self.z = self.y + 100
    self.zoom_x = $game_temp.temp_zoom_value
    self.zoom_y = $game_temp.temp_zoom_value
  end
end

#==============================================================================
# ** Arrow_Enemy
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose enemies. This class inherits from the
#  Arrow_Base class.
#==============================================================================

class Arrow_Enemy < Arrow_Base
  #--------------------------------------------------------------------------
  # * Update cursor position
  #--------------------------------------------------------------------------
  def update_arrows
    self.x = adjust_x_to_zoom(self.enemy.actual_x)
    self.y = adjust_y_to_zoom(self.enemy.actual_y)
    self.zoom_x = $game_temp.temp_zoom_value if Arrow_Zoom
    self.zoom_y = $game_temp.temp_zoom_value if Arrow_Zoom
  end
end

#==============================================================================
# ** Arrow_Actor
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose an actor. This class inherits from the
#  Arrow_Base class.
#==============================================================================

class Arrow_Actor < Arrow_Base
  #--------------------------------------------------------------------------
  # * Update cursor position
  #--------------------------------------------------------------------------
  def update_arrows
    self.x = adjust_x_to_zoom(self.actor.actual_x)
    self.y = adjust_y_to_zoom(self.actor.actual_y)
    self.zoom_x = $game_temp.temp_zoom_value if Arrow_Zoom
    self.zoom_y = $game_temp.temp_zoom_value if Arrow_Zoom
  end
end

#==============================================================================
# ** Arrow_Self
#------------------------------------------------------------------------------
# This arrow cursor is used to choose the user.
#==============================================================================

class Arrow_Self < Arrow_Base
  #--------------------------------------------------------------------------
  # * Update cursor position
  #--------------------------------------------------------------------------
  def update_arrows
    self.x = adjust_x_to_zoom(self.actor.actual_x)
    self.y = adjust_y_to_zoom(self.actor.actual_y)
    self.zoom_x = $game_temp.temp_zoom_value if Arrow_Zoom
    self.zoom_y = $game_temp.temp_zoom_value if Arrow_Zoom
  end
end

#==============================================================================
# ** Arrow_Actor_All
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose all actors.
#==============================================================================

class Arrow_Actor_All < Arrow_Base
  #--------------------------------------------------------------------------
  # * Update cursor position
  #     index : index
  #--------------------------------------------------------------------------
  def update_arrows(index)
    @arrows[index].x = adjust_x_to_zoom(@arrows[index].actor.actual_x)
    @arrows[index].y = adjust_y_to_zoom(@arrows[index].actor.actual_y)
    @arrows[index].zoom_x = $game_temp.temp_zoom_value if Arrow_Zoom
    @arrows[index].zoom_y = $game_temp.temp_zoom_value if Arrow_Zoom
  end
end

#==============================================================================
# ** Arrow_Enemy_All
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose all enemies.
#==============================================================================

class Arrow_Enemy_All < Arrow_Base
  #--------------------------------------------------------------------------
  # * Update cursor position
  #     index : index
  #--------------------------------------------------------------------------
  def update_arrows(index)
    @arrows[index].x = adjust_x_to_zoom(@arrows[index].enemy.actual_x)
    @arrows[index].y = adjust_y_to_zoom(@arrows[index].enemy.actual_y)
    @arrows[index].zoom_x = $game_temp.temp_zoom_value if Arrow_Zoom
    @arrows[index].zoom_y = $game_temp.temp_zoom_value if Arrow_Zoom
  end
end

#==============================================================================
# ** Arrow_Battler_All
#------------------------------------------------------------------------------
#  This arrow cursor is used to choose all battlers.
#==============================================================================

class Arrow_Battler_All < Arrow_Base
  #--------------------------------------------------------------------------
  # * Update cursor position for actors
  #     index : index
  #--------------------------------------------------------------------------
  def update_arrows_actor(index)
    @arrows[index].x = adjust_x_to_zoom(@arrows[index].actor.actual_x)
    @arrows[index].y = adjust_y_to_zoom(@arrows[index].actor.actual_y)
    @arrows[index].zoom_x = $game_temp.temp_zoom_value if Arrow_Zoom
    @arrows[index].zoom_y = $game_temp.temp_zoom_value if Arrow_Zoom
    @arrows[index].z = 3000
  end
  #--------------------------------------------------------------------------
  # * Update cursor position for enemies
  #     index : index
  #--------------------------------------------------------------------------
  def update_arrows_enemy(index)
    @arrows[index].x = adjust_x_to_zoom(@arrows[index].enemy.actual_x)
    @arrows[index].y = adjust_y_to_zoom(@arrows[index].enemy.actual_y)
    @arrows[index].zoom_x = $game_temp.temp_zoom_value if Arrow_Zoom
    @arrows[index].zoom_y = $game_temp.temp_zoom_value if Arrow_Zoom
  end
end

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass for the Game_Actor
#  and Game_Enemy classes.
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :sprite_x
  attr_accessor :sprite_y
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias initialize_zoom initialize
  def initialize
    initialize_zoom
    @sprite_x = 0
    @sprite_y = 0
  end
  #--------------------------------------------------------------------------
  # * Set target center action
  #--------------------------------------------------------------------------
  def action_target_center
    @target_x = $scene.spriteset.battleback_width / 2
    @target_y = $scene.spriteset.battleback_height / 2
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias terminate_zoom terminate
  def terminate
    terminate_zoom
    $game_temp.zoom_value = 1.0
    $game_temp.zoom_adj_x = 0
    $game_temp.zoom_adj_y = 0
  end
  #--------------------------------------------------------------------------
  # * Set intro battlecry
  #--------------------------------------------------------------------------
  alias set_intro_battlecry_zoom set_intro_battlecry
  def set_intro_battlecry
    @zoom_postion_adj = [0, 0]
    set_zoom_postion('reset')
    set_intro_battlecry_zoom
    if Zoom_Actions['intro_lock_on'] != nil and not $game_temp.no_intro_lock
      actors = []
      battler_zoom = nil
      for i in 0...$game_party.actors.size
        actors << $game_party.actors[i] unless $game_party.actors[i].restriction == 4
      end
      actor = actors[rand(actors.size)]
      battler_zoom = actor if actor != nil
      if @intro_battlercry_battler != nil
        battler_zoom = @intro_battlercry_battler
      end
      if $game_temp.lock_enemy_intro != nil
        enemy = $game_troop.enemies[$game_temp.lock_enemy_intro]
        battler_zoom = enemy if enemy != nil and enemy.exist?
      end
      if $game_temp.lock_actor_intro != nil
        battler = $game_actors[$game_temp.lock_actor_intro]
        battler_zoom = battler if battler != nil and $game_party.actors.include?(battler) and not battler.restriction == 4
      end
      set_zoom_postion('intro_lock_on', battler_zoom, battler_zoom) if battler_zoom != nil
    end
    update_graphics
    @spriteset.zoom_value = $game_temp.zoom_value
    @spriteset.zoom_adj_x = $game_temp.zoom_adj_x
    @spriteset.zoom_adj_y = $game_temp.zoom_adj_y
    update_graphics
  end
  #--------------------------------------------------------------------------
  # * Set allies victory battlecry
  #--------------------------------------------------------------------------
  alias set_victory_battlecry_zoom set_victory_battlecry
  def set_victory_battlecry
    set_zoom_postion('reset')
    set_victory_battlecry_zoom
    if Zoom_Actions['victory_lock_on'] != nil and not $game_temp.no_victory_lock
      battler_zoom = nil
      battler_zoom = @last_active_actor if @last_active_actor != nil
      battler_zoom = @victory_battlercry_battler if @victory_battlercry_battler != nil
      if $game_temp.lock_actor_victory != nil
        battler = $game_actors[$game_temp.lock_actor_victory]
        battler_zoom = battler if battler != nil and $game_party.actors.include?(battler) and not battler.restriction == 4
      end
      set_zoom_postion('victory_lock_on', battler_zoom, battler_zoom) if battler_zoom != nil
    end
  end
  #--------------------------------------------------------------------------
  # * Set Victory battlecry for enemies
  #--------------------------------------------------------------------------
  alias set_enemy_victory_battlecry_zoom set_enemy_victory_battlecry
  def set_enemy_victory_battlecry
    set_zoom_postion('reset')
    set_enemy_victory_battlecry_zoom
    if Zoom_Actions['victory_lock_on'] != nil and not $game_temp.no_victory_lock
      battler_zoom = nil
      battler_zoom = @last_active_enemy if @last_active_enemy != nil
      battler_zoom = @victory_battlercry_enemy if @victory_battlercry_enemy != nil
      if $game_temp.lock_enemy_victory != nil
        battler = $game_troop.enemies[$game_temp.lock_enemy_victory]
        battler_zoom = battler if battler != nil and battler.exist? and
            $game_troop.enemies.include?(battler) and not battler.restriction == 4
      end
      set_zoom_postion('victory_lock_on', battler_zoom, battler_zoom) if battler_zoom != nil
    end
  end
  #--------------------------------------------------------------------------
  # * Battle Ends
  #     result : results (0:win 1:escape 2:lose 3:abort)
  #--------------------------------------------------------------------------
  alias battle_end_zoom battle_end
  def battle_end(result)
    battle_end_zoom(result)
    $game_temp.lock_actor_intro = nil
    $game_temp.lock_enemy_intro = nil
    $game_temp.lock_actor_victory = nil
    $game_temp.lock_enemy_victory = nil
    $game_temp.no_intro_lock = nil
    $game_temp.no_victory_lock = nil
  end
  #--------------------------------------------------------------------------
  # * Start Party Command Phase
  #--------------------------------------------------------------------------
  alias start_phase2_zoom start_phase2
  def start_phase2
    start_phase2_zoom
    set_zoom_postion('reset') unless $atoa_script['Atoa ATB'] or $atoa_script['Atoa CTB']
  end
  #--------------------------------------------------------------------------
  # * Start Main Phase
  #--------------------------------------------------------------------------
  alias start_phase4_zoom start_phase4
  def start_phase4
    start_phase4_zoom
    set_zoom_postion('reset')
  end 
  #--------------------------------------------------------------------------
  # * Update Graphics
  #--------------------------------------------------------------------------
  alias update_graphics_zoom update_graphics
  def update_graphics
    update_graphics_zoom
    update_zoom
  end
  #--------------------------------------------------------------------------
  # * Update ATB
  #--------------------------------------------------------------------------
  alias atb_update_zoom atb_update if $atoa_script['Atoa ATB']
  def atb_update
    if @active_battler.nil? and @input_battler.nil? and @active_battlers.empty? and
       @input_battlers.empty?
      set_zoom_postion('reset')
    end
    atb_update_zoom
  end
  #--------------------------------------------------------------------------
  # * Update CTB
  #--------------------------------------------------------------------------
  alias ctb_update_zoom ctb_update if $atoa_script['Atoa CTB']
  def ctb_update
    if @active_battler.nil? and @input_battler.nil? and @active_battlers.empty? and
       @input_battlers.empty?
      set_zoom_postion('reset')
    end
    ctb_update_zoom
  end
  #--------------------------------------------------------------------------
  # * Update zoom
  #--------------------------------------------------------------------------
  def update_zoom
    plus_x = @zoom_postion_adj[0]
    plus_y = @zoom_postion_adj[1]
    zoom_spd = @zoom_postion_adj[4].nil? ? Zoom_Speed.to_f : @zoom_postion_adj[4].to_f
    case @zoom_type
    when 'lock_on_battler'
      if @locked_battler != nil
       $game_temp.zoom_value = @zoom_effect
        $game_temp.zoom_adj_x = (320 * $game_temp.zoom_value) - ((@locked_battler.actual_x + plus_x) * $game_temp.zoom_value)
        $game_temp.zoom_adj_y = (240 * $game_temp.zoom_value) - ((@locked_battler.actual_y + plus_y) * $game_temp.zoom_value)
      end
    when 'lock_on_move'
      if @locked_battler != nil
        sprite = @spriteset.battler(@locked_battler)
        $game_temp.zoom_value = @zoom_effect
        $game_temp.zoom_adj_x = (320 * $game_temp.zoom_value) - ((sprite.x + plus_x) * $game_temp.zoom_value)
        $game_temp.zoom_adj_y = (240 * $game_temp.zoom_value) - ((sprite.y + plus_y) * $game_temp.zoom_value)
      end
    when 'lock_on_group'
      party_x = 0
      party_y = 0
      @locked_party = @locked_party.nil? ? (@locked_battler.actor? ? $game_party.actors.dup : $game_troop.enemies.dup) : @locked_party
      for member in @locked_party
        party_x += member.base_x
        party_y += member.base_y
      end
      party_x /= [@locked_party.size, 1].max
      party_y /= [@locked_party.size, 1].max
      $game_temp.zoom_value = @zoom_effect
      $game_temp.zoom_adj_x = (320 * $game_temp.zoom_value) - ((party_x + plus_x) * $game_temp.zoom_value)
      $game_temp.zoom_adj_y = (240 * $game_temp.zoom_value) - ((party_y + plus_y) * $game_temp.zoom_value)
    when 'lock_on_screen'
      $game_temp.zoom_value = @zoom_effect
      $game_temp.zoom_adj_x = plus_x
      $game_temp.zoom_adj_y = plus_y
    end
    max_zoom_x = 640.0 / @spriteset.battleback_width
    max_zoom_y = 480.0 / @spriteset.battleback_height
    $game_temp.zoom_value = [$game_temp.zoom_value, (max_zoom_x > max_zoom_y ? max_zoom_x : max_zoom_y)].max
    max_x = [(@spriteset.battleback_width.to_f * $game_temp.zoom_value) - 640, 0].max
    max_y = [(@spriteset.battleback_height.to_f * $game_temp.zoom_value) - 480, 0].max
    $game_temp.zoom_adj_x = [[$game_temp.zoom_adj_x, - max_x / 2].max, max_x / 2].min
    $game_temp.zoom_adj_y = [[$game_temp.zoom_adj_y, - max_y / 2].max, max_y / 2].min
    if @old_type != @zoom_type or @old_zoom_adj_x != $game_temp.zoom_adj_x or @old_zoom_adj_y != $game_temp.zoom_adj_y
      @old_type = @zoom_type
      @old_zoom_adj_x = $game_temp.zoom_adj_x
      @old_zoom_adj_y = $game_temp.zoom_adj_y
      @min_move = @zoom_type == 'lock_on_battler' ? @min_move + 2.0 : 1.0
      @zoom_adj_z = [(($game_temp.temp_zoom_value - $game_temp.zoom_value) / zoom_spd).abs, 0.01].max
      @zoom_adj_x = [(($game_temp.temp_zoom_adj_x - $game_temp.zoom_adj_x) / zoom_spd).abs, @min_move].max
      @zoom_adj_y = [(($game_temp.temp_zoom_adj_y - $game_temp.zoom_adj_y) / zoom_spd).abs, @min_move].max
    end
    $game_temp.zoom_plus_z = @zoom_adj_z
    $game_temp.zoom_plus_x = @zoom_adj_x
    $game_temp.zoom_plus_y = @zoom_adj_y
    update_sprite_position
  end
  #--------------------------------------------------------------------------
  # * Update sprites position
  #--------------------------------------------------------------------------
  def update_sprite_position
    for battler in $game_party.actors + $game_troop.enemies
      sprite = @spriteset.battler(battler)
      next if sprite.nil? or sprite.disposed?
      battler.sprite_x = sprite.x
      battler.sprite_y = sprite.y
    end
  end
  #--------------------------------------------------------------------------
  # * Set zoom postion
  #     type   : zoom type
  #     target : target position
  #     active : active battler
  #--------------------------------------------------------------------------
  def set_zoom_postion(type, target = nil, active = nil)
    if active != nil and active.now_action != nil
      case active.now_action
      when RPG::Weapon
        if Zoom_Weapons[now_id(active)] != nil and
           Zoom_Weapons[now_id(active)].keys.include?(type)
          zoom_settings(Zoom_Weapons[now_id(active)][type], target)
          return
        end
      when RPG::Skill
        if Zoom_Skills[now_id(active)] != nil and
           Zoom_Skills[now_id(active)].keys.include?(type)
          zoom_settings(Zoom_Skills[now_id(active)][type], target)
          return
        end
      when RPG::Item
        if Zoom_Items[now_id(active)] != nil and
           Zoom_Items[now_id(active)].keys.include?(type)
          zoom_settings(Zoom_Items[now_id(active)][type], target)
          return
        end
      end
    end
    zoom_settings(Zoom_Actions[type], target)
  end
  #--------------------------------------------------------------------------
  # * Set zoom settings
  #     type   : zoom type
  #     target : target position
  #--------------------------------------------------------------------------
  def zoom_settings(type, target)
    return if type.nil?
    return if Zoom_Priority[@zoom_type] != nil and Zoom_Priority[@zoom_type] > Zoom_Priority[type]
    @zoom_type = type[0]
    @zoom_effect = type[1]
    @zoom_postion_adj = [type[2].nil? ? 0.0 : type[2], type[3].nil? ? 0.0 : type[3]]
    if target.nil?
      @locked_battler = nil
      @locked_party = nil
      @min_move = 1.0
      return
    elsif target.is_a?(Game_Battler)
      @locked_battler = target
      @locked_party = nil
      @min_move = (type == 'lock_on_battler' or type == 'lock_on_battler') ? 2.0 : 1.0
      return
    elsif target.is_a?(Array)
      @locked_battler = nil
      @locked_party = target
      @min_move = 1.0
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Actor Command Window Setup
  #--------------------------------------------------------------------------
  alias phase3_setup_command_window_zoom phase3_setup_command_window
  def phase3_setup_command_window
    phase3_setup_command_window_zoom
    set_zoom_postion('active_battler', @active_battler, @active_battler)
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : actor selection)
  #--------------------------------------------------------------------------
  alias update_phase3_actor_select_zoom update_phase3_actor_select
  def update_phase3_actor_select
    set_zoom_postion('select_ally', $game_party.actors[@actor_arrow.index], @active_battler)
    set_zoom_postion('active_battler', @active_battler) if Input.trigger?(Input::B)
    update_phase3_actor_select_zoom
  end
  #--------------------------------------------------------------------------
  # * Frame Updat (actor command phase : enemy selection)
  #--------------------------------------------------------------------------
  alias update_phase3_enemy_select_zoom update_phase3_enemy_select
  def update_phase3_enemy_select
    set_zoom_postion('select_enemy', $game_troop.enemies[@enemy_arrow.index], @active_battler)
    set_zoom_postion('active_battler', @active_battler) if Input.trigger?(Input::B)
    update_phase3_enemy_select_zoom
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : all enemies selection)
  #--------------------------------------------------------------------------
  alias update_phase3_select_all_enemies_zoom update_phase3_select_all_enemies
  def update_phase3_select_all_enemies
    set_zoom_postion('select_all_enemies', $game_troop.enemies, @active_battler)
    set_zoom_postion('active_battler', @active_battler) if Input.trigger?(Input::B)
    update_phase3_select_all_enemies_zoom
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : all actors selection)
  #--------------------------------------------------------------------------
  alias update_phase3_select_all_actors_zoom update_phase3_select_all_actors
  def update_phase3_select_all_actors
    set_zoom_postion('select_all_allies', $game_party.actors, @active_battlerr)
    set_zoom_postion('active_battler', @active_battler) if Input.trigger?(Input::B)
    update_phase3_select_all_actors_zoom
  end
  #--------------------------------------------------------------------------
  # * Frame Update (actor command phase : all battlers selection)
  #--------------------------------------------------------------------------
  alias update_phase3_select_all_battlers_zoom update_phase3_select_all_battlers
  def update_phase3_select_all_battlers
    set_zoom_postion('select_all_battlers', $game_party.actors + $game_troop.enemies, @active_battler)
    set_zoom_postion('active_battler', @active_battler) if Input.trigger?(Input::B)
    update_phase3_select_all_battlers_zoom
  end
  #--------------------------------------------------------------------------
  # * Update battler phase 2 (part 1)
  #     battler : active battler
  #--------------------------------------------------------------------------
  alias step2_part1_zoom step2_part1
  def step2_part1(battler)
    @current_zoom_battler = battler
    step2_part1_zoom(battler)
    set_zoom_postion('action_active', battler, battler)
  end
  #--------------------------------------------------------------------------
  # * Update battler phase 3 (part 2)
  #     battler : active battler
  #--------------------------------------------------------------------------
  alias step3_part2_zoom step3_part2
  def step3_part2(battler)
    camera_targets = set_camera_target(battler)
    set_zoom_postion(camera_targets[0], camera_targets[1], battler)
    step3_part2_zoom(battler)
  end
  #--------------------------------------------------------------------------
  # * Update battler phase 5 (part 4)
  #     battler : active battler
  #--------------------------------------------------------------------------
  alias step5_part4_zoom step5_part4
  def step5_part4(battler)
    step5_part4_zoom(battler)
    set_zoom_postion('reset') if battler == @current_zoom_battler
    @current_zoom_battler = nil
  end
  #--------------------------------------------------------------------------
  # * Combination update battler phase 3 (part 2)
  #     battler : active battler
  #--------------------------------------------------------------------------
  alias combination_step3_part2_zoom combination_step3_part2 if $atoa_script['Atoa Combination']
  def combination_step3_part2(active)
    camera_targets = set_camera_target(active)
    set_zoom_postion(camera_targets[0], camera_targets[1], active)
    combination_step3_part2_zoom(battler)
  end
  #--------------------------------------------------------------------------
  # * Set movement init
  #     battler : battler
  #--------------------------------------------------------------------------
  alias set_move_init_zoom set_move_init
  def set_move_init(battler)
    set_move_init_zoom(battler)
    set_zoom_postion('action_active', battler, battler) if battler.moving?
  end
  #--------------------------------------------------------------------------
  # * Update movement return
  #     battler : battler
  #--------------------------------------------------------------------------
  alias update_move_return_init_zoom update_move_return_init
  def update_move_return_init(battler)
    update_move_return_init_zoom(battler)
    set_zoom_postion('action_active', battler, battler) if battler.moving?
  end
  #--------------------------------------------------------------------------
  # * Set camera position
  #     battler : battler
  #--------------------------------------------------------------------------
  def set_camera_target(battler)
    return ['action_enemy', battler.target_battlers[0]] if battler.now_action.nil?
    ext = check_extension(battler_action(battler), 'TARGET/')
    ext.slice!('TARGET/') unless ext.nil?
    if ext == 'ALLBATTLERS'
      return ['action_all_battlers', battler.target_battlers]
    elsif ext == 'ALLENEMIES' or battler.now_action.scope == 2 or
       (battler.now_action.scope == 1 and
       check_include(battler.now_action, 'RANDOM'))
      return ['action_all_enemies', battler.target_battlers]
    elsif ext == 'ALLALLIES' or battler.now_action.scope == 4 or
       (battler.now_action.scope == 3 and
       check_include(battler.now_action, 'RANDOM'))
      return ['action_all_allies', battler.target_battlers]
    end
    if battler.now_action.scope == 1
      return ['action_enemy', battler.target_battlers[0]]
    elsif battler.now_action.scope == 3
      return ['action_ally', battler.target_battlers[0]]
    elsif battler.now_action.scope == 7
      return ['action_self', battler.target_battlers[0]]
    end
    return ['action_self', battler]
  end
end
13
Thank you so much for helping me. I had time to test your edit. I really did some long compatible tests etc.
And you know what? it worked. It solved the top/down/damage issue.

However, theres one issue, thats remaining.
Im using some addons written by dervvulfman like chanting animations, recovery when defending. I also tested them.

1. Recovery when defending by vvulfman addon works with your edit. No issues with that.
2. ATOA Chanting Battle Animations also by vvulfman works perfectly. It basicially gives one the ability to set animations on users when casting skills.
3. Then there is the last addon that doesnt want to work. Its the ATOA Status Effect Pops script also by VVulfman. It basicially sets messages when statuses are applied like damage spries. For example when someone is poisoned, a message with the text "poison" will appear like a damage sprite. Problem is only, that the script isnt compatible with your edit. It doesnt factors your edit with the damage. If I adjust a damage in the configuration which I need to make, the damage appears far below the character and not in the right position.

btw. the script order is:
main battle scripts
Atoa HP/SP Defending Recovery
Your edit
ATOA Status Effect Pops
ATOA Chanting Battle Animations

As far as I know, its the best variant, i tested around a lot. With that order all scripts except for the status effect pop ups work.

Could you edit the ATOA Status Effect Pops script or your edit so that both are compatible with each other and so that the status effect pop up script will factor the adjust taken on damage?

Heres the script, its free of use:

Thanks,
koktengri.

#==============================================================================
# ** ATOA Status Effect Pops
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.1
#    1-10-2016 (mm/dd/yyyy)
#    RGSS / RPGMaker XP
#
#==============================================================================

#  INTRODUCTION:
#
#  This script creates a new damage pop option for the ATOA ACBS system, now
#  drawing status effect/ailment names along when a character is so effected
#  while in battle.
#
#  Like the original system, graphics for status damage pops are kept within
#  the Graphics\Digits folder. Otherwise, it will draw damage pops using the
#  more traditional draw_text method.
#
#  NOTE: Mix match of graphically rendered and text drawn damage pops is not
#        visually recommended.  Both handle positioning differently.
#
#  This script is an add-on for Atoa's ACBS.
#
#------------------------------------------------------------------------------
#
#  INSTALLATION:
#
#  Paste below Atoa's ACBS system.
#
#  The configurations are explained below.
#
#------------------------------------------------------------------------------
#
#  CONFIGURATION:
#
#  These are going to be quickly explained.  There's not a lot really TO
#  explain about them.
#
#  Basic values:
#
#  * Dmg_State_Max
#    This sets the maximum number of damage pops that will show at one time.
#    I do not recommend going above 3 as it may appear crowded.
#
#  * Dmg_State_X_Adjust
#    Like the Atoa ACBS system, there is an extra X-Position adjustment value
#    you can use.  A setting of 0 should keep it horizontally aligned with all
#    other damage pops of the same style.
#
#  * Dmg_State_Y_Adjust
#    This determines the vertical position of your damage pops, either above
#    or below the ones normally generated.  Negative values are above the
#    default pops while positive will be positioned below. 
#
#  * Dmg_State_Height
#    This sets how much vertical space is between each status damage pop.
#
#  * Dmg_Default_Text
#    This is used when a status damage pop is being generated and no custom
#    status effect name (below) is defined.  If this value is set to true, then
#    it will use the default name in the database.  If set to false, then it
#    will not render the status damage pop.
#
#  * Dmg_State_Skip
#    This allows you to define what status ailments are not to be shown, even
#    if the game is set to permit default status effect names (above).  Just
#    set the IDs of the states in the array.
#
#
#  Extended values:
#
#  * Dmg_State_Pops
#    This is a hash array where you set the name for each status effect to
#    show.  If a graphic of the same name is in the Graphics\Digits folder,
#    it will render that graphic as the damage pop.  Otherwise, it will show
#    this name using default text methods.  If a state pop is being generated
#    and no name is in this hash array, it will either show the default name
#    stored in the database or just 'not' show the pop, depending upon the
#    value set by the Dmg_Default_Text value (above).
#
#  * Dmg_State_Color
#    When a status damage pop is rendered, it is of a custom color.  This
#    array sets the default color in the [red, green, blue] format.  It can
#    be overwritten by individual color settings described below.
#
#  * Dmg_State_Colors
#    This is a hash array where you set the color for each status effect to
#    show.  If no color is defined for a given state, it will use the default
#    color above.
#
#  * Dmg_State_Dur
#    When a status damage pop is rendered, it is to stay on the screen for
#    a set period of time in frames.  This is where you set the number of
#    frames (default = 40).
#
#  * Dmg_State_Durs
#    This is a hash array where you allow some status effect pops to show
#    longer or to vanish quicker than others.  If no value is listed, it will
#    use the default duration as set by the Dmg_State_Dur value above.
#
#
#==============================================================================
#
#  TERMS AND CONDITIONS:
#
#  Free for use, even in commercial games.   And as this script was requested
#  by Noctis, you have to give both of us credit for this script.
#
#==============================================================================

module Atoa
  #----------------------------------------------------------------------------
  Dmg_State_Pops    = {}        # Do Not Touch
  Dmg_State_Colors  = {}        # Do Not Touch
  Dmg_State_Durs    = {}        # Do Not Touch
  #----------------------------------------------------------------------------

  # State Pop Values
  # ---------------------------------------------------------------------------
  # Basis values to set that control the system.
  #
    Dmg_State_Max       = 3     # Max # of State pops (Recommend no more than 3)
    Dmg_State_X_Adjust  = 0     # X position adjustment for State Pops
    Dmg_State_Y_Adjust  = -48   # Y position adjustment for State Pops
    Dmg_State_Height    = 22    # Vertical Space between State Pops
    Dmg_Default_Text    = true  # If true and no damage pop defuned, use default
    Dmg_State_Skip      = [4,5] # Array of states NOT to show pops
   
   
  # State Pop Names
  # ---------------------------------------------------------------------------
  # Renames the damage pops or acts as filenames for graphic pops to show.
  # If a filename, assumes graphic is in the Graphics\Digits folder.
  #
    Dmg_State_Pops[2] = "Slammed"     # Changes stunned state name to Slammed
    Dmg_State_Pops[3] = "POISON"    # Changes venom state name to Poisoned
   

  # State Pop Colors
  # ---------------------------------------------------------------------------
  # Used only with damage pops drawn with the more traditional draw_text
  # method, this sets the color of rendered text.  Not used with graphic
  # image pops.
  #
    Dmg_State_Color     = [128,0,128] # Default color set to dark purple
    # -------------------------------------------------------------------------
    Dmg_State_Colors[2] = [255,0,0]   # Red color for Slammed/Stun state
    Dmg_State_Colors[3] = [0,255,0]   # Green color for Poisoned/Venom state
    Dmg_State_Colors[9] = [255,128,0] # Orange color for Weaken state
 
   
  # State Pop Colors
  # ---------------------------------------------------------------------------
  # Used only with damage pops drawn with the more traditional draw_text
  # method, this sets the color of rendered text.  Not used with graphic
  # image pops.
  #
    Dmg_State_Dur       = 40          # Default state effect duration
    # -------------------------------------------------------------------------
    Dmg_State_Durs[2]   = 60          # 2 second duration for stuns
    Dmg_State_Durs[3]   = 60          # 1 1/2 seconds for venom
   
end



#==============================================================================
# ** Atoa Module
#==============================================================================
$atoa_script = {} if $atoa_script.nil?
$atoa_script['Atoa StatePops'] = true



#==============================================================================
# ** RPG::Sprite
#------------------------------------------------------------------------------
# Class that manages Sprites exhibition
#==============================================================================

class RPG::Sprite < ::Sprite
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias status_pops_damage damage
  #--------------------------------------------------------------------------
  # * Set Damage Pop
  #     value     : Damage value
  #     critical  : Critical flag
  #     sp_damage : SP Damage flag
  #--------------------------------------------------------------------------
  def damage(value, critical, sp_damage = nil)
    # Create temporary damage state array
    temp_dmg_states = []
    # Push new damage states into array
    temp_dmg_states += @battler.state_to_add unless @battler.state_to_add == []
    # Perform the original call
    status_pops_damage(value, critical, sp_damage)
    return if temp_dmg_states == []
    # Take only up to the max number of states to show
    temp_dmg_states = temp_dmg_states[0,Atoa::Dmg_State_Max]
    # Reverse order if drawing above normal damage pop
    temp_dmg_states.reverse if Dmg_State_Y_Adjust < 0
    # Cycle through temporary damage state array
    for i in 0..temp_dmg_states.size-1
      # Get state ID from list
      state_id = temp_dmg_states[i]
      # Skip if the state is a no-show state (no pop)
      next if Atoa::Dmg_State_Skip.include?(state_id)
      # Get height position)
      state_ht = (i * Atoa::Dmg_State_Height) + Dmg_State_Y_Adjust
      # Determine if a valid graphic exists or if text
      test_pop = false
      begin
        testbitmap = RPG::Cache.digits(Atoa::Dmg_State_Pops[state_id])
      rescue
        test_pop = true
      end     
      # Branch if text pop or graphic
      if test_pop == true
        damage_state_pop_texts(i, state_id, state_ht)
      else
        damage_state_pop_graphics(i, state_id, state_ht)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Set State Damage Pop from Graphic
  #     i         : counter index of state in state pops applied
  #     state_id  : actual status ailment ID in database
  #     state_ht  : height position to be drawn in respect to pop
  #--------------------------------------------------------------------------
  def damage_state_pop_graphics(i, state_id, state_ht)
    # Determine last sprite drawn among all damage pops
    newpopsize = @_damage_sprites.size
    # Get duration for individual state
    state_dur = Atoa::Dmg_State_Dur
    if Atoa::Dmg_State_Durs.has_key?(state_id)
      state_dur = Atoa::Dmg_State_Durs[state_id]
    end
    # Grab the actual image from the folder
    bitmap    = RPG::Cache.digits(Atoa::Dmg_State_Pops[state_id])
    # Set sprite number, delay and x/y position
    j         = newpopsize + i
    dmg_delay = Multi_Pop ? i : 1
    x         = Dmg_State_X_Adjust
    y         = state_ht - self.oy / 3
    # Draw the state damage sprite
    damage_state_sprite_drawing(bitmap, state_dur, dmg_delay, j, x, y)
  end
  #--------------------------------------------------------------------------
  # * Set State Damage Pop from Text
  #     i         : counter index of state in state pops applied
  #     state_id  : actual status ailment ID in database
  #     state_ht  : height position to be drawn in respect to pop
  #--------------------------------------------------------------------------
  def damage_state_pop_texts(i, state_id, state_ht)
    # Determine last sprite drawn among all damage pops
    newpopsize = @_damage_sprites.size
    # Get duration for individual state
    state_dur = Atoa::Dmg_State_Dur
    if Atoa::Dmg_State_Durs.has_key?(state_id)
      state_dur = Atoa::Dmg_State_Durs[state_id]
    end
    # Get damage pop string from state ID
    damage_string = Atoa::Dmg_State_Pops[state_id]
    # Either use the default name or exit if no replacement string
    if damage_string.nil?
      if Atoa::Dmg_Default_Text == true
        damage_string = $data_states[state_id].name
      else
        return
      end
    end
    # Get the color for the status damage pop
    state_color = Atoa::Dmg_State_Color
    if Atoa::Dmg_State_Colors.has_key?(state_id)
      state_color = Atoa::Dmg_State_Colors[state_id]
    end
    # Set the color
    pop_damage_color = [state_color[0], state_color[1], state_color[2]]
    # Cycle through individual letters in text
    for k in 0...damage_string.size
      # Obtain letter
      letter = damage_string[k..k]
      # Create new bitmap for letter and draw
      bitmap = Bitmap.new(160, 48)
      bitmap.font.name = Damage_Font
      bitmap.font.size = Dmg_Font_Size
      # Set black font outline and draw outline
      bitmap.font.color.set(0, 0, 0)
      bitmap.draw_text(-1, 12-1,160, 36, letter, 1)
      bitmap.draw_text(+1, 12-1,160, 36, letter, 1)
      bitmap.draw_text(-1, 12+1,160, 36, letter, 1)
      bitmap.draw_text(+1, 12+1,160, 36, letter, 1)
      # Set pop color and draw text
      bitmap.font.color.set(*pop_damage_color)
      bitmap.draw_text(0, 12,160, 36, letter, 1)
      # Set sprite number, delay and x/y position
      j         = newpopsize + k
      dmg_delay = Multi_Pop ? i : 1
      x         = Dmg_State_X_Adjust + 32 + k * Dmg_Space - (damage_string.size * 8)
      y         = state_ht - self.oy / 3
      # Draw the state damage sprite
      damage_state_sprite_drawing(bitmap, state_dur, dmg_delay, j, x, y)
    end
  end
  #--------------------------------------------------------------------------
  # * Set State Damage Pop from Text
  #     bitmap    : bitmap passed into drawn sprite
  #     state_dur : amount of delay adjusted for individual state
  #     delay     : amount of delay adjusted for characters in pop
  #     count     : counter for individual sprite drawn (increases for each)
  #     x         : x-position of damage pop sprite being adjusted
  #     y         : y-position of damage pop sprite being adjusted
  #--------------------------------------------------------------------------
  def damage_state_sprite_drawing(bitmap, state_dur, delay, count, x, y)
  # Change X position if actor (0px) or enemy (left 45px)
x += (@battler.is_a?(Game_Actor)) ? 0 : -99
   
    dmg_delay = Multi_Pop ? i : 1
    dmg_adjust = Damage_Sprite ? 32 : 96
    @_damage_sprites[count] = ::Sprite.new(self.viewport)
    @_damage_sprites[count].bitmap  = bitmap
    @_damage_sprites[count].ox      = dmg_adjust
    @_damage_sprites[count].oy      = 20
    @_damage_sprites[count].x = self.x + Dmg_X_Adjust + x
    @_damage_sprites[count].y = self.y + Dmg_Y_Adjust + y
    @_damage_sprites[count].z = state_dur + 3000 + dmg_delay * 2
    @_damage_sprites[count].opacity = 0         
  end
end
14
Okay, thank you really for helping me, you dont probably know in how much trouble I was...
As for the animation issue, I at least know where the problem is altough i cant fix it.
As for the animation issue. My suggestion would be too make two lines. One that applies for battlers with center and one without.
sprite.y = self.y - self.oy + self.frame_height if position == 2
the line above is the original line.
The line below could fix this I believe
sprite.y = self.y - self.oy + self.frame_height +- self.center_y if position == 2
But I really don know how to check if a battler has a center command or how to make two separate versions. Im not on expert, so Im not gonna rush on things.

But do you know where the source for the damage issue is? So I can also look for solution while you're working on it.

Btw. I checked the version of ATOAS Script in the demo you showed with mine - it is the same. It also had the _name issue.
Thanks, from the bottom of my heart for helping me.
15
My problem is this: First:
The adjust or center settings are not calculated withhin animation that are buttom or top animation. I want that to be fixed or added. T_T. I consider this a bug
By tests which I have done, only the adjust/center settings for middle animations is calculated. I want that to be fixed. Thats my  first problem.
Because when I use a middle skill (And I tested the exact location of the skill) the location of where the skill is exactly at the same points. On both battlers. One who battler is a normal one without any adjust or center command. the other battler does have adjustment and center is a large battler. look at picture two and three.

EDIT: If the adjust or center settings are not calculated can't you add that it will be calculated?
I tried this here:            sprite.y = self.y - self.oy + self.frame_height - self.center_y if position == 2
But if I do that the animation is okay for battlers with the center command, but it doesnt work for battlers without the center command. Any ideas?


Second Problem:
The damage sprite is miles away from my hero character and from the animation. please look at picture one
Please note that both sprites only look the same. The enemy sprite is however different. My hero sprite is usign adjust and center. He doesnt.

Im sorry, it was my fault to use the exact same sprites for both battlers but they're both different.
Im not a beginner in terms of this script. Im using the battle system for months. But im a complete beginner in terms of scripting. I know exactly why Im using such large battlers. The problem is the script itself.

Spoiler: ShowHide

Picture ONE:


Picture two:
My enemy sprite. His battler is not adjusted.


Picture three:
My hero sprite

16
Thanks for your help so far.
I downloaded the Demo from RPG XP.ORG if I remember correctly. Can you tell me where I can get a clear version if mine was corrupted or is outdated?

Okay the animation problem is, lets say: solved to the half, but I really dont understand why the problem only happens if adjust and center term is used. So IT is a bug then. If I dont use them everything seems okay. Even if I use animation who are not below and and when I dont use both terms - everything is cool. I really dont understand why it only happens when using center and adjust. It works when I dont use buttom for animation. And what if I want to use buttom?



The battler was just a template. My battlers are normally greater. I need space because I make the animations of certain attacks thru battlers and not thru animations except for skills like thunder etc.

Another problem is still there. The dmg sprite is a bit apart from the animation. And even if I move the center - damage sprite is always on a certan point which it should not. Normally the damage is on the same point where the animation appears if I remember correctly. However after using center and adjust the animation is a bit apart. Any ideas?
17
Actually it wasnt me who did this but rather victor sants - the creator.
When I was about to post this, I wanted to erase the "_" but forget it to test it before I could upload it. I put it in the folder however.
But it worked.

But my problem is not over yet. Now the real problem is starting to begin. LOL.
Its hard for me to put it into words because my native tongue isnt english so im trying step for step if its okay.
If you look at my battler in the picture 1 (all pictures are at the buttom)- you will notice that he is in the very middle of the picture. Normally they are on the middle at the bototm. I need to do this because I will implement skills and actions for battlers that needs space. This is why hes in the middle. If I do this, in battle he will appear wrongly above the battlefield. Look at Picture two. Btw. dont mind the pink and yellow edges, they are only help for me.
Okay, so in order to counter that and in order to get my character below in the battlefield Victor sants created a Adjust command. With that you can adjust battlers who are not well aligned like my.

Heres an example how the code looks:
Pose_Sprite['%Soldier3'] = {'Base' =>[1,1,200,false], 'Adjust' => [0,220],
    1 =>[1,5,true], 2 =>[1,4,true], 3 =>[1,4,true], 4 =>[1,4,true], 5 =>[1,4,true],
    6 =>[1,4,true], 7 =>[1,2,false], 8 =>[1,4,false], 9 =>[1,4,true], 10 =>[1,4,true],
    11 =>[1,4,true], 12 =>[1,4,true]}

What does the adjust do? here? 0 is the X position adjust, 231 is the Y position adjust. It means that it will skip 220 x positions to get the battler right.
In Picture 3 you can see that it worked and I get my battler right. Dont mind the shadow under my battler. I was just too lazy to delete it. Look at picture 3 please.

Okay, now that the battler is displayed correctly, you will ask me where my problem is, isnt it? Here is where it starts. The funny thing is, as I corrected the display of the battler with the help of the adjust term, the animations and casting animations are postponed - they are displayed wrong. I dont know if the adjust command should do this or if its a bug. So  the adjust command displays the positions for animations skill on the user like cure or casting wrong etc. I dont know why the command is doing it or if its a bug. ALSO: What I also consider a bug or simply wrong is, that the dmg sprite is too much apart from the animation when adjust is used.
So my first question: Can anyone check if adjust should do this or if its a bug? Can anyone check in the script (I think its ACBS | RPG::Sprite) why the animation is displaced alongside the sprite? For all of that see picture 5.

In the script I found another command or term that is helpful in situations like where I am.
It is the center command.
'Center' = Value that sets the sprite "center", used to set the target point for battle animations and throws. By default, the center is based on the frame dimensions, but don't take into consideration the position of the sprite inside the frame If the sprite is on an uncommon position compared to the center (like an flying enemy that stays above the center).

Heres what I did:
Pose_Sprite['%Soldier3'] = {'Base' =>[1,1,200,false], 'Adjust' => [0,220],
    1 =>[1,5,true], 2 =>[1,4,true], 3 =>[1,4,true], 4 =>[1,4,true], 5 =>[1,4,true],
    6 =>[1,4,true], 7 =>[1,2,false], 8 =>[1,4,false], 9 =>[1,4,true], 10 =>[1,4,true],
    11 =>[1,4,true], 12 =>[1,4,true], 'Center' => {'Base' =>[530, 300]}}
I took the center command for 530 X positions and Y Positions. The problem is, that im Sure that the center command is bugged or it conflicts with the adjust command or something like this. BECAUSE: As I change the X positions of the center command, the animation goes right or left in the way I want it. But changing the Y positions wont do anything. I tried using 300, 50, 1, 0. Its always in the same position which it should not. Im 100% that the code is bugged. I dont know what exactly is wrong. Second question: can anyone look at the script and look whats wrong about the term center? Why is the animation not moving along the Y positions despite the fact that I change it?

The main scripts for my problem are found in

ACBS | RPG::Sprite
ACBS | Config 2 - Advanced
ACBS | Sprite Damage

Heres a link to a new demo with the current settings:
https://workupload.com/file/7sSeSdn
Screenshots: ShowHide

PICTURE ONE:


PICTURE TWO


PICTURE THREE

PICTURE FOUR

PICTURE FIVE

18
Hi, Im a RPG XP User and I use the ATOA ACBS (Sideview battlesystem) by Victor Sants aka Atoa.
I've a huge problem.

In the script "ACBS | Config 2 - Advanced" which is part of the battle scripts you can adjust the settings of battlers, like how fast a pose should be, if a pose should be inverted or not.
Okay. so far so good.

The name of my battler is soldier3.
Here are his Settings. Im gonna explain them all.

Pose_Sprite['%Soldier3'] = {'Base' =>[1,1,200,false], 'Adjust' => [0,211],
    1 =>[1,5,true], 2 =>[1,4,true], 3 =>[1,4,true], 4 =>[1,4,true], 5 =>[1,4,true],
    6 =>[1,4,true], 7 =>[1,2,false], 8 =>[1,4,false], 9 =>[1,4,true], 10 =>[1,4,true],
    11 =>[1,4,true], 12 =>[1,4,true], 'Center' => {'Base' =>[0, 50]}}

Pose_Sprite['%Soldier3'] menas its meant for the battler wit hthe name soldier 3.
{'Base' =>[1,1,200,false], = the first number is the maximum number of of horizontal frames and the next one is the maximum number of vertical frames.
200 is the movement speed. false means that the battler will be not inverted.
Adjust is important, it adjusts for battler sprite.
The rest of them are the poses used. For example  1 =>[1,5,true] is the idle pose. it has 1 frames and runs on 5 speed. True means loop. etc.

HERES MY PROBLEM: My problem is the center line. Center sets the sprite "center", used to set the target point
for battle animations and throws. its helpful for example if the sprite is not really in the middle or is an flying enemy or if the battler is a big sprite. I tried to use the line so that animations from enemies hit exactly where my sprite is and not bewlow wich they currently do. because my sprite is big and it needs to be big.
But whenever someone attacks me I get a errorline on Script battle line 418 undefined local variable or method'_ name for sprite_battler.
I dont know what I did wrong.
Heres the demo and the script part.

From ACBS | Sprite Battler
Line 400 - 423

http://workupload.com/file/DGNbnJ7 DOWNLOAD DEMO

Spoiler: ShowHide
#--------------------------------------------------------------------------
  # * Get sprite X center
  #--------------------------------------------------------------------------
  def center_x
    name = Pose_Sprite[set_battler_name].nil? ? @battler_name : set_battler_name
    if Pose_Sprite[name] != nil and Pose_Sprite[name]['Center'] != nil
      pose = Pose_Sprite[name]['Center'].dup
      return pose[@battler.pose_id][0] if pose[@battler.pose_id] != nil
      return pose['Base'][0] if pose['Base'] != nil
    end
    return @frame_width / 2
  end
  #--------------------------------------------------------------------------
  # * Get sprite Y center
  #--------------------------------------------------------------------------
  def center_y
    name = Pose_Sprite[set_battler_name].nil? ? @battler_name : set_battler_name
    if Pose_Sprite[name] != nil and Pose_Sprite[name]['Center'] != nil
      pose = Pose_Sprite[_name]['Center'].dup
      return pose[@battler.pose_id][1] if pose[@battler.pose_id] != nil
      return pose['Base'][1] if pose['Base'] != nil
    end
    return @frame_height / 2
  end
19
Quote from: Blizzard on January 25, 2016, 11:29:21 am
Dude, this is pretty cool. xD

Question: Can you also upload the gate which seems to ripped from diablo.
20
Can you also add some emotions to them?