I have probably one of the most simple questions but how do I reposition or get the gold menu at the bottom left. So far I did a little bit of editing for my PSIV Menu and I still have some more work to do but it'll do for right now. 🙂
MZ Gold Menu at bottom left (Still need help with cursor)
JS Plugin RequestsYou can flip the horizontal arrangement of MZ's pause menu with this short override:
This affects the core script coordinates of all windows on the pause menu, including the gold window.
Alternatively you could patch/override the
(I assume you already have something like this to cut the command window short.)
JavaScript:
Scene_Menu.prototype.isRightInputMode = function() { return false; };
Alternatively you could patch/override the
goldWindowRect (and commandWindowRect) methods of Scene_Menu. E.g. for the gold window:
JavaScript:
void (alias => {
Scene_Menu.prototype.goldWindowRect = function() {
const rect = alias.apply(this, arguments); // get usual rectangle
rect.x = 0; // move to left edge of screen
return rect;
};
})(Scene_Menu.prototype.goldWindowRect);
Thank you so much! Do you think you know how to edit the party member window width? I don't like how it basically is covering the whole screen. After that I just have to remove the faces and figure out how to remove HP and MP gauge bar without removing any digits.
Yep, e.g.
JavaScript:
void (alias => {
Scene_Menu.prototype.statusWindowRect = function() {
const rect = alias.apply(this, arguments); // get usual rectangle
rect.width -= 50; // reduce width by 50 px
rect.x += 25; // stay centred where it was
return rect;
};
})(Scene_Menu.prototype.statusWindowRect);
To remove all faces from the pause menu status window, you could try:
JavaScript:
Window_MenuStatus.prototype.drawActorFace = function() { /* nothing */ };
Window_MenuStatus with Window_StatusBase.If you want to remove the bars for all HP/MP gauges throughout the game, I think this will do it:
JavaScript:
void (alias => {
const NO_GAUGE = ["hp", "mp"];
Sprite_Gauge.prototype.drawGauge = function() {
if (NO_GAUGE.indexOf(this._statusType) < 0)
alias.apply(this, arguments);
};
})(Sprite_Gauge.prototype.drawGauge);
JavaScript:
Sprite_Gauge.prototype.drawGauge = function() { /* nothing */ };
It works nice, but do you think you can get it to work on the other side instead of the right side?
Also I'm really sorry for bothering you at such a late time, I know scripting and making plugins can be hard so you don't have to write the code right away, I'm a very patient person.
The status window's content gets cut off on the right because it draws its content based on fixed coordinates. To change that, you'll need an appropriate override. One option would be to change where the simple status gets drawn, e.g. (untested):
JavaScript:
Window_MenuStatus.prototype.drawItemStatus = function(index) {
const actor = this.actor(index);
const rect = this.itemRect(index);
const x = rect.x; // assumes face removed
const y = rect.y + Math.floor(rect.height / 2 - this.lineHeight() * 1.5);
this.drawActorSimpleStatus(actor, x, y);
};
JavaScript:
Window_MenuStatus.prototype.drawActorSimpleStatus = function(actor, x, y) {
const lineHeight = this.lineHeight();
const x2 = x + 180 - 50; // added -50
this.drawActorName(actor, x, y);
this.drawActorLevel(actor, x, y + lineHeight * 1);
this.drawActorIcons(actor, x, y + lineHeight * 2);
this.drawActorClass(actor, x2, y);
this.placeBasicGauges(actor, x2, y + lineHeight);
};
-50 here to match the example change in window width. Again, to apply this to all status windows, just replace Window_MenuStatus with Window_StatusBase. Depending on results, you may find you also want similar overrides for drawActorName and/or drawActorLevel, e.g. to avoid overlaps.If that wasn't what you meant, then I suggest you make a mockup, e.g. a fake/edited screenshot, showing what you want.
I assume OP's still going for this.
Yeah, still trying to get something like the PSIV menu that ATT_Turan just showed
I see! I hadn't looked through the post history...
I believe I've covered most relevant methods for the task. For the HP/MP numbers:
This will tell a window to draw the string
My example uses centre-alignment: width - 50, X + 25. For right-alignment, just do X + 50 instead, to match the width reduction. As mentioned, you'll also need to (significantly) edit how the status window draws its contents. Someone else may be able to help you sort out the coordinates/spacing if that turns out to be a sticking point. 👋
I believe I've covered most relevant methods for the task. For the HP/MP numbers:
JavaScript:
this.drawText(text, 80, 0, 100, "right");
text at coordinates (80, 0) px inside its borders, with maximum width 100 px and right-alignment. (Max width and alignment can be omitted if you like.) Relevant values:TextManager.hpA- abbreviated form for HP, as defined in the database.this.actor().hp,this.actor().mhp- current/max HP for actor being drawn.
hp with mp in all cases to reference the MP stuff.My example uses centre-alignment: width - 50, X + 25. For right-alignment, just do X + 50 instead, to match the width reduction. As mentioned, you'll also need to (significantly) edit how the status window draws its contents. Someone else may be able to help you sort out the coordinates/spacing if that turns out to be a sticking point. 👋
Ok, I'm not going to need to ask you for any scripts or anything but do you think you can breakdown on what you just said because I'm a little confused with drawtext and the little code you wrote about the HP and this actor thing.
drawText just draws the text you provide. E.g. if TextManager.hpA is "HP", this will draw "HP" in the top-left corner (X = 0, Y = 0) of the window:
JavaScript:
this.drawText(TextManager.hpA, 0, 0);
this.actor().mp. (JavaScript will automatically convert it to a string, no worries.) 👋It's context-dependent (
this), so it needs to be used in a game window context, e.g. in a function like Window_MenuStatus.prototype.drawItemStatus or Window_MenuStatus.prototype.drawActorSimpleStatus.As you may have spotted,
drawItemStatus gets the itemRect for the specified index. That gives you an intended area (X, Y, width, height) in which to draw.You could either draw each part separately, or try to make a single string and draw that, e.g.
JavaScript:
this.drawText(TextManager.hpA + ":" + this.actor().hp + "/" + this.actor().mhp, 0, 0);
If you're going to be trying to modify this through code (rather than a UI design plugin), you probably want to do some basic JavaScript tutorials.
Stuff like
this, understanding what class things belong to, and data types are all very fundamental things. If you're trying to write/modify code without understanding any of that, you're going to be very prone to error and quite likely get frustrated with it.Thank you, this really helps you can close the thread now.
OK, great!
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.
In future, when you want your thread closed, you can use the Report button with a reason like "thread can be closed" or "problem solved". That lets all mods see it, which generally means you'll get a faster response. 👋Original thread: https://forums.rpgmakerweb.com/threads/gold-menu-at-bottom-left-still-need-help-with-cursor.159851/