Ace 스크립트

43cdcdd59fc0376d6cd671872a8c0fef.png



http://www.rpgmakervxace.net/topic/654-see-item-menu-ace/



아이템 설명을 두 줄 이상을 어떻게 넣을까 고민하다가 찾았습니다

스크립트에 아이템 설명을 쓰시고 데이터베이스-아이템-메모 에다가 아래 스크립트를 집어넣으시면 됩니다


$imported = {} if $imported == nil
$imported["SEE - Item Menu Ace"] = true
  • profile
    노가다가 살짝 보이네요.
  • profile
    아방스 2024.07.23 09:51
    원본 링크가 접속되지 않아 스크립트를 남겨봅니다.


    #===============================================================================
    # * SEE - Item Menu ACE# * SEE - Item Menu ACE
    # * By Crazyninjaguy# * By Crazyninjaguy
    # * Requested by BizarreMonkey# * Requested by BizarreMonkey
    # * http://www.stormxstudios.co.uk# * http://www.stormxstudios.co.uk
    # * 02/01/2012# * 02/01/2012
    # * If you like my scripts, please show your appreciation by checking out# * If you like my scripts, please show your appreciation by checking out
    # my friendly, helpful Game Development Community, StormCross Studios.# my friendly, helpful Game Development Community, StormCross Studios.
    # ---------------------------------------------------------------------------# ---------------------------------------------------------------------------
    # * Aliased Methods# * Aliased Methods
    # - start (Scene_Item)# - start (Scene_Item)
    # - update_item_selection (Scene_Item)# - update_item_selection (Scene_Item)
    # - terminate (Scene_Item)# - terminate (Scene_Item)
    # ---------------------------------------------------------------------------# ---------------------------------------------------------------------------
    # * This script adds a new item description window with support for four text# * This script adds a new item description window with support for four text
    # text lines and a 96 x 96 picture in Graphics/Pictures.# text lines and a 96 x 96 picture in Graphics/Pictures.
    # * To add a picture for your item, add this into the notebox of that item in# * To add a picture for your item, add this into the notebox of that item in
    # the database# the database
    # * <picture potionpicture># * <picture potionpicture>
    # * Replacing potionpicture for your image filename.# * Replacing potionpicture for your image filename.
    #===============================================================================#===============================================================================

    $imported = {} if $imported == nil= {} if $imported == nil
    $imported["SEE - Item Menu Ace"] = true["SEE - Item Menu Ace"] = true

    #===============================================================================#===============================================================================
    # * Main StormCross Engine Evolution Configuration Module# * Main StormCross Engine Evolution Configuration Module
    #===============================================================================#===============================================================================
    module SEEmodule SEE
    #=============================================================================#=============================================================================
    # * Item Menu Configuration Module# * Item Menu Configuration Module
    #=============================================================================#=============================================================================
    module Itemmodule Item
    ITEMS = []= []
    #===========================================================================#===========================================================================
    # * The number at the beginning of the ITEMS[1] is the item id in the# * The number at the beginning of the ITEMS[1] is the item id in the
    # database.# database.
    # * Each line of text in quotes is a seperate line in the window.# * Each line of text in quotes is a seperate line in the window.
    # Seperate each with a comma# Seperate each with a comma
    #===========================================================================#===========================================================================
    ITEMS[1] = ["This is a potion.", "It's very nice and restores 500hp.", "Costs 50 Gil in a shop.", "Has a purplish glow."][1] = ["This is a potion.", "It's very nice and restores 500hp.", "Costs 50 Gil in a shop.", "Has a purplish glow."]
    ITEMS[2] = ["This is a high potion.", "It's very nice and restores 2500hp.", "Costs 150 Gil in a shop.", "Has a purplish glow."][2] = ["This is a high potion.", "It's very nice and restores 2500hp.", "Costs 150 Gil in a shop.", "Has a purplish glow."]

    WEAPONS = []= []
    WEAPONS[1] = ["Derp", "", "", ""][1] = ["Derp", "", "", ""]

    ARMORS = []= []
    ARMORS[1] = ["", "", "", ""][1] = ["", "", "", ""]

    ITEM_COLOURS = []= []
    #===========================================================================#===========================================================================
    # * As with the previous, the number at the beginning of COLOURS[1] is the# * As with the previous, the number at the beginning of COLOURS[1] is the
    # item id in the database.# item id in the database.
    # * The numbers in the array correspond to the text_color() argument of# * The numbers in the array correspond to the text_color() argument of
    # window base. 0 is white. You can find these by looking at the# window base. 0 is white. You can find these by looking at the
    # Window.png graphic. Seperate each value with a comma.# Window.png graphic. Seperate each value with a comma.
    #===========================================================================#===========================================================================
    ITEM_COLOURS[1] = [0, 1, 2, 3][1] = [0, 1, 2, 3]

    WEAPON_COLOURS = []= []
    WEAPON_COLOURS[1] = [0, 1, 2, 3][1] = [0, 1, 2, 3]

    ARMOR_COLOURS = []= []
    ARMOR_COLOURS[1] = [0, 1, 2, 3][1] = [0, 1, 2, 3]
    end # Itemend # Item
    end # SEEend # SEE

    module ReadNotemodule ReadNote
    def read_note(note, tag, position = 1)def read_note(note, tag, position = 1)
    note2 = note.dup= note.dup
    lines = note2.scan(/<.+>/)= note2.scan(/<.+>/)
    for line in linesfor line in lines
    words = line.split(/[ <>]/)= line.split(/[ <>]/)
    words.delete("").delete("")
    for word in wordsfor word in words
    if word == tagif word == tag
    result = words[words.index(word) + position]= words[words.index(word) + position]
    return true if result == nilreturn true if result == nil
    return resultreturn result
    endend
    endend
    endend
    return falsereturn false
    endend
    endend

    class Scene_Item < Scene_ItemBaseclass Scene_Item < Scene_ItemBase
    def startdef start
    supersuper
    create_description_window
    create_category_window
    create_item_window
    @description_index = 0@description_index = 0
    endend
    def create_description_windowdef create_description_window
    @description = Window_ItemDescription.new@description = Window_ItemDescription.new
    @description.viewport = @viewport@description.viewport = @viewport
    endend
    def create_category_windowdef create_category_window
    @category_window = Window_ItemCategory.new@category_window = Window_ItemCategory.new
    @category_window.viewport = @viewport@category_window.viewport = @viewport
    @category_window.y = @description.height@category_window.y = @description.height
    @category_window.set_handler(:ok, method(:on_category_ok))@category_window.set_handler(:ok, method(:on_category_ok))
    @category_window.set_handler(:cancel, method(:return_scene))@category_window.set_handler(:cancel, method(:return_scene))
    endend
    def create_item_windowdef create_item_window
    wy = @category_window.y + @category_window.height= @category_window.y + @category_window.height
    wh = Graphics.height - wy= Graphics.height - wy
    @item_window = Window_ItemList.new(0, wy, Graphics.width, wh)@item_window = Window_ItemList.new(0, wy, Graphics.width, wh)
    @item_window.set_handler(:ok, method(:on_item_ok))@item_window.set_handler(:ok, method(:on_item_ok))
    @item_window.set_handler(:cancel, method(:on_item_cancel))@item_window.set_handler(:cancel, method(:on_item_cancel))
    @category_window.item_window = @item_window@category_window.item_window = @item_window
    @item_window.viewport = @viewport@item_window.viewport = @viewport
    endend
    def on_item_canceldef on_item_cancel
    @item_window.unselect@item_window.unselect
    @category_window.activate@category_window.activate
    @description.refresh(nil)@description.refresh(nil)
    endend
    def updatedef update
    supersuper
    if @description_index != @item_window.indexif @description_index != @item_window.index
    @description.refresh(@item_window.item)@description.refresh(@item_window.item)
    @description_index = @item_window.index@description_index = @item_window.index
    endend
    endend
    endend

    class Window_ItemDescription < Window_Baseclass Window_ItemDescription < Window_Base
    include ReadNoteReadNote
    include SEE::Item::Item
    def initialize(item = nil)def initialize(item = nil)
    super(0, 0, Graphics.width, (Graphics.height - 288))super(0, 0, Graphics.width, (Graphics.height - 288))
    refresh(item)(item)
    end # initializeend # initialize
    def refresh(item)def refresh(item)
    self.contents.clearself.contents.clear
    if item != nilif item != nil
    if item.is_a?(RPG::Item)if item.is_a?(RPG::Item)
    picture = read_note($data_items[item.id].note, "picture")= read_note($data_items[item.id].note, "picture")
    elsif item.is_a?(RPG::Weapon)elsif item.is_a?(RPG::Weapon)
    picture = read_note($data_weapons[item.id].note, "picture")= read_note($data_weapons[item.id].note, "picture")
    elsif item.is_a?(RPG::Armor)elsif item.is_a?(RPG::Armor)
    picture = read_note($data_armors[item.id].note, "picture")= read_note($data_armors[item.id].note, "picture")
    endend
    if picture != falseif picture != false
    bitmap = Cache.picture(picture)= Cache.picture(picture)
    rect = Rect.new(0, 0, 96, 96)= Rect.new(0, 0, 96, 96)
    self.contents.blt(0, 0, bitmap, rect)self.contents.blt(0, 0, bitmap, rect)
    endend
    if item.is_a?(RPG::Item)if item.is_a?(RPG::Item)
    if ITEMS[item.id] != nilif ITEMS[item.id] != nil
    if ITEM_COLOURS[item.id] != nilif ITEM_COLOURS[item.id] != nil
    self.contents.font.color = text_color(ITEM_COLOURS[item.id][0])self.contents.font.color = text_color(ITEM_COLOURS[item.id][0])
    self.contents.draw_text(96, 0, width - 128, 24, ITEMS[item.id][0])self.contents.draw_text(96, 0, width - 128, 24, ITEMS[item.id][0])
    self.contents.font.color = text_color(ITEM_COLOURS[item.id][1])self.contents.font.color = text_color(ITEM_COLOURS[item.id][1])
    self.contents.draw_text(96, 24, width - 128, 24, ITEMS[item.id][1])self.contents.draw_text(96, 24, width - 128, 24, ITEMS[item.id][1])
    self.contents.font.color = text_color(ITEM_COLOURS[item.id][2])self.contents.font.color = text_color(ITEM_COLOURS[item.id][2])
    self.contents.draw_text(96, 48, width - 128, 24, ITEMS[item.id][2])self.contents.draw_text(96, 48, width - 128, 24, ITEMS[item.id][2])
    self.contents.font.color = text_color(ITEM_COLOURS[item.id][3])self.contents.font.color = text_color(ITEM_COLOURS[item.id][3])
    self.contents.draw_text(96, 72, width - 128, 24, ITEMS[item.id][3])self.contents.draw_text(96, 72, width - 128, 24, ITEMS[item.id][3])
    self.contents.font.color = text_color(0)self.contents.font.color = text_color(0)
    elseelse
    self.contents.draw_text(96, 0, width - 128, 24, ITEMS[item.id][0])self.contents.draw_text(96, 0, width - 128, 24, ITEMS[item.id][0])
    self.contents.draw_text(96, 24, width - 128, 24, ITEMS[item.id][1])self.contents.draw_text(96, 24, width - 128, 24, ITEMS[item.id][1])
    self.contents.draw_text(96, 48, width - 128, 24, ITEMS[item.id][2])self.contents.draw_text(96, 48, width - 128, 24, ITEMS[item.id][2])
    self.contents.draw_text(96, 72, width - 128, 24, ITEMS[item.id][3])self.contents.draw_text(96, 72, width - 128, 24, ITEMS[item.id][3])
    endend
    endend
    elsif item.is_a?(RPG::Weapon)elsif item.is_a?(RPG::Weapon)
    if WEAPONS[item.id] != nilif WEAPONS[item.id] != nil
    if WEAPON_COLOURS[item.id] != nilif WEAPON_COLOURS[item.id] != nil
    self.contents.font.color = text_color(WEAPON_COLOURS[item.id][0])self.contents.font.color = text_color(WEAPON_COLOURS[item.id][0])
    self.contents.draw_text(96, 0, width - 128, 24, WEAPONS[item.id][0])self.contents.draw_text(96, 0, width - 128, 24, WEAPONS[item.id][0])
    self.contents.font.color = text_color(WEAPON_COLOURS[item.id][1])self.contents.font.color = text_color(WEAPON_COLOURS[item.id][1])
    self.contents.draw_text(96, 24, width - 128, 24, WEAPONS[item.id][1])self.contents.draw_text(96, 24, width - 128, 24, WEAPONS[item.id][1])
    self.contents.font.color = text_color(WEAPON_COLOURS[item.id][2])self.contents.font.color = text_color(WEAPON_COLOURS[item.id][2])
    self.contents.draw_text(96, 48, width - 128, 24, WEAPONS[item.id][2])self.contents.draw_text(96, 48, width - 128, 24, WEAPONS[item.id][2])
    self.contents.font.color = text_color(WEAPON_COLOURS[item.id][3])self.contents.font.color = text_color(WEAPON_COLOURS[item.id][3])
    self.contents.draw_text(96, 72, width - 128, 24, WEAPONS[item.id][3])self.contents.draw_text(96, 72, width - 128, 24, WEAPONS[item.id][3])
    self.contents.font.color = text_color(0)self.contents.font.color = text_color(0)
    elseelse
    self.contents.draw_text(96, 0, width - 128, 24, WEAPONS[item.id][0])self.contents.draw_text(96, 0, width - 128, 24, WEAPONS[item.id][0])
    self.contents.draw_text(96, 24, width - 128, 24, WEAPONS[item.id][1])self.contents.draw_text(96, 24, width - 128, 24, WEAPONS[item.id][1])
    self.contents.draw_text(96, 48, width - 128, 24, WEAPONS[item.id][2])self.contents.draw_text(96, 48, width - 128, 24, WEAPONS[item.id][2])
    self.contents.draw_text(96, 72, width - 128, 24, WEAPONS[item.id][3])self.contents.draw_text(96, 72, width - 128, 24, WEAPONS[item.id][3])
    endend
    endend
    elsif item.is_a?(RPG::Armor)elsif item.is_a?(RPG::Armor)
    if ARMORS[item.id] != nilif ARMORS[item.id] != nil
    if ARMOR_COLOURS[item.id] != nilif ARMOR_COLOURS[item.id] != nil
    self.contents.font.color = text_color(ARMOR_COLOURS[item.id][0])self.contents.font.color = text_color(ARMOR_COLOURS[item.id][0])
    self.contents.draw_text(96, 0, width - 128, 24, ARMORS[item.id][0])self.contents.draw_text(96, 0, width - 128, 24, ARMORS[item.id][0])
    self.contents.font.color = text_color(ARMOR_COLOURS[item.id][1])self.contents.font.color = text_color(ARMOR_COLOURS[item.id][1])
    self.contents.draw_text(96, 24, width - 128, 24, ARMORS[item.id][1])self.contents.draw_text(96, 24, width - 128, 24, ARMORS[item.id][1])
    self.contents.font.color = text_color(ARMOR_COLOURS[item.id][2])self.contents.font.color = text_color(ARMOR_COLOURS[item.id][2])
    self.contents.draw_text(96, 48, width - 128, 24, ARMORS[item.id][2])self.contents.draw_text(96, 48, width - 128, 24, ARMORS[item.id][2])
    self.contents.font.color = text_color(ARMOR_COLOURS[item.id][3])self.contents.font.color = text_color(ARMOR_COLOURS[item.id][3])
    self.contents.draw_text(96, 72, width - 128, 24, ARMORS[item.id][3])self.contents.draw_text(96, 72, width - 128, 24, ARMORS[item.id][3])
    self.contents.font.color = text_color(0)self.contents.font.color = text_color(0)
    elseelse
    self.contents.draw_text(96, 0, width - 128, 24, ARMORS[item.id][0])self.contents.draw_text(96, 0, width - 128, 24, ARMORS[item.id][0])
    self.contents.draw_text(96, 24, width - 128, 24, ARMORS[item.id][1])self.contents.draw_text(96, 24, width - 128, 24, ARMORS[item.id][1])
    self.contents.draw_text(96, 48, width - 128, 24, ARMORS[item.id][2])self.contents.draw_text(96, 48, width - 128, 24, ARMORS[item.id][2])
    self.contents.draw_text(96, 72, width - 128, 24, ARMORS[item.id][3])self.contents.draw_text(96, 72, width - 128, 24, ARMORS[item.id][3])
    endend
    endend
    endend
    endend
    end # refreshend # refresh
    end # Window_ItemDescriptionend # Window_ItemDescription

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 5596
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 29420
57 맵/타일 안개 시스템 ( VXA ) 8 홍색의환상향 2013.05.19 4109
56 스킬 VXAce 스킬포인트 스크립트 5 file 아이미르 2013.03.21 4183
55 메시지 Message Skip [메세지 스킵] 5 file Lisky 2014.09.09 4230
54 전투 Basic Enemy HP Bars 2.1 by V.M 10 Alkaid 2013.02.21 4234
53 전투 Code Crush VXAce-RGSS3-21 프론트뷰 改 2 15 Alkaid 2013.01.28 4298
52 메뉴 Syvkal's Menu Bars VX Ace 3 Alkaid 2012.09.08 4311
51 메시지 텍스트 사운드 이펙트 ( Text Sound Effect ) 10 file 미루 2013.01.10 4386
50 전투 전투시 나오는 메세지 삭제 10 Nintendo 2012.03.03 4389
49 전투 Sideview08 Ace 테스트 버전 (인 듯 합니다) 5 재규어 2012.01.24 4409
48 기타 Yanfly Engine Ace Alkaid 2011.12.10 4412
47 전투 사이드뷰 배틀 스크립트 (Animated Battlers By Jet10985) 6 file Rebiart 2014.05.18 4543
46 기타 Sapphire Action System IV v4.4br(엑알 스크립트) 6 file 꿈꾸는사람 2012.08.02 4543
45 전투 XAS VX ACE 데모 한글 번역 ( 스크립트 번역 모음 ) 1 미루 2013.01.10 4595
44 이동 및 탈것 지상 탈것 스크립트 6 file 미루 2013.01.07 4602
43 타이틀/게임오버 타이틀 화면 없이 게임을 시작하게 만드는법. 6 마에르드 2012.02.11 4612
42 전투 콤보 카운팅 시스템 4 아르피쥐 2011.12.18 4618
41 아이템 양손무기 작착 스크립트 [Dual Wield -> Free Hands Version 1.0] 7 file 아방스 2012.01.31 4659
40 이동 및 탈것 [스크립트] Setp Sound (발걸음 소리) 20 file 허걱 2012.05.19 4687
39 메시지 ATS: Special Message Codes 1.0 by Modern Algebra 1 file Alkaid 2012.01.15 4740
38 기타 ACE) 오블리비언 락픽 구현 V0.5.2 7 file 77이알 2012.09.02 4827
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11