[Hướng Dẫn] [Help] Giúp mình cái này...

Jes_ftmn2611Jes_ftmn2611 Posts: 21Registered
Đây. Cho mình hỏi là làm thế nào để tên nhân vật hiển thị thế này:
untitled_zps515573fc.png

Comments

  • sanggameboysanggameboy Posts: 1,943Registered
    Oh sh*t game ai mà nhìn hay thế :v
    Nhân tiện thì đó là xài script Yanfly Message System bạn nhé.
  • Jes_ftmn2611Jes_ftmn2611 Posts: 21Registered
    cảm ơn bạn. vậy sẵn tiện cho mình hỏi cách nào:
    1. Xóa bớt mấy cái trong menu như: Status, Formation, Save...
    2.Khi bấm vào cái gì đó thì nó sẽ hiển thị danh sách item, nếu chọn đúng cái cần dùng thì nó sẽ hoạt động, không thỉ thôi.
    Cảm ơn nhìu.
  • slucis7593slucis7593 Posts: 544Registered
    1. Bạn vào phần script F11 rồi sửa như sau nhé:
    Thêm cái này vào 1 dòng mới (Ngay trên Main Process) nhé:
    #
    # IEK/lib/simple_item_window.rb
    #   dc 16/11/2013
    #   dm 16/11/2013
    #   by IceDragon
    # As requested by Quigon, a simple Item Menu.
    # jump to the '### EDITING STARTS HERE' to change the window's position, and
    # size
    class Scene_Item < Scene_ItemBase
    
      remove_method :on_category_ok
      remove_method :create_category_window
    
      ## ~overwrite
      # @return [Void]
      def start
        super
        create_help_window
        create_item_window
        adjust_windows
      end
    
      ## ~overwrite
      # @return [Void]
      def create_help_window
        @help_window = Window_Help.new(1)
        @help_window.viewport = @viewport
      end
    
      ## ~overwrite
      # @return [Void]
      def create_item_window
        ### EDITING STARTS HERE
        ### Rect.new(  x,   y, width, height)
        r = Rect.new( (544 - 400) / 2,  (416 - 220) / 2 ,   400,    220)
        ### EDITING ENDS HERE
        @item_window = Window_ItemList.new(r.x, r.y, r.width, r.height)
        @item_window.viewport = @viewport
        @item_window.help_window = @help_window
        @item_window.set_handler(:ok,     method(:on_item_ok))
        @item_window.set_handler(:cancel, method(:on_item_cancel))
      end
    
      ## ~new-item
      # @return [Void]
      def adjust_windows
        ### item_window
        ### inline-defintions, please don't try this at home...
        def @item_window.include?(item)
          $game_party.usable?(item)
        end
        ## uncomment this, to hide item quantities
        #def @item_window.draw_item(index)
        #  item = @data[index]
        #  if item
        #    rect = item_rect(index)
        #    rect.width -= 4
        #    draw_item_name(item, rect.x, rect.y, enable?(item))
        #  end
        #end
        ###
        @item_window.refresh
        @item_window.activate.select_last
        ### help_window
        @help_window.width = @item_window.width
        @help_window.x = @item_window.x
        @help_window.y = @item_window.y + @item_window.height
        @help_window.create_contents # re-create the Help_Window contents
        @help_window.refresh
      end
    
      ## ~overwrite
      # @return [Void]
      def on_item_cancel
        return_scene
      end
    
    end
    

    Còn dòng Scene_Menu bạn xóa hết đi rồi copy hết cái này vào:
    #==============================================================================
    # ** Scene_Menu
    #------------------------------------------------------------------------------
    #  This class performs the menu screen processing.
    #==============================================================================
    
    class Scene_Menu < Scene_MenuBase
      #--------------------------------------------------------------------------
      # * Start Processing
      #--------------------------------------------------------------------------
      def start
        super
        create_command_window
    #    create_gold_window
    #    create_status_window
      end
      #--------------------------------------------------------------------------
      # * Create Command Window
      #--------------------------------------------------------------------------
      def create_command_window
        @command_window = Window_MenuCommand.new
        
        @command_window.x = (544 - @command_window.width) / 2
        @command_window.y = (416 - @command_window.height) / 2
        
        @command_window.set_handler(:item,      method(:command_item))
        #@command_window.set_handler(:skill,     method(:command_personal))
        #@command_window.set_handler(:equip,     method(:command_personal))
        #@command_window.set_handler(:status,    method(:command_personal))
        #@command_window.set_handler(:formation, method(:command_formation))
        @command_window.set_handler(:save,      method(:command_save))
        @command_window.set_handler(:game_end,  method(:command_game_end))
        @command_window.set_handler(:cancel,    method(:return_scene))
      end
      #--------------------------------------------------------------------------
      # * Create Gold Window
      #--------------------------------------------------------------------------
      #def create_gold_window
      #  @gold_window = Window_Gold.new
      #  @gold_window.x = 0
      #  @gold_window.y = Graphics.height - @gold_window.height
      #end
      #--------------------------------------------------------------------------
      # * Create Status Window
      #--------------------------------------------------------------------------
      #def create_status_window
      #  @status_window = Window_MenuStatus.new(@command_window.width, 0)
      #end
      #--------------------------------------------------------------------------
      # * [Item] Command
      #--------------------------------------------------------------------------
      def command_item
        SceneManager.call(Scene_Item)
      end
      #--------------------------------------------------------------------------
      # * [Skill], [Equipment] and [Status] Commands
      #--------------------------------------------------------------------------
      #def command_personal
      #  @status_window.select_last
      #  @status_window.activate
      #  @status_window.set_handler(:ok,     method(:on_personal_ok))
      #  @status_window.set_handler(:cancel, method(:on_personal_cancel))
      #end
      #--------------------------------------------------------------------------
      # * [Formation] Command
      #--------------------------------------------------------------------------
      #def command_formation
      #  @status_window.select_last
      #  @status_window.activate
      #  @status_window.set_handler(:ok,     method(:on_formation_ok))
      #  @status_window.set_handler(:cancel, method(:on_formation_cancel))
      #end
      #--------------------------------------------------------------------------
      # * [Save] Command
      #--------------------------------------------------------------------------
      def command_save
        SceneManager.call(Scene_Save)
      end
      #--------------------------------------------------------------------------
      # * [Exit Game] Command
      #--------------------------------------------------------------------------
      def command_game_end
        SceneManager.call(Scene_End)
      end
      #--------------------------------------------------------------------------
      # * [OK] Personal Command
      #--------------------------------------------------------------------------
      def on_personal_ok
        case @command_window.current_symbol
        when :skill
          SceneManager.call(Scene_Skill)
        when :equip
          SceneManager.call(Scene_Equip)
        when :status
          SceneManager.call(Scene_Status)
        end
      end
      #--------------------------------------------------------------------------
      # * [Cancel] Personal Command
      #--------------------------------------------------------------------------
      def on_personal_cancel
        @status_window.unselect
        @command_window.activate
      end
      #--------------------------------------------------------------------------
      # * Formation [OK]
      #--------------------------------------------------------------------------
      def on_formation_ok
        if @status_window.pending_index >= 0
          $game_party.swap_order(@status_window.index,
                                 @status_window.pending_index)
          @status_window.pending_index = -1
          @status_window.redraw_item(@status_window.index)
        else
          @status_window.pending_index = @status_window.index
        end
        @status_window.activate
      end
      #--------------------------------------------------------------------------
      # * Formation [Cancel]
      #--------------------------------------------------------------------------
      def on_formation_cancel
        if @status_window.pending_index >= 0
          @status_window.pending_index = -1
          @status_window.activate
        else
          @status_window.unselect
          @command_window.activate
        end
      end
    end
    

    2. Bạn dùng theo cách sau:
    1627665.png
    1. Dòng 1 là nó sẽ hiện lên 1 bảng để lựa chọn các "Key Item" đang có trong túi của bạn (như cái chìa khóa nó có Item Type là Key Item đó), sau khi chọn 1 item nó sẽ lưu "Số thứ tự ở trong database" của Key Item đó vào 1 biến, như trong hình của mình là biến 0001 có tên "Key Item".

    2. Dòng 2 là kiểm tra giá trị của biến 0001:Key Item đang giữ số thứ tự của Key Item đã chọn.
    Nếu nó = "giá trị mình muốn" thì sẽ ra kết quả blah blah gì đó nếu điều kiện thỏa mãn.
  • Jes_ftmn2611Jes_ftmn2611 Posts: 21Registered
    ok, mình hiểu rồi. cám ơn bạn nhìu
Sign In or Register to comment.