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
679
Reaction score
375
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,933
Reaction score
13,570
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,473
Reaction score
5,304
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
679
Reaction score
375
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,815
Reaction score
1,275
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,933
Reaction score
13,570
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,815
Reaction score
1,275
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

12 done, 4-5 started. Now that the weekend is over, things will sloooowwwww down again proabably.
when you're completely done with someone's crap lol...
Ami
--- Survival For RPGist Part 3 ---

F.Healer: Here it is,I made the Simple Sandwich
Survivalist
: it's so Delicious!
Chef: Here you Go! My Gourmet Steak.
Survivalist: It's Super Delicious,Too!
F.Mage: I Made it for you!
F.Healer: Uhh...Charcoal?
F.Mage No,It's a Toast!
Chef: Did you Let it in 10 Minutes?
F.Mage: Maybe?

Forum statistics

Threads
103,032
Messages
996,809
Members
134,507
Latest member
juegostudios
Top