MV How To Make Damage Numbers Appear Over The HUD?

Maybe you put in so many conditions it broke the max field length
That's a good point, I tried putting a condition with a really long length to test this and it seems to be able to handle the length. I think it might be the "action" part of the code that may be confusing it.
That's a good point, I tried putting a condition with a really long length to test this and it seems to be able to handle the length. I think it might be the "action" part of the code that may be confusing it.
Then your code injection successfully broke the HUD Maker

What happens if you change the double quotes to single quotes?
Then your code injection successfully broke the HUD Maker

What happens if you change the double quotes to single quotes?
Hey that worked! I've been trying to alter the code but I don't think I know enough about javascript. Making 'action' with single quotes let me put the code into the condition box but sadly it doesn't seem to be working, nothing seems to cause the image to appear.

Edit: I removed the 'action' part of the code and it made the image appear only when the actor had been attacked, the only issue is that it still stays on screen until the next actor does their turn. That's really close to what I want so maybe a change to the 'action' part can make it work properly!
Okay, alternate route.

If you don't already have them, grab Yanfly's Buffs & States Core and Auto Passive States.

Put a passive state on your actor.

In that state, give it the notetags:
Code:
<Custom React Effect>
if (this.isDamage())
    $gameSwitches.setValue(ID, true);
</Custom React Effect>

<Custom Deselect Effect>
$gameSwitches.setValue(ID, false);
</Custom Deselect Effect>
where ID is the ID of an available game switch (no leading zeros). Then you make your HUD element condition be that switch: $gameSwitches.value(ID)

If the image displays too long, you can change the Deselect to a Respond.
Okay, alternate route.

If you don't already have them, grab Yanfly's Buffs & States Core and Auto Passive States.

Put a passive state on your actor.

In that state, give it the notetags:
Code:
<Custom React Effect>
if (this.isDamage())
    $gameSwitches.setValue(ID, true);
</Custom React Effect>

<Custom Deselect Effect>
$gameSwitches.setValue(ID, false);
</Custom Deselect Effect>
where ID is the ID of an available game switch (no leading zeros). Then you make your HUD element condition be that switch: $gameSwitches.value(ID)

If the image displays too long, you can change the Deselect to a Respond.
This looks like a really good solution! A lot less code for the conditions hah!

I did what you said and made the state and put it onto the actor and tested it in battle. The image still doesn't appear when they take damage unfortunately. I understand what the code is trying to do, I tested the condition by changing the switch manually through HUD Maker and when the switch is on and off the image will appear and disappear so I'm not sure why the state effect isn't doing anything.
Please post a screenshot of what you put into the notetags.
1683418847619.png

Gotcha, here's the passive state on actor 1.
And then the condition on your HUD element is $gameSwitches.value(50) ?
And then the condition on your HUD element is $gameSwitches.value(50) ?
Yeah, when the switch changes the image does appear and disappear but somethings making the state not change the switch.

Edit: I had some time to test out some more stuff and I removed the code that turned the switch off and replaced the react effect with a respond effect. The respond code does work! When the actor takes damage the image appears so I think the problem is the code to turn the image off activated at the same time so I'm gonna see if there's any other effects that will cause a delay.

Edit 2: I solved it!!!!!!!!!!!!
Here is what the notetag looks like:

Code:
<Custom Respond Effect>
if (this.isDamage())
    $gameSwitches.setValue(50, true);
</Custom Respond Effect>

<Custom Turn Start Effect>
$gameSwitches.setValue(50, false);
$gameSwitches.setValue(51, false);
$gameSwitches.setValue(52, false);
$gameSwitches.setValue(53, false);
</Custom Turn Start Effect>

My game uses 4 main party members so each of them has a state to show who took damage, that is what the 50, 51, 52, and 53 are. When they take damage an image associated to them appears and will disappear whenever the next party members turn starts. It works how I want it too!

The only "problem" is that when there are multiple enemies and they attack different targets before the next party members turn the images will appear one after the other without the previous one disappearing. I can think of a way to fix this by adding a state to enemies but I actually like how the effect looks so I'm going to keep it like this for now.

Thank you very much ATT_Turan and AquaEcho for the help on this! It took a little while but I'm glad to finally have this effect for my game!

Edit 3: So there turned out to be a few more issues because I am using yanfly's STB battle system but I found a better solution!
The first effect in the notetags stays the same, but I removed the last part and placed this code into a new passive state's notetags and then put it onto every enemy:

Code:
<Custom Action End Effect>
$gameSwitches.setValue(50, false);
$gameSwitches.setValue(51, false);
$gameSwitches.setValue(52, false);
$gameSwitches.setValue(53, false);
</Custom Action End Effect>

