Jump to content
Sign in to follow this  
declan

Installing Galv's Magic Shards while using Yanfly's Ace Menu

Recommended Posts

Hello Everyone

I'm having a little problem installing Galv's Magic Shards script. My issue is that it doesn't turn up on my game's main menu, Yanfly's Ace Menu Script is my current main menu script.

I'm a bit of a novice when it comes to programming but so far have managed to get by. If someone could tell me what I need to add in Yanfly's Ace Menu Script to get Galv's Magic Shards in the menu list I would be grateful. 

 

I have a feeling there is a very simple solution that I'm missing, a line or two of script needed adding to the menu script. I'll add the two scripts, just to add all the other scripts I've got do get to the main menu. 

 

Regards

Yanfly Menu Script (1).docx

Galv's Magic Shards.docx

Share this post


Link to post
Share on other sites

The scripts you provide gave me too many errors when I tried to open the menu scene inside the game (Yanfly Menu Script (1) fault, basically). Can you set a fresh project that's work with those two scripts installed so we can find a solution for your problem?

Share this post


Link to post
Share on other sites

I think it requires the other scripts I have to make it on a new project which are a lot. From what I'm aware they shouldn't clash with Galv's script. So I'll add a copy of the original Yanfly's Menu Script. If you could get the Magic Shards to work with the original Yanfly Menu script on a new project and let me know what you needed to add I should be able to finish it from there.  

Yanfly Menu Script (2).docx

Share this post


Link to post
Share on other sites

You need to add this on Yanfly Menu Script:

add_command(Galv_Shard::MENU_TEXT, :shards, !$game_switches[Galv_Shard::DISABLE_SWITCH])

Here's a lazy fix:

class Window_MenuCommand < Window_Command
  alias bla_bla_command make_command_list
  def make_command_list
    bla_bla_command
    add_command(Galv_Shard::MENU_TEXT, :shards, !$game_switches[Galv_Shard::DISABLE_SWITCH])
  end
end

Put it below both scripts.

Edited by Black Mage
instruction.

Share this post


Link to post
Share on other sites

Thank you so much for your help. Using the lazy fix you created, I've tested on both a new project and my main and it has come. The only issue I have now is the position on the menu. I changed it from Shards to Runes. Where In the main menu did I need to add the first bit of script you added?

 

 

 

Is there any way to edit where Runes appears on the menu? Say in-between equipment and Status. 

 

 

 

 

image.png

Edited by declan

Share this post


Link to post
Share on other sites

It's called a lazy fix for a reason. The actual fix needs you to register the command inside the YEA Module, and add a case for the command inside the make_command_list, and there you put the line that I provided above.

 

