This is gonna be a little complicated, so bear with me here.
First you want to put this script probably right under Scene_Debug
class Scene_Battle
attr_reader :active_battler, :target_battlers
attr_writer :forced_action
#--------------------------------------------------------------------------
# * Make Skill Action Results
#--------------------------------------------------------------------------
def make_skill_action_result
# Get skill
@skill = $data_skills[@active_battler.current_action.skill_id]
# If not a forcing action
unless @active_battler.current_action.forcing
# If unable to use due to SP running out
unless @active_battler.skill_can_use?(@skill.id)
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
@phase4_step = 1
return
end
end
# Use up SP
@active_battler.sp -= @skill.sp_cost
# Refresh status window
@status_window.refresh
# Show skill name on help window
@help_window.set_text(@skill.name, 1) unless @forced_action
# Set animation ID
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
# Set command event ID
@common_event_id = @skill.common_event_id
# Set target battlers
set_target_battlers(@skill.scope)
# Apply skill effect
for target in @target_battlers
target.skill_effect(@active_battler, @skill)
end
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 3 : animation for action performer)
#--------------------------------------------------------------------------
def update_phase4_step3
# Animation for action performer (if ID is 0, then white flash)
if @animation1_id == 0
@active_battler.white_flash = !@forced_action
else
@active_battler.animation_id = @animation1_id
@active_battler.animation_hit = true
end
# Shift to step 4
@phase4_step = 4
@forced_action = false
end
#--------------------------------------------------------------------------
# * Frame Update (main phase step 4 : animation for target)
#--------------------------------------------------------------------------
def update_phase4_step4
# Animation for target
for target in @target_battlers
target.animation_id = @animation2_id
target.animation_hit = (target.damage != "Miss")
end
# Animation has at least 8 frames, regardless of its length
# If no animation is played, then do not apply any wait
if @active_battler.current_action.kind == 0
@wait_count = 8
else
@wait_count = (@animation2_id == 0 ? 0 : 8)
end
# Shift to step 5
@phase4_step = 5
end
end
class Interpreter
def play_anim_on_targetted(anim_id)
# Script command does nothing if currently not in battle
return unless $scene.is_a?(Scene_Battle)
# Play animation on targetted battlers
$scene.target_battlers.each { |battler|
next unless battler.exist?
battler.animation_id = anim_id
battler.animation_hit = true
}
true
end
def force_skill(skill_id)
# Script command does nothing if currently not in battle
return unless $scene.is_a?(Scene_Battle)
# Force the skill on active battler and damage last targets
battler = $scene.active_battler
battler.current_action.skill_id = skill_id
battler.current_action.decide_last_target_for_actor
$scene.forced_action = true
# Set force flag
battler.current_action.forcing = true
$scene.forced_action = true
# If action is valid, then execute now
if battler.current_action.valid?
# Set battler being forced into action
$game_temp.forcing_battler = battler
# Advance index
@index += 1
# End
return false
end
# Continue
true
end
def targetted?(actor_id)
# Script command does nothing if currently not in battle
return unless $scene.is_a?(Scene_Battle)
$scene.target_battlers.each { |battler|
return true if battler.id == actor_id
}
false
end
end
# The damage pop-up animation still plays even though its 'value' is blank.
# This fixes that.
class RPG::Sprite < Sprite
alias no_show_damage_when_blank damage
def damage(value, critical)
return if value == '' || value.nil?
no_show_damage_when_blank(value, critical)
end
end
In your event command example you provided, change
Show Battle Animation to this script call:
play_anim_on_targetted(ANIMATION_ID)
replacing ANIMATION_ID with the index of the animation you want to play.
Also replace
Force Action to this script call:
again, replacing SKILL_ID with the index of the skill you want the enemy to use.
As for hiding damage pop-ups, the only way to do that is by making a skill have a
Power of 0 but is able to apply a state to a battler successfully. Make a new State (call it dummy or something), check the box for
Nonresistance, and a
Rating of 0. For your Attack Query skill, make it apply this dummy state.
Here's a GIF of it working. All instances of MISS are when I was holding left. Disregard the 0 damage, I just made their attacks too weak.