Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

32x32 icon size?

Hi!

I would like to increase the size of icons from 24x24 to 32x32.

I have searched through most of the default window classes and many forums to get an idea of what I need to edit. Unfortunately all the topics on this thing had only dead links to bits of code... :sad:

Can someone point me into the right direction, please? Thanks in advance!
 
Look, icon size is not a global variable shared within all the classes. RPG Maker XP simply assumes icon sizes are 24x24 pixels. That is to say, to change the icon size you need to go through every single class that uses icons and analyze each situation on its own terms. Most of the icons are drawn in situ inside windows. So you probably want to check Window_Item, Window_Skill, etc. You will find the following code, or similar.

Code:
bitmap = RPG::Cache.icon(item.icon_name)

opacity = self.contents.font.color == normal_color ? 255 : 128

self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)

Since 32 minus 24 is 8, and you want the icon centered, the difference of pixels from each side is 4. So replace the "x" with "x - 4", and the "y + 4" with "y", and the rectangle must be 32x32. I hope I was of assistance.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top