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

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
408
Reaction score
33
First Language
Portuguese
Primarily Uses
RMVXA
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
Veteran
Joined
May 22, 2016
Messages
4,381
Reaction score
1,212
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
Veteran
Joined
Dec 22, 2018
Messages
408
Reaction score
33
First Language
Portuguese
Primarily Uses
RMVXA
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 Threads

Latest Posts

Latest Profile Posts

DamageEvil_2.png added!
index.php

Important update for Leafko!

Forum statistics

Threads
125,671
Messages
1,172,701
Members
164,802
Latest member
thesailing
Top