Main Menu
  • Welcome to The RPG Maker Resource Kit.

Status Effects as Icons

Started by Falcon, January 06, 2008, 12:29:13 AM

0 Members and 1 Guest are viewing this topic.

Falcon

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.


# 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

ccoa

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.

hoangluan127

Quote from: 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.


# 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