Is there a way to draw an icon from a database entry?

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Like if I wanted an item/skill/weapon description to feature an icon in it.

Can I do this somehow?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Are you talking about in a Show Text box? If you hover your mouse over the panel where you enter text, the control codes will appear.


\i[15] will show the 15th icon. When you're assigning an icon to a weapon or something, you can click on the icon, and in the lower left(?) corner of that window, the icon index will appear. That's the number you want to use.
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Are you talking about in a Show Text box? If you hover your mouse over the panel where you enter text, the control codes will appear.

\i[15] will show the 15th icon. When you're assigning an icon to a weapon or something, you can click on the icon, and in the lower left(?) corner of that window, the icon index will appear. That's the number you want to use.
No I mean...



In that box.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
No, you would require a script mod for that. You do realize that when you add an icon to an item, it already displays the icon in the menu? You don't have to add it in the description as well.


Actually, I lie. I just tested it, and you can, indeed, put icons into the description field. Just type it in exactly the same format \i[n] where n is the icon index. When you're in the menu and you have the item highlighted, the description will have the icon.
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
No, you would require a script mod for that. You do realize that when you add an icon to an item, it already displays the icon in the menu? You don't have to add it in the description as well.

Actually, I lie. I just tested it, and you can, indeed, put icons into the description field. Just type it in exactly the same format \i[n] where n is the icon index. When you're in the menu and you have the item highlighted, the description will have the icon.
Well, it seems to indeed work for description fields...



But...



It does not seem to work for fields like this. Is there some way I could get these sorts of fields to work?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
In Window_Command, find the draw_item method (mine is on about line 115).


Comment out the draw_text line, and add in the following line instead:

draw_text_ex(item_rect_for_text(index).x, item_rect_for_text(index).y, command_name(index))Unfortunately, those options in the Terms tab have a limited size, so you may not be able to enter a 3-digit icon code. You might need to change the Window_TitleCommand script to actually use the text and icon you want to show, instead of looking up Vocab:: to get the text.
The arguments for draw_text and draw_text_ex are different too. If you use draw_text_ex (which is needed for the icons), you can't tell it to right or center align. You would have to manually calculate where you want the text to begin.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top