Icon Layer

My iconset doesn't have backgrounds and i wanted to mix 2 icons without opening a image editor and do it myself.


Is it possible to be done for skills items, equipments and states?



Maybe with tags like these


<top icon: x>


<botton icon: x>
Try this - save as a .js file in the js/plugins folder.  File name doesn't matter.

Code:
Window_Base.prototype.drawItemName = function(item, x, y, width) {
    width = width || 312;
    if (item) {
        var iconBoxWidth = Window_Base._iconWidth + 4;
        this.resetTextColor();
        if (item.meta.iconBack) {
            this.drawIcon(parseInt(item.meta.iconBack), x + 2, y + 2);
        }
        this.drawIcon(item.iconIndex, x + 2, y + 2);
        this.drawText(item.name, x + iconBoxWidth, y, width - iconBoxWidth);
    }
};



You only need to specify the background in the notes, like this: <iconBack:15> (no spaces anywhere in there).  The foreground should be selected in the normal way.


When a skill/equip/item is drawn, it will check if a background is specified and will draw it first.  Then it'll draw the normal icon.  If no background is specified in the notes, it'll just draw the icon that's assigned the normal way.


There might be conflicts if you have other plugins that overwrite or alias this function.
Working fine, no bugs so far :v


Is there a way that i can make them look bigger? I think i can increase their size by 4 - 8 pixels.



Thx Shaz!
You could try either changing these lines in the rpg_windows.js file, or if you want them in a plugin (so you don't have to remember to make the change again every time you update the project when a new MV is released) just insert a few new lines in the script I gave you and paste them in there:


Window_Base._iconWidth = 32;
Window_Base._iconHeight = 32;




Change the 32 to whatever you want it to be - 36, 40, whatever.


You will also have to modify your iconset to ensure they are all that size.


The windows MAY adjust the text spacing accordingly, if they use those values.  I'd be concerned how they'd show in a message, if you use icons in messages, and how they'd show on states, in the status window or in battles.  The line spacing would be based on 32x32 icons and I don't know if that would adjust if you set your icon size to be bigger.
This solves everything. Thx a lot :v

Original thread: https://forums.rpgmakerweb.com/threads/icon-layer.70014/