Adding Other Tabs to Yanfly Menu Engine Script

HyliaKitty

Villager
Member
Joined
Dec 1, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
So I'm making a game with a non combat system so I used Yanfly's engine to help get rid of the equipment, status and also put in a few other tabs. I've tried to put them in but I guess I did not do it right? I'm trying to add the quests (Moderan Algebra), achievements, messages and character biographies and I know its possible 'cause almost all scripts are compatible with Yanfly I've heard, this may be a dumb question but I'm horrible with working with some scripts even with directions. I also was once able to get rid of the level and HP bar through the Window Base Default Script but when adding Yan's script it came back, do I have to get rid of something there? All help would be appreciated, I've gotten so far into this game and have failed so many!

MENU.PNG

scripts.PNG
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
- For the Menu Engine buttons:

You can't just enter a new symbol into that setting, and expect it to work, that won't work like that.


Modern Algebra's custom scenes are especially weird to figure out.


BUT you don't have to do this, because, as far as I know, all of his scripts with new menus got settings for inserting the new commands WITH an index setting as well, so basically, you can simply enable the menu button in his scripts, rather than in Yanfly's script.


To do this, Yanfly's script MUST be above ALL other scripts which add new command buttons for the main menu! So, make this change in your project, because I see that you put the menu engine below the scripts which would add these new commands.


Here is how to add new, custom scenes to your menu using Yanfly's menu engine:


1. In the CUSTOM_COMMANDS setting, add in a new setting line which follows the same layout as the others. For Modern Algebra's Quest System menu, it should look like this:



:quest_journal => ["Quests", 0, 0, :maic_command_insert],


The :quest_journal and :maic_command_insert can NOT be changed, those will decide what will happen when the player selects the new command.


The first is the command's symbol, while the second is the command's handler method. You must get these symbol names from the custom scripts which add these new scenes OR make your own method for opening the new scene (but most of the times, the scripts got these methods already).


You can customize the rest of the settings in the array however you want.


2. Now that you have the logic added for your custom scene, you must add the command into the COMMANDS setting area. You must use a valid key from the CUSTOM_COMMANDS settings here for adding your own custom commands. For the quest system, this will be :quest_journal, so add that somewhere in the COMMANDS settings (remember that the order you make there will decide the order you see in your menu!).


All scenes from Modern Algebra use the :maic_command_insert method that you used in the CUSTOM_COMMANDS.


For CSCA's Achievement scene, you do the same, add your settings in the CUSTOM_COMMANDS area. That one should look like this:



:achievements => ["Achievements", 0, 0, :csca_ach_select],


Again, the key and the method (:achievement and :csca_ach_select) can NOT be changed, the rest is configurable.


Also, in the case of CSCA scripts, you must install CSCA Menu Organizer script, because that one contains the methods to load the new scenes.


BUT you need to disable the script starting from the class Window_MenuCommand < Window_Command line, because that part of the script would conflict with Yanfly's Menu Engine. Simply install the script, and comment out or delete everything from the line I mentioned above (including that line).


Or you could possibly add the said script above Yanfly's Menu Engine, because than those parts will be overwritten automatically.


I have no idea about those message and bio scripts, and I can't help with those without seeing those scripts.


To insert any command successfully with Yanfly's Menu Engine, you must know the command's symbol and handler method name. These can be usually found in the scripts ading these new scenes (in optimal cases, at least). You can get both of these if you check these scripts, just search for a line like:



