RMMV VE - Conditional Turn Battle: Icon Size Glitch

Status
Not open for further replies.

Ket

Veteran
Veteran
Joined
Oct 17, 2020
Messages
78
Reaction score
27
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,811
Reaction score
14,977
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

There's a different game over screen for each of the 4 endings in Forest Star (my Touch the Stars game jam entry). Have you seen this one? :wink:
PartyGameOver.png
So many ideas, so little energy.
SA57Face.pngSA57_IDLE.gifThis is just a "Chinese opera actor" who is totally not a serial killer. Now, we just need to clean up a pile of dead bodies found in his backyard. :kaojoy:

Forum statistics

Threads
113,589
Messages
1,076,050
Members
147,581
Latest member
bububoo
Top