MV How to show an equipped item's name?

Good day!
What I'm trying to do now is to show the name of a currently equipped item(s) on a party leader in a window. It would be a part of a character sheet that covers everything important on a single page, and it just needs to show the player what they have in slots, if they do, that's it.

Something like that:
HEAD (it's just text)
<item name>
BODY
<item name>
AMULET
<item name>

I looked in rpg_windows and found code that looks like what I need. That's the line:
this.drawItemName(this._actor.equips()[index], rect.x + 138, rect.y);
Or maybe it's some other line, there are many lines with 'equip' in them -___-
I'm afraid that's a bit too much for my level of javascript. I just have no idea how my code must look.

Can you guys help?

I basically need just this six lines: name of the current equipment of a party leader in slot 1/2/3/4/5/6. And dash if leader doesn't have anything in that slot.
The equips() array are the weapons and armor that the actor has equipped. The index corresponds to the list of Equipment Types (aka slots) in the Terms tab of your database.

Getting and printing the actual name of that item happens inside the code of drawItemName().
The equips() array are the weapons and armor that the actor has equipped. The index corresponds to the list of Equipment Types (aka slots) in the Terms tab of your database.

Getting and printing the actual name of that item happens inside the code of drawItemName().
Thanks for the info. Sadly, I still have no idea how to use it T__T
Can you elaborate, please? Maybe with an example?
I am having the same issue and am in the same boat as OP and would love for someone to answer this!
I am having the same issue and am in the same boat as OP and would love for someone to answer this!
Which part don't you understand?

There's an explanation above of the RPG Maker-specific parts of the code - anything beside that is more basic JavaScript in terms of arrays, indices and calling functions.

No one can just write the code for you because we have no idea what you already have or are trying to do.

If you don't understand what arrays, indices, and functions are, such that you can use the above explanation, you probably need to start with some more fundamental JavaScript tutorials before trying to code your own user interface.

I like w3schools, starting with the Statements chapter.
I'm not trying code my own interface, that would be far above me. I simply want to do the same thing OP is doing: display a certain actor's equipment in a given slot. But like OP, I also don't know how to use drawItemName() in conjunction with the preceding code. I would just like to know how that works, but if it is too basic to ask about, then I guess don't bother. For the record, I have a basic idea what functions, indices, and arrays are, but I don't know how to use them together. Your explanation above seems to imply that drawItemName() can be appended to the code once the index is specified but RMV hasn't accepted that when I use it, telling me it "isn't a function".

I have done a lot of digging through the documentation and used the console to try to figure out what I need to do, but none of that has been helpful. The core of my problem might be a syntax issue, and that's why I'm reaching out to others for advice rather than taking an entire class on javascript just to get to the part that's useful to me (which I might not even catch when it comes up because I'm not going to recognize it by another name). OP also put forth a fair amount of effort to understand this stuff but still needed it explained with an example. That seemed like a reasonable request and I simply wanted to second it.
I'm not trying code my own interface...I simply want to do the same thing OP is doing: display a certain actor's equipment in a given slot.
My point is, it's not a clear question as to what you're trying to accomplish.

The OP was, in fact, coding their own interface, indicated by the beginning of their post.

By default, RPG Maker MV already shows the names of the items that you have in the equipment slots.

1711748781946.png


Without actually seeing your code and the error message produced (by pressing F8 and going to the Console tab), there's no way any of us can just guess at what you're doing wrong. An example already exists in the core scripts if you search for "drawItemName" - without any context about what you're specifically trying to do, there's no reason to believe any example someone else types will make any more sense than looking at how it's already used.

1711749347191.png


1711749478474.png


It's possible I'm misinterpreting, but the tone of your response comes across as aggrieved, that I said your question was unreasonable and that it's unfair to suggest you learn something about coding when you're doing coding. But the fact is, your question is like saying "I want to mod the engine of my car without doing any mechanics training."

That's not the way code or engines are designed to be used - that's the purpose of the eventing and plugins system, if you want to work without JavaScript knowledge. There's nothing wrong with that.

If you need help with your code as a whole, then provide it and people will be happy to help you.
Thanks for offering. Somehow, 5 hours of searching did not get me to the topic until now. My issue was that I was working inside of a plugin and it did not know what to provide for the OTHER members of the party who had nothing to display. My question, like OP's, was about syntax, and it was answered here: https://forums.rpgmakerweb.com/index.php?threads/srds-menu-status-customizer-error.128287/ Sorry for taking up your time.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-show-an-equipped-items-name.156208/