MZ Want to show Ability Points in the main menu

Hello guys, first thread here, need some javascript help.
I'm using RMMZ and i have the following plugins active:

Untitled 3.jpg


I think what i need to do involve only the MainMenuCore and the SkillLearnSystem.

With the SkillLearnSystem i created AP (Ability Points) in which my characters uses to learn skills.

But right now the only window in the main menu that shows how much AP they have is in the OWNED in the Skills > Learn window:

Untitled 1.jpg



And i want AP to be shown here right next to Energy:

Untitled 2.jpg


In the help section of the SkillLearnSystem, in the very end, they wrote this:

"For those who wish to display how many Ability Points an actor has for a
specific class, you can use the following JavaScript code inside of a
window object.

this.drawAbilityPoints(value, x, y, width, align);
- The 'value' variable refers to the number you wish to display.
- The 'x' variable refers to the x coordinate to draw at.
- The 'y' variable refers to the y coordinate to draw at.
- The 'width' variable refers to the width of the data area.
- Replace 'align' with a string saying 'left', 'center', or 'right' to
determine how you want the data visibly aligned.

this.drawActorAbilityPoints(actor, classID, x, y, width, align);
- The 'actor' variable references the actor to get data from.
- The 'classID' variable is the class to get data from.
- Use 0 if Ability Points aren't shared or if you want the Ability
Points from the actor's current class.
- The 'x' variable refers to the x coordinate to draw at.
- The 'y' variable refers to the y coordinate to draw at.
- The 'width' variable refers to the width of the data area.
- Replace 'align' with a string saying 'left', 'center', or 'right' to
determine how you want the data visibly aligned."


Maybe this is exactly what i need??
I understand that Vigor, Will and Energy bars will need to be realocated left and the AP value drawn, but i dont have a clue how to do it.
It might be pretty simple or very hard, but if someone could help me, i would trully aprecciate.

This is pretty much the LAST thing i need to fully customize my UI, please help a brother out?
Thank you very much, and however solve my problem, i will happily send a free copy once my game is finished <3

Any doubts, please ask and i will try to explain better...
Up
1681126096141.png


Firstly, you may want to increase your game resolution to allow for more space.
Plugin Manager > VisuMZ_1_MainMenuCore > List Style Settings > JS: Thin >
Spoiler: Replace Code
Code:
// Declare Constants
const actor = arguments[0];
const rect = arguments[1];

// Draw Actor Graphic
const gx = rect.x + (this.graphicType() === 'face' ? 1 : 0);
const gy = rect.y + (this.graphicType() === 'face' ? 1 : 0);
const gw = Math.min(rect.width, ImageManager.faceWidth);
const gh = Math.min(rect.height, ImageManager.faceHeight);
this.drawActorGraphic(actor, gx, gy, gw, gh);

// Draw Status Stuff
const lineHeight = this.lineHeight();
let sx = rect.x + 160;
let sy = rect.y + ((rect.height - lineHeight) / 2) - 2;

// Draw Actor Data
this.drawActorName(actor, sx, sy);
this.drawActorLevel(actor, gx+8, rect.y + rect.height - lineHeight +1);

// Place Gauges
sx += 180;
sy += (lineHeight - this.gaugeLineHeight()) / 2;
this.placeGauge(actor, "hp", sx, sy);
sx += 140;
if ((sx + 128) > rect.x + rect.width) return;
this.placeGauge(actor, "mp", sx, sy);
sx += 140;
if ((sx + 128) > rect.x + rect.width) return;
if ($dataSystem.optDisplayTp) this.placeGauge(actor, "tp", sx, sy);

// place AP
sx += 140;
this.drawActorAbilityPoints(actor, 0, sx, sy, gw, "left");
View attachment 258497

Firstly, you may want to increase your game resolution to allow for more space.
Plugin Manager > VisuMZ_1_MainMenuCore > List Style Settings > JS: Thin >
Spoiler: Replace Code
Code:
// Declare Constants
const actor = arguments[0];
const rect = arguments[1];

