VX 스크립트

Source Thread: http://rmrk.net/index.php/topic,38851.0.html

  인벤토리 내의 아이템을 종류별로 분류하는 스크립트입니다.  스크립트는 링크된 쓰레드를 보시고, 사용법은 스크립트의 헤더를 읽어 보세요.



Comment '5'
  • profile
    천공대전 2010.11.12 16:09

    감사히 쓰겠습니다!

  • profile
    하늘바라KSND 2010.11.18 12:56

    잘쓰겠습니다~~

  • ?
    하늘바라KSND 2010.11.18 12:56

    축하합니다. 하늘바라KSND님은 고작 5포인트에 당첨되셨습니다

  • profile
    하늘바라KSND 2010.11.18 14:18

    음.. 대충 해석해 보았어요.ㅋ

    #===============================================================================
    # 해석 : 하바K
    # Cozziekuns Simple Sort Inventory(올린이 이름인듯)
    # Last Date Updated: 09/06/10(최근 수정일 : 09/06/10)
    #
    # Like in Tales of Phantasia, this inventory allows you to sort your items in the categories: All, Items, Weapons and Armours.(인 테일즈 오브 판타지아

    처럼, 이 인벤토리는 당신의 아이템을 가테고리 : 전체, 무기와 방어구로 분류할것 입니다.)
    #
    #
    #===============================================================================
    # Updates(업데이트)
    # -----------------------------------------------------------------------------
    # o 06/01/10 - Created Script.(스크립트를 만들다)
    # o 06/01/10 - Updated with Modern Algebra's recommendations.(모던 알게바라의 조언대로 업데이트를 함)
    # o 06/01/10 - Once again updated with Modern Algebra's recommendations.(다시한번 모던 알게바라의 조언

    으로 업데이트를 함)
    # o 08/27/10 - Updated with Scrolling support. Thanks kawagiri for the idea, and Modern Algebra for

    some help.(스크롤링을 지원하도록 업데이트함. 아이디어를 준 카와걸에게, 그리고 약간의 도움을 준 모던 알

    게바라에게 감사함)
    #
    # o 09/06/10 - Updated with some bugfixing. Thanks Fizzly for finding that out.(버그수정함. 버그를 찾아

    준 피즐리에 감사함)
    #===============================================================================
    # What's to come?(무엇이 올까?)
    # -----------------------------------------------------------------------------
    # o Nothing! Suggest something.(아무것도! 뭔가를 제안해봐.)
    #===============================================================================
    # Instructions(설명)
    # -----------------------------------------------------------------------------
    # To install this script, open up your script editor and copy/paste this script to an open slot below ?

    Materials but above ? Main. Remember to save.(이 스크립트를 설치하기 위해선, 너의 스크립트 에디터를 열

    고 이 스크립트를 아래의 열린 빈 공간에 복사/붙여넣기를. 메타리얼,즉 소재는 하지만 위에? 메인.-뭔뜻인지

    모르겠어요- 저장하는것은 잊지말도록. )
    #
    # Change the modules to your liking. The "hard" parts have instructions of their own.(당신이 원하는데로

    모듈을 바꿔. 그들 스스로 소개하는 부분이 제일 어려운 부분이야.-이 문장은 뭔가 어색한-)
    #
    #===============================================================================

    $imported = {} if $imported == nil
    $imported["CozSimplSortInvent"] = true

    module COZZIEKUNS
      module SSI
        CATEGORY_TEXT = "Category:"
      
    #===============================================================================
    # Extra Item Categories (Inspired by Modern Algebra) (여분의 아이템 분류법(모던 알게바라의 영감))
    # ------------------------------------------------------------------------------
    # How should I go about explaining something like this? Well, basically, each item in the hash

    represents a certain category. For example, the first hash we see here is: (어떻게 이것을 설명해야 하나

    ? 글쎄. 기본적으로 해시-#-안에 있는 각각의 아이템은 특정한 분류법을 나타내. 예를 들어, 이것처럼 첫번째

    해시에 있는것은:)
    #
    # 0 => [144, "All", false]
    #
    # The syntax of this is:(이것의 구성은)
    #
    # Category ID => [Icon Number, Text, Prime]
    #
    # Probably the most important part, the category ID is the number you want to put into the notebox that

    the item contains. For example, if you wanted to make the item "World Map" into a key item, simply add

    the text into the notebox.: (아마 가장중요한 부분, 가테고리 아이디는 아이템이 가지고 있는 노트박스- [ ]

    인듯- 안에 당신이 원하는 숫자를 집어넣는것. 예를 들어, 만약 당신이 월드맵을 키 아이템속에 만들고 싶으면

    , 간단히 텍스트, 즉 글을 노트박스에 집어넣으면 끝.)
    #
    # item_category[4]
    #
    #Note that numbers 0, 1, 2, and 3 are special. They're prime categories.(0,1,2,3은 특별하다. 그것들은

    주요한 가테고리.) 
    #
    #Sound special. right? Not really, this just means you have to have them in the inventory for this

    script to work. (특별하게 들리지? 안그래? 뭐, 사실 그렇지도 않아. 그건 그저 이 스크립트가 작동하기 위해

    서 인벤토리가 꼭 갖추어야 할 것들.)
    #
    #I could've gotten rid of them, but that would've just given more work on your part (and mine), so bear

    with them, please.(난 그것들을 지울수도 있었지만, 그것은 당신의(그리고 나의)일이 더 많아지기에 그것들을

    만들었지.
    #
    #Icon Numbers and Text are pretty self explanatory.(아이콘 숫자-넘버가 더 어울리려나?-와 텍스트는 꽤 비

    슷하다.)
    #
    # Last, but not least, is the "Prime" function (inspired by Kyraiki).(끝으로, 하지만 적지않은, 중요한

    기능.(키라이키의 영감))
    #
    # Setting this to "true" means that anything in the prime category will not show up in the item, weapon

    or armour categories. You can set if you want it to show up in all.(이것을 "true"라 설정한다는것은, 주

    요한 가테고리안에 있는 어떤것이든, 보여지지 않는다는 것이다. 모든것이 보여지길 원한다면 이것을 설정할

    수 있다.)
    #
    #===============================================================================
        MOD_ALG_ITEM_CATEGORIES = {
      
          0 => [144, "All", false],
          1 => [64, "Items", false],
          2 => [26, "Weapons", false],
          3 => [40, "Armours", false],
          4 => [80, "Key Items", true],
          5 => [90, "Filler", false],
          6 => [92, "Scrolling", false],
          7 => [32, "Scrolling", false],
        }
      
        MOD_ALG_ITEM_CATEGORY_WIDTH = 220 # How wide you want your text window.(텍스트 윈도우의 크기)
        KYRIAKI_ALL_CATEOGRY_PRIME = false # If you want prime key items to show up in the all window.(주요

    한 키아이템이 all 창에서 보여지길 바란다면.)
        MAX_NUMBER = (544 - MOD_ALG_ITEM_CATEGORY_WIDTH) / 54 # The maximum number of icons that will fit.(

    아이콘의 최댓값.)
      end
    end

    #==============================================================================
    # ** RPG::BaseItem(기본적인 아이템)
    #------------------------------------------------------------------------------
    #  The superclass of all states.(모든부분 중 슈퍼클래스)
    #==============================================================================

    class RPG::BaseItem
      #--------------------------------------------------------------------------
      # * Cozziekuns Category Index
      #--------------------------------------------------------------------------
      def coz_modalg_category_index
        @coz_modalg_category_index = 0
        if self.note[/item_category[(d+)]/i] != nil
          @coz_modalg_category_index = $1.to_i
        end
      return @coz_modalg_category_index
      end
    end

    #==============================================================================
    # ** Window_Item(윈도우_아이템)
    #------------------------------------------------------------------------------
    #  This window displays a list of inventory items for the item screen, etc.(이 윈도우 창은 아이템 스크린이나 그외의 것의 인벤토리 아이템의 목록을 나타냄.)
    #==============================================================================

    class Window_Item < Window_Selectable
      #--------------------------------------------------------------------------
      # * Refresh(새롭게 하다)
      #--------------------------------------------------------------------------
      alias coz_modalg_ssi_refresh refresh
      def refresh(sort_index = 0)
       @sort_index = sort_index
       coz_modalg_ssi_refresh
     end
      #--------------------------------------------------------------------------
      # * Whether or not to include in item list(아이템리스트에 포함시키던가 말던가.)
      #     item : item
      #--------------------------------------------------------------------------
      alias coz_modalg_ssi_include? include?
      def include?(item)
        val = coz_modalg_ssi_include?(item)
        return false if !val
        return case @sort_index
          when 0
            unless COZZIEKUNS::SSI::KYRIAKI_ALL_CATEOGRY_PRIME
              if COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES[item.coz_modalg_category_index][2]
                return false
              else
                return true
              end
            else
              return true
            end
          when 1
            if COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES[item.coz_modalg_category_index][2]
              return false
            else
              return item.is_a?(RPG::Item)
            end
          when 2
            if COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES[item.coz_modalg_category_index][2]
              return false
            else
              return item.is_a?(RPG::Weapon)
            end
          when 3
            if COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES[item.coz_modalg_category_index][2]
              return false
            else
              return item.is_a?(RPG::Armor)
            end
          when 4..999
            return item.coz_modalg_category_index == @sort_index
          end
        end
      end
     
    #==============================================================================
    # ** Window_ItemCategory (윈도우_아이템가테고리)
    #------------------------------------------------------------------------------
    #  This window displays what type of item is being displayed.(이창은 어떤종류의 아이템이 표시되는지 표시한다.)
    #==============================================================================

    class Window_ItemCategory < Window_Base
      #--------------------------------------------------------------------------
      # * Object Initialization
      #     x : window X coordinate
      #     y : window Y coordinate
      #--------------------------------------------------------------------------
      def initialize(x, y, width)
        super(x, y, width, WLH + 32)
        refresh
      end
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh(sort_index = 0)
        @sort_index = sort_index
        @item_categories = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES
        @item_categories_width = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORY_WIDTH
        @category_string = COZZIEKUNS::SSI::CATEGORY_TEXT
        self.contents.clear
        self.contents.font.color = system_color
        self.contents.draw_text(4, 0, @item_categories_width - 40, WLH, @category_string, 0)
        self.contents.font.color = normal_color
        for i in 0...@item_categories.size
          if @sort_index == i
            self.contents.draw_text(4, 0, @item_categories_width - 40, WLH, @item_categories[i][1], 2)
          end
        end
      end
    end

    #==============================================================================
    # ** Window_ItemSort(윈도우_아이템종류)
    #------------------------------------------------------------------------------
    #  This window displays what type of item is being displayed.(이창은 어떤종류의 아이템이 표시되는지 표시한다.)
    #==============================================================================

    class Window_ItemSort < Window_Base
      #--------------------------------------------------------------------------
      # * Object Initialization
      #     x : window X coordinate
      #     y : window Y coordinate
      #--------------------------------------------------------------------------
      def initialize(x, y, width)
        super(x, y, width, WLH + 32)
        @ox = 0
        if COZZIEKUNS::SSI::MAX_NUMBER < COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES.size
          self.contents = Bitmap.new(self.width - 32 + ((COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES.size -

    COZZIEKUNS::SSI::MAX_NUMBER) * 54), self.height - 32)
        end
        refresh
      end
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh(sort_index = 0)
        @sort_index = sort_index
        @item_categories = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES
        @item_categories_width = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORY_WIDTH
        self.contents.clear
        for i in 0...@item_categories.size
          @icon_x = 0 + (i * ((544 - @item_categories_width) / @item_categories.size))
          if @item_categories.size < COZZIEKUNS::SSI::MAX_NUMBER
            draw_item(i)
          else
            draw_items(i)
          end
          if @sort_index == i
            if @item_categories.size < COZZIEKUNS::SSI::MAX_NUMBER
              draw_icon(@item_categories[i][0], @icon_x, 0, true)
            else
              draw_icon(@item_categories[i][0], i * 54, 0, true)
            end
          end
        end
      end
      #--------------------------------------------------------------------------
      # * Draw Item
      #     index : item number
      #--------------------------------------------------------------------------
      def draw_item(index)
        icons_x = (544 - @item_categories_width) / @item_categories.size
        draw_icon(@item_categories[index][0], index * icons_x, 0, false)
      end
      #--------------------------------------------------------------------------
      # * Draw Items
      #     index : item number
      #--------------------------------------------------------------------------
      def draw_items(index)
        draw_icon(@item_categories[index][0], index * 54, 0, false)
      end
    end

    #==============================================================================
    # ** Scene_Item(장면_아이템)
    #------------------------------------------------------------------------------
    #  This class performs the item screen processing.(이 클래스는 아이템 장면의 프로세싱을 실행한다.)
    #==============================================================================

    class Scene_Item < Scene_Base
      #--------------------------------------------------------------------------
      # * Start processing
      #--------------------------------------------------------------------------
      def start
        super
        create_menu_background
        @viewport = Viewport.new(0, 0, 544, 416)
        @help_window = Window_Help.new
        @help_window.viewport = @viewport
        @item_window = Window_Item.new(0, 112, 544, 304)
        @item_window.viewport = @viewport
        @item_window.help_window = @help_window
        @item_window.active = false
        @category_width = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORY_WIDTH
        @category_window = Window_ItemCategory.new(544 - @category_width, 56, @category_width)
        @sort_window = Window_ItemSort.new(0, 56, 544 - @category_width)
        @target_window = Window_MenuStatus.new(0, 0)
        @sort_index = 0
        @item_categories = COZZIEKUNS::SSI::MOD_ALG_ITEM_CATEGORIES
        hide_target_window
      end
      #--------------------------------------------------------------------------
      # * Termination Processing
      #--------------------------------------------------------------------------
      alias coz_ssi_terminate terminate
      def terminate
        super
        coz_ssi_terminate
        @sort_window.dispose
        @category_window.dispose
      end
      #--------------------------------------------------------------------------
      # * Update Frame
      #--------------------------------------------------------------------------
      alias coz_ssi_update update
      def update
        super
        coz_ssi_update
        @sort_window.update
        @category_window.update
      end
      #--------------------------------------------------------------------------
      # * Update Item Selection
      #--------------------------------------------------------------------------
      def update_item_selection
        if Input.trigger?(Input::B)
          Sound.play_cancel
          return_scene
        elsif Input.trigger?(Input::C)
          @item = @item_window.item
          if @item != nil
            $game_party.last_item_id = @item.id
          end
          if $game_party.item_can_use?(@item)
            Sound.play_decision
            determine_item
          else
            Sound.play_buzzer
          end
        elsif Input.trigger?(Input::Y)
          @sort_index += 1
          @sort_index %= @item_categories.size
          if @sort_index != 0
            if @item_categories.size > COZZIEKUNS::SSI::MAX_NUMBER and @sort_index >

    COZZIEKUNS::SSI::MAX_NUMBER - 1
              @sort_window.ox += 54
            end
          else
            @sort_window.ox = 0
          end
          @category_window.refresh(@sort_index)
          @sort_window.refresh(@sort_index)
          @item_window.refresh(@sort_index)
          @item_window.index = 0
          Sound.play_cursor
        elsif Input.trigger?(Input::A)
          @sort_index -= 1
          @sort_index %= @item_categories.size
          if @sort_index + 1 == @item_categories.size
            @sort_window.ox += 54 * (@item_categories.size - COZZIEKUNS::SSI::MAX_NUMBER)
          else
            if @item_categories.size > COZZIEKUNS::SSI::MAX_NUMBER and @sort_index >

    COZZIEKUNS::SSI::MAX_NUMBER - 2
              @sort_window.ox -= 54
            end
          end
          @category_window.refresh(@sort_index)
          @sort_window.refresh(@sort_index)
          @item_window.refresh(@sort_index)
          @item_window.index = 0
          Sound.play_cursor
        end
      end
    end

  • ?
    난아오닌쿠로 2011.05.09 22:35

    해석 잘하셨습니다.

    근데 왼지 이상한 스크립트


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
537 HUD KH HUD (HP MP 게이지바 스크립트) 41 아방스 2010.12.17 6421
536 전투 GTBS 1.5.1.4 - GubiD's Tactical Battle System 10 아방스 2010.12.11 4448
535 메뉴 기본메인 메뉴 아이콘 추가 10 아방스 2010.12.11 4573
534 HUD HUD 스크립트 모음 10 아방스 2010.12.11 3657
533 전투 전투후 HP/MP 퍼센테이지(지정) 회복 5 하얀슬픔 2010.12.06 2489
532 이동 및 탈것 3D 던젼 스크립트 38 아방스 2010.12.06 5772
531 장비 장비 레벨 개념 추가 스크립트 14 아방스 2010.12.06 3275
530 스킬 체스트 팝업 3.0 9 file 파이어 2010.12.05 3037
529 미니맵 MiniMap 1.0 미니맵 스크립트. 39 아방스 2010.12.02 4740
528 전투 사이드 뷰 시스템 [시트르산님 제공] 56 아방스 2010.11.29 7499
527 변수/스위치 HG_SelfVariables 셀프 변수 8 file 허걱 2010.11.19 2341
526 기타 HG_SHOOT_ANIMATION 4 file 허걱 2010.11.17 2595
525 기타 RMVX Patcher 1.2.0 by Yeyinde 5 file Alkaid 2010.11.12 2116
524 아이템 아이템 무게, 아이템별 소지수 적용 16 file 허걱 2010.11.11 2981
523 스킬 Simple Sort Skill Inventory 1.1 by cozziekuns 5 file Alkaid 2010.11.10 2350
» 스킬 Simple Sort Inventory 1.3a by cozziekuns 5 file Alkaid 2010.11.10 1636
521 전투 RPG tankentai에서의 치명적 문제점을 보완한 스크립트 2 file 톰소여동생 2010.11.03 3116
520 전투 포켓몬 스크립트 한글화 완료 26 file 서울냥이 2010.10.11 6028
519 기타 Modified Advanced Weather Script VX 1.1 3 file Alkaid 2010.10.08 1966
518 기타 책 읽기 스크립트 44 file 히류 2010.10.05 4506
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32