Enemy Hp Guage

Discussion in 'JS Plugin Releases (RMMV)' started by Jeremy Cannady, Nov 16, 2015.

  1. Jeremy Cannady

    Jeremy Cannady Coldfire Veteran

    Messages:
    449
    Likes Received:
    250
    Location:
    Texas
    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

    [​IMG]
    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: Nov 20, 2015
    #1
    Michael Dionne and Nohmaan like this.
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    35,435
    Likes Received:
    9,926
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    please add terms of use
     
    #2
  3. Nohmaan

    Nohmaan Veteran Veteran

    Messages:
    138
    Likes Received:
    33
    Location:
    Minneapolis MN
    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?
     
    #3
  4. Jeremy Cannady

    Jeremy Cannady Coldfire Veteran

    Messages:
    449
    Likes Received:
    250
    Location:
    Texas
    First Language:
    English
    I can make that a option in the plugin menu.
     
    #4
    Nohmaan likes this.
  5. DustyCat Media

    DustyCat Media Indie Game Purrfector Veteran

    Messages:
    115
    Likes Received:
    71
    Location:
    Philippines
    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!
     
    #5
  6. Jeremy Cannady

    Jeremy Cannady Coldfire Veteran

    Messages:
    449
    Likes Received:
    250
    Location:
    Texas
    First Language:
    English
    Which plugin name is that exactly? I should be able to make it track it easily.
     
    #6
  7. DustyCat Media

    DustyCat Media Indie Game Purrfector Veteran

    Messages:
    115
    Likes Received:
    71
    Location:
    Philippines
    First Language:
    English
    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. :)
     
    #7
  8. Maus Merryjest

    Maus Merryjest Veteran Veteran

    Messages:
    240
    Likes Received:
    36
    Location:
    Colorado
    First Language:
    English
    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: Nov 16, 2015
    #8
  9. Jeremy Cannady

    Jeremy Cannady Coldfire Veteran

    Messages:
    449
    Likes Received:
    250
    Location:
    Texas
    First Language:
    English
    I have been using the unstable current version. I will make a patch for the current stable one if I can.
     
    #9
    Maus Merryjest likes this.
  10. 10kk

    10kk Parallel Process irl Veteran

    Messages:
    201
    Likes Received:
    71
    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: Nov 19, 2015
    #10
  11. Nohmaan

    Nohmaan Veteran Veteran

    Messages:
    138
    Likes Received:
    33
    Location:
    Minneapolis MN
    First Language:
    English
    I was wondering if you still planned on making this an option?
     
    #11
  12. Jeremy Cannady

    Jeremy Cannady Coldfire Veteran

    Messages:
    449
    Likes Received:
    250
    Location:
    Texas
    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: Nov 20, 2015
    #12
    Nohmaan likes this.
  13. Nohmaan

    Nohmaan Veteran Veteran

    Messages:
    138
    Likes Received:
    33
    Location:
    Minneapolis MN
    First Language:
    English
    Definitely when selecting the enemy, but if it can also be while damage is being done big plus.
     
    #13
  14. Jeremy Cannady

    Jeremy Cannady Coldfire Veteran

    Messages:
    449
    Likes Received:
    250
    Location:
    Texas
    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!
     
    #14
    Nohmaan likes this.
  15. Nohmaan

    Nohmaan Veteran Veteran

    Messages:
    138
    Likes Received:
    33
    Location:
    Minneapolis MN
    First Language:
    English
    Great! I'll try it out when I get home.  Thanks for circling back around to that.
     
    #15
  16. junglechief

    junglechief Veteran Veteran

    Messages:
    46
    Likes Received:
    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: Nov 20, 2015
    #16
    JAD94 likes this.
  17. Jeremy Cannady

    Jeremy Cannady Coldfire Veteran

    Messages:
    449
    Likes Received:
    250
    Location:
    Texas
    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.
     
    #17
  18. junglechief

    junglechief Veteran Veteran

    Messages:
    46
    Likes Received:
    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.
     
    #18
  19. 10kk

    10kk Parallel Process irl Veteran

    Messages:
    201
    Likes Received:
    71
    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: Nov 20, 2015
    #19
  20. Jeremy Cannady

    Jeremy Cannady Coldfire Veteran

    Messages:
    449
    Likes Received:
    250
    Location:
    Texas
    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:

    [​IMG]
     
    Last edited by a moderator: Nov 20, 2015
    #20

Share This Page