Simple Item Menu Request

Discussion in 'RGSS3 Script Requests' started by MuyHiram, Oct 30, 2015.

  1. MuyHiram

    MuyHiram MuyHiram Member

    Messages:
    16
    Likes Received:
    1
    First Language:
    Engllish
    Primarily Uses:
    N/A
    I would like my menu to show this when I press X:

    [​IMG]

    The main idea is to only have items, key items, and end game while also displaying the gold.

    I Will give proper credit.

    Thank You
     
    #1
  2. MeowFace

    MeowFace Meow Veteran

    Messages:
    1,034
    Likes Received:
    177
    Location:
    La La Land
    First Language:
    Meowish
    Give this script a try:

    Code:
    #==============================================================================# ■ Meow Face Item Only Menu#------------------------------------------------------------------------------# Menu with Items & Key Items only#==============================================================================# How to Use:# [1] Put this script below Material and above Main#==============================================================================class Window_ItemCategory < Window_HorzCommand  def make_command_list    add_command(Vocab::item,     :item)    add_command(Vocab::key_item, :key_item)    add_command(Vocab::game_end, :game_end)  end  def window_width    Graphics.width - 160  end  def col_max    return 3  endendclass Scene_Map < Scene_Base  def call_menu    Sound.play_ok    Input.update    SceneManager.call(Scene_Item)  endendclass Scene_Item < Scene_ItemBase  def start    super    create_help_window    create_category_window    create_item_window    create_gold_window  end  def create_gold_window    @gold_window = Window_Gold.new    @gold_window.x = Graphics.width - @gold_window.width    @gold_window.y = @help_window.height  end  def create_category_window    @category_window = Window_ItemCategory.new    @category_window.viewport = @viewport    @category_window.help_window = @help_window    @category_window.y = @help_window.height    @category_window.set_handler(:ok,     method(:on_category_ok))    @category_window.set_handler(:cancel, method(:return_scene))    @category_window.set_handler(:game_end,  method(:command_game_end))  end  def command_game_end    SceneManager.call(Scene_End)  endend
     
    Last edited by a moderator: Oct 30, 2015
    #2
    Name and Tetsune like this.
  3. MuyHiram

    MuyHiram MuyHiram Member

    Messages:
    16
    Likes Received:
    1
    First Language:
    Engllish
    Primarily Uses:
    N/A
    Thank you, it's exactly what i was looking for.
     
    #3
  4. MeowFace

    MeowFace Meow Veteran

    Messages:
    1,034
    Likes Received:
    177
    Location:
    La La Land
    First Language:
    Meowish
    You're welcome
     
    #4
  5. AllyJamy

    AllyJamy Veteran Veteran

    Messages:
    48
    Likes Received:
    25
    First Language:
    English
    Primarily Uses:
    RMVXA
    Managed to fix the code  that was broken due to the V3 to V4 migration. (with zero coding experience) Script belongs to MeowFace. 

    Code:
    #==============================================================================#
    #¦ Meow Face Item Only Menu
    #------------------------------------------------------------------------------#
    #Menu with Items & Key Items only
    #==============================================================================#
    #How to Use# [1] Put this script below Material and above Main
    #==============================================================================
    class Window_ItemCategory < Window_HorzCommand
      def make_command_list
      add_command(Vocab::item,     :item)   
      add_command(Vocab::key_item, :key_item)   
      add_command(Vocab::game_end, :game_end)  
    end
      
      def window_width    
      Graphics.width - 160  
      end
      
      def col_max    
      return 3  
     end
    end
      
    class Scene_Map < Scene_Base 
     
      def call_menu    
      Sound.play_ok    
      Input.update    
      SceneManager.call(Scene_Item)  
     end
    end
      
    class Scene_Item < Scene_ItemBase  
      
      def start    
        super    
      create_help_window    
      create_category_window    
      create_item_window    
      create_gold_window 
      end  
      
      def create_gold_window 
        
      @gold_window = Window_Gold.new    
      @gold_window.x = Graphics.width - @gold_window.width    
      @gold_window.y = @help_window.height  
      end  
      
      def create_category_window    
        
      @category_window = Window_ItemCategory.new    
      @category_window.viewport = @viewport
      @category_window.help_window = @help_window
      @category_window.y = @help_window.height 
      @category_window.set_handler(:ok,     method(:on_category_ok))    
      @category_window.set_handler(:cancel, method(:return_scene))  
      @category_window.set_handler(:game_end,  method(:command_game_end))  
      end  
      
      def command_game_end   
        
      SceneManager.call(Scene_End) 
      end
     end
     
    #5
  6. goldfrappian

    goldfrappian Villager Member

    Messages:
    12
    Likes Received:
    0
    Location:
    Port Augusta, South Australia
    First Language:
    English
    Is it possible to use this script without the gold/currency window?
     
    #6
  7. SaburoX

    SaburoX Veteran Veteran

    Messages:
    66
    Likes Received:
    7
    Remove the " - 160" on line 16 and comment out " create_gold_window" (line 40)
     
    #7
  8. goldfrappian

    goldfrappian Villager Member

    Messages:
    12
    Likes Received:
    0
    Location:
    Port Augusta, South Australia
    First Language:
    English
    Thank you SaburoX
     
    #8
  9. Tarzanthecat

    Tarzanthecat (Meow) Veteran

    Messages:
    61
    Likes Received:
    12
    Location:
    A location
    First Language:
    English
    Primarily Uses:
    N/A
    Where do you put it
     
    #9

Share This Page