MV Icon close to Character name in main menu

Hello there, I'm using the standard menu. How can I display icon near to the character name into the main menu?
I'd like to put a code into database in the "note" section for each actor such as <icon 2> so that the menu can read it. It should look like the following menu screen.
I don't remember who exacly made a plugin, but I'm 90% sure it is still in this forum and I had it in use in my game. It's a plugin that allows create buttons on game screen and assing to it a common event wich would be ideal for your needs, however I noticed you use primilary MZ so it might not work with MZ, it was made for MV, but your screen shot shows MV... I'm a little confused... Give few moments to remember that plugin and I provide link either in this post edit or if someone else's find what I have in mind.

Edit:
I think it was this plugin by @Aloe Guvner

Edit2:
If it is really this what you need then please be aware that if you disable mouse input in your game, buttons will not work.
I'm using MV, anyway the best solution for me would be to use a plugin (I've installed many Yanfly plugins including his menu) that can read the note on the Actor database so I can put there what icon should be displayed.
I don't have all Yanfly's plugins, but I don't think Picture Common Event plugin works in Scenes other than Scene_Map. I Never had a need to use it in my game.
So, let me see. You can try to do something like this. Inside a js file, add this:


Code:
// As I don't know which version of MV are you using, I will use ES5 standards;

(function() {
    
    var _window_base_drawActorSimpleStatus = Window_Base.prototype.drawActorSimpleStatus;
    Window_Base.prototype.drawActorSimpleStatus = function(actor, x, y, width) {
        _window_base_drawActorSimpleStatus.call(this, actor, x, y, width);
        var data = actor.actor();
        if(!!data.meta["MenuIcon"]) {
            var iconIndex = parseInt(data.meta["MenuIcon"].trim())
            // Edit this part of the code for positioning better the [x,y] of the icon
            this.drawIcon(iconIndex,x + width - Window_Base._iconWidth,y + this.lineHeight())
        }

    };
})()

You can use this notetag for the icon index: <MenuIcon:iconIndex>
Ex.
<MenuIcon:17>
AAAAAAAhhh, I missunderstood topic's word "close" with close (window) instead of close (near to/next to)
I don't have all Yanfly's plugins, but I don't think Picture Common Event plugin works in Scenes other than Scene_Map.
Don't
So, let me see. You can try to do something like this. Inside a js file, add this:


Code:
// As I don't know which version of MV are you using, I will use ES5 standards;

(function() {
   
    var _window_base_drawActorSimpleStatus = Window_Base.prototype.drawActorSimpleStatus;
    Window_Base.prototype.drawActorSimpleStatus = function(actor, x, y, width) {
        _window_base_drawActorSimpleStatus.call(this, actor, x, y, width);
        var data = actor.actor();
        if(!!data.meta["MenuIcon"]) {
            var iconIndex = parseInt(data.meta["MenuIcon"].trim())
            // Edit this part of the code for positioning better the [x,y] of the icon
            this.drawIcon(iconIndex,x + width - Window_Base._iconWidth,y + this.lineHeight())
        }

    };
})()

You can use this notetag for the icon index: <MenuIcon:iconIndex>
Ex.
<MenuIcon:17>
Thank you! Shall I add this as a new plugin? I'm not into javascript, how can install it?
Yes, save it as plugin, place it in js/plugins directory, add to plugin manager as any plugin you did before and that's all.
Done, but that appears

1627118813918.png
Mmm... Strange! I have tried to add it in a js file, too. No problem on my end. You can test my file then, I have added it for your in the attachments.
wonderful! it works. I very thank you! this community is fantastic!
is there a way to display it in x.y positions?

// Edit this part of the code for positioning better the [x,y] of the icon

shall I insert integers in the place of x and y?

I'd like the icon to be just to the right of the actor name (same position of Lv number, just on the upper line)
1627130356862.png
You can try editing the icon drawing this way:

Code:
this.drawIcon(iconIndex,x + width/2,y)

Then, you can try to add some offsets number to place it better (ex. this.drawIcon(iconIndex,x + width/2 - 8,y + 4) etc...
You can try editing the icon drawing this way:

Code:
this.drawIcon(iconIndex,x + width/2,y)

Then, you can try to add some offsets number to place it better (ex. this.drawIcon(iconIndex,x + width/2 - 8,y + 4) etc...
Perfect! Found the position, it is:
this.drawIcon(this.drawIcon(iconIndex,x + width/70 - 8,y + 75))


(for those which will need the same plugin too)

Thank you very much!

Original thread: https://forums.rpgmakerweb.com/threads/icon-close-to-character-name-in-main-menu.138870/