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 5605
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 29441
14 메뉴 파티 개별 인벤토리 스크립트 안나카레리나 2018.06.25 786
13 메뉴 Etude87's Menu Editor 44 file 습작 2014.07.17 7047
12 메뉴 스텟을 랭크로 나타내기 7 file Yeolde 2014.05.10 3564
11 메뉴 메뉴창 없애기 2 file hamin 2014.02.28 3927
10 메뉴 시스템 칼라 스크립트 3 file 스리아씨 2013.10.27 3290
9 메뉴 XS 메뉴 스크립트 4 file 스리아씨 2013.10.22 3881
8 메뉴 저장금지시 메뉴에 저장 안 뜨게 하기 5 file Bunny_Boy 2013.08.24 2558
7 메뉴 System Options v1.00 시스템 환경설정, 이동속도 10 file 믛디 2013.07.18 3483
» 메뉴 아이템 설명 메뉴 스크립트 (Crazyninjaguy) 2 file IZEN 2013.04.18 4918
5 메뉴 Syvkal's Menu Bars VX Ace 3 Alkaid 2012.09.08 4314
4 메뉴 Syvkal's Ring Menu VX Ace 2 Alkaid 2012.09.08 3837
3 메뉴 ace용 mog메뉴와 mog전투 10 file 꿈꾸는사람 2012.08.04 6085
2 메뉴 [VX Ace] 다이얼 링 메뉴 스크립트 8 file RaonHank 2012.04.16 6709
1 메뉴 Customizable Main Menu 1.0b by modern algebra 4 file Alkaid 2012.02.13 5482
Board Pagination Prev 1 Next
/ 1