// Draw Actor Graphic
const gx = rect.x + (this.graphicType() === 'face' ? 1 : 0);
const gy = rect.y + (this.graphicType() === 'face' ? 1 : 0);
const gw = Math.min(rect.width, ImageManager.faceWidth);
const gh = Math.min(rect.height, ImageManager.faceHeight);
this.drawActorGraphic(actor, gx, gy, gw, gh);

// Draw Status Stuff
const lineHeight = this.lineHeight();
let sx = rect.x + 160;
let sy = rect.y + ((rect.height - lineHeight) / 2) - 2;

// Draw Actor Data
this.drawActorName(actor, sx, sy);
this.drawActorLevel(actor, gx+8, rect.y + rect.height - lineHeight +1);

// Place Gauges
sx += 180;
sy += (lineHeight - this.gaugeLineHeight()) / 2;
this.placeGauge(actor, "hp", sx, sy);
sx += 140;
if ((sx + 128) > rect.x + rect.width) return;
this.placeGauge(actor, "mp", sx, sy);
sx += 140;
if ((sx + 128) > rect.x + rect.width) return;
if ($dataSystem.optDisplayTp) this.placeGauge(actor, "tp", sx, sy);

// place AP
sx += 140;
this.drawActorAbilityPoints(actor, 0, sx, sy, gw, "left");
@NaosoX Thank you so much, it worked!
But i need to apologize, this request was in a previous patch of my game, i recently updated it and the main menu now uses the "Thicker" version.
I need the AP points to show in this menu now, centered right after the gauges:

kkkkk.jpg


Sorry for the trouble. I tried to edit it with the code you provided me, but i couldn't...
If you can be so kind to help me again, i would truly appreciate.
Thank you so much!!!
@NaosoX Thank you so much, it worked!
But i need to apologize, this request was in a previous patch of my game, i recently updated it and the main menu now uses the "Thicker" version.
I need the AP points to show in this menu now, centered right after the gauges:

View attachment 258503

Sorry for the trouble. I tried to edit it with the code you provided me, but i couldn't...
If you can be so kind to help me again, i would truly appreciate.
Thank you so much!!!
Your current configuration doesn't seem to have enough room .. try another configuration or style first
Can you help me to place AP and SP on vertical style? im using 1920x1080 res
Can you help me to place AP and SP on vertical style? im using 1920x1080 res
// Declare Constants const actor = arguments[0]; const rect = arguments[1]; const lineHeight = this.lineHeight(); const gaugeLineHeight = this.gaugeLineHeight(); const totalHeight = (lineHeight * 4.5) + (gaugeLineHeight * ($dataSystem.optDisplayTp ? 3 : 2)); // Draw Actor Graphic const gw = rect.width; const gh = Math.min(rect.height, ImageManager.faceHeight); const gx = rect.x; const gy = Math.max(rect.y, rect.y + (rect.height - totalHeight - gh) / 2); this.drawActorGraphic(actor, gx, gy, gw, gh); // Draw Actor Name let sx = rect.x; let sy = Math.max(gy + gh, rect.y + (rect.height - totalHeight + gh) / 2); let sw = rect.width; this.drawText(actor.name(), sx, sy, sw, 'center'); // Draw Actor Level sx = rect.x + Math.round((rect.width - 128) / 2); sy += lineHeight; this.drawActorLevel(actor, sx, sy); // Draw Actor Class const className = actor.currentClass().name; sx = rect.x + Math.round((rect.width - this.textSizeEx(className).width) / 2); sy += lineHeight; this.drawTextEx(className, sx, sy, sw); // Draw Actor Icons sx = rect.x + Math.round((rect.width - 128) / 2); sy += lineHeight; this.drawActorIcons(actor, sx, sy); // Draw Gauges sx = rect.x + Math.round((rect.width - 128) / 2); sy += lineHeight; this.placeGauge(actor, "hp", sx, sy); sy += gaugeLineHeight; this.placeGauge(actor, "mp", sx, sy); sy += gaugeLineHeight; if ($dataSystem.optDisplayTp) { this.placeGauge(actor, "tp", sx, sy); } // place AP sx += 16; sy += 40; this.drawActorAbilityPoints(actor, 0, sx, sy, gw, "left");
If someone need the vertical AP settings

Original thread: https://forums.rpgmakerweb.com/threads/want-to-show-ability-points-in-the-main-menu.155347/