Script Request: Animated Item drop graphics for Blizz Abs [Request Filled!]

Started by Shek, November 20, 2013, 01:46:02 pm

Previous topic - Next topic

Shek

I know how this would be done if I were to do it; just change the item drop graphic from an icon to a Character sprite with 'stop animation'  and 'direction fix' set to on.
Sadly I am mentally disabled when it comes to scripting so I'm not sure where exactly I'd put this into blizz abs script / how to do it.

If anyone has some free time, this would help a lot! I'm trying to steer away from using health pots in my game and want enemies to drop health globes that sustain your HP as you battle through waves of enemies.  Sadly, a health globe that isn't animated looks kind of lame.

KK20

Question: do your enemies also drop normal items as well? / Do you have Tons multi-drop script?

EDIT: Here's a really basic edit
Spoiler: ShowHide

# Contains a list of icon graphic filenames. Items that use this icon graphic
# will be replaced with a character graphic of the same name during a dropped
# item event.
# For example, if the enemy drops a Potion (which uses the icon graphic
# "021-Potion01") then, instead of showing this icon graphic on the map, it will
# instead show a character graphic named "021-Potion01" walking.
ANIMATING_ICONS = ['021-Potion01', 'health_globe']


module BlizzABS
 
  #============================================================================
  # BlizzABS::Processor
  #----------------------------------------------------------------------------
  #  This class provides methods for Blizz-ABS handling.
  #============================================================================
 
  class Processor
    #--------------------------------------------------------------------------
    # drop_event
    #  items   - array of items which the event contains
    #  real_x  - real x-coordinate
    #  real_y  - real y-coordinate
    #  dropper - the enemy that dropped the loot
    #  time    - timer setting
    #  Creates an event that contains loot that can be picked up.
    #--------------------------------------------------------------------------
    def drop_event(items, real_x, real_y, dropper = nil, time = nil)
      # map coordinates
      x, y, icon = real_x / 128, real_y / 128, false
      # if gold dropped and no corpses used
      if dropper == nil && items[0].is_a?(Numeric) &&
          !BlizzABS::Config::CORPSES
        # set up everything for map display
        event = create_drop_event(x, y, BlizzABS::Config::GOLD_DROP)
        # setup the event commands
        setup_drop_event(event, items, BlizzABS::Config::GOLD_PICKUP_SOUND_FILE)
      else
        # if not dropped by enemy
        if dropper == nil
          # create drop event with icon spriteset
          event = create_drop_event(x, y, items[0].icon_name)
          # event with icon spriteset
          #=================================================
          #                                     KK20 EDIT
          #=================================================
          if ANIMATING_ICONS.include?(items[0].icon_name)
            icon = false
          else
            icon = !Items.drop_sprite(items[0].id)
          end
        # if using corpses
        elsif BlizzABS::Config::CORPSES
          # create drop event
          event = create_drop_event(x, y, dropper.character_name_org +
              BlizzABS::SPRCorpse, dropper.character_hue, 0)
        else
          # create drop event
          event = create_drop_event(x, y, dropper.character_name_org,
              dropper.character_hue)
        end
        # setup the event commands
        setup_drop_event(event, items)
      end
      # call superclass method
      drop = Game_Event.new($game_map.map_id, event)
      # mark created event as icon event
      drop.icondrop = icon
      # refresh
      drop.refresh
      # set up drop mode
      drop.activate_drop_mode(BlizzABS::Config::DROP_TIME * 40)
      # add into map events
      $game_map.events[event.id] = drop
      # stop if scene not Scene_Map or spriteset doesn't exist
      return if !$scene.is_a?(Scene_Map) || $scene.spriteset == nil
      # create own sprite as dropped
      sprite = Sprite_Character.new($scene.spriteset.viewport1, drop)
      # add to spriteset handler
      $scene.spriteset.character_sprites.push(sprite)
    end
   
  end
 
end


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

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

Join the CP Discord Server!

Shek

So I've been reading this forum like it's my job for the past two months, but have never posted until this past week.

I have read so many posts and guides by so many of you and have gotten to know you all by name.  Now I'm posting and you're helping me with your awesomeness.  It honestly feels like I'm meeting celebrities here.

Thanks so much! My glowy health globes work now!