Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How i Add Elements to the menu?

Well, i Use the SDK, and i want to Customize my menu.

I don't know how i can add elements to the menu without edit the big file of the sdk.

for example, i made a window called: WINDOW_MEPHISTO
well, in the not SDK scripts i only agree the @windowmephisto...blahblah and all these. for example:

To agree a extra window to the Scene_Menu i only agree something like this:

Code:
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416

And agree to the update and Dispose Method.


but with the sdk which is the manner to edit the Scene_Menu and edit all the windows?. is there a Template or something?.

Thanks for read.
 
I will explain me better..sorry.

Well, i want to edit the Scene_Menu ( I use the SDK). and i cant edit the Original Scene_Menu, because the SDK replace the old methods. How i can edit the Scene_Menu with the SDK?
 
Adds a new script before main and write there the modifications. Remember you don't have to update and dispose windows with the SDK 2.x, and if you only wish to add a window to the scene, all you have to do is alias main_window method:
Code:
class Scene_Menu
  alias mephitso_scmenu_mainwin main_window
  def main_window
    mephitso_scmenu_mainwin
    @mephisto_window = Window_Mephisto.new
  end
end
Doing it without SDK would require overwriting the whole original main method.
 
cheatking;284322 said:
copy and paste Scene_Menu under the sdk

Don't do that!!!! It will mess all the SDK means... The correct way to change the menu items with SDK is to copy the important codes from SDK Part IV to a new script before main and change it with your needs. These codes are:
Code:
module SDK::Scene_Commands
  module Scene_Menu
    Item     = DataSystem.words.item
    Skill    = DataSystem.words.skill
    Equip    = DataSystem.words.equip
    Status   = 'Status'
    Save     = 'Save'
    End_Game = 'End Game'
  end
end

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Main Processing : Window Initialization : Main Command
  #--------------------------------------------------------------------------
  def main_command_window
    # Make command window
    s1 = SDK::Scene_Commands::Scene_Menu::Item
    s2 = SDK::Scene_Commands::Scene_Menu::Skill
    s3 = SDK::Scene_Commands::Scene_Menu::Equip
    s4 = SDK::Scene_Commands::Scene_Menu::Status
    s5 = SDK::Scene_Commands::Scene_Menu::Save
    s6 = SDK::Scene_Commands::Scene_Menu::End_Game
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
  end
  #--------------------------------------------------------------------------
  # * Main Command Input
  #--------------------------------------------------------------------------
  def main_command_input
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Branch by command window cursor position
    case @command_window.command
    when SDK::Scene_Commands::Scene_Menu::Item      # item
      command_item
    when SDK::Scene_Commands::Scene_Menu::Skill     # skill
      command_skill
    when SDK::Scene_Commands::Scene_Menu::Equip     # equipment
      command_equip
    when SDK::Scene_Commands::Scene_Menu::Status    # status
      command_status
    when SDK::Scene_Commands::Scene_Menu::Save      # save
      command_save
    when SDK::Scene_Commands::Scene_Menu::End_Game  # end game
      command_endgame
    end
  end
  #--------------------------------------------------------------------------
  # * Sub Command Input
  #--------------------------------------------------------------------------
  def sub_command_input
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Branch by command window cursor position
    case @command_window.command
    when SDK::Scene_Commands::Scene_Menu::Skill     # skill
      command_skill
    when SDK::Scene_Commands::Scene_Menu::Equip     # equipment
      command_equip
    when SDK::Scene_Commands::Scene_Menu::Status    # status
      command_status
    end
  end
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top