MV In need of assistance in showing actor and enemy states with SRD HUD Maker.

Hi. For numerous reasons, I'd like to draw states with the HUD Maker plugin. It's a plugin I already use to draw personalized actor and enemy HP/MP/TP gauges and numbers, but I have no idea how to use it to show icons of states affecting actor and enemy.

To be more precise, I want to make so four different state icons are shown for the actor, and another four for the enemy (should four states be applied to the actor or enemy). I'm bad at explaining, so I attached a screenshot of my game. I would have the state icons appear next to "ER" (which can be found on the top and bottom right of the picture). I was told showing states with the HUD Maker plugin is possible, but is there a limit to how many I can show?

The I want this is that the battle system I'm developing is very reliant on states for pretty much everything, and it's essential that players know what states, if any, are in play at every turn.

Any help is appreciated. For a starter, what are the script calls for states?


Plugin: http://sumrndm.site/hud-maker/


Screenshot:


Edit: I found a thread where the user figured out a way to draw the states, but they are using MZ and the MV HUD Maker is quite different... So I still need help.

2021.03.22
I solved this problem with the help of a friend.
The method is to enter the following in "Icon Index".

if ($gameParty.members()[隊伍順位] && $gameParty.members()[隊伍順位].allIcons()[持有狀態順位]){
return $gameParty.members()[隊伍順位].allIcons()[持有狀態順位];
} else {
return 0;
}


Edit 2: I think I figured it out, after scavenging the entire forums for information. I can make state icons appear by using the PictureEx feature in SRD HUD Maker, having the state icon appear or disappear based on whether $gameActors.actor(1).isStateAffected(39) is true or false. 39 being the ID for the state in question. The actual IconSet.png in the system folder is basically useless in this scenario.

The downside is I have several dozen states in my game, and I'll have to come up with a way to organize the battle HUD in a way that it doesn't look stupid with a million state icons in play. But at least I figured it out.
Hi!

Edit 2: I think I figured it out, after scavenging the entire forums for information. I can make state icons appear by using the PictureEx feature in SRD HUD Maker, having the state icon appear or disappear based on whether $gameActors.actor(1).isStateAffected(39) is true or false. 39 being the ID for the state in question. The actual IconSet.png in the system folder is basically useless in this scenario.

The downside is I have several dozen states in my game, and I'll have to come up with a way to organize the battle HUD in a way that it doesn't look stupid with a million state icons in play. But at least I figured it out.

I think you can do the following:

1 - $gameParty.members()[MEMBER_INDEX] → Replace MEMBER_INDEX with the position of the actor you want to check. The first actor on your party(the leader) is 0. The second one, is 1. And so on.
2 - .allIcons()[INDEX] → This script call will return a list of the states that the actor has. Replace the INDEX with a number starting from 0.

An example:
$gameParty.members()[0].allIcons()[0] → Will return the first icon state of the first actor(leader).

If it does not has a state, the script call can return undefined, which can give an error. So to avoid that error, you can try write this down to return the icon on the position INDEX you want or return 0:

$gameParty.members()[0].allIcons()[0] || 0

So, if you want for the hud maker to show them, you could put on the condition field:
!!$gameParty.members()[0].allIcons()[0] → This will return true if there is a icon/state on that position.

If you want only to show 4 states on the screen at the same time, then you just need to do the same and increase only the index number to return the state icon, and create 4 hud elements, each one with the proper icon index:
JavaScript:
$gameParty.members()[0].allIcons()[0]
$gameParty.members()[0].allIcons()[1]
$gameParty.members()[0].allIcons()[2]
$gameParty.members()[0].allIcons()[3]

Now I just don't remember how you can draw an Icon of the state with the HUD Maker. I don't remember if using the PictureEx or if it does have another method. And I don't currently have MV to test it.

Original thread: https://forums.rpgmakerweb.com/threads/in-need-of-assistance-in-showing-actor-and-enemy-states-with-srd-hud-maker.167680/