Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

status effect icons script repost

McP

Member

Hello,
I'm looking for the script with the name "status effect icons".
I once saw it here.
It shows icons instead of the written state in order to display the current states of a character.
It was posted by ccoa
The entry in the FSL reads:
by ccoa (07-08-2007) (reposted from .net)
Custom Menu Add-Ons / Custom Battle Add-Ons / Audio/Video Enhancements
This is a repost of a scriptlet I created long ago at .net. I finally found it and dusted it off, and improved it to now show status icons for enemies in the help window. Essentially, this script uses icons that you import (sized 32x32 pixels) instead of the state names in [].

However, the FSL link is dead.
 
...Try a search, or the Forum Script Listings (it's stickied). As well, this isn't enough info to justify keeping this open. Please, read the Rules and reform your post. If it's not cleaned up in 24 hours, I'll lock this for ya.
 

Fade

Member

I have a copy of it. I seem to recall that she made more than one version, and I'm not sure if this is the latest, but here you go.

Add to Window_Base:
Code:
def make_battler_state_images(battler)
   images = []
   for i in battler.states
     images.push(RPG::Cache.icon($data_states[i].name))
   end
   return images
 end

And replace the method draw_actor_state with this:

Code:
def draw_actor_state(actor, x, y, width = 120)
   images = make_battler_state_images(actor)
   for i in 0...images.length
     rect = Rect.new(x + (i * 26), y, self.width - 32, 24)
     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
     self.contents.blt(x + (i * 26), y, images[i], Rect.new(0, 0, 24, 24), 255)
   end
 end
Now import icons that are named for the status ailments in your database. For example, if you have a state named Divine Grace, import a 24 x 24 icon that is named Divine Grace.png.
 
I was just wondering I am using this too because I saw the topic and wanted this and I am trying to make an icon for [Normal] state so that it isn't just plain nothing where my actor's status should be. I am working on it and have made it so the normal icon shows at all times, but I am stuck at taking it away when another state is added. Here is what I have as of now for one piece (state adding snippet):
Code:
  def make_battler_state_images(battler)
   images = []
   images.push(RPG::Cache.icon("Normal"))
   for i in battler.states
     images.push(RPG::Cache.icon($data_states[i].name))
   end
    return images
 end

Could someone please help me take the [Normal] status icon away when adding another state?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top