Jump to content
Vlue

Basic Enemy HP Bars

Recommended Posts

Basic Enemy HP Bars v2.1
Basic Enemy HP Bars Lite v1.0.2

by V.M.


Introduction
Provides basic hp gauges over enemies in battle with options for displaying percentage or absolute value of remaining hp, as well as customizing color, size, and position. And now with the option to use a custom image from file!

New Lite version without the option for a customizable gauge, for use with Sleek Gauges

Features
- Plug and play with default settings
- Customizable colors, size, position
- Can display remaining hp as percentage or absolute value
- Can use custom image from file

Screenshots

ENEMYHP1.pngENEMYHP2.pngENEMYHP3.png



How to Use
Plug and play, no editing required for default bars.
Customization can be found right in the script with comments explaining the values.

Script
Convenient pastebin right... over there >> Here!
And to play around, a image file I made for the custom image feature: Custom_HP.png

Lite version: http://pastebin.com/dEkBwmPw


FAQ
None Available

Credit and Thanks
- By V.M. of D.T.
- Free to use in any project with credit given

Edited by Vlue

Share this post


Link to post
Share on other sites

Would it be possible to only show enemy HP bars if a certain actor is in the active battle party, or after using a skill on the enemy (sort of like a Scan spell)?

Share this post


Link to post
Share on other sites

Yes and yes! Thanks to the way I rewrote it, that was very easy. Newer version up with those options!

Share this post


Link to post
Share on other sites

Here's some more suggestions... these are all based on me using the script requiring a certain actor to be in the party.

 

- HP Bars are showing for a quick moment and then disposing if an actor is required, and is not in the ACTIVE battle party. This may have been a one-time occurence, because I haven't seen it happen again afterwards.

- HP Bars are not disposing when an enemy dies. The bar remains on the screen and says 0 with an empty bar. Having it dispose would be better once the enemy has been defeated.

- If using required actors AND a required state, having the required actor in the party will not show the enemy HP bars. Applying the state will still work, however.

 

That is all for now. Good work!

Share this post


Link to post
Share on other sites

Suggestions!? I would call those like.. bugs! Errors even~

1. I have no clue, the way it's written, that shouldn't happen...

2. Correct! But only when you use required actor or state. That's been fixed now.

3. Yah, I didn't really expect both to be used I guess! Bad past me. That's been fixed.

Share this post


Link to post
Share on other sites

Excellent work, now I just think a little z layer priority needs to be placed on the bars so they always appear ABOVE the enemies. Sometimes, if the enemies are close enough together on the screen, they can overlap the HP Bars and obscure them.

Share this post


Link to post
Share on other sites

Vlue: Something in this script is causing the RGSS player to crash. I've used Mithran's Bug Fix script to determine this, and after removing the script, no more crashing.

 

Here is what the script output to me. Maybe it will be some help in finding a way to fix it.

 


Time: 2012-12-05 06:02:00 -0500
Critical Object #<Sprite_Base:0xe347da4>
In Scene NilClass
Caller:: 
{0221}:87:in `update_hp_bar'
{0221}:82:in `update'
{0050}:333:in `block in update_enemies'
{0050}:333:in `each'
{0050}:333:in `update_enemies'
{0050}:311:in `update'
{0124}:7998:in `update'
{0050}:20:in `initialize'
{0124}:7991:in `initialize'
{0181}:91:in `initialize'
{0117}:146:in `new'
{0117}:146:in `create_spriteset'
{0124}:8254:in `create_spriteset'
{0117}:13:in `start'
{0100}:12:in `main'
{0230}:201:in `main'
{0006}:23:in `run'
{0232}:10:in `block in <main>'
:1:in `block in rgss_main'
:1:in `loop'
:1:in `rgss_main'
{0232}:8:in `<main>'
ruby:in `eval'

Share this post


Link to post
Share on other sites

Vlue: Something in this script is causing the RGSS player to crash. I've used Mithran's Bug Fix script to determine this, and after removing the script, no more crashing.

 

Here is what the script output to me. Maybe it will be some help in finding a way to fix it.

 

That uh... means absolutely nothing to me. How about when it crashes and the error message produced?

Share this post


Link to post
Share on other sites

It doesn't crash the game. It crashes the RGSS Player (as in, the executable file that runs the game). There is no error message. But it is DEFINITELY this script. When the script is removed, no more crashes. Ever.

 

In the most likely scenario, something in this script is clashing with another script and causing the executable to crash, because I couldn't reproduce any crashes in a default project. It'll take me some time to determine which script isn't getting along with this one without any error message to trace, but I'll be working on it today.

 

One thing you should know, though: when using Mithran's Bug Finder to locate any errors, the only two scripts that produced anything in the log file were both written by you. Sleek Item Popup 1.8 and this script (latest version). Something about the way you write your scripts is incorrect somewhere. Just a heads up.

Share this post


Link to post
Share on other sites

Yes and yes! Thanks to the way I rewrote it, that was very easy. Newer version up with those options!

 A problem with game crashing in battles..!!! it boots me out 

Share this post


Link to post
Share on other sites

With or without an error? And if without, what other scripts are you using?

Share this post


Link to post
Share on other sites

Added a Scan Once option that when combined with scan state skills will let you have the player scan a monster once and their hp bar will remain visible throughout the game.

Share this post


Link to post
Share on other sites

Love your script! Is there a way to change the customizable settings in game? It's not necessary, but it'd be nice to change the bar to be slightly bigger for boss battles. If not, would there be an easy way to use the BOSS_MONSTERS array to change the size in addition to numbers?

Share this post


Link to post
Share on other sites

Hey, why not. Easy enough. Updated the script so you can set width, height, border_width, and border_height of the bars for bosses.

Share this post


Link to post
Share on other sites

Hi, I found this and I got it working. However, I'm not sure how to use the boss bar. I don't know what goes in here:
 

 
  #ID's of boss monsters in array format.
  BOSS_MONSTERS = []

I'm pretty sure that is what I need to know to set enemies to bosses. All help is appreciated.

Share this post


Link to post
Share on other sites

I would assume the enemy IDs.

Say if your bosses are numbers, 26, 31, and 33 in the enemy list in the database, the array would be as so.

  BOSS_MONSTERS = [26, 31, 33]

Share this post


Link to post
Share on other sites

Whoops, no, not at all! It seems while I put that option in there.. I forgot to actually set it up. Fixed it up in the pastebin now!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted