MZ Battle UI

I'm looking for someone who can help with a custom interface for The Secret of Luin's front-view battle system.

Hearts represent HP, with each quarter-heart representing 1 HP. The small gold hearts represent armor (which adds extra HP, rather than Defense). The green bottle to the right represents MP, with each character's abilities drawing from the same MP pool (similar to FP in Mario RPG). The thin yellow bar is the ATB gauge, and the red bar represents enemy HP. Character expressions change when taking damage, healing, being critically injured, status afflicted, or dying. The rest is pretty standard:

1.gif


Drop a comment here or DM me if you're interested in being a part of this project.
Sounds like HUDmaker should fairly easily bae able to do that.
Sounds like HUDmaker should fairly easily bae able to do that.
I’m not too familiar with HUDmaker. How would I go about assigning HP to hearts, having the yellow hearts represent bonus HP from armor, or having shared MP?
Not sure either since I don't use it on MZ. But sounds doable. If not, good luck finding a scripter 😀
I’m not too familiar with HUDmaker. How would I go about assigning HP to hearts, having the yellow hearts represent bonus HP from armor, or having shared MP?
He's right, It's doable but would rely on formulas that added one heart for every 100 hp or whatever, and also changed the heart image based on fractions of a full heart.
He's right, It's doable but would rely on formulas that added one heart for every 100 hp or whatever, and also changed the heart image based on fractions of a full heart.
Each quarter-heart = 1 HP. I downloaded HUD Maker Ultra and I'm trying to create a picture gauge, but it's not really clear what's what in the editor and it would seem the gauge would need to be a static number of hearts, rather than something expandable? Also, how could I distinguish base HP from bonus HP granted by equipment?

I guess for the shared MP pool, the easiest solution might be to have a dummy character and find a way to use their MP for everyone's abilities.

Edit: This is a really nifty program so far though, so thanks for the suggestion! I've made the basic layout, but can I change the actual battle menu via HUD Maker to appear as a horizontal strip like in the mockup, or would I have to actually modify the default menu's script (and how could I go about doing that)?
There's two ways you can do this: The hearts are all collectively one bar (one HUD element), but then you would need to swap it between potentially dozens of images based on different amounts of health the actor could have.

Or each heart would be one HUD element, then each heart would only have to swap between four different pictures for each quarter of health. You would hide or show each heart based off the actor's total HP.
With the red hearts needing to be be drawn in two rows, it'd be easiest to draw them as individual sprites, IMO. Not sure if HUD Maker can do that.

For the yellow hearts, if I'm understanding your requirements correctly, you would need an additional plugin that implements a barrier or temporary HP mechanic before you can actually represent that on the HUD.
Or each heart would be one HUD element, then each heart would only have to swap between four different pictures for each quarter of health. You would hide or show each heart based off the actor's total HP.
This is the goal.

So, within HUD Maker, is there a way to translate 1 Heart to 4 HP in a way that tells the game to change a single picture to that of a full, 3/4, 1/2, 1/4, or empty heart? Or do I need to have completely separate pictures for each of these heart fractions layered on top of each other, conditionally showing/hiding them based on an Actor HP Number Comparison?

For the yellow hearts, if I'm understanding your requirements correctly, you would need an additional plugin that implements a barrier or temporary HP mechanic before you can actually represent that on the HUD.
Yeah, that's correct. Is there a plugin like that for MZ? Seems Yanfly made a similar plugin for MV.
In terms of plugins available to the public, VisuStella has one, but their code is obfuscated, so I don't know whether or not you could easily retrieve the actor barrier data to display in your custom HUD. I assume it would show up in the dev console, but I prefer to not use VisuStella's plugins, so I can't tell you for certain. You might be able ask in their Discord. There may also be some Japanese barrier / temporary HP plugins available that don't come up in an English Google search.
I'll look into that. At least for now I do have a HUD that functions roughly how the mockup shows, really appreciate everyone for the suggestions.

How would I go about changing the battle menu so that it appears as a horizontal bar like in the mockup?
The battle menu(s) in your mockup are Window_PartyCommand and Window_ActorCommand, and you would need to look at the maxRows and maxCols functions that are inherited from their parent windows.

You will also need to look at Scene_Battle; in MZ, Scene_Battle creates each window within a specific rect. The rect's position and dimensions are generally configured in Scene_Battle.

The actor command window, which is shown in your screenshot, actually has two Y values in the code, if I remember correctly. So you'll need to keep that in mind if your window is not located where you want it to be.
The battle menu(s) in your mockup are Window_PartyCommand and Window_ActorCommand, and you would need to look at the maxRows and maxCols functions that are inherited from their parent windows.

You will also need to look at Scene_Battle; in MZ, Scene_Battle creates each window within a specific rect. The rect's position and dimensions are generally configured in Scene_Battle.

The actor command window, which is shown in your screenshot, actually has two Y values in the code, if I remember correctly. So you'll need to keep that in mind if your window is not located where you want it to be.
Nice, I'll see what I can do with that.

Just wondering but how would I lock a HUD element's coordinates onto an enemy's? For example if I want "Enemy HP Bar 1" to always appear center-aligned with Enemy #1, etc.
I would add the gauge as a child to each enemy sprite. You can look at Sprite_Enemy.prototype.createStateIconSprite() for a general idea as to how.

Alternatively, you could do something like Spriteset_Battle.prototype.createEnemies, where the spriteset iterates through the troop and creates each enemy sprite. You could instead do this with your gauges and add each gauge as a child to each enemy sprite.
Can you elaborate on what you mean by adding a gauge as a child to an enemy sprite?

Edit: Also, does anyone know what the victory window (where it displays EXP, gold, etc. won after a fight) is called in the default .js files? I need to edit it so it doesn't overlap with the HUD. Same for the message window that appears when you flee from battle.

And one last thing, how could I go about adding the active character's name to the top of the Actor Command Window (on top of the command window, not inside it)?
Can you elaborate on what you mean by adding a gauge as a child to an enemy sprite?

Edit: Also, does anyone know what the victory window (where it displays EXP, gold, etc. won after a fight) is called in the default .js files? I need to edit it so it doesn't overlap with the HUD. Same for the message window that appears when you flee from battle.

And one last thing, how could I go about adding the active character's name to the top of the Actor Command Window (on top of the command window, not inside it)?

If you intend to tackle this with JS, your best bet would be to look at the code syntax of the two functions I mentioned.

Sprite_Enemy.prototype.createStateIconSprite() can be found in rmmz_sprites.js. It provides a code blueprint for adding a state icon sprite to enemy sprites, and could be used as a reference for adding a gauge. In MZ, gauges also happen to be sprites, with Sprite_Gauge being the default gauge sprite.

If you're trying to add gauges via the HUD Maker Ultra plugin, the above probably won't apply, unfortunately. I'm unfamiliar with the plugin, so I'm afraid I can't help much.

For your second question, MV and MZ's victory messages are printed in the standard, default message window. If you have a separate victory window, it's being added by a 3rd party plugin.

Your last question is slightly tricky, because Window_ActorCommand is based off of Window_Selectable, which iterates through a list of items and draws those items as options in a selectable list. In this case, the actor's battle commands. You'd have to make significant changes to the way that Window_Selectable works in order to draw the actor's name at the top of the window as an item that's not selectable.

My personal preference would be to add a new window to Scene_Battle that displays the name of the currently inputting actor. You can then position the new window as you like, and you don't need to make any major changes to Window_Selectable.

You could also make a new sprite, e.g. Sprite_ActorName, that displays the currently inputting actor, and attach that to Window_ActorCommand and position it as you like. It'd have the same effect.

Original thread: https://forums.rpgmakerweb.com/threads/battle-ui.159356/