Jeremy Cannady

Coldfire
Regular
Joined
Oct 25, 2015
Messages
449
Reaction score
275
First Language
English
EnemyBars.js V1.1
Jeremy Cannady


I know that Yanfly is making a script like this but this has been over in the plugins in development board
for weeks and thought I would put it on this forum for feedback.



Introduction
Adds an hp bar to enemies during battle.

Features
Decide which colors you want to represent the hp.

The hp bars will be below the sprites.

Works with Rexal animated battlers.


Screenshots

barsenemy_zpsdomscdqt.png
How to Use
Download the script place in plugins folder.

Make sure the script is named EnemyBars.js
Place the correct note tag in the enemy.

Note tag:

 * Put <hpBar> in the enemy note tag to activate the hp bar for that enemy

 during battle.

 *Put <hpBarSelectionOnly> to actiavte the hp bar only during selection.

 *Put<hpBarTurnASelection> to actiavet he bar during selection and attack.

 *Put <hpBarTurnOnly> to only show the bar during the attack phase.

 *PLEASE PUT ONLY ONE NOTETAG.

Script

http://pastebin.com/mQmZ5Jy0


Credit and Thanks
-Jeremy Cannady

Terms:

Free and unrestricted access for anyone for any purpose.

No credits necessary.
 
Last edited by a moderator:

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,970
First Language
English
Primarily Uses
RMMV
please add terms of use
 

Nohmaan

Regular
Regular
Joined
Jul 7, 2012
Messages
182
Reaction score
50
First Language
English
Nice!  Is it possible to have the bar only visible for a short time when the enemy is taking damage or visible when in target mode?
 

DustyCat Media

Indie Game Purrfector
Regular
Joined
Oct 15, 2012
Messages
115
Reaction score
71
First Language
English
Great plugin, Jeremy!


I use the custom stuff from Yanfly's plugin; specifically wherein the enemy approaches the heroes when they attack. Is there a way to have the bar move along with the enemy itself whenever the enemy moves anywhere?


Thanks!
 

Jeremy Cannady

Coldfire
Regular
Joined
Oct 25, 2015
Messages
449
Reaction score
275
First Language
English
Which plugin name is that exactly? I should be able to make it track it easily.
 

DustyCat Media

Indie Game Purrfector
Regular
Joined
Oct 15, 2012
Messages
115
Reaction score
71
First Language
English
Which plugin name is that exactly? I should be able to make it track it easily.
The commands in either of the three "YEP_ActSeqPack"s has something to do with movement both in heroes and enemies. They contain notetags that when used in the Skills would make either the heroes or enemies move away from their initial position. :)
 

Merryjest

Regular
Regular
Joined
May 8, 2012
Messages
275
Reaction score
53
First Language
English
Primarily Uses
RMMZ
This version doesn't seem to be compatible with Rexal's stable version (v1.12.11) with the YEP corengine attached. I tried it and I got the following: 

TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': float parameter 1 is non-finite.    at TypeError (native)    at Bitmap.gradientFillRect (file:///C:/Users/Merryjest/Documents/Games/Grinners%20&%20Losers%20Working/js/rpg_core.js:781:24)    at Enemy_Bars.Window_Base.drawGauge (file:///C:/Users/Merryjest/Documents/Games/Grinners%20&%20Losers%20Working/js/plugins/YEP_CoreEngine.js:1208:19)    at Enemy_Bars.drawBar (file:///C:/Users/Merryjest/Documents/Games/Grinners%20&%20Losers%20Working/js/plugins/EnemyBars.js:110:9)    at Enemy_Bars.update (file:///C:/Users/Merryjest/Documents/Games/Grinners%20&%20Losers%20Working/js/plugins/EnemyBars.js:73:10)    at file:///C:/Users/Merryjest/Documents/Games/Grinners%20&%20Losers%20Working/js/rpg_scenes.js:112:19    at Array.forEach (native)    at Scene_Battle.Scene_Base.updateChildren (file:///C:/Users/Merryjest/Documents/Games/Grinners%20&%20Losers%20Working/js/rpg_scenes.js:110:19)    at Scene_Battle.Scene_Base.update (file:///C:/Users/Merryjest/Documents/Games/Grinners%20&%20Losers%20Working/js/rpg_scenes.js:42:10)    at Scene_Battle.Scene_Base.update (file:///C:/Users/Merryjest/Documents/Games/Grinners%20&%20Losers%20Working/js/plugins/gametime.js:433:30)rpg_managers.js:1618 SceneManager.catchExceptionrpg_managers.js:1579 SceneManager.updateTurning off Rexal's animated battlers v1.12.11 makes everything flow smoothly. I haven't moved up to version 1.15.5.1 because it has a lot of crashing bugs and I'm waiting for the next stable release, but I wanted to let you know that it's currently not compatible with the current stable release. I did some double-checking and ran the HP gauge with just the animated battlers plugin active and the same error ("Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': float parameter 1 is non-finite.") popped up. 

It does works with only the YEP engine   and this plugin active, so the incompatibility occurs when Rexal's v1.12.11 release is present (YEP patch included)
 
Last edited by a moderator:

Jeremy Cannady

Coldfire
Regular
Joined
Oct 25, 2015
Messages
449
Reaction score
275
First Language
English
I have been using the unstable current version. I will make a patch for the current stable one if I can.
 

