[Ace] MOG's Battler Motions & Yami Engine Symphony Minor Issues

Discussion in 'RGSSx Script Support' started by Ech0es, Apr 30, 2014.

  1. Ech0es

    Ech0es Moon Veteran

    Messages:
    37
    Likes Received:
    0
    Location:
    Earth
    First Language:
    English
    Primarily Uses:
    N/A
    I'm using Moghunters Battler Motions script along side Yami's Symphony and Yanfly Ace Battle Engine.

    So far all seems to work well except for a few minor issues:

    1) When a party member dies, they still remain on the screen instead of disappearing like they normally would. I tried using "<Motion Collapse = 6>" on characters note tag, but nothing. I tried both with and without.

    2) The enemy doesn't move forward like they used to. But this may not be much of an issue since the battlers are animated. The player does move foward still.

    3) After the enemy dies on screen, I can still see the shadow of the enemy on the battle screen, behind the victory scene.

    Any help would be greatly appreciated. Scripts are below:

    Yami Symphony (at pastebin, script is too large):

    http://pastebin.com/P2w6gM3z

    Moghunter's Battler Motions:

    Code:
    if true#==============================================================================# +++ MOG - Battler Motion (v1.8) +++#==============================================================================# By Moghunter # [URL="http://www.atelier-rgss.com/#==============================================================================%23"]http://www.atelier-rgss.com/#==============================================================================#[/URL] Adiciona efeitos de animações nos sprites dos battlers.# ● Animação inicial (entrada)de batalha.# ● Animação de espera.# ● Animação de ação.# ● Animação de dano.# ● Animação de colapso.#==============================================================================#==============================================================================# ● Version History#==============================================================================# V 1.8 - Fixed bug not activate the system hidden enemies.# - Improved the effect of breathing and the option to configure the effect.# V 1.7 - Compatibility with the script Aura Effect.# V 1.6 - Improved code and performance.# V 1.5 - Option to enable or disable the effects on allies or enemies.# This option is used to resolve compatibility issues.# V 1.4 - Fixed bug with display 1 damage the Log box# V 1.3 - Fix the position of the battler after receiving damage. (Actor)# V 1.2 - Improved coding of the script. (Better compatibility.)# - Addition type 6 collapse.# - Adding the effect type 6:07 action.# - Adding the effect of initial type 5 animation.# V 1.1 - Enable animation slaughtered battler. (Ex - Animations Reviver.)# - Option to enable or no effect of collapse for the characters.# V 1.0 - First release.#==============================================================================#==============================================================================# ● Configuration#==============================================================================# ■ Initial entrance animation to begin the battle. #==============================================================================# Put the following in the note tags of enemies or characters.## <Motion Appear = X>## X = 0# Battler sliders in horizontally.## X = 1# Battler sliders in vertically.## X = 2# Battler rolls in.## X = 3# Zooms in on battler.## X = 4# Zooms out on battler.## X = 5# Battler emerges from the ground.##==============================================================================# ■ Animations of battlers on standby.#==============================================================================# Put the following in the note tags of enemies or characters.## <Motion Standby = X>## X = 0# The effect of active battler breathing.## X = 1# The effect of active battler levitating.## X = 2# The effect of active battler moving sideways.##==============================================================================# ■ Animations of battlers in action mode.#==============================================================================# Put the following in the note tags of skills or items.## <Motion Action = X># # X = 0# Activates the effect of zoom action.## X = 1# Activates the effect of action jumping.## X = 2# Activates the effect of rotating to the left.## X = 3# Activates the effect of turning right.## X = 4# Activates the effect of shaking.## X = 5# Activates the effect of frontal action.## X = 6# Activates the effect of taking a step to the left.## X = 7# Activates the effect of taking a step to the right.##==============================================================================# ■ Animações dos battlers em Colapso. #==============================================================================# Coloque as seguintes Tags na caixa de notas dos inimigos ou personagens.## <Motion Collapse = X>## X = 0# Ativa colapso na vertical.## X = 1 # Ativa o colapso na horizontal.## X = 2# Ativa o colapso em Zoom OUT.## X = 3# Ativa o colapso em Zoom IN.## X = 4# Ativa o colapso em Zoom IN e Zoom OUT.## X = 5# Ativa o colapso em Modo Boss.## X = 6# Não ativa colapso.(Do nothing)##==============================================================================# ■ Ativar animação de dano em condições maléficas.#==============================================================================# Coloque a seguinte Tag na caixa de notas de condições para ativar o efeito# de dano.## <Bad State>##==============================================================================module MOG_BATTLER_MOTION  #Ativar o efeito no aliados.  ENABLE_ACTOR_MOTION = false    #Ativar o efeito nos inimigos  ENABLE_ENEMY_MOTION = true    #Definição da velocidade do efeito de respirar.  BREATH_EFFECT_SPEED = 1  #Default 1    #Definição do limite de zoom do efeito de respirar.  BREATH_EFFECT_RANGE = [0.92, 1.00] #Default [0.92, 1.00]end#==============================================================================# ■ Game_Battler#==============================================================================class Game_Battler < Game_BattlerBase     attr_accessor :motion_start   attr_accessor :motion_stand   attr_accessor :motion_action   attr_accessor :motion_damage   attr_accessor :motion_collapse     #--------------------------------------------------------------------------  # ● Initialize  #--------------------------------------------------------------------------          alias mog_motion_animation_initialize initialize   def initialize       mog_motion_animation_initialize       @motion_start = -1       @motion_stand = [-1,0]       @motion_action = [-1,0]       @motion_collapse = [7,0]       @motion_damage = [0,0]   end          #--------------------------------------------------------------------------  # ● Added New State  #--------------------------------------------------------------------------    alias mog_motion_animation_add_new_state add_new_state  def add_new_state(state_id)      mog_motion_animation_add_new_state(state_id)      self.motion_damage[0] = 1 if $data_states[state_id].note =~ /<Bad State>/  end      end#==============================================================================# ■ Game_Enemy#==============================================================================class Game_Enemy < Game_Battler     #--------------------------------------------------------------------------  # ● Initialize  #--------------------------------------------------------------------------  alias mog_motion_animation_enemy_initialize initialize  def initialize(index, enemy_id)      mog_motion_animation_enemy_initialize(index, enemy_id)      setup_motion_animation(enemy_id)  end    #--------------------------------------------------------------------------  # ● Setup Motion Animation  #--------------------------------------------------------------------------    def setup_motion_animation(enemy_id)      self.motion_stand[0] = $1.to_i if  enemy.note =~ /<Motion Standby = (\d+)>/i       self.motion_collapse[0] = $1.to_i if  enemy.note =~ /<Motion Collapse = (\d+)>/i       self.motion_start =  $1.to_i if  enemy.note =~ /<Motion Appear = (\d+)>/i   endend#==============================================================================# ■ Game Actor#==============================================================================class Game_Actor < Game_Battler  #--------------------------------------------------------------------------  # ● Setup  #--------------------------------------------------------------------------  alias mog_motion_animation_actor_setup setup  def setup(actor_id)      mog_motion_animation_actor_setup(actor_id)      self.motion_stand[0] = $1.to_i if  actor.note =~ /<Motion Standby = (\d+)>/i      self.motion_collapse[0] = $1.to_i if  actor.note =~ /<Motion Collapse = (\d+)>/i             self.motion_start =  $1.to_i if  actor.note =~ /<Motion Appear = (\d+)>/i    endend#==============================================================================# ■ Game_Battler#==============================================================================class Game_Battler < Game_BattlerBase    #--------------------------------------------------------------------------  # ● Execute Damage  #--------------------------------------------------------------------------    alias mog_battler_motion_execute_damage execute_damage  def execute_damage(user)      mog_battler_motion_execute_damage(user)      self.motion_damage[0] = 1 if @result.hp_damage > 0  end  end#==============================================================================# ■ Sprite Battler#==============================================================================class Sprite_Battler < Sprite_Base  #--------------------------------------------------------------------------  # ● Update Position  #--------------------------------------------------------------------------    alias mog_motion_animation_update_position update_position  def update_position      active_battler_motion       if @battler_motion_active         update_motion_animation         self.z = @battler.screen_z rescue nil         if $mog_rgss3_aura_effect != nil            update_aura         end         return      end            mog_motion_animation_update_position  end      #--------------------------------------------------------------------------  # ● Active Battler Motion  #--------------------------------------------------------------------------      def active_battler_motion      return if @motion_initial_base != nil or bitmap == nil      return if @battler == nil      return if !@battler.exist?      @motion_initial_base = true      @battler_motion_active = true if can_update_battler_motion?  end      #--------------------------------------------------------------------------  # ● Can Update Battler Motion  #--------------------------------------------------------------------------        def can_update_battler_motion?      return false if @battler == nil      return false if !@battler.use_sprite?      return false if @battler.screen_x == nil      return false if @battler.is_a?(Game_Actor) and !MOG_BATTLER_MOTION::ENABLE_ACTOR_MOTION      return false if @battler.is_a?(Game_Enemy) and !MOG_BATTLER_MOTION::ENABLE_ENEMY_MOTION      return true  end      #--------------------------------------------------------------------------  # ● Update Motion Animation  #--------------------------------------------------------------------------      def update_motion_animation      setup_initial_motion      execute_start_animation      return if @wait_motion_start       if can_execute_collapse?         execute_motion_collapse      else           execute_motion_damage         execute_motion_animation         execute_motion_action      end  end    #--------------------------------------------------------------------------  # ● Setup Initial Motion  #--------------------------------------------------------------------------        def setup_initial_motion      return if @motion_initial != nil      @motion_initial = true      @collapse_done = false      @motion_speed = 0      @start_speed = [0,0]      @battler.motion_collapse[1] = 0      self.x = @battler.screen_x rescue 0      self.y = @battler.screen_y rescue 0      self.z = battler.screen_z rescue 100      setup_motion_stand      @original_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,255]       setup_motion_start      setup_motion_damage                  setup_motion_action  end    #--------------------------------------------------------------------------  # ● Return Set  #--------------------------------------------------------------------------            def return_set(value)      self.x = value[0]      self.y = value[1]      self.zoom_x = value[2]      self.zoom_y = value[3]      self.mirror = value[4]      self.angle = value[5]      self.opacity = value[6]        end     #--------------------------------------------------------------------------  # ● setup_motion_start  #--------------------------------------------------------------------------              def setup_motion_start      @wait_motion_start = true      @scr_rect_speed = 1      case @battler.motion_start         when 0              self.x = 0 - (self.bitmap.width + rand(100))         when 1             self.y = 0 - (self.bitmap.height + rand(100))          when 2               self.angle = 360            self.x = 0 - self.bitmap.width         when 3               self.zoom_x = 1.5 + (rand(10) / 100.0)            self.zoom_y = self.zoom_x            self.opacity = 0         when 4            self.zoom_x = 0.2 + (rand(10) / 100.0)            self.zoom_y = self.zoom_x            self.opacity = 0         when 5               self.src_rect.y = -self.bitmap.height            @scr_rect_speed = self.bitmap.height / 40            @scr_rect_speed = 1 if @scr_rect_speed <= 0         else              @wait_motion_start = false      end     end      #--------------------------------------------------------------------------  # ● Setup Motion Damage  #--------------------------------------------------------------------------          def setup_motion_damage      @battler.motion_damage = [0,0]      @damage_pre_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,self.opacity]  end      #--------------------------------------------------------------------------  # ● Execute Start Animation  #--------------------------------------------------------------------------            def execute_start_animation      return if !@wait_motion_start      s_x = 1 + ((self.x - @original_set[0]).abs / (20 + @start_speed[0]))      s_y = 1 + ((self.y - @original_set[1]).abs / (20 + @start_speed[1]))            if self.x < @original_set[0]         self.x += s_x         self.x = @original_set[0] if self.x >= @original_set[0]      elsif self.x > @original_set[0]         self.x -= s_x         self.x = @original_set[0] if self.x <= @original_set[0]      end      if self.y < @original_set[1]         self.y += s_y         self.y = @original_set[1] if self.y > @original_set[1]      elsif self.y > @original_set[1]         self.y -= s_y         self.y = @original_set[1] if self.y < @original_set[1]      end      if self.zoom_x != @original_set[2]         if self.zoom_x > @original_set[2]            self.zoom_x -= 0.01            self.zoom_x = @original_set[2] if self.zoom_x < @original_set[2]         elsif self.zoom_x < @original_set[2]            self.zoom_x += 0.01            self.zoom_x = @original_set[2] if self.zoom_x > @original_set[2]         end                end        if self.zoom_y != @original_set[3]         if self.zoom_y > @original_set[3]            self.zoom_y -= 0.01            self.zoom_y = @original_set[3] if self.zoom_y < @original_set[3]         elsif self.zoom_y < @original_set[3]            self.zoom_y += 0.01            self.zoom_y = @original_set[3] if self.zoom_y > @original_set[3]         end                end              self.opacity += 10      if self.angle > 0         self.angle -= 5          self.angle = @original_set[5] if self.angle < @original_set[5]      end      if self.src_rect.y != 0         self.src_rect.y += @scr_rect_speed         self.src_rect.y = 0 if self.src_rect.y > 0      end      if sprite_original_set?           @wait_motion_start = false          self.src_rect.y = 0       end     end      #--------------------------------------------------------------------------  # ● Sprite original Set?  #--------------------------------------------------------------------------            def sprite_original_set?      return false if self.x != @original_set[0]      return false if self.y != @original_set[1]         return false if self.zoom_x != @original_set[2]      return false if self.zoom_y != @original_set[3]              return false if self.mirror != @original_set[4]      return false if self.angle != @original_set[5]      return false if self.opacity != @original_set[6]           return false if self.src_rect.y != 0            return true  end      #--------------------------------------------------------------------------  # ● Setup Initial Motion  #--------------------------------------------------------------------------          def execute_motion_damage      damage_refresh      update_motion_damage  end    #--------------------------------------------------------------------------  # ● Damage Refresh  #--------------------------------------------------------------------------            def damage_refresh      return if @battler.motion_damage[0] == 0      if @battler.motion_damage[1] == 0         @damage_pre_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,self.opacity]      end      @battler.motion_damage[0] = 0       @battler.motion_damage[1] = 45  end    #--------------------------------------------------------------------------  # ● Update Motion Damage  #--------------------------------------------------------------------------              def update_motion_damage      return if @battler.motion_damage[1] == 0      self.x = @damage_pre_set[0] + rand(@battler.motion_damage[1])      @battler.motion_damage[1] -= 1      if @battler.motion_damage[1] == 0          if $mog_rgss3_battle_hud != nil and @battler.is_a?(Game_Actor)            return_set(@original_set)          else              return_set(@damage_pre_set)         end         end    end      #--------------------------------------------------------------------------  # ● Setup Motion Stand  #--------------------------------------------------------------------------          def setup_motion_stand            @breath_range = [MOG_BATTLER_MOTION::BREATH_EFFECT_RANGE[0],                       MOG_BATTLER_MOTION::BREATH_EFFECT_RANGE[1],0,                       MOG_BATTLER_MOTION::BREATH_EFFECT_SPEED]      @float_range = [@battler.screen_y - 10, @battler.screen_y + 10]      @side_range = [@battler.screen_x - 10, @battler.screen_x + 10]      @battler.motion_stand[1] = 0      case @battler.motion_stand[0]         when 0             self.zoom_y = @breath_range[0] + (rand(10) / 100.0)             @battler.motion_stand[1] = rand(2)          when 1             self.y += 10 - rand(20)             @battler.motion_stand[1] = rand(2)         when 2             self.x += 10 - rand(20)             @battler.motion_stand[1] = rand(2)                   end  end      #--------------------------------------------------------------------------  # ● Execute Motion Animation  #--------------------------------------------------------------------------          def execute_motion_animation      return if @old_motion_action != -1      return if @battler.motion_damage[1] > 0      case @battler.motion_stand[0]         when 0             update_motion_breath         when 1               update_motion_float         when 2             update_motion_side      end          end      #--------------------------------------------------------------------------  # ● Update Motion Breath  #--------------------------------------------------------------------------            def update_motion_breath        @breath_range[2] += 1      return if @breath_range[2] < @breath_range[3]       @breath_range[2] = 0      case @battler.motion_stand[1]         when 0           self.zoom_y -= 0.002           if self.zoom_y <= @breath_range[0]              @battler.motion_stand[1] = 1              self.zoom_y = @breath_range[0]           end            when 1             self.zoom_y += 0.002           if self.zoom_y >= @breath_range[1]              @battler.motion_stand[1] = 0              self.zoom_y = @breath_range[1]           end         end  end      #--------------------------------------------------------------------------  # ● Update Motion Float  #--------------------------------------------------------------------------            def update_motion_float      @motion_speed += 1      return if @motion_speed < 5      @motion_speed = 0      case @battler.motion_stand[1]           when 0                self.y -= 1                if self.y < @float_range[0]                   self.y = @float_range[0]                   @battler.motion_stand[1] = 1                end              when 1                  self.y += 1                if self.y > @float_range[1]                   self.y = @float_range[1]                   @battler.motion_stand[1] = 0                end                        end  end        #--------------------------------------------------------------------------  # ● Update Motion Side  #--------------------------------------------------------------------------            def update_motion_side      @motion_speed += 1      return if @motion_speed < 5      @motion_speed = 0      case @battler.motion_stand[1]           when 0                self.x -= 1                if self.x < @side_range[0]                   self.x = @side_range[0]                   @battler.motion_stand[1] = 1                end              when 1                  self.x += 1                if self.x > @side_range[1]                   self.x = @side_range[1]                   @battler.motion_stand[1] = 0                end                        end  end       end#==============================================================================# ■ Game Action#==============================================================================class Game_Action    #--------------------------------------------------------------------------  # ● Prepare  #--------------------------------------------------------------------------                    alias mog_motion_action_prepare prepare  def prepare      mog_motion_action_prepare         set_motion_action  end      #--------------------------------------------------------------------------  # ● Set Motion Action  #--------------------------------------------------------------------------                      def set_motion_action      return if @item.object == nil or subject == nil            subject.motion_action[0] = $1.to_i if @item.object.note =~ /<Motion Action = (\d+)>/i   end  end#==============================================================================# ■ Sprite Battler#==============================================================================class Sprite_Battler < Sprite_Base    #--------------------------------------------------------------------------  # ● Setup Motion Action  #--------------------------------------------------------------------------          def setup_motion_action      @battler.motion_action = [-1,0]      @old_motion_action = @battler.motion_action[0]      @pre_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,self.opacity]  end    #--------------------------------------------------------------------------  # ● Refresh Action  #--------------------------------------------------------------------------            def refresh_action      return if @old_motion_action == @battler.motion_action[0]      if @old_motion_action == -1         @pre_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,self.opacity]      end      @battler.motion_action[1] = 0        return_set(@pre_set)       @old_motion_action = @battler.motion_action[0]      self.src_rect.y =  0  end      #--------------------------------------------------------------------------  # ● Execute Motion Action  #--------------------------------------------------------------------------              def execute_motion_action      return if @battler.motion_damage[1] > 0      refresh_action      update_motion_action  end      #--------------------------------------------------------------------------  # ● Update Motion Action  #--------------------------------------------------------------------------                def update_motion_action      return if @battler.motion_action[0] == -1      @battler.motion_action[1] += 1      case @battler.motion_action[0]           when -2              end_action           when 0              update_motion_zoom           when 1              update_motion_jump           when 2                update_motion_round_right           when 3              update_motion_round_left           when 4              update_motion_shake           when 5              update_motion_front           when 6                 update_motion_step_left           when 7              update_motion_step_right                    end   end    #--------------------------------------------------------------------------  # ● Update Motion Step Left  #--------------------------------------------------------------------------                    def update_motion_step_left      case @battler.motion_action[1]            when 1..20                self.x -= 2           when 21..40                  self.x += 2                      else           end_action      end          end      #--------------------------------------------------------------------------  # ● Update Motion Step Right  #--------------------------------------------------------------------------                    def update_motion_step_right      case @battler.motion_action[1]            when 1..20                self.x += 2           when 21..40                  self.x -= 2                      else        end_action         end     end        #--------------------------------------------------------------------------  # ● Update Motion Shake  #--------------------------------------------------------------------------                  def update_motion_shake            self.x = @pre_set[0] + rand(@battler.motion_action[1]) if can_update_motion_shake?      end_action if @battler.motion_action[1] > 40  end        #--------------------------------------------------------------------------  # ● Can Update Motion Shake?  #--------------------------------------------------------------------------                    def can_update_motion_shake?      if $mog_rgss3_battle_hud !=nil         return false if @battler.is_a?(Game_Actor) and MOG_BATTLE_HUD::BATTLER_FACE_ENABLE      end      return true    end      #--------------------------------------------------------------------------  # ● Update Motion Zoom  #--------------------------------------------------------------------------                  def update_motion_zoom      case @battler.motion_action[1]        when 1..20           self.zoom_x += 0.01           self.zoom_y += 0.01        when 21..40           self.zoom_x -= 0.01           self.zoom_y -= 0.01                  else          end_action         end  end    #--------------------------------------------------------------------------  # ● Update Motion Jump  #--------------------------------------------------------------------------                    def update_motion_jump      case @battler.motion_action[1]        when 1..20            self.y -= 9            self.zoom_x += 0.01            self.zoom_y += 0.01            self.mirror = true            self.angle += 9        when 21..40            self.y += 9            self.zoom_x -= 0.01            self.zoom_y -= 0.01                        self.mirror = false            self.angle += 9        else          self.angle = 0        end_action         end         end    #--------------------------------------------------------------------------  # ● Update Motion Front  #--------------------------------------------------------------------------                    def update_motion_front      case @battler.motion_action[1]        when 1..20            self.y += 3            self.zoom_x += 0.02            self.zoom_y += 0.02        when 21..40            self.y -= 3            self.zoom_x -= 0.02            self.zoom_y -= 0.02                    else          end_action         end         end     #--------------------------------------------------------------------------  # ● Update Motion Round Left  #--------------------------------------------------------------------------                      def update_motion_round_left      case @battler.motion_action[1]        when 1..15            self.y += 3            self.x -= 3            self.mirror = false        when 16..30            self.x += 6            self.mirror = true        when 31..45            self.y -= 3            self.x -= 3            self.mirror = false        else          end_action        end          end    #--------------------------------------------------------------------------  # ● Update Motion Round Right  #--------------------------------------------------------------------------                      def update_motion_round_right      case @battler.motion_action[1]        when 1..15            self.y += 3            self.x += 3            self.mirror = true                    when 16..30            self.x -= 6             self.mirror = false        when 31..45            self.y -= 3            self.x += 3            self.mirror = true        else          end_action          end      end      #--------------------------------------------------------------------------  # ● End Action  #--------------------------------------------------------------------------                        def end_action      if $mog_rgss3_battle_hud != nil and @battler.is_a?(Game_Actor)         return_set(@original_set)      else           return_set(@pre_set)        end      @battler.motion_action = [-1,0]  end    end#==============================================================================# ■ Sprite Battler#==============================================================================class Sprite_Battler < Sprite_Base  #--------------------------------------------------------------------------  # ● Update Blink  #--------------------------------------------------------------------------        alias mog_motion_animation_update_blink update_blink  def update_blink      return if @battler.dead?      mog_motion_animation_update_blink  end    #--------------------------------------------------------------------------  # ● Update Collapse  #--------------------------------------------------------------------------  def update_collapse      end    #--------------------------------------------------------------------------  # ● Execute Motion Collapse  #--------------------------------------------------------------------------      def execute_motion_collapse      collapse_end if self.opacity == 0      @battler.motion_collapse[1] += 1            case @battler.motion_collapse[0]           when 0;     update_collapse_vertical           when 1;     update_collapse_horizontal           when 2;     update_collapse_zoom_out           when 3;     update_collapse_zoom_in           when 4;     update_collapse_zoom_in_out           when 5;     update_collapse_boss_2           when 6;     update_collpase_do_nothing           else ;      update_collapse_normal      end          end   #--------------------------------------------------------------------------  # ● Can Execute Collapse  #--------------------------------------------------------------------------        def can_execute_collapse?      return false if !@battler.dead?      return false if @collapse_done      return true  end    #--------------------------------------------------------------------------  # ● Update Collapse Vertical  #--------------------------------------------------------------------------          def update_collapse_vertical      self.zoom_y += 0.1      self.zoom_x -= 0.02               self.opacity -= 3      end    #--------------------------------------------------------------------------  # ● Update Collapse Horizontal  #--------------------------------------------------------------------------            def update_collapse_horizontal      self.zoom_x += 0.1      self.zoom_y -= 0.02            self.opacity -= 3        end       #--------------------------------------------------------------------------  # ● Update Collapse Zoom Out  #--------------------------------------------------------------------------              def update_collapse_zoom_out           self.zoom_x += 0.02      self.zoom_y += 0.02           self.opacity -= 4     end        #--------------------------------------------------------------------------  # ● Update Collapse Zoom IN  #--------------------------------------------------------------------------                def update_collapse_zoom_in      self.zoom_x -= 0.01      self.zoom_y -= 0.01            self.opacity -= 4              end    #--------------------------------------------------------------------------  # ● Update Collapse Zoom IN OUT  #--------------------------------------------------------------------------                  def update_collapse_zoom_in_out      case @battler.motion_collapse[1]           when 0..30                self.zoom_x += 0.1                self.zoom_y -= 0.02                self.opacity -= 2           else                  self.zoom_y += 0.5                self.zoom_x -= 0.2                self.opacity -= 10      end         end       #--------------------------------------------------------------------------  # ● Update Collapse Boss 2  #--------------------------------------------------------------------------                    def update_collapse_boss_2      self.x = @original_set[0] + rand(10)       self.src_rect.y -= 1      self.opacity = 0 if self.src_rect.y < -self.bitmap.height   end        #--------------------------------------------------------------------------  # ● Update Collapse do nothing  #--------------------------------------------------------------------------                      def update_collpase_do_nothing      end      #--------------------------------------------------------------------------  # ● Update Collapse Normal  #--------------------------------------------------------------------------                      def update_collapse_normal      self.opacity -= 3      self.blend_type = 1  end      #--------------------------------------------------------------------------  # ● Collapse End  #--------------------------------------------------------------------------        def collapse_end      @collapse_done = true      return_set(@original_set)       self.src_rect.y = -self.bitmap.height unless @battler.motion_collapse[0] == 6  end    #--------------------------------------------------------------------------  # ● Revert to Normal  #--------------------------------------------------------------------------          alias mog_battler_motion_revert_to_normal revert_to_normal  def revert_to_normal      if @collapse_done         @collapse_done = false         return_set(@original_set)       end      mog_battler_motion_revert_to_normal   end    end$mog_rgss3_battler_motion = trueend
     
    #1
  2. ShinGamix

    ShinGamix DS Style 4Ever! Veteran

    Messages:
    3,906
    Likes Received:
    447
    Location:
    Alien Ship
    First Language:
    April Fools
    Primarily Uses:
    N/A
    So I guess everyone is trying to do a battle Dungeons battle Engine. It has taken me a year to get BD scrips working right.

    I have had a most if not all of the battle scripts modified in one form or another.

    Be warned it is a very difficult and tricky script situation(s) once you start mixing MogHunter, Yami's, and Yanfly's scripts together.

    You will have to get the scripts modified to fix these issues most likely as they conflict in a lot of ways.
     
    Last edited by a moderator: May 1, 2014
    #2
  3. Ech0es

    Ech0es Moon Veteran

    Messages:
    37
    Likes Received:
    0
    Location:
    Earth
    First Language:
    English
    Primarily Uses:
    N/A
    Yeah I see. I don't think anyone will be helping me out with this one. What do you mean about taking a year to get scripts working right? Which scripts are you referring to?

    Anyway, I like using Mogs Battle Motions because it makes the enemies animate so it doesn't look like they just sit there doing nothing. And the best thing is you don't need to use any special sprite sheet.

    It appears to work just fine, the one issue is that the actors do not vanish after they are killed. They stay on the map. Yami's symphony has it so the actors vanish after death. Something in Mogs script overwrites the collapse sequence in Yami's script. I tried to remove some script pieces from Mog's script but no luck. If I knew what to remove in Mogs that pertains to actor collapse, that would be good. Or if someone knew how to make the actor vanish after dying, that works too.

    But I am not hopeful in getting this one resolved. I'll use another script if someone knows of one that is similar to Mogs and won't conflict as much.
     
    Last edited by a moderator: May 1, 2014
    #3
  4. Euphoria

    Euphoria Veteran Veteran

    Messages:
    378
    Likes Received:
    92
    First Language:
    English
    It shouldn't take a year. I'm using lots of stuff and it took me a week to configure everything properly. And any needed fixes were found within a month. But I'd like to see a fix to this as I originally thought about using both these scripts and dropped the idea. I'll look into it, but I'm not very good at scripting.
     
    #4
  5. Ech0es

    Ech0es Moon Veteran

    Messages:
    37
    Likes Received:
    0
    Location:
    Earth
    First Language:
    English
    Primarily Uses:
    N/A
    Yeah, doubt anyone is going to help with this one.
     
    #5
  6. Euphoria

    Euphoria Veteran Veteran

    Messages:
    378
    Likes Received:
    92
    First Language:
    English
    I'm hoping someone does, it would make a nice combination. I looked through the code, but not too closely, plus I'm new to scripting so I probably won't find the error.
     
    #6
  7. 12212026

    12212026 Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Hey Moon,

    Thanks for posting this, i actually wanted the exact opposite of what you want, ie that the corpses hang around after being killed and i couldn't figure out how to make Yami's Battle Symphony do it.

    But your post lead me in the right direction so THANKS.

    anyways im using

    Yami's Battle Symphony

    https://github.com/suppayami/rmvxa-collection/blob/master/battle-symphony/battle-symphony-116c.rb

    Yami's Battle Symphony Holders Battlers addon

    https://github.com/suppayami/rmvxa-collection/blob/master/battle-symphony/add-on/Holder-Battlers.rb

    MOGs - Battler Motion (v2.1)

    #==============================================================================
    # +++ MOG - Battler Motion (v2.1) +++
    #==============================================================================
    # By Moghunter
    # http://www.atelier-rgss.com/
    #==============================================================================
    # Adiciona efeitos de animações nos sprites dos battlers.
    # ● Animação inicial (entrada)de batalha.
    # ● Animação de espera.
    # ● Animação de ação.
    # ● Animação de dano.
    # ● Animação de colapso.
    #==============================================================================

    #==============================================================================
    # ● Histórico (Version History)
    #==============================================================================
    # v2.1 - Melhoria no sistema animação.
    # v2.0 - Melhoria na codificação.
    #==============================================================================


    #==============================================================================
    # ● CONFIGURAÇÃO
    #==============================================================================
    # ■ Animação inicial de entrada ao começar a batalha.
    #==============================================================================
    # Coloque as seguintes Tags na caixa de notas dos inimigos ou personagens.
    #
    #
    #
    # X = 0
    # Battler desliza horizontalmente.
    #
    # X = 1
    # Battler desliza verticalmente.
    #
    # X = 2
    # Battler rola (Cambalhota o_O) pela tela.
    #
    # X = 3
    # Zoom IN
    #
    # X = 4
    # Zoom Out
    #
    # X = 5
    # Efeito de emergir do solo.
    #
    #==============================================================================
    # ■ Animações dos battlers em modo espera.
    #==============================================================================
    # Coloque as seguintes Tags na caixa de notas dos inimigos ou personagens.
    #
    #
    #
    # X = 0
    # Ativa o efeito do battler respirando.
    #
    # X = 1
    # Ativa o efeito do battler levitando.
    #
    # X = 2
    # Ativa o efeito do battler movimentando para os lados.
    #
    #==============================================================================
    # ■ Animações dos battlers em modo de ação.
    #==============================================================================
    # Coloque as seguintes Tags na caixa de notas de itens ou habilidades.
    #
    #
    #
    # X = 0
    # Ativa o efeito de ação de zoom.
    #
    # X = 1
    # Ativa o efeito de ação de pular.
    #
    # X = 2
    # Ativa o efeito de girar para a esquerda.
    #
    # X = 3
    # Ativa o efeito de girar para a direita.
    #
    # X = 4
    # Ativa o efeito de tremer.
    #
    # X = 5
    # Ativa o efeito de ação frontal.
    #
    # X = 6
    # Ativa o efeito de dar um passo para esquerda.
    #
    # X = 7
    # Ativa o efeito de de dar um passo para direita.
    #
    #==============================================================================
    # ■ Animações dos battlers em Colapso.
    #==============================================================================
    # Coloque as seguintes Tags na caixa de notas dos inimigos ou personagens.
    #
    #
    #
    # X = 0
    # Ativa colapso na vertical.
    #
    # X = 1
    # Ativa o colapso na horizontal.
    #
    # X = 2
    # Ativa o colapso em Zoom OUT.
    #
    # X = 3
    # Ativa o colapso em Zoom IN.
    #
    # X = 4
    # Ativa o colapso em Zoom IN e Zoom OUT.
    #
    # X = 5
    # Ativa o colapso em Modo Boss.
    #
    # X = 6
    # Não ativa colapso.(Do nothing)
    #
    #==============================================================================
    # ■ Ativar animação de dano em condições maléficas.
    #==============================================================================
    # Coloque a seguinte Tag na caixa de notas de condições para ativar o efeito
    # de dano.
    #
    #
    #
    #==============================================================================
    module MOG_BATTLER_MOTION

    #Ativar o efeito no aliados.
    ENABLE_ACTOR_MOTION = false

    #Ativar o efeito nos inimigos
    ENABLE_ENEMY_MOTION = true

    #Definição da velocidade do efeito de respirar.
    BREATH_EFFECT_SPEED = 1 #Default 1

    #Definição do limite de zoom do efeito de respirar.
    BREATH_EFFECT_RANGE = [0.92, 1.00] #Default [0.92, 1.00]
    end

    $imported = {} if $imported.nil?
    $imported[:mog_battler_motion] = true

    #==============================================================================
    # ■ Game_Temp
    #==============================================================================
    class Game_Temp

    attr_accessor :battler_in_motion

    #--------------------------------------------------------------------------
    # ● Initialize
    #--------------------------------------------------------------------------
    alias mog_battler_motion_initialize initialize
    def initialize
    @battler_in_motion = false
    mog_battler_motion_initialize
    end

    end

    #==============================================================================
    # ■ Game_Battler
    #==============================================================================
    class Game_Battler < Game_BattlerBase

    attr_accessor :motion_start
    attr_accessor :motion_stand
    attr_accessor :motion_action
    attr_accessor :motion_damage
    attr_accessor :motion_collapse
    attr_accessor :motion_move
    attr_accessor :motion_org_pos

    #--------------------------------------------------------------------------
    # ● Initialize
    #--------------------------------------------------------------------------
    alias mog_motion_animation_initialize initialize
    def initialize
    mog_motion_animation_initialize
    @motion_start = -1
    @motion_stand = [-1,0]
    @motion_action = [-1,0]
    @motion_collapse = [7,0]
    @motion_damage = [0,0]
    @motion_move = [false,0,0]
    @motion_org_pos = [0,0]
    end

    #--------------------------------------------------------------------------
    # ● Added New State
    #--------------------------------------------------------------------------
    alias mog_motion_animation_add_new_state add_new_state
    def add_new_state(state_id)
    mog_motion_animation_add_new_state(state_id)
    self.motion_damage[0] = 1 if $data_states[state_id].note =~ //
    end

    #--------------------------------------------------------------------------
    # ● Move To
    #--------------------------------------------------------------------------
    def move_to(x,y)
    return if self.dead?
    @motion_move = [true,x,y]
    end

    #--------------------------------------------------------------------------
    # ● Set Original Position
    #--------------------------------------------------------------------------
    def set_org_pos
    scx = self.screen_x rescue 0
    scy = self.screen_y rescue 0
    @motion_opos = [scx,scy]
    end

    #--------------------------------------------------------------------------
    # ● Return Org
    #--------------------------------------------------------------------------
    def return_org
    return if self.dead?
    @motion_move = [true,@motion_opos[0],@motion_opos[1]]
    end

    end

    #==============================================================================
    # ■ Game_Enemy
    #==============================================================================
    class Game_Enemy < Game_Battler

    #--------------------------------------------------------------------------
    # ● Initialize
    #--------------------------------------------------------------------------
    alias mog_motion_animation_enemy_initialize initialize
    def initialize(index, enemy_id)
    mog_motion_animation_enemy_initialize(index, enemy_id)
    setup_motion_animation(enemy_id)
    end

    #--------------------------------------------------------------------------
    # ● Setup Motion Animation
    #--------------------------------------------------------------------------
    def setup_motion_animation(enemy_id)
    self.motion_stand[0] = $1.to_i if enemy.note =~ //i
    self.motion_collapse[0] = $1.to_i if enemy.note =~ //i
    self.motion_start = $1.to_i if enemy.note =~ //i
    end
    end

    #==============================================================================
    # ■ Game Actor
    #==============================================================================
    class Game_Actor < Game_Battler

    #--------------------------------------------------------------------------
    # ● Setup
    #--------------------------------------------------------------------------
    alias mog_motion_animation_actor_setup setup
    def setup(actor_id)
    mog_motion_animation_actor_setup(actor_id)
    self.motion_stand[0] = $1.to_i if actor.note =~ //i
    self.motion_collapse[0] = $1.to_i if actor.note =~ //i
    self.motion_start = $1.to_i if actor.note =~ //i
    end

    end

    #==============================================================================
    # ■ Game_Battler
    #==============================================================================
    class Game_Battler < Game_BattlerBase

    #--------------------------------------------------------------------------
    # ● Execute Damage
    #--------------------------------------------------------------------------
    alias mog_battler_motion_execute_damage execute_damage
    def execute_damage(user)
    mog_battler_motion_execute_damage(user)
    self.motion_damage[0] = 1 if @result.hp_damage > 0
    end

    end

    #==============================================================================
    # ■ Spriteset Battle
    #==============================================================================
    class Spriteset_Battle

    #--------------------------------------------------------------------------
    # * Update
    #--------------------------------------------------------------------------
    alias mog_battler_motion_update update
    def update
    $game_temp.battler_in_motion = false
    mog_battler_motion_update
    end

    #--------------------------------------------------------------------------
    # * Animation?
    #--------------------------------------------------------------------------
    alias mog_battler_motion_animation? animation?
    def animation?
    return true if $game_temp.battler_in_motion
    mog_battler_motion_animation?
    end
    #--------------------------------------------------------------------------
    # * Effect?
    #--------------------------------------------------------------------------
    alias mog_battler_motion_effect? effect?
    def effect?
    return true if $game_temp.battler_in_motion
    mog_battler_motion_effect?
    end

    end

    #==============================================================================
    #==============================================================================
    # ● INITIAL ●
    #==============================================================================
    #==============================================================================

    #==============================================================================
    # ■ Sprite Battler
    #==============================================================================
    class Sprite_Battler < Sprite_Base

    #--------------------------------------------------------------------------
    # ● Can Update Motion?
    #--------------------------------------------------------------------------
    def can_update_motion?
    return true
    end

    #--------------------------------------------------------------------------
    # ● Update Position
    #--------------------------------------------------------------------------
    alias mog_motion_animation_update_position update_position
    def update_position
    active_battler_motion
    if @battler_motion_active
    update_motion_animation
    self.z = @battler.screen_z rescue nil
    return
    end
    mog_motion_animation_update_position
    end

    #--------------------------------------------------------------------------
    # ● Active Battler Motion
    #--------------------------------------------------------------------------
    def active_battler_motion
    return if @motion_initial_base != nil or bitmap == nil
    return if @battler == nil
    return if !@battler.exist?
    @motion_initial_base = true
    @battler_motion_active = true if can_update_battler_motion?
    end

    #--------------------------------------------------------------------------
    # ● Can Update Battler Motion
    #--------------------------------------------------------------------------
    def can_update_battler_motion?
    return false if @battler == nil
    return false if !@battler.use_sprite?
    return false if @battler.screen_x == nil
    return false if @battler.is_a?(Game_Actor) and !MOG_BATTLER_MOTION::ENABLE_ACTOR_MOTION
    return false if @battler.is_a?(Game_Enemy) and !MOG_BATTLER_MOTION::ENABLE_ENEMY_MOTION
    return true
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Animation
    #--------------------------------------------------------------------------
    def update_motion_animation
    setup_initial_motion
    execute_start_animation
    return if @wait_motion_start
    if can_execute_collapse?
    execute_motion_collapse
    else
    if can_update_motion?
    execute_motion_move_to if can_update_move_to?
    execute_motion_damage
    execute_motion_idle if can_update_idle?
    execute_motion_action if can_update_action?
    end
    end
    end

    #--------------------------------------------------------------------------
    # ● Setup Initial Motion
    #--------------------------------------------------------------------------
    def setup_initial_motion
    return if @motion_initial != nil
    @motion_initial = true
    @collapse_done = false
    @motion_speed = 0
    @start_speed = [0,0]
    @battler.motion_collapse[1] = 0
    self.x = @battler.screen_x rescue 0
    self.y = @battler.screen_y rescue 0
    self.z = @battler.screen_z rescue 100
    @battler.set_org_pos
    setup_motion_stand
    @original_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,255]
    setup_motion_start
    setup_motion_damage
    setup_motion_action
    end

    #--------------------------------------------------------------------------
    # ● Return Set
    #--------------------------------------------------------------------------
    def return_set(value)
    self.x = value[0]
    self.y = value[1]
    self.zoom_x = value[2]
    self.zoom_y = value[3]
    self.mirror = value[4]
    self.angle = value[5]
    self.opacity = value[6]
    end

    #--------------------------------------------------------------------------
    # ● setup_motion_start
    #--------------------------------------------------------------------------
    def setup_motion_start
    @wait_motion_start = true
    @scr_rect_speed = 1
    case @battler.motion_start
    when 0
    self.x = 0 - (self.bitmap.width + rand(100))
    when 1
    self.y = 0 - (self.bitmap.height + rand(100))
    when 2
    self.angle = 360
    self.x = 0 - self.bitmap.width
    when 3
    self.zoom_x = 1.5 + (rand(10) / 100.0)
    self.zoom_y = self.zoom_x
    self.opacity = 0
    when 4
    self.zoom_x = 0.2 + (rand(10) / 100.0)
    self.zoom_y = self.zoom_x
    self.opacity = 0
    when 5
    self.src_rect.y = -self.bitmap.height
    @scr_rect_speed = self.bitmap.height / 40
    @scr_rect_speed = 1 if @scr_rect_speed <= 0
    else
    @wait_motion_start = false
    end
    end

    #--------------------------------------------------------------------------
    # ● Execute Start Animation
    #--------------------------------------------------------------------------
    def execute_start_animation
    return if !@wait_motion_start
    $game_temp.battler_in_motion = true
    s_x = 1 + ((self.x - @original_set[0]).abs / (20 + @start_speed[0]))
    s_y = 1 + ((self.y - @original_set[1]).abs / (20 + @start_speed[1]))
    if self.x < @original_set[0]
    self.x += s_x
    self.x = @original_set[0] if self.x >= @original_set[0]
    elsif self.x > @original_set[0]
    self.x -= s_x
    self.x = @original_set[0] if self.x <= @original_set[0]
    end
    if self.y < @original_set[1]
    self.y += s_y
    self.y = @original_set[1] if self.y > @original_set[1]
    elsif self.y > @original_set[1]
    self.y -= s_y
    self.y = @original_set[1] if self.y < @original_set[1]
    end
    if self.zoom_x != @original_set[2]
    if self.zoom_x > @original_set[2]
    self.zoom_x -= 0.01
    self.zoom_x = @original_set[2] if self.zoom_x < @original_set[2]
    elsif self.zoom_x < @original_set[2]
    self.zoom_x += 0.01
    self.zoom_x = @original_set[2] if self.zoom_x > @original_set[2]
    end
    end
    if self.zoom_y != @original_set[3]
    if self.zoom_y > @original_set[3]
    self.zoom_y -= 0.01
    self.zoom_y = @original_set[3] if self.zoom_y < @original_set[3]
    elsif self.zoom_y < @original_set[3]
    self.zoom_y += 0.01
    self.zoom_y = @original_set[3] if self.zoom_y > @original_set[3]
    end
    end
    self.opacity += 10
    if self.angle > 0
    self.angle -= 5
    self.angle = @original_set[5] if self.angle < @original_set[5]
    end
    if self.src_rect.y != 0
    self.src_rect.y += @scr_rect_speed
    self.src_rect.y = 0 if self.src_rect.y > 0
    end
    if sprite_original_set?
    @wait_motion_start = false
    self.src_rect.y = 0
    end
    end

    #--------------------------------------------------------------------------
    # ● Sprite original Set?
    #--------------------------------------------------------------------------
    def sprite_original_set?
    return false if self.x != @original_set[0]
    return false if self.y != @original_set[1]
    return false if self.zoom_x != @original_set[2]
    return false if self.zoom_y != @original_set[3]
    return false if self.mirror != @original_set[4]
    return false if self.angle != @original_set[5]
    return false if self.opacity != @original_set[6]
    return false if self.src_rect.y != 0
    return true
    end

    end

    #==============================================================================
    #==============================================================================
    # ● MOVE TO ●
    #==============================================================================
    #==============================================================================

    #==============================================================================
    # ■ Sprite Battler
    #==============================================================================
    class Sprite_Battler < Sprite_Base

    #--------------------------------------------------------------------------
    # ● Can Update Move_to
    #--------------------------------------------------------------------------
    def can_update_move_to?
    return false if !@battler.motion_move[0]
    return true
    end

    #--------------------------------------------------------------------------
    # ● Execute Motion Move_to
    #--------------------------------------------------------------------------
    def execute_motion_move_to
    $game_temp.battler_in_motion = true
    execute_motion_mv(0,self.x,@battler.motion_move[1])
    execute_motion_mv(1,self.y,@battler.motion_move[2])
    mv_clear
    end

    #--------------------------------------------------------------------------
    # ● MV Clear
    #--------------------------------------------------------------------------
    def mv_clear
    return if self.x != @battler.motion_move[1]
    return if self.y != @battler.motion_move[2]
    @battler.motion_move[0] = false
    end

    #--------------------------------------------------------------------------
    # ● Execute Motion Mv
    #--------------------------------------------------------------------------
    def execute_motion_mv(type,cp,np)
    sp = 2 + ((cp - np).abs / 20)
    if cp > np
    cp -= sp
    cp = np if cp < np
    elsif cp < np
    cp += sp
    cp = np if cp > np
    end
    self.x = cp if type == 0
    self.y = cp if type == 1
    end

    end

    #==============================================================================
    #==============================================================================
    # ● DAMAGE ●
    #==============================================================================
    #==============================================================================

    #==============================================================================
    # ■ Sprite Battler
    #==============================================================================
    class Sprite_Battler < Sprite_Base

    #--------------------------------------------------------------------------
    # ● Can Update Damage
    #--------------------------------------------------------------------------
    def can_update_damage?
    return false if @battler.motion_damage[1] == 0
    return false if @battler.motion_move[0]
    return true
    end

    #--------------------------------------------------------------------------
    # ● Setup Initial Motion
    #--------------------------------------------------------------------------
    def execute_motion_damage
    damage_refresh
    update_motion_damage if can_update_damage?
    end

    #--------------------------------------------------------------------------
    # ● Setup Motion Damage
    #--------------------------------------------------------------------------
    def setup_motion_damage
    @battler.motion_damage = [0,0]
    @damage_pre_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,self.opacity]
    end

    #--------------------------------------------------------------------------
    # ● Damage Refresh
    #--------------------------------------------------------------------------
    def damage_refresh
    return if @battler.motion_damage[0] == 0
    if @battler.motion_damage[1] == 0
    @damage_pre_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,self.opacity]
    end
    @battler.motion_damage[0] = 0
    @battler.motion_damage[1] = 45
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Damage
    #--------------------------------------------------------------------------
    def update_motion_damage
    self.x = @damage_pre_set[0] + rand(@battler.motion_damage[1])
    @battler.motion_damage[1] -= 1
    if @battler.motion_damage[1] == 0
    if $imported[:mog_battle_hud_ex] != nil and @battler.is_a?(Game_Actor)
    return_set(@original_set)
    else
    return_set(@damage_pre_set)
    end
    end
    end

    end

    #==============================================================================
    #==============================================================================
    # ● IDLE ●
    #==============================================================================
    #==============================================================================


    #==============================================================================
    # ■ Sprite Battler
    #==============================================================================
    class Sprite_Battler < Sprite_Base

    #--------------------------------------------------------------------------
    # ● Can Update idle
    #--------------------------------------------------------------------------
    def can_update_idle?
    return false if @old_motion_action != -1
    return false if @battler.motion_damage[1] > 0
    return false if @battler.motion_move[0]
    return true
    end

    #--------------------------------------------------------------------------
    # ● Setup Motion Stand
    #--------------------------------------------------------------------------
    def setup_motion_stand
    @breath_range = [MOG_BATTLER_MOTION::BREATH_EFFECT_RANGE[0],
    MOG_BATTLER_MOTION::BREATH_EFFECT_RANGE[1],0,
    MOG_BATTLER_MOTION::BREATH_EFFECT_SPEED]
    @float_range = [@battler.screen_y - 10, @battler.screen_y + 10]
    @side_range = [@battler.screen_x - 10, @battler.screen_x + 10]
    @battler.motion_stand[1] = 0
    case @battler.motion_stand[0]
    when 0
    self.zoom_y = @breath_range[0] + (rand(10) / 100.0)
    @battler.motion_stand[1] = rand(2)
    when 1
    self.y += 10 - rand(20)
    @battler.motion_stand[1] = rand(2)
    when 2
    self.x += 10 - rand(20)
    @battler.motion_stand[1] = rand(2)
    end
    end

    #--------------------------------------------------------------------------
    # ● Execute Motion Animation
    #--------------------------------------------------------------------------
    def execute_motion_idle
    case @battler.motion_stand[0]
    when 0
    update_motion_breath
    when 1
    update_motion_float
    when 2
    update_motion_side
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Breath
    #--------------------------------------------------------------------------
    def update_motion_breath
    @breath_range[2] += 1
    return if @breath_range[2] < @breath_range[3]
    @breath_range[2] = 0
    case @battler.motion_stand[1]
    when 0
    self.zoom_y -= 0.002
    if self.zoom_y <= @breath_range[0]
    @battler.motion_stand[1] = 1
    self.zoom_y = @breath_range[0]
    end
    when 1
    self.zoom_y += 0.002
    if self.zoom_y >= @breath_range[1]
    @battler.motion_stand[1] = 0
    self.zoom_y = @breath_range[1]
    end
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Float
    #--------------------------------------------------------------------------
    def update_motion_float
    @motion_speed += 1
    return if @motion_speed < 5
    @motion_speed = 0
    case @battler.motion_stand[1]
    when 0
    self.y -= 1
    if self.y < @float_range[0]
    self.y = @float_range[0]
    @battler.motion_stand[1] = 1
    end
    when 1
    self.y += 1
    if self.y > @float_range[1]
    self.y = @float_range[1]
    @battler.motion_stand[1] = 0
    end
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Side
    #--------------------------------------------------------------------------
    def update_motion_side
    @motion_speed += 1
    return if @motion_speed < 5
    @motion_speed = 0
    case @battler.motion_stand[1]
    when 0
    self.x -= 1
    if self.x < @side_range[0]
    self.x = @side_range[0]
    @battler.motion_stand[1] = 1
    end
    when 1
    self.x += 1
    if self.x > @side_range[1]
    self.x = @side_range[1]
    @battler.motion_stand[1] = 0
    end
    end
    end

    end

    #==============================================================================
    #==============================================================================
    # ● ACTION ●
    #==============================================================================
    #==============================================================================

    #==============================================================================
    # ■ Game Action
    #==============================================================================
    class Game_Action

    #--------------------------------------------------------------------------
    # ● Prepare
    #--------------------------------------------------------------------------
    alias mog_motion_action_prepare prepare
    def prepare
    mog_motion_action_prepare
    set_motion_action
    end

    #--------------------------------------------------------------------------
    # ● Set Motion Action
    #--------------------------------------------------------------------------
    def set_motion_action
    return if @item.object == nil or subject == nil
    subject.motion_action[0] = $1.to_i if @item.object.note =~ //i
    end

    end

    #==============================================================================
    # ■ Sprite Battler
    #==============================================================================
    class Sprite_Battler < Sprite_Base

    #--------------------------------------------------------------------------
    # ● Can Update Action
    #--------------------------------------------------------------------------
    def can_update_action?
    return false if @battler.motion_damage[1] > 0
    return false if @battler.motion_move[0]
    return true
    end

    #--------------------------------------------------------------------------
    # ● Setup Motion Action
    #--------------------------------------------------------------------------
    def setup_motion_action
    @battler.motion_action = [-1,0]
    @old_motion_action = @battler.motion_action[0]
    @pre_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,self.opacity]
    end

    #--------------------------------------------------------------------------
    # ● Refresh Action
    #--------------------------------------------------------------------------
    def refresh_action
    return if @old_motion_action == @battler.motion_action[0]
    if @old_motion_action == -1
    @pre_set = [self.x, self.y, self.zoom_x,self.zoom_y,self.mirror,self.angle,self.opacity]
    end
    @battler.motion_action[1] = 0
    return_set(@pre_set)
    @old_motion_action = @battler.motion_action[0]
    self.src_rect.y = 0
    end

    #--------------------------------------------------------------------------
    # ● Execute Motion Action
    #--------------------------------------------------------------------------
    def execute_motion_action
    refresh_action
    update_motion_action
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Action
    #--------------------------------------------------------------------------
    def update_motion_action
    return if @battler.motion_action[0] == -1
    $game_temp.battler_in_motion = true
    @battler.motion_action[1] += 1
    case @battler.motion_action[0]
    when -2
    end_action
    when 0
    update_motion_zoom
    when 1
    update_motion_jump
    when 2
    update_motion_round_right
    when 3
    update_motion_round_left
    when 4
    update_motion_shake
    when 5
    update_motion_front
    when 6
    update_motion_step_left
    when 7
    update_motion_step_right
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Step Left
    #--------------------------------------------------------------------------
    def update_motion_step_left
    case @battler.motion_action[1]
    when 1..20
    self.x -= 2
    when 21..40
    self.x += 2
    else
    end_action
    end

    end

    #--------------------------------------------------------------------------
    # ● Update Motion Step Right
    #--------------------------------------------------------------------------
    def update_motion_step_right
    case @battler.motion_action[1]
    when 1..20
    self.x += 2
    when 21..40
    self.x -= 2
    else
    end_action
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Shake
    #--------------------------------------------------------------------------
    def update_motion_shake
    self.x = @pre_set[0] + rand(@battler.motion_action[1]) if can_update_motion_shake?
    end_action if @battler.motion_action[1] > 40
    end

    #--------------------------------------------------------------------------
    # ● Can Update Motion Shake?
    #--------------------------------------------------------------------------
    def can_update_motion_shake?
    if $imported[:mog_battle_hud_ex] !=nil
    return false if @battler.is_a?(Game_Actor)
    end
    return true
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Zoom
    #--------------------------------------------------------------------------
    def update_motion_zoom
    case @battler.motion_action[1]
    when 1..20
    self.zoom_x += 0.01
    self.zoom_y += 0.01
    when 21..40
    self.zoom_x -= 0.01
    self.zoom_y -= 0.01
    else
    end_action
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Jump
    #--------------------------------------------------------------------------
    def update_motion_jump
    case @battler.motion_action[1]
    when 1..20
    self.y -= 9
    self.zoom_x += 0.01
    self.zoom_y += 0.01
    self.mirror = true
    self.angle += 9
    when 21..40
    self.y += 9
    self.zoom_x -= 0.01
    self.zoom_y -= 0.01
    self.mirror = false
    self.angle += 9
    else
    self.angle = 0
    end_action
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Front
    #--------------------------------------------------------------------------
    def update_motion_front
    case @battler.motion_action[1]
    when 1..20
    self.y += 3
    self.zoom_x += 0.02
    self.zoom_y += 0.02
    when 21..40
    self.y -= 3
    self.zoom_x -= 0.02
    self.zoom_y -= 0.02
    else
    end_action
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Round Left
    #--------------------------------------------------------------------------
    def update_motion_round_left
    case @battler.motion_action[1]
    when 1..15
    self.y += 3
    self.x -= 3
    self.mirror = false
    when 16..30
    self.x += 6
    self.mirror = true
    when 31..45
    self.y -= 3
    self.x -= 3
    self.mirror = false
    else
    end_action
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Motion Round Right
    #--------------------------------------------------------------------------
    def update_motion_round_right
    case @battler.motion_action[1]
    when 1..15
    self.y += 3
    self.x += 3
    self.mirror = true
    when 16..30
    self.x -= 6
    self.mirror = false
    when 31..45
    self.y -= 3
    self.x += 3
    self.mirror = true
    else
    end_action
    end
    end

    #--------------------------------------------------------------------------
    # ● End Action
    #--------------------------------------------------------------------------
    def end_action
    if $imported[:mog_battle_hud_ex] != nil and @battler.is_a?(Game_Actor)
    return_set(@original_set)
    else
    return_set(@pre_set)
    end
    @battler.motion_action = [-1,0]
    end

    end

    #==============================================================================
    #==============================================================================
    # ● COLLAPSE ●
    #==============================================================================
    #==============================================================================

    #==============================================================================
    # ■ Sprite Battler
    #==============================================================================
    class Sprite_Battler < Sprite_Base

    #--------------------------------------------------------------------------
    # ● Can Update Action
    #--------------------------------------------------------------------------
    def can_update_collapse?
    return true
    end

    #--------------------------------------------------------------------------
    # ● Update Blink
    #--------------------------------------------------------------------------
    alias mog_motion_animation_update_blink update_blink
    def update_blink
    return if @battler.dead?
    mog_motion_animation_update_blink
    end

    #--------------------------------------------------------------------------
    # ● Update Collapse
    #--------------------------------------------------------------------------
    def update_collapse
    end

    #--------------------------------------------------------------------------
    # ● Execute Motion Collapse
    #--------------------------------------------------------------------------
    def execute_motion_collapse
    collapse_end if self.opacity == 0
    @battler.motion_collapse[1] += 1
    case @battler.motion_collapse[0]
    when 0; update_collapse_vertical
    when 1; update_collapse_horizontal
    when 2; update_collapse_zoom_out
    when 3; update_collapse_zoom_in
    when 4; update_collapse_zoom_in_out
    when 5; update_collapse_boss_2
    when 6; update_collpase_do_nothing
    else ; update_collapse_normal
    end

    end

    #--------------------------------------------------------------------------
    # ● Can Execute Collapse
    #--------------------------------------------------------------------------
    def can_execute_collapse?
    return false if !@battler.dead?
    return false if @collapse_done
    return true
    end

    #--------------------------------------------------------------------------
    # ● Update Collapse Vertical
    #--------------------------------------------------------------------------
    def update_collapse_vertical
    self.zoom_y += 0.1
    self.zoom_x -= 0.02
    self.opacity -= 3
    end

    #--------------------------------------------------------------------------
    # ● Update Collapse Horizontal
    #--------------------------------------------------------------------------
    def update_collapse_horizontal
    self.zoom_x += 0.1
    self.zoom_y -= 0.02
    self.opacity -= 3
    end

    #--------------------------------------------------------------------------
    # ● Update Collapse Zoom Out
    #--------------------------------------------------------------------------
    def update_collapse_zoom_out
    self.zoom_x += 0.02
    self.zoom_y += 0.02
    self.opacity -= 4
    end

    #--------------------------------------------------------------------------
    # ● Update Collapse Zoom IN
    #--------------------------------------------------------------------------
    def update_collapse_zoom_in
    self.zoom_x -= 0.01
    self.zoom_y -= 0.01
    self.opacity -= 4
    end

    #--------------------------------------------------------------------------
    # ● Update Collapse Zoom IN OUT
    #--------------------------------------------------------------------------
    def update_collapse_zoom_in_out
    case @battler.motion_collapse[1]
    when 0..30
    self.zoom_x += 0.1
    self.zoom_y -= 0.02
    self.opacity -= 2
    else
    self.zoom_y += 0.5
    self.zoom_x -= 0.2
    self.opacity -= 10
    end
    end

    #--------------------------------------------------------------------------
    # ● Update Collapse Boss 2
    #--------------------------------------------------------------------------
    def update_collapse_boss_2
    self.x = @original_set[0] + rand(10)
    self.src_rect.y -= 1
    self.opacity = 0 if self.src_rect.y < -self.bitmap.height
    end

    #--------------------------------------------------------------------------
    # ● Update Collapse do nothing
    #--------------------------------------------------------------------------
    def update_collpase_do_nothing

    end

    #--------------------------------------------------------------------------
    # ● Update Collapse Normal
    #--------------------------------------------------------------------------
    def update_collapse_normal
    self.opacity -= 3
    self.blend_type = 1
    end

    #--------------------------------------------------------------------------
    # ● Collapse End
    #--------------------------------------------------------------------------
    def collapse_end
    @collapse_done = true
    return_set(@original_set)
    self.src_rect.y = -self.bitmap.height unless @battler.motion_collapse[0] == 6
    end

    #--------------------------------------------------------------------------
    # ● Revert to Normal
    #--------------------------------------------------------------------------
    alias mog_battler_motion_revert_to_normal revert_to_normal
    def revert_to_normal
    if @collapse_done
    @collapse_done = false
    return_set(@original_set)
    end
    mog_battler_motion_revert_to_normal
    end

    end
    in that order underneath the Materials Script Header

    so i started tearing mogs script apart to find how he was keeping the characters around...

    To answer your first question delete this section from his script

      #--------------------------------------------------------------------------
      # ● Update Collapse
      #--------------------------------------------------------------------------
      def update_collapse    
      end

    and to answer your second question if you delete everything inside "can_update_battler_motion?" then the enemies begin to move again. Although I dont know if this disrupts any other functionality you wanted from his script.

      #--------------------------------------------------------------------------
      # ● Can Update Battler Motion
      #--------------------------------------------------------------------------      
      def can_update_battler_motion?
          return false if @battler == nil
          return false if !@battler.use_sprite?
          return false if @battler.screen_x == nil
          return false if @battler.is_a?(Game_Actor) and !MOG_BATTLER_MOTION::ENABLE_ACTOR_MOTION
          return false if @battler.is_a?(Game_Enemy) and !MOG_BATTLER_MOTION::ENABLE_ENEMY_MOTION
          return true
      end

    Anyway hope this helps
     
    #7
  8. 12212026

    12212026 Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Ohhh and by the way if anyone finds this post who wants to make their corpses stick around just make a new script under battle symphony containing

    #==============================================================================
    # ■ Sprite Battler
    #==============================================================================
    class Sprite_Battler < Sprite_Base
     
      #--------------------------------------------------------------------------
      # ● Update Collapse
      #--------------------------------------------------------------------------
      def update_collapse    
      end

    end
     
    #8

Share This Page