Remove MP from Menu

D-D-D-Dan

Veteran
Veteran
Joined
Mar 30, 2019
Messages
52
Reaction score
5
First Language
English
Primarily Uses
RMMV
In my game mana is set to zero at the beginning of every encounter so there is no reason to have the Mana bar shown in the Menus. Is there a simple way to remove/hide the Mana bar in the menus but still have it in encounters?
 
Last edited:

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
693
Reaction score
383
First Language
Poland
Primarily Uses
RMMV
Im on the phone right now but I can tell you find this in Window_Menu object in rpg_windows.js file, find
this.drawMp or something like that and erase it. In the morning when i get back from work i provide you more details
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,950
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
You are better off writing a plugin that overwrites that method. Otherwise, if you get an update to MV and you update your project, your change will be lost.

Actually, the drawMP is used by both the menus and the battles, so clearing it completely will cause it to not show in battles either. I'm assuming you do still want it to show in battles, as you said they START each battle with 0MP, not that you don't use it at all?

In that case, you'd need to alias the function, do a check to see if you're in battle, and if you are, call the aliased function.
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,474
Reaction score
5,307
First Language
english
Primarily Uses
RMMZ

The best way to do this would require a plugin, so I'm moving this to Plugin Requests.

 

D-D-D-Dan

Veteran
Veteran
Joined
Mar 30, 2019
Messages
52
Reaction score
5
First Language
English
Primarily Uses
RMMV
@Shaz yes you are correct in the assumption that i want it to be shown in battle.
I have a mana charging combat system where you start at 0 and each basic attack
charges up your mana and decreases when using a skill.
So there is no reason to have it show in the menu.
I guess i do need a plugin to resolve this then...
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
693
Reaction score
383
First Language
Poland
Primarily Uses
RMMV
@D-D-D-Dan
Code:
Window_Base.prototype.drawActorMp = function(actor, x, y, width) {
// NOTHING!!!
};
save this as plugin and you will have no MP - https://prnt.sc/qkzxyo
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,841
Reaction score
1,305
First Language
EN
Primarily Uses
RMMZ
Here's something along the lines of what Shaz suggested, i.e. draw only when in battle:
JavaScript:
(function(alias) {
	Window_Base.prototype.drawActorMp = function() {
		if (SceneManager._scene instanceof Scene_Battle) {
				alias.apply(this, arguments);
		}
	};
})(Window_Base.prototype.drawActorMp);
Haven't tested but I think that'll work. Just save as a .js file (Save As > File Type: All Files, Filename: whateverYouLike.js) and import as a plugin.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,950
Reaction score
13,585
First Language
English
Primarily Uses
RMMV
save this as plugin and you will have no MP
Again, that will remove MP from battles as well, but the OP only wants it removed from the menu screen.
 

D-D-D-Dan

Veteran
Veteran
Joined
Mar 30, 2019
Messages
52
Reaction score
5
First Language
English
Primarily Uses
RMMV
Here's something along the lines of what Shaz suggested, i.e. draw only when in battle:


(function(alias) {
Window_Base.prototype.drawActorMp = function() {
if (SceneManager._scene instanceof Scene_Battle) {
alias.apply(this, arguments);
}
};
})(Window_Base.prototype.drawActorMp);


Haven't tested but I think that'll work. Just save as a .js file (Save As > File Type: All Files, Filename: whateverYouLike.js) and import as a plugin.
This! Thank you! Ill be testing to see if it breaks other stuff but it seems to be working sofar!
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,841
Reaction score
1,305
First Language
EN
Primarily Uses
RMMZ
Great, happy RPG Making! :kaojoy:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Hello folks, I'm an old member deciding to reenter the forum. Greetings :D
When a parent (of a less than adult aged child) is like
"Oh, I'm like a friend to my child. We're friends."
I'm like
"Oh, that kid's gonna suck...."
Baby tiger gets a belly rub! ^.^
Ami
--- Friendship System ---

(F.Mage and F.Healer's FP is 100)
F.Mage: We did it! we can beat the monster easily!
F.Healer: With the Friendship System,we got stronger thanks to you F.Mage (Hugging)
F.Mage: (Blushing) Ahh...don't say like that. we are Best Friend Forever.
(In Distand)
M.Mage: They look happy...
M.Healer: Yeah...always like that...

Forum statistics

Threads
103,287
Messages
998,596
Members
134,798
Latest member
evilperm
Top