Or you could just try placing the line somewhere inside the make_command_list until you got the desired effect. It's a bad fix, but easier to do and won't do much harm (if there's any).

Edited by Black Mage
alternative solution

Share this post


Link to post
Share on other sites

Are these the two parts that the line needs inputting. Sorry I'm not so great on coding teminology. Where in these do I add it?

 

#==============================================================================
# ■ Window_MenuCommand
#------------------------------------------------------------------------------
# This class is kept towards the top of the script to provide easier access.
#==============================================================================

class Window_MenuCommand < Window_Command
  
  #--------------------------------------------------------------------------
  # overwrite method: make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    for command in YEA::MENU::COMMANDS
      case command
      #--- Default Commands ---
      when :item
        add_command(Vocab::item,   :item,   main_commands_enabled)
      when :skill
        add_command(Vocab::skill,  :skill,  main_commands_enabled)
      when :equip
        add_command(Vocab::equip,  :equip,  main_commands_enabled)
      when :status
        add_command(Vocab::status, :status, main_commands_enabled)
      when :formation
        add_formation_command
      when :save
        add_original_commands
        add_save_command
      when :game_end
        add_game_end_command
      #--- Yanfly Engine Ace Commands ---
      when :class
        next unless $imported["YEA-ClassSystem"]
        add_class_command
      #--- Imported Commands ---
      when :sslots
        next unless $imported["YSA-SlotBattle"]
        add_sslots_command
      when :grathnode
        next unless $imported["KRX-GrathnodeInstall"]
        process_custom_command(command)
      when :gogototori
        next unless $imported["KRX-AlchemicSynthesis"]
        process_custom_command(command)
      #--- Imported Commands ---
      else
        process_common_event_command(command)
        process_custom_command(command)
      end
    end
  end
  
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - General Menu Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This changes the way menus appear in your game. You can change their
    # alignment, and the location of the help window, Note that any non-Yanfly
    # Engine Ace scripts may not conform to these menu styles.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    HELP_WINDOW_LOCATION = 0     # 0-Top, 1-Middle, 2-Bottom.
    COMMAND_WINDOW_ALIGN = 1     # 0-Left, 1-Middle, 2-Right.
    
    # These settings below adjust the visual appearance of the main menu.
    # Change the settings as you see fit.
    MAIN_MENU_ALIGN = 0         # 0-Left, 1-Middle, 2-Right.
    MAIN_MENU_RIGHT = false      # false-Left, true-Right.
    MAIN_MENU_ROWS  = 10         # Maximum number of rows for main menu.
    DRAW_TP_GAUGE   = true       # If true, draws TP in the main menu.
    DRAW_MP_GAUGE   = true       # If true, draws MP in the main menu.
    
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Main Menu Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These settings adjust the main menu, the order at which commands appear,
    # what text is displayed, and what the commands are linked to. Here's a
    # list of which commands do what:
    # 
    # -------------------------------------------------------------------------
    # :command         Description
    # -------------------------------------------------------------------------
    # :item            Opens up the item menu. Default menu item.
    # :skill           Opens up the skill menu. Default menu item.
    # :equip           Opens up the equip menu. Default menu item.
    # :status          Opens up the status menu. Default menu item.
    # :formation       Lets player manage party. Default menu item.
    # :save            Opens up the save menu. Default menu item.
    # :game_end        Opens up the shutdown menu. Default menu item.
    # 
    # :class           Requires YEA - Class System
    # 
    # :gogototori      Requires Kread-EX's Go Go Totori! Synthesis
    # :grathnode       Requires Kread-EX's Grathnote Install
    # :sslots          Requires Yami's YSA - Slot Battle
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    COMMANDS =[
      :item,         # Opens up the item menu. Default menu item.
      :skill,        # Opens up the skill menu. Default menu item.
      :equip,        # Opens up the equip menu. Default menu item.
      :class,        # Requires YEA - Class System.
      :status,       # Opens up the status menu. Default menu item.
      :formation,    # Lets player manage party. Default menu item.
    # :event_1,      # Launches Common Event 1. Common Event Command.
    # :event_2,      # Launches Common Event 2. Common Event Command.
    # :debug,        # Opens up debug menu. Custom Command.
    # :shop,         # Opens up a shop to pawn items. Custom Command.
      :save,         # Opens up the save menu. Default menu item.
      :game_end,     # Opens up the shutdown menu. Default menu item.
    ] # Do not remove this.
    
    #--------------------------------------------------------------------------
    # - Common Event Commands -
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # If you insert one of the following commands into the COMMANDS array, the
    # player can trigger a common event to launch. 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 and it will always be enabled. The
    # ShowSwitch will prevent a command from appear if that switch is false.
    # Set it to 0 for it to have no impact.
    #--------------------------------------------------------------------------
    COMMON_EVENT_COMMANDS ={
    # :command => ["Display Name", EnableSwitch, ShowSwitch, Event ID],
      :event_1 => [        "Camp",           11,          0,        1],
      :event_2 => [   "Synthesis",            0,          0,        2],
    } # Do not remove this.
    
    #--------------------------------------------------------------------------
    # - 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.
    
  end # MENU
end # YEA

 

Share this post


Link to post
Share on other sites

Yes. I'll save you some trouble.

module YEA
  module MENU
    COMMANDS =[
      :item,         # Opens up the item menu. Default menu item.
      :skill,        # Opens up the skill menu. Default menu item.
      :equip,        # Opens up the equip menu. Default menu item.
      
      :runes,
      
      :class,        # Requires YEA - Class System.
      :status,       # Opens up the status menu. Default menu item.
      :formation,    # Lets player manage party. Default menu item.
    # :event_1,      # Launches Common Event 1. Common Event Command.
    # :event_2,      # Launches Common Event 2. Common Event Command.
    # :debug,        # Opens up debug menu. Custom Command.
    # :shop,         # Opens up a shop to pawn items. Custom Command.
      :save,         # Opens up the save menu. Default menu item.
      :game_end,     # Opens up the shutdown menu. Default menu item.
    ] # Do not remove this.
  end
end

class Window_MenuCommand < Window_Command
  #--------------------------------------------------------------------------
  # overwrite method: make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    for command in YEA::MENU::COMMANDS
      case command
      #--- Default Commands ---
      when :item
        add_command(Vocab::item,   :item,   main_commands_enabled)
      when :skill
        add_command(Vocab::skill,  :skill,  main_commands_enabled)
      when :equip
        add_command(Vocab::equip,  :equip,  main_commands_enabled)
        
      when :runes
        add_command(Galv_Shard::MENU_TEXT, :shards, !$game_switches[Galv_Shard::DISABLE_SWITCH])
        
      when :status
        add_command(Vocab::status, :status, main_commands_enabled)
      when :formation
        add_formation_command
      when :save
        add_original_commands
        add_save_command
      when :game_end
        add_game_end_command
      #--- Yanfly Engine Ace Commands ---
      when :class
        next unless $imported["YEA-ClassSystem"]
        add_class_command
      #--- Imported Commands ---
      when :sslots
        next unless $imported["YSA-SlotBattle"]
        add_sslots_command
      when :grathnode
        next unless $imported["KRX-GrathnodeInstall"]
        process_custom_command(command)
      when :gogototori
        next unless $imported["KRX-AlchemicSynthesis"]
        process_custom_command(command)
      #--- Imported Commands ---
      else
        process_common_event_command(command)
        process_custom_command(command)
      end
    end
  end
end

Not tested. But I believe this will work fine.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×