RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[SOLVED]fix script request

Started by naizehcnas, September 10, 2010, 01:27:24 AM

0 Members and 1 Guest are viewing this topic.

naizehcnas

i want to use modern algebra's Diary script v1.0. i also have the script:  "add a continue option" by BigEd781 from rpgmakervx.net

The Script:
[spoiler]module LoadMenuOption
  # set to -1 if you would like the option to appear right after "save"
  WindowPosition = -1
end

class Scene_File < Scene_Base

  alias :pre_load_return_scene :return_scene
  def return_scene
    unless @from_title || @from_event
      $scene = Scene_Menu.new(LoadMenuOption::WindowPosition - 1)
    else
      pre_load_return_scene
    end
  end
   
end

class Scene_Menu < Scene_Base
   
  alias :pre_load_create_command_window :create_command_window
  def create_command_window   
    pre_load_create_command_window
    commands = @command_window.commands   
    index = LoadMenuOption::WindowPosition - 1
    index = (commands.index(Vocab::save) + 1) if (index < 0)
    selected_index = @command_window.index
    selected_index = index if selected_index < 0
    commands.insert(index, Vocab::continue)
    commands_width = @command_window.width
    @command_window = Window_Command.new(commands_width, commands)   
    @command_window.index = selected_index
    if $game_party.members.size == 0         
      @command_window.draw_item(commands.index(Vocab::item), false)
      @command_window.draw_item(commands.index(Vocab::skill), false)
      @command_window.draw_item(commands.index(Vocab::equip), false)
      @command_window.draw_item(commands.index(Vocab::status), false)
      @command_window.draw_item(commands.index(Vocab::continue), false)
    end
    if $game_system.save_disabled
      @command_window.draw_item(commands.index(Vocab::save), false)
    end
    if !continue_enabled?
      @command_window.draw_item(commands.index(Vocab::continue), false)
    end
  end
 
  def continue_enabled?
    return Dir.glob('Save*.rvdata').size > 0
  end
 
  alias :pre_load_update_command_selection :update_command_selection
  def update_command_selection
    if Input.trigger?(Input::C)
      if @command_window.index == @command_window.commands.index(Vocab::continue)
        if continue_enabled?
          Sound.play_decision
          $scene = Scene_File.new(false, false, false)
        else
          Sound.play_buzzer
        end
      else
        pre_load_update_command_selection
      end
    else
      pre_load_update_command_selection
    end
  end 
 
end
[/spoiler]
my request is this: see the image

dricc

I recommend to add a customizable menu script .
Like modern algebra's one :
http://rmrk.net/index.php/topic,34500.0.html
You can use my scripts freely . but not for commercial use .
:ccbync:
Don't encrypt your game !!!
Want to give me credit ? Easy ,add me in your game :

naizehcnas

#2
Edit: i solved it no need to answer

i tried to use it and edited this lines:
    0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
    1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
    2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
    3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
    4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
            "true, false, false"],
    5 => ["Vocab::game_end", 179, -1, false, Scene_End],
    6 => ["Serenade", 134, 2, true, 1],
    7 => ["Quests", 178, "$game_system.quest_disabled || $game_party.quests.list.empty?",
            false, Scene_Quest, "1"],
    8 => ["Bestiary", 177, -1, false, Scene_Catalogue, "20"],
    9 => ["Load", 145, "(Dir.glob('Save*.rvdata').size == 0)", false,
            Scene_File, "false, false, false"]
  }
  #  This is where you setup the order that commands appear in the command
  # window of the menu. List them by their command ID, as it is explained
  # above. The default commands are:
  #    0 => Item
  #    1 => Skill
  #    2 => Equip
  #    3 => Status
  #    4 => Save
  #    5 => End Game
  #  Those can be changed by you above, if you desire, and you can always add
  # more commands with whatever IDs you want. Note, however, that those
  # command IDs must appear in the array below or they will NOT appear in the
  # initial menu. This array can be modified in-game by the following script
  # calls:
  #
  #      add_custom_command (command_id)
  #      remove_custom_command (command_id)
  #        command_id : ID of the command being added/removed from the commands
  FSCMS_COMMANDLIST = [0, 1, 2, 6, 7, 8, 4, 9, 5]


to these:
    0 => ["Vocab::item", 144, "$game_party.members.empty?", false, Scene_Item],
    1 => ["Vocab::skill", 128, "$game_party.members.empty?", true, Scene_Skill],
    2 => ["Vocab::equip", 51, "$game_party.members.empty?", true, Scene_Equip],
    3 => ["Vocab::status", 137, "$game_party.members.empty?", true, Scene_Status],
    4 => ["Vocab::save", 133, "$game_system.save_disabled", false, Scene_File,
            "true, false, false"],
    7 => ["Vocab::game_end", 179, -1, false, Scene_End]
  }
  #  This is where you setup the order that commands appear in the command
  # window of the menu. List them by their command ID, as it is explained
  # above. The default commands are:
  #    0 => Item
  #    1 => Skill
  #    2 => Equip
  #    3 => Status
  #    4 => Save
  #    5 => End Game
  #  Those can be changed by you above, if you desire, and you can always add
  # more commands with whatever IDs you want. Note, however, that those
  # command IDs must appear in the array below or they will NOT appear in the
  # initial menu. This array can be modified in-game by the following script
  # calls:
  #
  #      add_custom_command (command_id)
  #      remove_custom_command (command_id)
  #        command_id : ID of the command being added/removed from the commands
  FSCMS_COMMANDLIST = [0, 1, 2, 3, 4, 7]


i also removed the script: add a continue option by BigEd781


when i chose end game, i got this: