RMMV VE - Conditional Turn Battle: Icon Size Glitch

Status
Not open for further replies.

Ket

Veteran
Veteran
Joined
Oct 17, 2020
Messages
56
Reaction score
23
First Language
English
Primarily Uses
RMMV
By default, the VE - Conditional Turn Battle has icons as 32 x 32. My icons are 54 x 48. They aren't pulling from the default faceset. Even when I state this in the plugin parameters, the icons come out looking like this:

1620270450287.png

How can I get them to display properly?

EDIT:
Changing
JavaScript:
    Sprite_CtbIcon.prototype.drawIcon = function() {
        var icon = this._battler.ctbIcon() || 0;
        var pw = Window_Base._iconWidth;
        var ph = Window_Base._iconHeight;
        var bitmap = ImageManager.loadSystem(this.display().iconset);
        var sx = icon % 16 * pw;
        var sy = Math.floor(icon / 16) * ph;
        this.bitmap.blt(bitmap, sx, sy, pw, ph, 0, 0);
    };
to
JavaScript:
    Sprite_CtbIcon.prototype.drawIcon = function() {
        var icon = this._battler.ctbIcon() || 0;
        var pw = Window_Base._iconWidth;
        var ph = Window_Base._iconHeight;
        var bitmap = ImageManager.loadSystem(this.display().iconset);
        var sx = icon % 27 * pw;
        var sy = Math.floor(icon / 24) * ph;
        this.bitmap.blt(bitmap, sx, sy, pw, ph, 0, 0);
    };
gave me this:
1620271294138.png
I feel like I'm working in the right direction, but I'm still not entirely sure what I'm doing. I'm just playing with numbers while wait for assistance, to be honest. But who knows, maybe I'll figure it out.

EDIT 2:
So, I figured it out.
I just made
JavaScript:
    Sprite_CtbIcon.prototype.drawIcon = function() {
        var icon = this._battler.ctbIcon() || 0;
        var pw = Window_Base._iconWidth;
        var ph = Window_Base._iconHeight;
        var bitmap = ImageManager.loadSystem(this.display().iconset);
        var sx = icon % 16 * pw;
        var sy = Math.floor(icon / 16) * ph;
        this.bitmap.blt(bitmap, sx, sy, pw, ph, 0, 0);
    };
into
JavaScript:
    Sprite_CtbIcon.prototype.drawIcon = function() {
        var icon = this._battler.ctbIcon() || 0;
        var pw = 54
        var ph = 48
        var bitmap = ImageManager.loadSystem(this.display().iconset);
        var sx = icon % 27 * pw;
        var sy = Math.floor(icon / 24) * ph;
        this.bitmap.blt(bitmap, sx, sy, 54, 48, 0, 0);
    };
 
Last edited:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,529
Reaction score
14,848
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Ami
trying to change my picture & got screwed up...
I've been busy working on my next music pack, and I've also been busy composing some personal compositions. Depending on the type of mood and setting, sometimes I just really love the sound of music created in lofi mono. It has its charm.
Haven't used this website in so long, hope everyone here have a good day! Lately I've been crafting a dnd world, so I haven't got the time to use RPG maker sadly enough.
New MZ Update! Subfolders for Assets, Search in Plugin Help, Map Layer Buttons | RPG Maker News #78

A little WIP I decided to drop for something coming in 10-12 hours!
9.PNG

Forum statistics

Threads
112,482
Messages
1,068,578
Members
146,149
Latest member
GlacierStangs
Top