Removing and adding menu commands

Discussion in 'RGSSx Script Support' started by Casia, Sep 18, 2013.

Thread Status:
Not open for further replies.
    Tags:
  1. Casia

    Casia Veteran Veteran

    Messages:
    313
    Likes Received:
    54
    First Language:
    English
    For a veteran scripter this is probably an easy task, but I am left stupified by the question...

    I have bestiary and quest log scripts and I'd really like them to be accessible from the menu. On the other hand, I don't need the save option since I use save points. How could I remove and add these commands to the menu? Is it an easy process or does it require a lot of scripting here and there?
     
    #1
  2. Aeri_Sicher

    Aeri_Sicher Rookie Programmer! >. Veteran

    Messages:
    74
    Likes Received:
    10
    Location:
    United States, California
    First Language:
    English
    Try looking at the Scene_Menu part of your script editor and find this part of the code:

        # Make command window

        s1 = $data_system.words.item

        s2 = $data_system.words.skill

        s3 = $data_system.words.equip

        s4 = "Status"

        s5 = "Save"

        s6 = "End Game"

        s7 = "Beastiary"

        @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])

     
     

    I've already added the "beastiary" command into the list (you can add more by adding s8 and the name) so now the command should be there (you will also notice that the save command is there too, all you have to do is remove it from the window_command.new list and probably have to change up the format a bit)...  now all you have to do is define what the command "beastiary" should do. find this part of the script and add your code for it:

     


          case @command_window.index

          when 0  # item

            # Play decision SE

            $game_system.se_play($data_system.decision_se)

            # Switch to item screen

            $scene = Scene_Item.new

          when 1  # skill

            # Play decision SE

            $game_system.se_play($data_system.decision_se)

            # Make status window active

            @command_window.active = false

            @status_window.active = true

            @status_window.index = 0

          when 2  # equipment

            # Play decision SE

            $game_system.se_play($data_system.decision_se)

            # Make status window active

            @command_window.active = false

            @status_window.active = true

            @status_window.index = 0

          when 3  # status

            # Play decision SE

            $game_system.se_play($data_system.decision_se)

            # Make status window active

            @command_window.active = false

            @status_window.active = true

            @status_window.index = 0

          when 4  # save

            # If saving is forbidden

            if $game_system.save_disabled

              # Play buzzer SE

              $game_system.se_play($data_system.buzzer_se)

              return

            end

            # Play decision SE

            $game_system.se_play($data_system.decision_se)

            # Switch to save screen

            $scene = Scene_Save.new

          when 5  # end game

            # Play decision SE

            $game_system.se_play($data_system.decision_se)

            # Switch to end game screen

            $scene = Scene_End.new

          when 6 # beastiary

            # enter your code here (like the scene call or something)

          end

     



     

    Let me know how this works out (the editing out of save might cause problems)
     
    Last edited by a moderator: Sep 18, 2013
    #2
  3. Casia

    Casia Veteran Veteran

    Messages:
    313
    Likes Received:
    54
    First Language:
    English
    It works, but looks a bit silly because the Bestiary option is after End Game and overlaps with the playing time window below. I'm not sure how to make it look more aesthetically pleasing...
     
    #3
  4. Dark_Metamorphosis

    Dark_Metamorphosis What a horrible night to have a curse. Veteran

    Messages:
    2,194
    Likes Received:
    382
    Location:
    Sweden
    First Language:
    Swedish
    I guess you could just change the order of them? Just change End Game with Beastiery etc, or wherever you want it to appear in the list.
     
    #4
  5. Casia

    Casia Veteran Veteran

    Messages:
    313
    Likes Received:
    54
    First Language:
    English
    Ah, a few tries and I got it to work. Thank you for your help!
     
    #5
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,797
    Likes Received:
    11,507
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


    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.
     
    #6
Thread Status:
Not open for further replies.

Share This Page