[Script] [ACE] [Xin] Cần Script cụ thể trong bài.

BelfBelf Posts: 288Registered
Cho hỏi là ai có Script để cái Title Menu [Phần có New Game này nọ, xin lỗi em không biết gọi là gì] nằm ngay trên Title Screen không ạ ? Giống kiểu Dear RED ấy, Graphic sao cũng được vì em có thể chỉnh sửa lại.
Em có chút gọi là "thanh minh" rằng em hoàn toàn không có ý bắt trước game của anh Sang một tí nào cả. Chỉ là em rất thích cái Menu giống vậy nên hỏi xin. Ai biết thì giúp, em rất cảm ơn trước ạ.

Comments

  • StupidDonutStupidDonut Posts: 1,196Registered
    là cái quái gì ? giải thích cụ thể giùm cái ... =''=bác sang xài script này cơ mà ? có phải cái bạn nói đâu ... có newgame.png đàng hoàng mà =''=
    script mình nói :
    # =============================================================================
    # TheoAllen - Custom Title Command
    # Version : 1.0
    # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
    # (This script documentation is written in informal indonesian language)
    # =============================================================================
    ($imported ||= {})[:Theo_CustomTitle] = true
    # =============================================================================
    # CHANGE LOGS:
    # -----------------------------------------------------------------------------
    # 2013.08.23 - Finished script
    # =============================================================================
    =begin
    
      Perkenalan :
      Script ini ngebikin kamu bisa ngebikin command dalam title screen pake
      gambar (bukan window)
      
      Cara penggunaan :
      Pasang dibawah material namun diatas main
      Edit konfignya.
      
      Terms of use :
      Credit gw, TheoAllen. Kalo semisal u bisa ngedit2 script gw trus jadi lebih
      keren, terserah. Ane bebasin. Asal ngga ngeklaim aja. Kalo semisal mau
      dipake buat komersil, jangan lupa, gw dibagi gratisannya.  
    
      Note :
      Script ini kemungkinan besar ngga kompet ama segala yg ngerubah title command
      atau kontrol input dalam title screen (misalnya press start)
    
    =end
    # =============================================================================
    # Konfigurasi :
    # =============================================================================
    module THEO
      module Title
        # ------------------------------------------------------------------------
        # Grafis untuk command harus ada di Graphics/system
        # ------------------------------------------------------------------------
        module Start  # Untuk start
          Unselect  = "new"
          Select    = "new_selected"
          Position  = [300,250] # posisi [x,y]
        end
        
        module Continue # Untuk continue / load
          Unselect  = "continue"
          Select    = "continue_selected"
          Position  = [290,290] # posisi [x,y]
        end
        
        module Exit # Untuk exit / shutdown
          Unselect  = "exit"
          Select    = "exit_selected"
          Position  = [300,340] # posisi [x,y]
        end
        
      end
    end
    # =============================================================================
    # Akhir dari konfigurasi :
    # =============================================================================
    class TitleCommandset
      attr_reader :commands
      
      include THEO::Title
      
      def initialize(viewport)
        @index = 0
        @viewport = viewport
        @active = true
        make_spriteset
        update_selection
      end
      
      def make_spriteset
        @commands = []
        @commands.push(TitleCommand.new(Start,@viewport))
        @commands.push(TitleCommand.new(Continue,@viewport))
        @commands.push(TitleCommand.new(Exit,@viewport))
      end
      
      def update
        return unless @active
        update_index
        update_scene if Input.trigger?(:C) 
      end
      
      def update_selection
        @commands.each {|cmd| cmd.unselect}
        @commands[@index].select
      end
      
      def update_index
        if Input.repeat?(:UP)
          Sound.play_cursor
          @index -= 1
          wrap_index
          update_selection
        elsif Input.repeat?(:DOWN)
          Sound.play_cursor
          @index += 1
          wrap_index
          update_selection
        end
      end
      
      def wrap_index
        @index = 0 if @index > max_index
        @index = max_index if @index < 0
      end
      
      def max_index
        return 2
      end
      
      def update_scene
        @active = @commands[@index].call
      end
      
      def dispose
        @commands.each {|cmd| cmd.dispose}
      end
      
    end
    
    class TitleCommand < Sprite
      
      def initialize(mod,viewport)
        super(viewport)
        @mod = mod
        self.z = 200    
        update_pos
      end
      
      def set_handler(method, enable = true)
        @handler = method
        @enable = enable
      end
      
      def unselect
        self.bitmap = Cache.system(@mod::Unselect)
      end
      
      def select
        self.bitmap = Cache.system(@mod::Select)
      end
      
      def update_pos
        self.x = @mod::Position[0]
        self.y = @mod::Position[1]
      end
      
      def call
        if @enable
          Sound.play_ok
          @handler.call
          return false
        else
          Sound.play_buzzer
          return true
        end
      end
      
    end
    
    class Scene_Title < Scene_Base
      
      def create_command_window
        @sprites = TitleCommandset.new(@viewport)
        @sprites.commands[0].set_handler(method(:command_new_game))
        @sprites.commands[1].set_handler(method(:command_continue),load_enable?)
        @sprites.commands[2].set_handler(method(:command_shutdown))
      end
      
      def load_enable?
        DataManager.save_file_exists?
      end
      
      def close_command_window
      end
      
      alias theo_custom_title_update update
      def update
        theo_custom_title_update
        @sprites.update
      end
      
      alias theo_custom_title_term terminate
      def terminate
        theo_custom_title_term
        @sprites.dispose
      end
      
    end
    
  • BelfBelf Posts: 288Registered
    Thì không biết nên em mới hỏi là ai có không.
    Mà chèn Script trên vào rồi bỏ Graphic vào như thế nào ạ ? [Làm những gì và bỏ vào đâu ?]
  • YuuYuu Posts: 1,160Registered
    module Continue # Untuk continue / load
    Unselect = "continue"
    Select = "continue_selected"
    Position = [290,290] # posisi [x,y]
    end

    Theo cái này thì ghi tên hình ảnh vào cái select chăng? Còn hình thì Belf ném vào Graphic/picture thử xem...?
  • slucis7593slucis7593 Posts: 544Registered
    I. Nói sơ qua:
    Một lựa chọn thì có 2 trạng thái: Bình thường (Unselect) và Đang được trỏ đến (Select - Thường là cái nền nó sẽ sẫm màu hoặc chữ sáng lên, đại loại vậy).

    Do đó nhìn vào dòng code ở đây ta thấy:

    Có 3 lựa chọn: Start, Continue và Exit.
    Với mỗi lựa chọn có 2 trạng thái: Unselect và Select.
    Giá trị của nó chính là tên file.
    [php]
    module Start # Untuk start
    Unselect = "new"
    Select = "new_selected"
    Position = [300,250] # posisi [x,y]
    end

    module Continue # Untuk continue / load
    Unselect = "continue"
    Select = "continue_selected"
    Position = [290,290] # posisi [x,y]
    end

    module Exit # Untuk exit / shutdown
    Unselect = "exit"
    Select = "exit_selected"
    Position = [300,340] # posisi [x,y]
    end
    end
    [/php]

    II. Cách làm:
    Bước 1:
    Đặt các file ảnh vào thư mục Graphics/System.
    Ở đây có 3 lựa chọn, mỗi lựa chọn 2 trạng thái => Cần tất cả 3 x 2 = 6 file ảnh.

    Bước 2:
    Nhìn vào Code để đặt tên file ảnh cho tương ứng với Lựa chọn (Start, Continue, Exit)Trạng thái(Select, Unselect)..

    Ví dụ:
    Với Lựa chọn Start:
    - Select: Đặt tên file là "new_selected" (Đuôi là .png, .jpg, ... gì đó, cái này không bắt buộc)
    - Unselect: Đặt tên file là "new".
Sign In or Register to comment.