@command_window.set_handler(


And on these lines, the first symbol you see will be the command's symbol, and the second symbol will be the command's handler method.


The only scripts where it is not exactly clear to get these data are from Modern Algebra, because of that weird method he used in his scripts, but the other scripts I saw use pretty obvious names and symbols for their commands.



- For the status window display:

Yes, you will need to edit Yanfly's script to get rid of those. 


You wrote that you once managed to get rid of these stuffs, so what you will need to do is just rinse and repeat in Yanfly's script. 


Check which methods you edited to disable these data, and edit the same methods in Yanfly's scripts.
 

Kilana

Warper
Member
Joined
Jul 2, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
 I also was once able to get rid of the level and HP bar through the Window Base Default Script but when adding Yan's script it came back, do I have to get rid of something there?


Yanfly core overwrites alot of the window display scripts... should be around line 785:
 

Edited to hide the hp/mp bars




#--------------------------------------------------------------------------
# overwrite method: draw_actor_simple_status
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, dx, dy)
draw_actor_name(actor, dx, dy)
draw_actor_level(actor, dx, dy + line_height * 1)
draw_actor_icons(actor, dx, dy + line_height * 2)
dw = contents.width - dx - 124
draw_actor_class(actor, dx + 120, dy, dw)
#Edited to hide the hp/mp bars
# draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
# draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
end






I've tried to put them in but I guess I did not do it right? I'm trying to add the quests (Moderan Algebra), achievements, messages and character biographies and I know its possible 'cause almost all scripts are compatible with Yanfly I've heard
If those other systems have built in yanfly menu compatibility, they'll have a command settings section where you can define the enable/show switches and handler method :)commandwhatever)... the switches will have to be set to 0 if you don't want to manually activate them. If the show switch is something other than 0, it will likely be hidden by default.


If they don't have built in compatibility, you'll need to define new commands to link to the new menu options:


Examples inside the YEA - Menu Engine script:

#--------------------------------------------------------------------------
# - Custom Commands -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# For those who use scripts that may lead to other menu scenes, use this
# hash to manage custom commands that run specific script calls. You can
# disable certain commands in the menu by binding them to a switch. If you
# don't want to disable them, set the switch to 0. The ShowSwitch will
# prevent a command from appear if that switch is false. Set it to 0 for
# it to have no impact.
#--------------------------------------------------------------------------
CUSTOM_COMMANDS ={
# :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
:debug => [ "Debug", 0, 0, :command_debug],
:shop => [ "Shop", 12, 0, :command_shop],
:gogototori => ["Synthesis", 0, 0, :command_totori],
:grathnode => [ "Grathnode", 0, 0, :command_install],
} # Do not remove this.




Custom command methods

Code:
  #--------------------------------------------------------------------------
  # new method: command_debug
  #--------------------------------------------------------------------------
  def command_debug
    SceneManager.call(Scene_Debug)
  end
  
  #--------------------------------------------------------------------------
  # new method: command_shop
  #--------------------------------------------------------------------------
  def command_shop
    goods = []
    SceneManager.call(Scene_Shop)
    SceneManager.scene.prepare(goods, false)
  end
  
  #--------------------------------------------------------------------------
  # new method: command_totori
  #--------------------------------------------------------------------------
  def command_totori
    return unless $imported['KRX-AlchemicSynthesis']
    SceneManager.call(Scene_Alchemy)
  end
 

HyliaKitty

Villager
Member
Joined
Dec 1, 2014
Messages
7
Reaction score
0
First Language
English
Primarily Uses
Omg I am so sorry for the late response! I got busy and sort of.. forgot >.> Thanks for helping and being patient for any reply! You helped a bunch but I don't think I've quite figured it all out??


Okay I put CSCA's menu above and it fixed where Yanfly would work over that and got rid of most of the stuff I wanted out. However, I cannot get debug out of the way? I did it before by getting rid of the line in Custom Commands but even though I did this time it will not go away still, I searched the script and could not find another place it could be. I also found another problem, when I go to items the weapons and armor tabs are still there and I need those gone as well, I'm sure its in the script somewhere but I could not find it - apologies if it's easy to find! Not to mention, the Quests are at the bottom when I wanted it above Achievements, I could have sworn I put it in the right order?? Oh, and if it helps here is the scripts for the Biographies and Message System and if anyone knows it is possible to change the bio a little to show more about... the character (personality, background, etc maybe) instead of stats, since it's not really a fighting game. >.> I also apologize if I missed something you said I do not feel the greatest x.x 

IS MENU FIXED..PNG

WEAPONS AND ARMOR GO AWAY.PNG

MENU ENGINE.PNG
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top