[SOLVED] Customizing Default RPG Maker MV Menus

MeekoSoup

Warper
Member
Joined
Dec 16, 2015
Messages
3
Reaction score
1
First Language
English (US)
Hey fellow developers,

I've been pooring over forums and Rpg Maker MV Javascript Code for hours trying to figure out how to simply tweak the pre-existing in-game menus.

For instance, I am attempting to remove the HP/MP bars that show up next to my actor's when I open the main menu (I've turned off the Status Menu Item button through the Database, so that's not a problem). I thought I found out where this code was in the core files, and I commented it out to see if it would have any effect on the game. It had none. So, I tried, a bit blindly, to create a plugin that overwrote the section of the code that I thought dealt with drawing the extra information, besides class and name. This also failed.

I was under the impression that the following code is what I would want to tweak to achieve my goal:

Window_Status.prototype.refresh = function() { this.contents.clear(); if (this._actor) { var lineHeight = this.lineHeight(); this.drawBlock1(lineHeight * 0); this.drawHorzLine(lineHeight * 1); this.drawBlock2(lineHeight * 2); this.drawHorzLine(lineHeight * 6); this.drawBlock3(lineHeight * 7); this.drawHorzLine(lineHeight * 13); this.drawBlock4(lineHeight * 14); }};Window_Status.prototype.drawBlock1 = function(y) { this.drawActorName(this._actor, 6, y); this.drawActorClass(this._actor, 192, y); this.drawActorNickname(this._actor, 432, y);};Window_Status.prototype.drawBlock2 = function(y) { this.drawActorFace(this._actor, 12, y); this.drawBasicInfo(204, y); this.drawExpInfo(456, y);};Window_Status.prototype.drawBlock3 = function(y) { this.drawParameters(48, y); this.drawEquipments(432, y);};Window_Status.prototype.drawBlock4 = function(y) { this.drawProfile(6, y);};Window_Status.prototype.drawHorzLine = function(y) { var lineY = y + this.lineHeight() / 2 - 1; this.contents.paintOpacity = 48; this.contents.fillRect(0, lineY, this.contentsWidth(), 2, this.lineColor()); this.contents.paintOpacity = 255;};I felt that commenting out:

this.drawBlock2(lineHeight * 2);this.drawHorzLine(lineHeight * 6);this.drawBlock3(lineHeight * 7);this.drawHorzLine(lineHeight * 13);this.drawBlock4(lineHeight * 14);would at least get me somewhere, but it didn't seem to do anything at all. And I have only been working on one project, so I haven't mixed up the file for one in another project.

I really want to become well aquanted with modifying windows and menus in the new system, given how important it is for game design, but thus far it has been like pulling teeth. I would appreciate any helpful feedback on my issue.

Thanks!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I think you'll find it's in Window_Base.prototype.drawBasicInfo - there will be a call there to draw a gauge with some parameters.  Be aware though, changing this will change it in several menu screens.

If you ONLY want it to happen in one screen, you're going to have to duplicate the drawBasicInfo function (or whichever one has that call to draw the bars) into the current window class and just disable those couple of lines that draw the gauges.
 

Heartbreak61

Wandering Noob
Veteran
Joined
Sep 5, 2012
Messages
187
Reaction score
90
First Language
Indonesian
Primarily Uses
RMMV
You're looking in wrong place, mate.

Window_Status is window on scene status, which I believe has been safely disabled by you.

Look into Window_MenuStatus, find drawBasicInfo, and try to comment it.
 

MeekoSoup

Warper
Member
Joined
Dec 16, 2015
Messages
3
Reaction score
1
First Language
English (US)
Hey Shaz and Heartbreak61, thanks for the speedy reply! (No, seriously, that was FAST! :o )

So, I'm pooring over the Window_MenuStatus code right now, and I can't seem to find where the drawBasicInfo method is. It really doesn't look like Window_MenuStatus is the status menu, but possibly the menu button for the status screen? Or the status screen that results from pressing the button? It does inherit from Window_Selectable.

So, I suspect I'll need to duplicate the methods/classes like Shaz explained. Trouble is, I'm not entirely sure how to do that.I had just started to get used to Ruby's way of doing things, and RPG Maker VX Ace's Developers way of using Ruby... I'm really thrown off by how Javascript inherits things, and what prototyping is, why it's necessary, and the like. So, is it possible to get an example of what I might do to accomplish such a modification?

I do get the feeling it's more or less a matter of overwriting the function (in a plugin) and having that new one be the one that is refered to, but I still feel like I'm not doing it properly.

Thanks again everyone!
 

MeekoSoup

Warper
Member
Joined
Dec 16, 2015
Messages
3
Reaction score
1
First Language
English (US)
Hey everyone! I figured out the solution and I'd like to share it for anyone who runs across the thread! (I'll also change the title to [solved] if I have permissions to do so.)

So, Shaz, you were right, except the item in particular I needed to modify (in my case), is the Window_Base.prototype.drawActorSimpleStatus function.

All I had to do was this:

//=============================================================================// MeekoMenus.js//=============================================================================/*: * @plugindesc Modify the main menu, focusing on status menus. * @author MeekoSoup * * @help This plugin does not provide plugin commands. */Window_Base.prototype.drawActorSimpleStatus = function(actor, x, y, width) { var lineHeight = this.lineHeight(); var x2 = x + 180; var width2 = Math.min(200, width - 180 - this.textPadding()); 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.drawActorHp(actor, x2, y + lineHeight * 1, width2); // this.drawActorMp(actor, x2, y + lineHeight * 2, width2);};I decided to post my whole plugin file so that those who read this in the future will know just how easy it is to make such a change. Of course, changing the very layout of the status window is another full gambit of challenges, but for now, I'm very happy with this.

Thanks again for such speedy responses! I can feel my sanity returning to me! :D
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top