10kk

Parallel Process irl
Regular
Joined
Apr 10, 2013
Messages
218
Reaction score
79
First Language
English
Primarily Uses
RMMV
I'm a big fan of this plugin! Adds a lot of quality to battles, especially boss battles or high HP enemies overall.

My only suggestion would be to add an option between having the bar above or below the enemy sprite. This seems achievable enough by having the choice as a parameter in the plugin menu or as a different notetag like <hpBar2>
 
Last edited by a moderator:

Jeremy Cannady

Coldfire
Regular
Joined
Oct 25, 2015
Messages
449
Reaction score
275
First Language
English
Oh yeah I just got caught up in making my shop script. 1200 lines of code was not a fun project. I am going to try to look at it today but I think Yanfly is going to release enemy hp bars this weekend. Everyone will use that one so IDK. If anything I will do it just because it is a feature I want as well. I will update later this afternoon. 

Edit: Actually I just tested it and it was really easy to do so I will update it after lunch, that is making it visible during selection. Not sure if you want only visible when selecting the enemy or when damage is being done.
 
Last edited by a moderator:

Nohmaan

Regular
Regular
Joined
Jul 7, 2012
Messages
182
Reaction score
50
First Language
English
Oh yeah I just got caught up in making my shop script. 1200 lines of code was not a fun project. I am going to try to look at it today but I think Yanfly is going to release enemy hp bars this weekend. Everyone will use that one so IDK. If anything I will do it just because it is a feature I want as well. I will update later this afternoon. 

Edit: Actually I just tested it and it was really easy to do so I will update it after lunch, that is making it visible during selection. Not sure if you want only visible when selecting the enemy or when damage is being done.
Definitely when selecting the enemy, but if it can also be while damage is being done big plus.
 

Jeremy Cannady

Coldfire
Regular
Joined
Oct 25, 2015
Messages
449
Reaction score
275
First Language
English
Updated to 4 options:

hp bar always visible

hp visible during selecting enemy

hp visible during selection and attack phase

hp only visible during attack phase

Please only put in one note tag.

Let me know if you experience any bugs!
 

Nohmaan

Regular
Regular
Joined
Jul 7, 2012
Messages
182
Reaction score
50
First Language
English
Great! I'll try it out when I get home.  Thanks for circling back around to that.
 

junglechief

Regular
Regular
Joined
Nov 9, 2015
Messages
46
Reaction score
3
First Language
English
So I downloaded your current version and the updates from what I was using before are awesome. However I still get issues with Rexals Animated Battlers. I have a fight where I am using a party member as an animated battler. I have them on the other side of the screen, working an everything, but when I turn this plugin on, I get the same error I did with the old version: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': float parameter 1 is not infinite.

http://imgur.com/A9eogeM

here is my console output.

Didn't scroll through all the posts sorry. Looks like this is a similar report to the one above. I guess I'll just confirm that it does indeed not work with the most stable version of Rexal's.
 
Last edited by a moderator:

Jeremy Cannady

Coldfire
Regular
Joined
Oct 25, 2015
Messages
449
Reaction score
275
First Language
English
I think it is because with the party member as an enemy means its not an actual enemy per how the game decides. 
I will have to test it to figure out how to draw the bars on actors or enemies. 

Can you clarify, the enemy is an actor sprite correct? And not the default enemy pictures.
 

junglechief

Regular
Regular
Joined
Nov 9, 2015
Messages
46
Reaction score
3
First Language
English
As far as the game is concerned, it's an enemy. You just take an enemy image and rename it to match the actor icon name and the plugin pulls the sprite data. Shouldn't have any other data associated with it.
 

10kk

Parallel Process irl
Regular
Joined
Apr 10, 2013
Messages
218
Reaction score
79
First Language
English
Primarily Uses
RMMV
I would love the option for choosing HP bar above or below enemies, and slightly slimmer bars, because they are very large when compared to your screenshot. Otherwise, love the plugin a lot! :)
 
Last edited by a moderator:

Jeremy Cannady

Coldfire
Regular
Joined
Oct 25, 2015
Messages
449
Reaction score
275
First Language
English
@ 10kk Those options would be easy to do, at first I had the bars on top but everyone didn't like that. I will just make that an option.

I am just working on getting it to work with the animated battlers script first.

@jungle

It seems to work fine with me:

enemy_zpsy1jrtdr0.png
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

Screenshot saturday!

Granny's home

Happy weekend all

home.png
Would an older woman be eligible for Blondus points?
Or is that a privilege exclusive to the youngsters?
Lindsey-Neutral.png
Another One.gif
Sometimes screenshot saturday is just a new enemy
Update: Coworker sabotaged the truck's mirrors by applying a threadlocking compound to the bolts used to adjust the mirrors. Now NO ONE can adjust them. So I filed a legit report of sabotage of equipment to leadership and declared that I cannot safely operate the vehicle if I can't see what needs to be seen. So the truck has to go to the shop for repair, and we need a substitute vehicle. Nice work, dude :p
1701524304115.png
Part of growing up is finding out that love hurts.
"I signed up for this heartbreak."

Forum statistics

Threads
136,687
Messages
1,268,772
Members
180,394
Latest member
Shaltai
Top