The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX => VX Scripts Database => Topic started by: modern algebra on September 14, 2009, 08:14:50 PM

Title: Minto's Monster Collapse VX
Post by: modern algebra on September 14, 2009, 08:14:50 PM
Minto's Monster Collapse
Version: 1.2
Author: modern algebra & Minto
Date: June 25, 2010

Version History



Description


This is a complete rewrite of Minto's Monster Collapse script in order for it to function optimally in RMVX. While the implementation was entirely rewritten, most of the basic algorithms for the effects are Minto's and so he deserves a lot of credit for this script.

The script is very simple and allows for two basic functions:
  1) Can play a specified animation upon the death of a monster
  2) Can specify a special collapse effect, rather than the default fade.
  3) Specify the colour each monster changes to, rather than default white

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg132.imageshack.us%2Fimg132%2F610%2Fmonstercollapse.png&hash=fbbbc9f2b6206b565beb53087a7d78f8568b1d2c)
1 of the 14 new custom collapse effects. This one is Horizontal Division and Horizontal Separation

Instructions

Paste this script in its own slot above Main and below Materials in the Script Editor (F11)

To setup collapse effects, all you need to do is use are the following codes in the notebox of the enemy:

     \COLLAPSE_ANIM[n]
       n : an integer; the ID of the animation you want played. Defaults to 0, which means no animation played.
 
     \COLLAPSE_TYPE[n]
       n : the ID of the collapse effect you want played. These are:
              0  => Default Collapse Effect
              1  => Shrink
              2  => Horizontal Expansion
              3  => Vertical Expansion
              4  => Contract and Ascend
              5  => Rotate
              6  => Shake and Descend
              7  => Divides Vertically and Separates Vertically
              8  => Divides Horizontally and Separates Horizontally
              9  => Divides Vertically and Separates Horizontally
              10 => Divides Horizontally and Separates Vertically
              11 => Wave
              12 => Blur
              13 => Fast Rotate & Shrink
              14 => Eraser
              15 => Pixel Away

     \COLLAPSE_TYPE_RANDOM
       randomly chooses a collapse type for each instance of the enemy

     \COLLAPSE_COLOR[#hex]
       can specify in hexadecimal the colour it changes to when collapsing.
         [#rrggbbaa] # rr - red, gg - green, bb - blue, aa - alpha (opacity)
       Examples: \collapse_color[#FFFFFF] # Black
                 \collapse_colour[#FF808080] # Default

Link to a hex converter so you know what to do: http://www.statman.info/conversions/hexadecimal.html

Script


Code: [Select]
#==============================================================================
#    Minto's Monster Collapse VX
#    Version: 1.2
#    Author: Minto & modern algebra (rmrk.net)
#    Date: June 25, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This is a complete rewrite of Minto's Monster Collapse script in order for
#   it to function optimally in RMVX.
#
#    The script is very simple and allows for three basic functions:
#      1) Can play a specified animation upon the death of a monster
#      2) Can specify a special collapse effect, rather than the default fade.
#      3) Specify the colour each monster changes to, rather than default white
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:

#    Paste this script in its own slot above Main and below Materials in the
#   Script Editor (F11)
#
#    To setup collapse effects, all you need to do is use are the following
#   codes in the notebox of the enemy:
#
#      \COLLAPSE_ANIM[n]
#        n : an integer; the ID of the animation you want played. Defaults to
#           0, which means no animation played.
#   
#      \COLLAPSE_TYPE[n]
#        n : the ID of the collapse effect you want played. These are:
#               0  => Default Collapse Effect
#               1  => Shrink
#               2  => Horizontal Expansion
#               3  => Vertical Expansion
#               4  => Contract and Ascend
#               5  => Rotate
#               6  => Shake and Descend
#               7  => Divides Vertically and Separates Vertically
#               8  => Divides Horizontally and Separates Horizontally
#               9  => Divides Vertically and Separates Horizontally
#               10 => Divides Horizontally and Separates Vertically
#               11 => Wave
#               12 => Blur
#               13 => Rotate Fast & Shrink
#               14 => Eraser
#               15 => Pixel Eraser
#
#      \COLLAPSE_TYPE_RANDOM
#        randomly chooses a collapse type for each instance of the enemy
#
#      \COLLAPSE_COLOR[#hex]
#        can specify in hexadecimal the colour it changes to when collapsing.
#          [#rrggbbaa]
#        Examples: \collapse_color[#FFFFFF] # Black
#                  \collapse_colour[#FF808080] # Default
#
#      \COLLAPSE_BLEND[n]
#        n : the blend type. 0 => Normal; 1 => Addition; 2 => Subtraction
#           The default is 1. You might want to set it to 0 for pixel away or
#           blur effects.
#==============================================================================

#==============================================================================
# ** RPG::Enemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new methods - collapse_animation, collapse_type, collapse_blend, effect_ids
#==============================================================================

class RPG::Enemy
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Animation
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def collapse_animation
    @collapse_anim = self.note[/\\COLLAPSE_ANIM\[(\d+)\]/i] != nil ? $1.to_i : 0 if @collapse_anim.nil?
    return @collapse_anim
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Type
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def collapse_type
    return $1.to_i if self.note[/\\COLLAPSE_TYPE\[(\d+)\]/i] != nil
    array = self.effect_ids
    return array[rand (array.size)] if self.note[/\\COLLAPSE_TYPE_RANDOM/i] != nil
    return 0
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Colour
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def collapse_color
    r, g, b, a = 255, 128, 128, 128
    if self.note[/\\COLLAPSE_COLOU?R\[#([\dABCDEF]+)\]/i] != nil
      r = $1[0, 2].to_i (16) if $1.size >= 2
      g = $1[2, 2].to_i (16) if $1.size >= 4
      b = $1[4, 2].to_i (16) if $1.size >= 6
      a = $1[6, 2].to_i (16) if $1.size >= 8
    end
    return r, g, b, a
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Blend
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def collapse_blend
    return $1.to_i % 3 if self.note[/\\COLLAPSE_BLEND\[(\d+)\]/i] != nil
    return 1
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Effect IDs
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def effect_ids
    effects = []
    for i in 0...16 do effects.push (i) end
    return effects
  end
end

#==============================================================================
# ** Game Enemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new instance variable - collapse_type
#    aliased method - perform_collapse
#==============================================================================

class Game_Enemy
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variable
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :collapse_type # The collapse type for this enemy
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Perform Collapse
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_mino_prfrmclpse_mons_0ki2 perform_collapse
  def perform_collapse (*args)
    # Do not play Sound Effect here unless no animation is specified
    if enemy.collapse_animation > 0 && $game_temp.in_battle && dead?
      @collapse = true
      self.animation_id = enemy.collapse_animation
    else
      # Run Original Method
      malg_mino_prfrmclpse_mons_0ki2 (*args)
    end
    @collapse_type = enemy.collapse_type
  end
end

#==============================================================================
# ** Sprite_Battler
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - update_collapse, x=, y=
#    new method - execute_special_collapse, create_dup_sprite
#==============================================================================

class Sprite_Battler
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Collapse
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_mint_moncollapse_upd_0kh2 update_collapse
  def update_collapse (*args)
    if @battler.actor?
      malg_mint_moncollapse_upd_0kh2 (*args) # Run Original Method
      return
    end
    # If animation, hold off on executing collapse
    if self.animation?
      # Restore lost time
      @effect_duration += 1
      return
    end
    execute_special_collapse (@battler.collapse_type)
    malg_mint_moncollapse_upd_0kh2 (*args) # Run Original Method
    self.color.set (*@battler.enemy.collapse_color)
    self.blend_type = @battler.enemy.collapse_blend
    # Update Duplicate Sprite Opacity
    @dup_sprite.opacity = self.opacity if @dup_sprite != nil
    # If Ending the effect
    if @effect_duration == 0
      # Restore Zoom
      self.zoom_x = 1
      self.zoom_y = 1
      # Free @dup_sprite (not dispose because of Cache)
      @dup_sprite = nil
    elsif @effect_duration == 47 && @battler.enemy.collapse_animation > 0
      # Play Collapse SE once animation has finished.
      Sound.play_enemy_collapse
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Set X
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mal_minto_setx_collapse_0kh3 x=
  def x= (n, *args)
    # Override general x setting when collapsing
    return if @effect_type == COLLAPSE && n == @battler.screen_x
    mal_minto_setx_collapse_0kh3 (n, *args)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Set Y
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias algbmod_ntomi_yset_cllpse_9gb2 y=
  def y= (n, *args)
    # Override general x setting when collapsing
    return if @effect_type == COLLAPSE && n == @battler.screen_y
    algbmod_ntomi_yset_cllpse_9gb2 (n, *args)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Create Duplicate Sprite
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def create_dup_sprite (split_type = 0)
    # Create new sprite of the same class and set components
    @dup_sprite = self.class.new (self.viewport, @battler)
    @dup_sprite.x, @dup_sprite.y = self.x, self.y
    @dup_sprite.blend_type = 1
    @dup_sprite.color.set(255, 128, 128, 128)
    @dup_sprite.update
    if split_type == 0 # Vertical Split
      @dup_sprite.src_rect.width = @dup_sprite.ox
      self.src_rect.x = self.ox
      self.x += self.ox
    elsif split_type == 1 # Horizontal Split
      @dup_sprite.src_rect.height = @dup_sprite.oy / 2
      self.src_rect.y = self.oy / 2
      self.y += self.oy / 2
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Execute Special Collapse
  #    collapse_type (type of collapse)
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def execute_special_collapse (collapse_type)
    case collapse_type
    when 1 # Shrink
      self.zoom_x -= 0.02
      self.zoom_y -= 0.02
      self.y -= (0.01*self.height)
    when 2 # Horizontal Expansion
      self.zoom_x += 0.05
    when 3 # Vertical Expansion
      self.zoom_y += 0.05
      self.zoom_x -= 0.02
    when 4 # Spring Ascent
      if @effect_duration >= 24 then
        self.zoom_y = [self.zoom_y - 0.02, 0].max
        self.zoom_x = [self.zoom_x + 0.01, 1.24].min
      else
        self.zoom_x -= 0.115
        self.zoom_y += 0.6
      end
    when 5 # Rotate
      self.zoom_x -= 0.03
      self.zoom_y += 0.05
      self.angle += 7.5
    when 6 # Shake Descent
      if @effect_duration >= 44
        self.ox -= 1
      else
        self.ox += ((@effect_duration / 4) % 2) == 0 ? 2 : -2
      end
      self.src_rect.y -= self.bitmap.rect.height / 48
    when 7 # Vertical Division; Vertical Movement
      create_dup_sprite (0) if @effect_duration == 47 # Split Vertically
      self.y += [self.oy / 96, 1].max
      @dup_sprite.y -= [@dup_sprite.oy / 96, 1].max
    when 8 # Horizontal Division; Horizontal Movement
      create_dup_sprite (1) if @effect_duration == 47 # Split Horizontally
      self.x += [self.ox / 48, 1].max
      @dup_sprite.x -= [@dup_sprite.ox / 48, 1].max
    when 9 # Vertical Division; Horizontal Movement
      create_dup_sprite (0) if @effect_duration == 47 # Split Vertically
      self.x += [self.ox / 48, 1].max
      @dup_sprite.x -= [@dup_sprite.ox / 48, 1].max
    when 10 # Horizontal Division; Vertical Movement
      create_dup_sprite (1) if @effect_duration == 47 # Split Horizontally
      self.y += [self.oy / 96, 1].max
      @dup_sprite.y -= [@dup_sprite.oy / 96, 1].max
    when 11 # Wave
      self.wave_amp += 1
    when 12 # Blur
      self.bitmap = self.bitmap.dup if @effect_duration == 47
      self.bitmap.blur if @effect_duration % 4 == 0
    when 13 # Fast Rotate and Shrink
      self.angle += 48 - @effect_duration
      execute_special_collapse (1)
    when 14 # Eraser
      self.bush_opacity = 0
      self.bush_depth += (self.height / 48.0).ceil
    when 15 # Pixel Eraser
      if @effect_duration == 47
        self.bitmap = self.bitmap.dup
        @pixels_to_erase = []
        for i in 0...self.bitmap.width
          for j in 0...self.bitmap.height
            @pixels_to_erase.push ([i, j])
          end
        end
        @pixel_erase_rate = @pixels_to_erase.size / 48
      end
      erase_color = Color.new (255, 255, 255, 0)
      @pixel_erase_rate.times do
        x, y = @pixels_to_erase.delete_at (rand (@pixels_to_erase.size))
        self.bitmap.set_pixel (x, y, erase_color)
      end
    end
  end
end

Credit



Support


Please post in this topic at rmrk.net if you have any suggestions for improvement or bug reports.

Known Compatibility Issues

Spoiler for Tankentai Sideview Battle 3.3:
There is a compatibility issue with Enu's Tankentai Sideview Battle. The following patch will fix it. It should be below both the Sideview Battle script and Monster Collapse in the Script Editor (F11) to work.

Note that

Code: Compatibility Fix [Select]

#==============================================================================
#    Monster Collapse + Tankentai SBS Compatibility Patch
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: September 16, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This patch resolves incompatibility between the Enu's Sideview 3.3 and
#   my Minto's Monster Collapse VX 1.1b scripts. There may be interference with
#   other addons - no tests were conducted.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    Place Monster Collapse under Tankentai and this patch under Monster
#   Collapse in the Script Editor (F11).
#
#    Since I wanted to retain the special collapse effects tankentai has, the
#   IDs for the effects are different from the regular monster collapse script.
#   The tankentai codes take 1, 2, 3 and Monster Collapse effects are shifted
#   up by 3. The list is:
#      0  => Default Fade
#      1  => Sprite Stays on Screen (Tankentai)
#      2  => Default Fade (Tankentai)
#      3  => Boss Collapse (Tankentai)
#      4  => Shrink
#      5  => Horizontal Expansion
#      6  => Vertical Expansion
#      7  => Contract and Ascend
#      8  => Rotate
#      9  => Shake and Descend
#      10 => Divides Vertically and Separates Vertically
#      11 => Divides Horizontally and Separates Horizontally
#      12 => Divides Vertically and Separates Horizontally
#      13 => Divides Horizontally and Separates Vertically
#      14 => Wave
#      15 => Blur
#      16 => Rotate Fast & Shrink
#      17 => Eraser
#      18 => Pixel Eraser
#
#   Please note that the way for setting up the collapse effect in tankentai
#   will no longer work. You must set the collapse type in the enemy's notebox
#   as you would for any other effect. \COLLAPSE_TYPE[x]
#==============================================================================

#==============================================================================
# ** Sprite_Battler
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - collapse_action, execute_special_collapse
#==============================================================================

class Sprite_Battler
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Collapse Action
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malg_sbs_clpsact_mon_8kg2 collapse_action
  def collapse_action (*args)
    malg_sbs_clpsact_mon_8kg2 (*args) # Run Original Method
    if @collapse_type == 0
      @collapse_type = 2
      @effect_duration = N01::COLLAPSE_WAIT + 48
    end
    if @collapse_type > 3
      @effect_duration = N01::COLLAPSE_WAIT + 48
      Sound.play_enemy_collapse
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Execute Special Collapse
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_sbstnk_monster_clpse_special_0gh2 execute_special_collapse
  def execute_special_collapse (id, *args)
    return if @effect_duration >= 48 || id < 4
    ma_sbstnk_monster_clpse_special_0gh2 (id - 3, *args)  # Reduce ID
    normal_collapse
  end
end


It will likely not work with some exotic battle systems. If you encounter any problems with the battle system you want to use, please link and I will determine whether or not to write compatibility patches (If it doesn't use default monster battlers, chances are unlikely). If you do encounter a compatibility problem, remember to first try changing the order the scripts are in.

Demo


Download Demo (http://rmrk.net/index.php?action=dlattach;topic=34815.0;attach=17888)


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
Title: Re: Minto's Monster Collapse VX
Post by: SuperMega on September 14, 2009, 09:21:04 PM
This is a great script, and I can confirm that it does not work with Takentai ATB... ;9
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on September 14, 2009, 09:44:56 PM
Yeah, I figured it wouldn't, but I'll take a look and see if there's anything that pops out at me.

EDIT::

Looks like it has its own special collapse options built into it. The boss collapse is quite cool. I should consider putting in a wave amp kind of collapse.

I probably could find a way to make the scripts compatible, but I don't think I will, at least not now.
Title: Re: Minto's Monster Collapse VX
Post by: Grafikal on September 14, 2009, 09:49:05 PM
Quote
\COLLAPSE_ANIM[n]
       n : an integer; the ID of the animation you want played. Defaults to 0, which means no animation played.

AWESOME
Title: Re: Minto's Monster Collapse VX
Post by: Cascading Dragon on September 15, 2009, 12:42:37 AM
Awesome script. Good job.
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on September 15, 2009, 09:49:02 PM
Thank you!

Also, I updated the script to 1.1

Basically, I did a few things:
Title: Re: Minto's Monster Collapse VX
Post by: Cascading Dragon on September 16, 2009, 12:20:47 AM
Nice. I might actually use this now.

Off-topic:
Any idea when Advanced Text System 3.0 is gonna be released?
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on September 16, 2009, 01:17:39 AM
I'm not really actively working on it yet. I have done some work with the Paragraph Formatter that internalizes some of the interpretation of message codes to the formatter, and that might be imported into ATS 3.0, but I haven't actually evaluated the work that needs to be done with the ATS yet.
Title: Re: Minto's Monster Collapse VX
Post by: chronofreak on September 16, 2009, 05:18:04 AM
Very nice script, I'm definitely going to use it. One question/request, though: would there be a way to cause the collapse animation to change depending on what weapon/skill you used to kill the monster? (i.e. The monster was killed by a sword slash and thus has a horizontal separation animation.) Of course, don't bother with this if it involves a lot of work...
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on September 16, 2009, 10:51:12 AM
I could probably add it, but it is not a feature yet.
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on September 17, 2009, 07:39:26 PM
I updated this script in order to fix a bug with the blur effect.

More importantly, however, I have posted a compatibility patch for use with the popular Tankentai Sideview Battle System. You should now be able to use this script to give your battlers interesting collapse effects even when using Tankentai. It can be found under the Known Compatibility Problems header in the first post.
Title: Re: Minto's Monster Collapse VX
Post by: SuperMega on September 17, 2009, 11:46:00 PM
Hm...The patch isn't working for me.  I'm thinking it's because I'm using the ATB add-on.  So I guess that still doesn't work, but why would it be so different from regular Takentai?  :'(
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on September 18, 2009, 12:40:18 AM
Could be a lot of reasons. Addons, despite the name, very seldom are addons in the strictest sense. Usually they change ways in which the script operates. If you could post the addon then I could take a look at it.


EDIT::

I tried it with ATB. It worked. Are you sure it's not some other addon you have that's interfering, like animated battlers?

I attached the demo of my test so you can see script order and stuff.
Title: Re: Minto's Monster Collapse VX
Post by: SuperMega on September 18, 2009, 08:54:14 PM
That's very odd.  See, when I try it with the patch, my enemies don't have any animation once they die.  When they die, nothing happens, but their dead.  I am using Animated Battlers, but not on the enemies that I tried this on.  Would it still cause this problem?
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on September 20, 2009, 03:00:27 AM
It could, potentially. I haven't really tried it.
Title: Re: Minto's Monster Collapse VX
Post by: Heartofshadow on January 21, 2010, 06:25:39 AM
Okay, I understand it has been a while since this topic was posted in, but I have an error I feel many people who use this script could benefit from. Therefore, I'm posting anyway. =)

When using this script in combination with Yanfly's Scene Battle ReDux (http://www.pockethouse.com/rpgvx/scripts/scenebattleredux.txt) (whether one is above the other or not) the error below pops up if an actor is killed in battle.

Code: [Select]
Minto's Monster Collapse VX
Line 154: NoMethodError occurred.

undefined method `collapse_type` for #<Game_Actor>

I was wondering if there was a fix for this, cause the two together are pretty awesome (not counting the current error, of course). Hopefully it's a quick-fix.. would love to be able to use these two scripts flawlessly.


-Heart of Shadow-
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on January 21, 2010, 03:50:52 PM
Sure thing. Try pasting this script into its own slot below the Monster Collapse script, but still above Main

Code: [Select]
#==============================================================================
#    Monster Collapse + Yanfly Battle (ReDux or Zealous) Compatibility
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: January 21, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place this patch in its own slot in the Script Editor (F11), somewhere
#   below the Monster Collapse script. That should fix the death error. This
#   patch works with both the ReDux and Zealous versions
#==============================================================================

#==============================================================================
# ** Sprite_Battler
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - update_collapse
#==============================================================================

class Sprite_Battler
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Update Collapse
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_ysbr_mintocollaps_upd_5th2 update_collapse
  def update_collapse (*args)
    # Call default if actor, otherwise call monster collapse
    @battler.actor? ? malg_mint_moncollapse_upd_0kh2 (*args) : ma_ysbr_mintocollaps_upd_5th2 (*args)
  end
end
Title: Re: Minto's Monster Collapse VX
Post by: Heartofshadow on January 21, 2010, 05:45:57 PM
Works just dandy now!

You, sir, are the bomb. Thanks for the fix!


-Heart of Shadow-
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on June 26, 2010, 01:11:28 AM
Updated to 1.2 to fix a bug when the actor dies. Also, I added the ability to change the blend type of a collapse and I added a new effect: Pixel Erase. It will erase a battler by randomly erasing pixels until it is gone. I also integrated the Yanfly fix into the script itself.
Title: Re: Minto's Monster Collapse VX
Post by: cozziekuns on June 26, 2010, 01:51:43 AM
How did I miss this?

These are awesome! I like 5 and 15 the most.
Title: Re: Minto's Monster Collapse VX
Post by: Atomic_Apple123 on August 03, 2010, 07:41:22 PM
It won't work on S.B.S. 2.6 cuz everytime i kill a battler with a specific monster collapse(ex:Rotate),it won't do anything except Regular Death :(.
Title: Re: Minto's Monster Collapse VX
Post by: wsensor on September 17, 2010, 06:34:44 AM
Hey Modern Algebra there is a glitchy problem with the script and animated enemies for tankentai.

If you have an animated enemy and you kill it it will...
1st show part of the animation.
2nd show the sprite sheet of the animated enemy with the animation.
3rd go back to the non entire spritesheet of the animated enemy and die.
Title: Re: Minto's Monster Collapse VX
Post by: Wiimeiser on September 21, 2010, 12:27:15 PM
Compatibility notice:
If anything relating to this script is placed below a JP number the game will crash with a normal Windows error when it tries to return to the field. Putting the JP at the bottom seems to fix this though.
Title: Re: Minto's Monster Collapse VX
Post by: wsensor on October 04, 2010, 05:23:36 PM
Well I think I know what my error is.
I was using a single sprite for placement of enemy battles.
IE: top left frame of the charchip for each enemy.
However I am using animated enemies...
I think thats what caused my problems.
I had no problems with the basic death animations however so I am unsure on this lol.
Title: Re: Minto's Monster Collapse VX
Post by: anthrenz on October 15, 2011, 04:16:49 PM
sorry for necroposting, just wondering if this can be set for specified skill. for example i want a DIVIDE INTO HALF skill, so if that skill kills the monster the set collapse animation should be applied...
Title: Re: Minto's Monster Collapse VX
Post by: modern algebra on October 15, 2011, 07:24:28 PM
That's a good idea. If I find the time I will add such a feature.
Title: Re: Minto's Monster Collapse VX
Post by: anthrenz on October 15, 2011, 08:11:57 PM
That's a good idea. If I find the time I will add such a feature.

actually im finding a way on how to do that but im not a scripter. that's why i thought i should go here and share my idea.
im just waiting for the feature to be done and hope it's tankentai compatible ;D

anyway thanks in advance sir modern algebra :)