VisuStella ElemStatus Core Access Category: 2 Columns for Armor Type

Sorry, Mods. Not sure if this is the right section but pls move this post if necessary. TIA.

As the title says, how can I add another column for the Armor Type (Gear Classes in my case) in the Access (Proficiencies) Category. Got a lot of Armor Types for each Class (actually, 1 per armor variant) so another column would have properly displayed them all. BTW, shrinking the font wouldn’t help at all. Yes, I could have just used Galv’s Equip Requirements to limit Armor Types but I’m just sticking to VisuStella to prevent compatibility issues down the road.

No scripting experience whatsoever, just relying on pure logic and this is as far as my editing goes: Eliminated the Skill Types Column and moved Weapon Types (Weapon Classes) and Armor Types to the left but IDK how to split the Armor Types Column to display more items.

Prof.jpg


BTW, this is my edited Access Category DrawJS:func:

// Declare Constants const lineHeight = this.lineHeight(); const actor = this._actor; const thirdWidth = Math.floor(this.innerWidth / 3); let x = 0; let y = 0; // Draw Actor Graphic this.drawActorGraphic(0, this.innerWidth / 2); // Declare Parameter Rect let rect = new Rectangle(0, 0, thirdWidth, this.innerHeight); // Draw Weapon Types rect.x; x = rect.x; y = 0; this.resetFontSettings(); this.drawItemDarkRect(x, y, rect.width, lineHeight, 2); this.changeTextColor(ColorManager.systemColor()); this.drawText(TextManager.statusMenuWtype, x, y, rect.width, 'center'); y += lineHeight; for (const wtypeId of actor.weaponTypes()) { this.drawItemDarkRect(x, y, rect.width, lineHeight); if (wtypeId > 0) { const text = $dataSystem.weaponTypes[wtypeId]; const padding = Math.round((rect.width - this.wtypeWidth()) / 2); this.drawTextEx(text, x + padding, y, rect.width - padding * 2); } y += lineHeight; } this.drawItemDarkRect(x, y, rect.width, this.innerHeight - y); // Draw Armor Types rect.x += rect.width; x = rect.x; y = 0; rect.width = this.innerWidth - rect.x; this.resetFontSettings(); this.drawItemDarkRect(x, y, rect.width, lineHeight, 2); this.changeTextColor(ColorManager.systemColor()); this.drawText(TextManager.statusMenuAtype, x, y, rect.width, 'center'); y += lineHeight; for (const atypeId of actor.armorTypes()) { this.drawItemDarkRect(x, y, rect.width, lineHeight); if (atypeId > 0) { const text = $dataSystem.armorTypes[atypeId]; const padding = Math.round((rect.width - this.atypeWidth()) / 2); this.drawTextEx(text, x + padding, y, rect.width - padding * 2); } y += lineHeight; } this.drawItemDarkRect(x, y, rect.width, this.innerHeight - y);

Hope someone can help. TIA.
Sorry, instead of editing, I made a reply.
so, there will be more than 12, and no more than 24?
This is a Fighter class character so he can equip the most armor variants (so he is my baseline). He is proficient in 22 Gear Types. Thus, others have less. I can always decrease the font size to make each column display more than 12. But, yes, 24 would be the max.
1667579767212.png

1667579713346.png

1667580812441.png


Spoiler: Replace Code
Code:
// Declare Constants
const lineHeight = this.lineHeight();
const actor = this._actor;
const thirdWidth = Math.floor(this.innerWidth / 3);
let x = 0;
let y = 0;
let col = 0;
// Draw Actor Graphic
this.drawActorGraphic(0, this.innerWidth / 2);
// Declare Parameter Rect
let rect = new Rectangle(0, 0, thirdWidth, this.innerHeight);
// Draw Weapon Types
rect.x;
x = rect.x;
y = 0;
this.resetFontSettings();
this.drawItemDarkRect(x, y, rect.width, lineHeight, 2);
this.changeTextColor(ColorManager.systemColor());
this.drawText(TextManager.statusMenuWtype, x, y, rect.width, 'center');
y += lineHeight;
for (const wtypeId of actor.weaponTypes()) {
    this.drawItemDarkRect(x, y, rect.width, lineHeight);
    if (wtypeId > 0) {
        const text = $dataSystem.weaponTypes[wtypeId];
        const padding = Math.round((rect.width - this.wtypeWidth()) / 2);
        this.drawTextEx(text, x + padding, y, rect.width - padding * 2);
    }
    y += lineHeight;
}
this.drawItemDarkRect(x, y, rect.width, this.innerHeight - y);
// Draw Armor Types
rect.x += thirdWidth;
x = rect.x;
y = 0;
this.resetFontSettings();
this.drawItemDarkRect(x, y, rect.width * 2, lineHeight, 2);
this.changeTextColor(ColorManager.systemColor());
this.drawText(TextManager.statusMenuAtype, x, y, rect.width * 2, 'center');
y += lineHeight;
for (const atypeId of actor.armorTypes()) {
    if (y > this.innerHeight - lineHeight) {
        col = 1;
        this.drawItemDarkRect(x, y, rect.width, this.innerHeight - y);
        y = 0 + lineHeight;
        x += rect.width;
    }
    this.drawItemDarkRect(x, y, rect.width, lineHeight);
    if (atypeId > 0) {
        const text = $dataSystem.armorTypes[atypeId];
        const padding = Math.round((rect.width - this.atypeWidth()) / 2);
        this.drawTextEx(text, x + padding, y, rect.width - padding * 2);
    }
    y += lineHeight;
}
this.drawItemDarkRect(x, y, rect.width, this.innerHeight - y);
if (col == 0) {
    y = 0 + lineHeight;
    x += rect.width;
    this.drawItemDarkRect(x, y, rect.width, this.innerHeight - y);
}
OMG! That's amazing, you nailed it! Worked like a charm! Couldn't be more happier. Thank you so much, NaosoX!

BTW, besides this, I'm already crediting you 'cause I'm also using your Char Gen Gradients. Fantastic work!

Anyway, Mods, solved & extremely satisfied. Pls close this thread. Thanks!
Im glad you enjoy it. Have fun making your game!

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.

Original thread: https://forums.rpgmakerweb.com/threads/visustella-elemstatus-core-access-category-2-columns-for-armor-type.152458/