joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
88
Reaction score
8
First Language
English
Primarily Uses
RMMZ
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.
 

Attachments

  • Screenshot_20210724_084423_com.android.chrome.jpg
    Screenshot_20210724_084423_com.android.chrome.jpg
    600.4 KB · Views: 11

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,221
Reaction score
707
First Language
Poland
Primarily Uses
RMMV
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.
 
Last edited:

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
88
Reaction score
8
First Language
English
Primarily Uses
RMMZ
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.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,221
Reaction score
707
First Language
Poland
Primarily Uses
RMMV
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.
 

BlueMoon

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
363
Reaction score
485
First Language
Italian
Primarily Uses
RMMZ
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>
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,221
Reaction score
707
First Language
Poland
Primarily Uses
RMMV
AAAAAAAhhh, I missunderstood topic's word "close" with close (window) instead of close (near to/next to)
 

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
88
Reaction score
8
First Language
English
Primarily Uses
RMMZ
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?
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,221
Reaction score
707
First Language
Poland
Primarily Uses
RMMV
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.
 

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
88
Reaction score
8
First Language
English
Primarily Uses
RMMZ
Done, but that appears

1627118813918.png
 

BlueMoon

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
363
Reaction score
485
First Language
Italian
Primarily Uses
RMMZ
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.
 

Attachments

  • Blue_MenuIcon.js
    2 KB · Views: 2

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
88
Reaction score
8
First Language
English
Primarily Uses
RMMZ
wonderful! it works. I very thank you! this community is fantastic!
 

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
88
Reaction score
8
First Language
English
Primarily Uses
RMMZ
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
 

BlueMoon

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
363
Reaction score
485
First Language
Italian
Primarily Uses
RMMZ
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...
 

joket

Veteran
Veteran
Joined
Apr 24, 2021
Messages
88
Reaction score
8
First Language
English
Primarily Uses
RMMZ
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!
 

Latest Threads

Latest Profile Posts

Ami
Gosh,I want to Play this Game Again one more again!

Seeing my Own Character & Kannono Once Again!
Tales_of_the_World_Radiant_Mythology_3_JPN_PSP-Coverart.jpg
I've been a bit to depressed to get work done on the game lately. Don't worry, I'll be okay.
LunarFlareStudios wrote on Solar_Flare's profile.
Hey, my name is Lunar Flare Studios, and you're Solar Flare? That's so weird!
How has this place been dead quiet since after I posted about Deltarune? That's the only post that people are reacting to now... will you please read my other statuses?

Forum statistics

Threads
115,296
Messages
1,088,724
Members
149,939
Latest member
Kionea
Top