It makes it so after an enemy attacks the image will disappear after a moment like before and makes the images disappear after every enemy's action.
Hello! In my game I am using the front view option for battles and I am also using the SRD HUD Maker plugin to create the HUD. Here is what it currently looks like:
Spoiler: Battle Screen
So far everything is working how I would like except for how party member damage is displayed. The front view setting only causes the screen to shake and only indicate the damage in the battle log like in the image above, this makes it hard to notice who took damage during battle. What I would like to happen is for damage numbers to appear in the center of the character portraits when they take damage to better show who is being attacked. My HUD looks similar to the game OMORI by using portraits to show your party I would like it to act the same in regards to displaying damage to your party members.

I have tried looking for a solution to this before and the closest I have found is to use the side view battle system and place the battler sprites behind the portraits to allow for animations and the numbers to appear. There is a problem with this method because both animations and the number pop ups are placed behind the HUD so they can't be seen.

What I want to know is if there are any ways to change the damage numbers to be displayed over top of the HUD, and if there is a layer system for these UI elements that I can alter. Maybe the HUD Maker plugin can do something like this? Any advice would be appreciated!

Hello friend, I apologize for my weak English, but I would like to ask you something:

while looking at the battle UI of your game, I noticed that the character portraits are arranged in a unique way. How is the selection of characters done during battles? I mean, when you need to visually select one of your actors to attack, is there a sort of cursor or lightbox that indicates the actor you are currently on? Because in my thread, I've been trying to solve this issue as well. - I also have a customized HUD using the SRDude plugin.
Hello friend, I apologize for my weak English, but I would like to ask you something:

while looking at the battle UI of your game, I noticed that the character portraits are arranged in a unique way. How is the selection of characters done during battles? I mean, when you need to visually select one of your actors to attack, is there a sort of cursor or lightbox that indicates the actor you are currently on? Because in my thread, I've been trying to solve this issue as well. - I also have a customized HUD using the SRDude plugin.
Hello! No problem at all!

If your asking about how to show who's turn it is in battle I made a picture of a square line over top of the each of the characters portrait like this:
1688243837892.png

And then in it's properties I put this code in the condition box:
Code:
BattleManager.actor() === $gameParty.members()[x]
The x is replaced with the actor's id number, so to show actor 3's turn you put a 3 in.
This way the image will only appear when it is that actor's turn. I copy this picture for every actor in battle so there is a visual indicator for each actors turn!

I am a little confused about what exactly you are asking so I apologize if that was not what you wanted to know about, but If your asking about how to show selecting an actor when using a skill of item I just use the default rpg maker window so if you would like something more unique I'm not sure how to do that unfortunately.

I hope this can help you out!
Hello! No problem at all!

If your asking about how to show who's turn it is in battle I made a picture of a square line over top of the each of the characters portrait like this:
View attachment 267597
And then in it's properties I put this code in the condition box:
Code:
BattleManager.actor() === $gameParty.members()[x]
The x is replaced with the actor's id number, so to show actor 3's turn you put a 3 in.
This way the image will only appear when it is that actor's turn. I copy this picture for every actor in battle so there is a visual indicator for each actors turn!

I am a little confused about what exactly you are asking so I apologize if that was not what you wanted to know about, but If your asking about how to show selecting an actor when using a skill of item I just use the default rpg maker window so if you would like something more unique I'm not sure how to do that unfortunately.

I hope this can help you out!
Thank you so much, that's exactly what I was looking for.
EDIT: I solved
@Yoshibater - I have reviewed this thread, and I have the same issue. I just don't understand one thing: in the end, were you able to display the actual damage above the HUD, or did you find another solution?

I need to solve this same problem, along with another one. The enemy animations when they attack your party, do they not appear below the HUD? Have you found a solution for this? I was discussing it with Aquaecho in this thread: link
@Yoshibater - I have reviewed this thread, and I have the same issue. I just don't understand one thing: in the end, were you able to display the actual damage above the HUD, or did you find another solution?

I need to solve this same problem, along with another one. The enemy animations when they attack your party, do they not appear below the HUD? Have you found a solution for this? I was discussing it with Aquaecho in this thread: link
Unfortunately no I haven't found a solution for the damage numbers and animations sorry.

The way HUD maker works all battle animations and display numbers are placed underneath the UI. I work around it by using the battle log to display the damage taken and the damage indicator images I posted before. I'm using the front view battle system as well so enemy animations don't show except for the sound effects.

It's not ideal but I've settled for these in my game and it works fine, I hope you'll be able to find a solution for these problems soon!
@Yoshibater - I have reviewed this thread, and I have the same issue. I just don't understand one thing: in the end, were you able to display the actual damage above the HUD, or did you find another solution?

I need to solve this same problem, along with another one. The enemy animations when they attack your party, do they not appear below the HUD? Have you found a solution for this? I was discussing it with Aquaecho in this thread: link
I made a thread for you since I know you've been asking around

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-damage-numbers-appear-over-the-hud.157256/