[SOLVED]Help in adding a custom menu command (using plugin) into Yanfly's Main Menu Manager

Status
Not open for further replies.

cirnoe

Villager
Member
Joined
Apr 24, 2020
Messages
13
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hello!

I am facing some difficulties in adding custom menu commands to yanfly's main menu manager. I need to use it because I want to omit certain menu elements.
For context, I am using these three plugins together.

YF Main Menu Manager , Kru Reputation System , MOG Scene Menu
I haven't had any problems with the YF and MOG together and it's been working cleanly (EDIT: for some reason, there's an issue with closing the main menu now that wasn't there before... :( ), up until I tried to add an external plugin. Screen Shot 2020-08-07 at 3.47.22.png
I have confirmed that "Scene_Factions" is indeed the correct menu command according to the script. However, when I tried to scene call, it completely didn't work. The icon is present for some reason but pressing it does nothing (pardon the icons they are just default placeholders)
Screen Shot 2020-08-07 at 3.47.02.png

I attempted to switch off the main menu manager just to try things out and it pulled up this error message. Of course this is just for extra info because ultimately I'd like the plugin to work when the main menu manager is actually on XD
Screen Shot 2020-08-07 at 3.46.07.png
Lastly, this is my list of plugins for reference

Screen Shot 2020-08-07 at 3.46.17.png
Funnily enough, I had this same problem with Yanfly's quest journal but it started working all on its own for some reason without me creating a new menu command. I assume it might be because they are from the same creator?

If anyone could help me figure out the problem I'd be really grateful! Thank you in advance :)
 
Last edited:

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,226
Reaction score
601
First Language
English
Primarily Uses
RMMV
Not sure if this will make a difference in your problem, but your Yanfly plugins are not in correct order. Yanfly engine core should always be at the top of the list. You can check the YEP website for the correct order of those plugins.
 

cirnoe

Villager
Member
Joined
Apr 24, 2020
Messages
13
Reaction score
2
First Language
English
Primarily Uses
RMMV
Not sure if this will make a difference in your problem, but your Yanfly plugins are not in correct order. Yanfly engine core should always be at the top of the list. You can check the YEP website for the correct order of those plugins.
Thank you for the reply, I've rearranged it but unfortunately the problem's still there :(
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,424
Reaction score
806
First Language
Dutch
Primarily Uses
RMMV
make main bind to blank and ext: to a common Event ID, and place the scriptcall in there.
and it will work.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,829
Reaction score
1,286
First Language
EN
Primarily Uses
RMMZ
Yanfly's Main Menu Manager parameters are all code evals, so I'd suggest a couple of changes:
  1. Symbol should also be in quotes, i.e. "affection". This is because it's text, not a variable name. I think what you have currently will assign an empty symbol "", meaning that the command will not have a handler/bind assigned, hence the behaviour you're seeing. :kaoswt:

  2. Main Bind should be a function. What you've got will execute as soon as you open the pause menu (assuming it has a symbol assigned). Instead, try this:
    JavaScript:
    SceneManager.push.bind(SceneManager, Scene_Factions);
    Technical details on the bind method can be found here~
:kaothx:
 

cirnoe

Villager
Member
Joined
Apr 24, 2020
Messages
13
Reaction score
2
First Language
English
Primarily Uses
RMMV
Yanfly's Main Menu Manager parameters are all code evals, so I'd suggest a couple of changes:
  1. Symbol should also be in quotes, i.e. "affection". This is because it's text, not a variable name. I think what you have currently will assign an empty symbol "", meaning that the command will not have a handler/bind assigned, hence the behaviour you're seeing. :kaoswt:

  2. Main Bind should be a function. What you've got will execute as soon as you open the pause menu (assuming it has a symbol assigned). Instead, try this:
    JavaScript:
    SceneManager.push.bind(SceneManager, Scene_Factions);
    Technical details on the bind method can be found here~
:kaothx:
Thank you so much for the detailed reply! However, the issue still isn't fixed and it pulls up an error message when I try to click on the icon, maybe I did something wrong? Do let me know if you notice anything :kaodes: (these emojis are so cute!)
Screen Shot 2020-08-07 at 14.06.57.png

Screen Shot 2020-08-07 at 14.06.36.png
 

cirnoe

Villager
Member
Joined
Apr 24, 2020
Messages
13
Reaction score
2
First Language
English
Primarily Uses
RMMV
make main bind to blank and ext: to a common Event ID, and place the scriptcall in there.
and it will work.
Really sorry to be a bother, but could you elaborate a little on how I should format this? I'm not very familiar with the terms. From what I understand... I make the main bind field empty and put both the event ID (I didn't set a common event for this plugin though) + SceneManager.push(Scene_Factions) together in the ext field.. ?

Thanks in advance!
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,424
Reaction score
806
First Language
Dutch
Primarily Uses
RMMV
@cirnoe
Name: "Affections" or 'Affections' (this is the command name
Symbol: affections (unique symbol)
Show: true (or use variable or switch when to activate (example: $gameswitches.value(4) ))
Enable: true (or same as above)
Ext: 4 (4 is the Common Event ID 4 (change this to a empty place in your common event)
Main Bind:
Actor Bind:

Main and Actor Bind is empty, in your Common Event 4 (as an example above)
place teh scriptcall: SceneManager.push(Scene_Factions)

sometimes, the setup for adding it to the MainMenuManager is different,
this are mostly in the helpfile if it does. Else the bove works most of the times.

thats all basicly.

@caethyril symbol has no "quotes" this will lead into errors though, only the Name need
quotes in YEP_MainMenuManager.
 

cirnoe

Villager
Member
Joined
Apr 24, 2020
Messages
13
Reaction score
2
First Language
English
Primarily Uses
RMMV
@cirnoe
Name: "Affections" or 'Affections' (this is the command name
Symbol: affections (unique symbol)
Show: true (or use variable or switch when to activate (example: $gameswitches.value(4) ))
Enable: true (or same as above)
Ext: 4 (4 is the Common Event ID 4 (change this to a empty place in your common event)
Main Bind:
Actor Bind:

Main and Actor Bind is empty, in your Common Event 4 (as an example above)
place teh scriptcall: SceneManager.push(Scene_Factions)

sometimes, the setup for adding it to the MainMenuManager is different,
this are mostly in the helpfile if it does. Else the bove works most of the times.

thats all basicly.

@caethyril symbol has no "quotes" this will lead into errors though, only the Name need
quotes in YEP_MainMenuManager.
Thank you so much omg!!!!!! I finally got it to work :kaothx: I found out that the Reputation plugin was the main problem because I couldn't even access it normally, so I found another plugin. Your method works perfectly :kaosalute:
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,829
Reaction score
1,286
First Language
EN
Primarily Uses
RMMZ
I realise you've got it working now with another plugin and a common event, but now that I've done some testing with all four original plugins I'll let you know what worked for me:
  1. Kru_Reputation has a bug in its code. :kaoswt2: You can fix it by replacing this line (272):
    JavaScript:
    factionWin.window.activate();
    ...with this:
    JavaScript:
    factionWin.activate();  // edited!
    This was the error you were seeing with the Menu Manager plugin switched off, or after selecting the option with my bind thing in place.

  2. Load Kru_Reputation (and, obviously, Kru_Core) before YEP_MainMenuManager. This is so that the SceneManager.push bind will apply with a known scene rather than undefined.

  3. Load Mog_SceneMenu after YEP_MainMenuManager (you've got this already). This is so Mog's plugin sees the Yanfly menu options and loads the appropriate resources~

  4. Use the Main Bind I suggested. Normally, without the bind, that'd evaluate when the scene loads. I believe Mog's plugin changes something there. :kaoback:

  5. Like @ShadowDragon said, it seems that Symbol doesn't need "quotes" around it...good to know! However, it only changes the internal symbol, so it's only a problem if referencing the symbol elsewhere (e.g. another plugin's parameters).
Happy RPG Making! :kaojoy:
 
Last edited:

cirnoe

Villager
Member
Joined
Apr 24, 2020
Messages
13
Reaction score
2
First Language
English
Primarily Uses
RMMV
I realise you've got it working now with another plugin and a common event, but now that I've done some testing with all four original plugins I'll let you know what worked for me:
  1. Kru_Reputation has a bug in its code. :kaoswt2: You can fix it by replacing this line (272):
    JavaScript:
    factionWin.window.activate();
    ...with this:
    JavaScript:
    factionWin.activate();  // edited!
    This was the error you were seeing with the Menu Manager plugin switched off, or after selecting the option with my bind thing in place.

  2. Load Kru_Reputation (and, obviously, Kru_Core) before YEP_MainMenuManager. This is so that the SceneManager.push bind will apply with a known scene rather than undefined.

  3. Load Mog_SceneMenu after YEP_MainMenuManager (you've got this already). This is so Mog's plugin sees the Yanfly menu options and loads the appropriate resources~

  4. Use the Main Bind I suggested. Normally, without the bind, that'd evaluate when the scene loads. I believe Mog's plugin changes something there. :kaoback:

  5. Like @ShadowDragon said, it seems that Symbol doesn't need "quotes" around it...good to know! However, it only changes the internal symbol, so it's only a problem if referencing the symbol elsewhere (e.g. another plugin's parameters).
Happy RPG Making! :kaojoy:
Wow, thank you!!! <3 It’s always good to have options, so I’m grateful for the fix! Since there was a mistake in the original code, it’s no wonder it didn’t work for so long QAQ...
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,424
Reaction score
5,057
First Language
Dutch
Primarily Uses
RMXP

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.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Got any suggestions?

Here is my valiant and beloved captain
of the space cruiser ROSTOV.
Made a video showcasing a plugin (by Triacontane) that allows us to summon a relative touchpad/analog stick wherever we touch on the game's screen. (Mostly for mobile RPG Maker games.)

EmptyVoid_ wrote on Leporine's profile.
Just letting you know that I have written a PM to you.
Testing testing. First time doing this.

What are we, facekook?

Forum statistics

Threads
103,179
Messages
997,821
Members
134,650
Latest member
KuroZer0
Top