Non-Combat Menu

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
919
Reaction score
736
First Language
English
Primarily Uses
N/A
A wild MV port appears!
Non-Combat Menu v1.04 (MV)
by mjshi- OK for use in all projects with credit
Get it here! (direct link)​

Introduction
Well, it was going to happen someday. So why not now?

Introducing a sleek, minimalist menu for all your non-combat game needs! Be it survival horror, mystery, point-and-click... the non-combat menu is here for you.

Features
Configurable:

- Configure what can be shown on the menu and what they will be called.
- Configure whether or not to have a gold window, where the window should be, and how wide
- Change what the item menu shows
- Change where the item description box will go

Updates:
- Compatibility edit for Yanfly Item Core. updated to 1.0b
- Added support for backgrounds. updated to 1.01
- Added support for calling common events from the menu. updated to 1.02
- Fixed the common event call to actually support multiple common events. updated to 1.02a
- Integrated the pluginCMD addon onto the main plugin. updated to 1.03
- Added icon and text alignment support updated to 1.04

Screens
(Blank project with some mapping for eye candy)

Screenshot_1.png

Screenshot_3.png

Screenshot_2.png


How to Use
Drag the file into your plugins folder, then configure to your heart's content.
Place below Yanfly Item Core if you have it.

Addons

PluginCMD addon Allows for plugin commands to be opened from the menu (thus allowing the implementation of other plugin scenes)
Status OUTDATED, works for 1.02 and below. For 1.03+, this addon's functionality has already been added to the main plugin and thus isn't needed.
View attachment NonCombatMenu_PluginCMD.js

Item Only addon Skips the menu and jumps straight to the items screen
Status up to date
View attachment NonCombatMenu_ItemOnly.js

Remove HP/MP from Status addon Removes the HP/MP/bar from the streamlined status screen.
Status up to date
View attachment 46753

Credit
mjshi
 
Last edited:

Valrix

Code Breaker
Member
Joined
Feb 13, 2016
Messages
14
Reaction score
4
First Language
English
Primarily Uses
Greetings, I needed to make a few edits to your plugin in order to support calling a plugin command from the menu, allowing it to be a bit more customized. I'm not sure how useful others may find it, but I thought I'd share the changes just in case. Thank you for making such a useful plugin!


Scene_NCMenu.prototype.createCommandWindow = function() {
this._commandWindow = new Window_NCMenu();
var method, split;

for (var i = 0; i < NCMenu.menuList.length; i++) {
method = NCMenu.menuList[1];
if (method == 'cancel') {continue}
split = method.split("_");
this._commandWindow.setHandler(method, eval(String("this.command" + (split[1] ? split[0].charAt(0).toUpperCase()+split[0].slice(1) : method.charAt(0).toUpperCase()+method.slice(1)) + ".bind(this"+(split[1] ? ",'"+split[1]+"'" : "")+")")));
}

this._commandWindow.setHandler('cancel', this.popScene.bind(this));
this.addWindow(this._commandWindow);
};

Scene_NCMenu.prototype.commandOther = function() {
var args = Array.prototype.slice.call(arguments, 0);
Game_Interpreter.prototype.pluginCommand(args.shift(), args);
};




As an example, I have the following menu in order to support Yanfly's Item Synthesis: "Items: item, Craft: other_OpenSynthesis, Status: status, Options: options, Save: save, Quit: toTitle"
 
Last edited by a moderator:

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
919
Reaction score
736
First Language
English
Primarily Uses
N/A
@Valrix It's just a little unclear (at least, on first glance) in that code there, what exactly 


eval(String("this.command" + (split[1] ? split[0].charAt(0).toUpperCase()+split[0].slice(1) : method.charAt(0).toUpperCase()+method.slice(1)) + ".bind(this"+(split[1] ? ",'"+split[1]+"'" : "")+")"))


is. I would recommend processing the "if/else" statements outside of the method binding itself, because it gets terribly messy if you do it inside the eval(). I myself can't criticize programming practices, though, because I only now realize (after looking at your code xD) that I was redefining "var method" over and over in a for loop... *facepalm* Well, I've fixed that now, and updated the plugin.


This as well:


Screenshot_1.png


Then take that conditional statement you had inside the eval and check if split == method or something or another. 


Anyways. Looks nice, would you mind me adding it to the main post, listed as an addon, or including it in the script (with credit given to you, of course)? 
 

Valrix

Code Breaker
Member
Joined
Feb 13, 2016
Messages
14
Reaction score
4
First Language
English
Primarily Uses
@mjshi Yikes, this is why I shouldn't work while tired. I took your advice and cleaned it up a bit, pulling the logic from the eval and using replace() over split(). Feel free to add or include it how you like :)


Scene_NCMenu.prototype.createCommandWindow = function() {
this._commandWindow = new Window_NCMenu();
var method, split, cmd;

for (var i = 0; i < NCMenu.menuList.length; i++) {
method = NCMenu.menuList[1];
if (method == 'cancel') {continue}
split = method.replace("other_", "");
if (split === method) {
cmd = "this.command" + method.charAt(0).toUpperCase() + method.slice(1) + ".bind(this)";
} else {
cmd = "this.commandOther.bind(this,'" + split + "')";
}
this._commandWindow.setHandler(method, eval(cmd));
}

this._commandWindow.setHandler('cancel', this.popScene.bind(this));
this.addWindow(this._commandWindow);
};




I noticed I now get the following error when I try to back out my inventory:

Code:
TypeError: Cannot read property 'setItem' of undefined at Scene_Item.onItemCancel
which points to the following line of code in Yanfly's Item Core:

