Hidestates animation ATOA ACBS

Started by koktengri, February 26, 2017, 07:33:18 am

Previous topic - Next topic

koktengri

February 26, 2017, 07:33:18 am Last Edit: February 26, 2017, 07:34:42 am by koktengri
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.

KK20

Most of the code can be copied from the code you pointed out. The main difference being you need to set the state_animation_id of the battler to 0 (which will remove the animation) and then reassign it back after the skill animation finishes (thereby needing to store the value of state_animation_id into another variable temporarily).

Do you want the state animation to not be played only on the attacker?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

koktengri

February 27, 2017, 12:18:18 am #2 Last Edit: February 27, 2017, 12:38:15 am by koktengri
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.

KK20


class Scene_Battle
  alias check_hide_state_animation check_action_hits
  def check_action_hits(battler)
    set_hide_state_animation(battler)
    check_hide_state_animation(battler)
  end
 
  def set_hide_state_animation(battler)
    ext = check_extension(battler_action(battler), "HIDE/")
    return if ext.nil?
    ext.slice!("HIDE/")
    if ext == "STATEANIMATION"
      @battler_state_animation_id = battler.state_animation_id
      battler.state_animation_id = 0
    end
  end
 
  alias reset_battler_state_animation_id step5_part3
  def step5_part3(battler)
    if @battler_state_animation_id
      battler.state_animation_id = @battler_state_animation_id
      @battler_state_animation_id = nil
    end
    reset_battler_state_animation_id(battler)
  end
end

Place under the Add-Ons section.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!