No idea how to check boss HP

I'm a user of RPG Maker VX Ace. It was suggested to me by a friend that I should include a function to check a bosses HP mid-bossfight. After failing to create this on my own, I googled some tutorials but was unable to find what I was looking for. (All I found were guides on how to make an HP bar.)
What I have in mind is a Skill (something similar to Cyrus' Study from Octopath Traveler) that would display the bosses current HP
when used. (The number would change according to the damage the boss has taken and so on)
Please advise as I am helpless on my own.
Many thanks.
Being a boss means that you already know which battler you are talking about in the troop array (you can check its position in the Troop tab in your database).
You can simply create a skill that calls a common event. In the common event you can store the boss HP in a variable. After that you can either use the said variable to show the remaining HP, or use that variable to show how much damage has been dealt. Everything can be handled through the Control Variable event command. Once you have that, all you have to do is change that variable according to your boss health.

You could refresh the variable value at the end of each turn and show a message window whenever you refresh it, or you could create a separate window to show the said value. Not having played Octopath Traveler I cannot understand what you are looking for so this is all the help I can provide. If you give us more information, even those who did not play the game you mentioned can help you. It is usually better to explain things with more details rather than just saying "like game X", otherwise you are going to limit the number of users that can help you to the intersection between those who played the game and those who read your post (which is naturally smaller than or equal to the smallest of the two sets).
Specifically, the command is Control Variables > Game Data > Enemy > 1's (assuming the boss is the first enemy you placed in that troop) > HP
Regarding Cyrus' Study: Upon activation, the enemies HP is shown as Current HP/Total HP.
I'll try your suggestion. Would I have to create a common event for every boss?
Would I have to create a common event for every boss?
No, you are not supposed to create a different common event for every boss, not if you do it in a smart way at least. I recommend taking advantage of element rates for that. Create an element called "boss" and make all your bosses take 0 damage from that element. This allows you to immediately understand which enemy is the boss in your current troop array by checking the element_rate of each enemy for that element.

Code:
boss = $game_troop.members.select { |enemy| enemy.element_rate(boss_element_id) < 0.1 }
if (boss.length != 0)
  $game_variables[variable_id_for_hp] = boss[0].hp
  $game_variables[variable_id_for_mhp] = boss[0].mhp
end
Ah, gotcha.
Do I have to script that?
If so where?
If you don't want to write a different event for each boss you need the script call I provided. You can put it in a script call in the common event linked to your skill.
So it goes:
Common Events>Script>The stuff you posted above right?
Tried putting the code shown above into a Common Event, then using the common event in a skill.
Tried it on a boss and this is what I got:
Something I missed or forgot to include?
You are supposed to change those ID placeholders (namely "boss_element_id", "variable_id_for_hp" and "variable_id_for_mhp") to real IDs from your database. I could not do that because I cannot see your whole project, but you know which variables you want to use and which one is the boss_element that you created, so change them accordingly.
so change boss_element_id to the name of the boss and so forth?
Create an element called "boss" and make all your bosses take 0 damage from that element.
Do this, no need for the boss name at all.
Where would I create the element? In script?
This is the code you posted above, what parts exactly do I change?
I can send a picture of an example boss if needed
Where would I create the element?
This is a very basic question. Since things are as they are, I recommend you to follow the link to Andar's tutorial in my signature. Taking your time understanding how the engine exactly works will greatly speed up your development process later on.
I don't suppose you have a link to that specific tutorial?
The link is in his signature block and mine.
@JEIA_CORP
Ahh! Now I see!
Thanks a ton you guys!
Double-post notice: JEIA_CORP
If you want to add something just use the Edit button and type the additional info/comment. What many people do to make it clear that it's an addition is this:
EDIT
More stuff here.

Original thread: https://forums.rpgmakerweb.com/threads/no-idea-how-to-check-boss-hp.112491/