Code:
this._statusWindow.setItem(null);
If I change the load order so it comes after ItemCore, the menu text in Scene_Item is no longer visible.
 
Last edited by a moderator:

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
919
Reaction score
736
First Language
English
Primarily Uses
N/A
No, your code seems to work. I placed the Yanfly Item Core under the NonCombatMenu and I didn't get that error.


I did change your code a little bit, though, but that shouldn't affect anything at all: https://www.diffchecker.com/zevwcogq


Also I noticed that this plugin isn't exactly compatible with Yanfly's item core xD Welp, here I go to do a compatibility edit for it...

Screenshot_1.png


edit: sheesh, MV screenshots are huge. Put it into spoiler tags ^_^
 
Last edited by a moderator:

Valrix

Code Breaker
Member
Joined
Feb 13, 2016
Messages
14
Reaction score
4
First Language
English
Primarily Uses
Interesting, I may have had an outdated plugin doing that, it went away. Thank you for taking the time to make it compatible, it's greatly appreciated.
 

0sleepy0

Veteran
Veteran
Joined
May 28, 2014
Messages
25
Reaction score
3
First Language
English
Primarily Uses
did you know?


there is a mix-up



Window_ItemCategory.prototype.makeCommandList = function() {
    if (NCMenu.showConsumables) {this.addCommand(TextManager.item,  'item')}
    if (NCMenu.showKeyItems) {this.addCommand(TextManager.weapon,   'weapon')}
    if (NCMenu.showWeapons) {this.addCommand(TextManager.armor,     'armor')}
    if (NCMenu.showArmors) {this.addCommand(TextManager.keyItem,    'keyItem')}
};


if (NCMenu.showKeyItems...weapon,   'weapon')}


if (NCMenu.showWeapons...armor,     'armor')}


if (NCMenu.showArmors....keyItem,    'keyItem')}
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
919
Reaction score
736
First Language
English
Primarily Uses
N/A
Ah, whoops xD Thanks for catching that!


Uploading a fix shortly.


edit: Updated.


Also, @Valrix, made your code into a plugin addon and added it to the main post.
 
Last edited by a moderator:

kyuukyuu

Veteran
Joined
Jul 28, 2015
Messages
53
Reaction score
92
First Language
English
Primarily Uses
I love this >ww< was wondering if it's possible to make the menus smaller? :)  
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,600
Reaction score
2,360
First Language
French
Primarily Uses
@mjshiNice plugin now I will be a total a**hole and I will change everything's in it for allow bust ect o3o~
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
919
Reaction score
736
First Language
English
Primarily Uses
N/A
@kyuukyuu What do you mean "menus smaller"? Like size-wise, or what?


@nio kasgami Feel free to modify :)  I'd like to see how it turns out, though!
 

kyuukyuu

Veteran
Joined
Jul 28, 2015
Messages
53
Reaction score
92
First Language
English
Primarily Uses
Yup like size wise~ an example would be when it's on the item page, is it possible for it to not take up the whole screen? TwT so sorry that I have only a basic understanding of codes. I could only see adjustments for the width and height for the main menu and the gold bar TwT 
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
919
Reaction score
736
First Language
English
Primarily Uses
N/A
Ah, yeah, that isn't possible at the moment. I am planning on perhaps making a couple alternate Scene_Item layouts for the Non-Combat Menu, though, so if you have an idea or want to make a mock-up of how big each window should be I can take a look at it ^_^
 

kyuukyuu

Veteran
Joined
Jul 28, 2015
Messages
53
Reaction score
92
First Language
English
Primarily Uses
They would be so nice of you *ooo* 


@mjshi Here's the sizing of mockup >www< I also wonder if I can use graphics instead of the window skin? 


mockup.png
 
Last edited by a moderator:

dragonkiller

Warper
Member
Joined
Sep 15, 2014
Messages
2
Reaction score
0
Primarily Uses
Great plugin which I am looking for.


Would you please delete the "status"?


I would like to make the AVG and the status is not required in the menu.
 

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
919
Reaction score
736
First Language
English
Primarily Uses
N/A
By "delete the status" do you mean you don't want the status to show up in the menu?


You can configure that in the plugin parameters, under "-- Menu --", double click "Menu order". Then delete the part that says "Status: status,".


edit @kyuukyuu Nothing like that has been implemented yet, but it should be fairly simple. I'll look it up.
 
Last edited by a moderator:

mjshi

Jack of Most Trades
Veteran
Joined
Feb 16, 2013
Messages
919
Reaction score
736
First Language
English
Primarily Uses
N/A
Update v1.01: Added support for background images for each screen.


Pending implementation of screen resizing...
 

dragonkiller

Warper
Member
Joined
Sep 15, 2014
Messages
2
Reaction score
0
Primarily Uses
By "delete the status" do you mean you don't want the status to show up in the menu?


You can configure that in the plugin parameters, under "-- Menu --", double click "Menu order". Then delete the part that says "Status: status,".


edit @kyuukyuu Nothing like that has been implemented yet, but it should be fairly simple. I'll look it up.
Thanks.


Let me try.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Guys I just want to sit around and work on my game! *gets lots and lots of money shoveled at him* Game, I don't recall a game. What game? :LZSexcite:
Seems like people have stopped looking both ways before crossing the road nowadays. Blindly walking out into a into a road only ends in disaster.
Just finished planning out the skeleton of the main quest line of my new game. I'm so excited for it!
Integrating Jason Perry's japan tile set while listening to Murray Atkinson's Heaven and Earth background music.
I forgot I had an account on rpgmakercentral lol

Forum statistics

Threads
94,544
Messages
921,771
Members
124,411
Latest member
yellowsonicboom64
Top