More HUD Faces - Extension for Moghunter's Battle, Party, and Actor HUDs

Discussion in 'JS Plugin Releases (RMMV)' started by LadyBaskerville, Jun 3, 2017.

  1. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    More Hud Faces (Moghunter Extension) v1.2.2
    LadyBaskerville
    Introduction
    Moghunter / Atelier Rgss provides visually impressive plugins to show your actors' faces on the screen, be it in battle or on the map. However, the MV plugins do not provide an easy way to change the graphic assigned to an actor mid-game. This extension now adds this functionality.

    Features
    This plugin is an extension to the following Moghunter plugins:
    RMV - Battle Hud
    RMV - Actor Hud
    RMV - Party Hud
    You can use this extension with any combinations of those plugins.

    The current version of this extension plugin is made for the plugin versions Battle Hud 3.7, Actor Hud 1.9, and Party Hud 1.3. It will probably not work with older versions. (Version 1.0.1 of this extension is still available for download, if you are using older versions of Moghunter's plugins and cannot / do not want to update them.)

    This extension plugin provides Plugin Commands and Script Calls to change the face graphics used in Moghunter's Battle HUD, Party HUD and/or Actor HUD mid-game. You can also specify a different default face file for each actor using notetags.

    Apart from manually changing the HUD face graphic during the game, you can now assign face graphics for different states to an actor, and the graphic will change automatically when the actor is afflicted by the respective states. You can set these up with notetags in the actor notebox, or change them during the game with Plugin Commands and Script Calls. The state with the highest priority will determine the face graphic used. If there is no face graphic assigned to the actor for this state, the state with the next highest priority will determine the face graphic. If there is no face graphic assigned for ANY of the actor's states, the default face graphic will be used instead.

    How to use
    To use this plugin, place it below Moghunter's plugins in your plugin list.

    Plugin Commands
    Change HUD faces immediately:
    Code:
    change_ahud_face ACTOR_ID FILENAME
    change_bhud_face ACTOR_ID FILENAME
    change_phud_face ACTOR_ID FILENAME
    
    Immediately change the face file used in the Actor, Battle, or Party HUD, respectively. The file must be located in the respective HUD folder (img/actorhud, img/battlehud, or img/partyhud). This also changes the face file used by default when the actor is not afflicted by any states.

    Example:
    Code:
    change_ahud_face 1 HaroldFace12
    
    will change the Actor HUD face for Actor #1 to the file "HaroldFace12.png" in the folder img/actorhud.

    Set faces to show based on state:
    Code:
    set_ahud_face ACTOR_ID STATE_ID FILENAME
    set_bhud_face ACTOR_ID STATE_ID FILENAME
    set_phud_face ACTOR_ID STATE_ID FILENAME
    
    Set the face file that is automatically used for the state in the Actor, Battle, or Party HUD, respectively. The file must be located in the respective HUD folder (img/actorhud, img/battlehud, or img/partyhud).
    Enter 0 as the state ID to change the face file used by default when the actor is not afflicted by any states.

    Example:
    Code:
    set_ahud_face 1 4 HaroldFacePoison
    
    will set the face that is for Actor #1 in the Actor HUD when Actor #1 is afflicted by state #4 to the file "HaroldFacePoison.png" in img/actorhud.


    Clear state faces assigned to the actor:

    Code:
    clear_ahud_face ACTOR_ID STATE_ID
    clear_bhud_face ACTOR_ID STATE_ID
    clear_phud_face ACTOR_ID STATE_ID
    
    Clear the face file that is automatically used for the state in the Actor, Battle, or Party HUD, respectively. If the actor is afflicted by this state, the face graphic will no longer automatically change.

    Script Calls (advanced)
    The following functions have been added to Game_Actor:

    Change HUD faces immediately:
    Code:
    changeAhudFace(FILENAME)
    changeBhudFace(FILENAME)
    changePhudFace(FILENAME)
    
    Immediately change the face file used in the Actor, Battle, or Party HUD, respectively. The file must be located in the respective HUD folder (img/actorhud, img/battlehud, or img/partyhud).
    This also changes the face file used by default when the actor is not afflicted by any states.

    Example:
    Code:
    $gameActors.actor(1).changeAhudFace("HaroldFace12")
    
    will change the Actor HUD face for Actor #1 to the file "HaroldFace12.png" in the folder img/actorhud.

    Set faces to show based on state:
    Code:
    setAhudFace(STATE_ID, FILENAME)
    setBhudFace(STATE_ID, FILENAME)
    setPhudFace(STATE_ID, FILENAME)
    
    Set the face file that is automatically used for the state in the Actor, Battle, or Party HUD, respectively. The file must be located in the respective HUD folder (img/actorhud, img/battlehud, or img/partyhud).
    Enter 0 as the state ID to change the face file used by default when the actor is not afflicted by any states.

    Example:
    Code:
    $gameActors.actor(1).setAhudFace(4, "HaroldFacePoison")
    
    will set the face that is for Actor #1 in the Actor HUD when Actor #1 is afflicted by state #4 to the file "HaroldFacePoison.png" in img/actorhud.

    Clear state faces assigned to the actor:
    Code:
    clearAhudFace(STATE_ID)
    clearBhudFace(STATE_ID)
    clearPhudFace(STATE_ID)
    
    Clear the face file that is automatically used for the state in the Actor, Battle, or Party HUD, respectively. If the actor is afflicted by this state, the face graphic will no longer automatically change.

    Notetags
    You can specify a different face file to be used at the start of the game with the following notetags in the Actor tab:

    Code:
    <AHudFace: FILENAME>
    <BHudFace: FILENAME>
    <PHudFace: FILENAME>
    
    Use the file FILENAME.png to represent this actor in the Actor, Battle, or Party HUD by default. The file must be located in the respective HUD folder (img/actorhud, img/battlehud, or img/partyhud).

    Code:
    <AHudFace State STATE_ID: FILENAME>
    <BHudFace State STATE_ID: FILENAME>
    <PHudFace State STATE_ID: FILENAME>
    
    Automatically change the actor's face graphic in the Actor, Battle, or Party HUD to FILENAME.png when the actor is afflicted with the state. The file must be located in the respective HUD folder (img/actorhud, img/battlehud, or img/partyhud).

    Plugin
    Download it here: MOG_X_MoreHudFaces.js
    (If you are using older versions of Moghunter's HUD plugins and cannot / do not want to update them, you can still download version 1.0.1 of the extension here: MOG_X_MoreHudFaces_v101.js

    Credit and Thanks
    - LadyBaskerville (optional)
    - Moghunter

    Terms of Use
    - Free for use in both non-commercial and commercial games.
    - You may repost and edit this plugin.

    Version 1.2.2
    - Fixed a bug where animated faces would not display properly when the face graphic was changed in battle.
    Version 1.2.1
    - Fixed a bug with Party and Battle HUD when there were less than 4 members.
    Version 1.2.0
    - Added notetags, plugin commands and script calls to set up automatic state faces: The face graphic can be changed based on the states the actor is afflicted with.
    - Cleaned up the documentation.
    Version 1.1.1
    - Fixed a bug where changing the battle HUD image would try to load an image from the actor HUD folder.
    Version 1.1.0
    - Reworked the plugin to work with Moghunter's updated plugins.
    - Added script calls.
    - Faces are now changed without refreshing the entire HUD.
    Version 1.0.1
    - Only refresh the HUDs when the face graphic has changed.
    Version 1.0.0
    - Finished the plugin.
     
    Last edited: Aug 7, 2018
    #1
    Thothdan, sieben43, Leanne and 8 others like this.
  2. RPGMaker777

    RPGMaker777 Veteran Veteran

    Messages:
    47
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks again for making this, it works great and hopefully many people can use it.

    If anyone needs an easy to use HUD system with an easy and intuitive way to change images, this is highly recommended by me.
     
    #2
    LadyBaskerville likes this.
  3. RPGMaker777

    RPGMaker777 Veteran Veteran

    Messages:
    47
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi I hope this is OK to ask here, but I've encountered a big issue when using the plugin via parallel process.

    In my game I use a common event parallel process to check what character is playing, and what armour they have on, I use your special plugin commands as conditional branches to changes the Actor HUD accordingly.

    Everything works great with the faces changing exactly as I want them to, with one weird side effect - it deletes the existing MOgHunter energy bars images as well.

    All other images stay, but for some reason when the plugin deletes the HUD face image to update it with the new one, it also deletes the HP, MP and SP image bars as well.

    Any help with this would be greatly appreciated.
     
    #3
  4. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    I've updated the plugin. Please download again from the same link and let me know if that fixes the problem :)
    (I haven't found a way to update the face graphic separately yet, so I've changed it so that the HUD only refreshes when the face graphic is actually changed.)
     
    #4
    RPGMaker777 likes this.
  5. RPGMaker777

    RPGMaker777 Veteran Veteran

    Messages:
    47
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMMV
    EDIT:

    I'll leave the original so you can have a laugh at my rookie mistake. The solution to it?

    Actually enabling the plugin in Plugin Manager in the first place!

    Self faceplam!

    Thanks so much it now works perfectly as far as I can tell!


    Original:

    Thanks so much, it does fix the HP,MP and SP bars from disappearing, but it now doesn't change the ActorHUD images at all, just defaulting to whatever image is set as Face_21 (my main character ID) in the actor HUD image file. That image is necessary initially or MOG Actor HuD wont even run the game. I've tested parallel and on touch events, for whatever reason it now wont change the actor hud faceset using your plugin command.

    With the first version I noticed a couple of things, if a wait command was placed, the HP, etc bars would actually appear and would pulse on and off in time with the wait, with a 1 second wait you could change armour just fine with a very minor delay so it was almost a solution but far too distracting looking at the pulsing bars.

    Another way it worked was on any other kind of event other than parellel, if it switched to another page after the change actor hud pugin script and thus stopped the constant refreshes, the bars would show just fine then too.

    I even thought it might not be fixable due to how parallel processes work, if so I'll still be able to use your plugin but only for a change for a single faceset at the start of the game, which is still a lot better than I was doing before, but now I won't be able to change expressions or armours in the Actor HUD, so if there is another way I'd be really grateful.
     
    Last edited: Jun 9, 2017
    #5
    LadyBaskerville likes this.
  6. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    You won't believe how many times I did that myself :D

    Glad it's working now! If you find any more issues, just let me know.
     
    #6
    RPGMaker777 likes this.
  7. Lnik3500

    Lnik3500 Master Troll Veteran

    Messages:
    299
    Likes Received:
    46
    Location:
    Somewhere you will less expect me to be.
    First Language:
    French
    Primarily Uses:
    RMMV
    Request here:

    Ability to display faces based on classes :p
     
    #7
  8. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Sorry for the late reply, I don't really have a stable internet connection atm :kaoswt2:

    I'll include class based faces in the next update, but it might be another week or so before I'll be able to upload anything :kaoswt:
     
    #8
    Lnik3500 likes this.
  9. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Just a quick heads up: This plugin is currently incompatible with the latest versions of Moghunter's Actor and Battle HUD plugins. (I haven't tested it with Party HUD, but chances are it won't work either.) An update is on its way for the weekend sometime in the near future, which might also solve another minor issue.

    Concerning class based faces: I've currently put this feature on hold because I have a bit of a problem with the logic behind it - specifically, whether the face assigned by class or by plugin command should take precedence when an actor changes class. I think this can be handled more clearly with a common event that checks the actor's class and assigns the corresponding face(s) via plugin command. (Or script call, which for some reason is not a feature yet? Let me put that on the list for the update as well.)
     
    Last edited: Dec 6, 2017
    #9
  10. Grimar Horns

    Grimar Horns Villager Member

    Messages:
    6
    Likes Received:
    2
    First Language:
    French
    Primarily Uses:
    RMMV
    Hello all, hello Basker,

    I'm having issue with the latest update of Mog's as you noticed it, "SceneManager._scene._spriteset._actor_hud.refresh_bhud();" sends an error as refresh_bhud() is apparently unknown.
    I don't know if you came with something to this issue, I'm waiting like a little kid in front of his Christmas present =D
     
    #10
    LadyBaskerville likes this.
  11. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @Grimar Horns You must have some kind of sixth sense, I just finished reworking the plugin yesterday :D

    The plugin is now updated to Version 1.1.0!
    - Reworked the plugin to work with Moghunter's updated plugins.
    - Added script calls.
    - Faces are now changed without refreshing the entire HUD.
     
    #11
    Grimar Horns likes this.
  12. Grimar Horns

    Grimar Horns Villager Member

    Messages:
    6
    Likes Received:
    2
    First Language:
    French
    Primarily Uses:
    RMMV
    Basker, you made my day so much, you can't even know !
    I thought I couldn't make what I wanted to for my next update, now I can, just finished the tests and it's operationnal.
    Many thanks and love my friend !
     
    #12
    LadyBaskerville likes this.
  13. Lionheart_84

    Lionheart_84 Veteran Veteran

    Messages:
    462
    Likes Received:
    42
    First Language:
    Italian
    Very useful plugin:guffaw::guffaw::guffaw::guffaw::guffaw::guffaw: ... but ...
    Ability to display faces based on state??? :D
     
    #13
  14. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    So you would specify the face files for different states in the actor notetags? Hm, I could probably implement that. Only point where it might get difficult is with multiple states - I would just chose the graphic according to state priority and not have an option for "state combination" graphics. Yeah, I'll give it a try when I have some time!
     
    #14
  15. Lionheart_84

    Lionheart_84 Veteran Veteran

    Messages:
    462
    Likes Received:
    42
    First Language:
    Italian
    Yes, or as you said, or add it to the "state notetags"!!! :wink:
     
    #15
  16. optiprimeful

    optiprimeful Veteran Veteran

    Messages:
    78
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    $gameActors.actor(1).changeBhudFace("Face_2") results in : cannot read property "forEach" of undefined;_;
     
    #16
  17. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @optiprimeful Which plugin versions are you using for the extension and Moghunter's Battle HUD plugin respectively? And where are you using that script call - on the map, or in a battle scene?
     
    #17
  18. optiprimeful

    optiprimeful Veteran Veteran

    Messages:
    78
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    I use it on the battle scene for a transform skill. I use v 3.6 of battle hud, and V1.1.0 of your plugin but I also use yanfly's plugins.
     
    #18
  19. LadyBaskerville

    LadyBaskerville Hell-poodle Veteran

    Messages:
    645
    Likes Received:
    486
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Could you try updating Moghunter's plugin to version 3.7? (Backup the old plugin version just to be safe.) If that doesn't fix the error, please show a screenshot of your plugin manager as well as a screenshot of the full error message in the console (press F8 when the error comes up and screenshot the window that opens).
     
    #19
  20. optiprimeful

    optiprimeful Veteran Veteran

    Messages:
    78
    Likes Received:
    6
    First Language:
    English
    Primarily Uses:
    RMMV
    Last edited: Feb 8, 2018
    #20

Share This Page