How do I draw certain piece of equipment on the menu...?

Panda_Artist

Humble RPG Fan
Regular
Joined
Dec 22, 2018
Messages
459
Reaction score
38
First Language
Portuguese
Primarily Uses
RMMV
Good Morning / Afternoon / Evening

I am not sure if this is the right place to ask... but okay.

What I want is to for example display a character's equipped weapon next to their face, nickname class etc... for a menu...

with the icon and everything..

draw_actor_equips(7) obviously does not work so I would really appreciated if anyone could teach me how to code this...

Any help is appreciated!
 

Roninator2

Gamer
Regular
Joined
May 22, 2016
Messages
5,122
Reaction score
1,505
First Language
English
Primarily Uses
RMVXA
In the Window_EquipSlot script there is the draw_item method
at first glance it looks like it doesn't draw the icon anywhere here.
Inside that is the draw_item_name
when you trace it back (search by ctrl+shift+F)
in Window_Base is draw_item_name method and inside that is the draw_icon call.
So looking at the data that gets passed through, we can see that the draw icon wants the item and it's position with it enabled or not. Equip_Slot passes the item through with @actor.equips[index]
The actor equip index starts at 0 for the weapon up to however many equips you have.
Then looking at Window_Base at the draw_icon call, you see it uses the item.icon_index to draw the icon.
Then you just need to figure out where to place the icon on the Window_MenuStatus
Using draw_icon(actor.equips[0].icon_index, rect.x, rect.y, true)
you will just need to adjust the rect.x and rect.y for positioning the icon.
This of course would have to go into the draw_item method
 

Panda_Artist

Humble RPG Fan
Regular
Joined
Dec 22, 2018
Messages
459
Reaction score
38
First Language
Portuguese
Primarily Uses
RMMV
Thank you so much for your help!

I put draw_item_name(actor.equips[0],dx + 160, dy) and that did exactly what I wanted to achieve with Ace Menu engine.
 

Latest Profile Posts

Couple shots of my own window and button set stuff in action.
Likely Lads.gif
These ones write themselves!
Ugh, having one of those days again. Someone want to tell me something good about reality that is quantifiable and not easily proven wrong? Anything related to fiction doesn't count (which I thought would be obvious but then I've been show 'obvious' isn't a real thing).
I just saw someone's post that had an instagram link. I have yet to be able to open that site up once, ever, or have an embed of it work (it just straight up won't show either of them). And I haven't really found a reason to try to fix the problem, either XD
I want to go play piano now. This is gonna be my stopping point today (yes, I’m very slow at drafting). Might have a few too many curly Qs? Obviously gotta finish the limbs and clean up. There are a few more outfit details I need to add. Probably going to do a background so that the pose makes sense, LOL.

IMG_0515.jpeg

Forum statistics

Threads
135,052
Messages
1,253,328
Members
178,030
Latest member
Not_an_alligator
Top