The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Scripts Database => Topic started by: Falcon on January 06, 2008, 12:29:13 AM

Title: Status Effects as Icons
Post by: Falcon on January 06, 2008, 12:29:13 AM
Yeah, I'm not using the template, it'd take me more time to do the template than it did for me to make this script.

This just displays up to 5 status effects as icons, ccoa made this script, it was on .org, but I wasn't able to find it anywhere.

Give credit to Ccoa, since she made the original version, I just rewrote it.

Code: [Select]
# Status Effects as Icons
# Original Script by Ccoa
# Since Falcon didn't have 1337 search skills, he rewrote this
class Window_Base
  #--------------------------------------------------------------------------
  # * Draw State
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 120)
    for i in 0...actor.states.length
      if i < 5
        ix = 24 * i
        bitmap = RPG::Cache.icon($data_states[actor.states[i]].name + ".png" )
        self.contents.blt(ix, y, bitmap, Rect.new(0, 0, 24, 24))
      end
    end
  end
end
Title: Re: Status Effects as Icons
Post by: ccoa on March 27, 2008, 03:39:53 PM
http://www.pcis-studios.com/ccoa/StatusIcons.exe

This one replaces the status in the help window during battle and allows icons of any size (just change this line: ICON_SIZE = 32).  Icon names must be the same as status names from the database.
Title: Re: Status Effects as Icons
Post by: hoangluan127 on September 22, 2010, 05:33:07 AM
Yeah, I'm not using the template, it'd take me more time to do the template than it did for me to make this script.

This just displays up to 5 status effects as icons, ccoa made this script, it was on .org, but I wasn't able to find it anywhere.

Give credit to Ccoa, since she made the original version, I just rewrote it.

Code: [Select]
# Status Effects as Icons
# Original Script by Ccoa
# Since Falcon didn't have 1337 search skills, he rewrote this
class Window_Base
  #--------------------------------------------------------------------------
  # * Draw State
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 120)
    for i in 0...actor.states.length
      if i < 5
        ix = 24 * i
        bitmap = RPG::Cache.icon($data_states[actor.states[i]].name + ".png" )
        self.contents.blt(ix, y, bitmap, Rect.new(0, 0, 24, 24))
      end
    end
  end
end
the icons always show in the first character
so that:
bitmap = RPG::Cache.icon($data_states[actor.states].name + ".png" )
        self.contents.blt(ix+x, y, bitmap, Rect.new(0, 0, 24, 24))
it's better now