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
117 키입력 Key Simulator by Fantasist 1 습작 2013.05.01 1409
116 기타 Localization by ForeverZer0, KK20 file 습작 2013.04.26 1444
115 키입력 No F1, F12 and Alt+Return (Kein F1, F12 und Alt+Eingabe) by cremno 3 습작 2013.04.19 1575
» 메뉴 아이템 설명 메뉴 스크립트 (Crazyninjaguy) 2 file IZEN 2013.04.18 4918
113 스킬 Skill Cost Manager - Yanfly 4 file Rondo 2013.04.09 2643
112 메시지 N.A.S.T.Y. Text Pop Over Events 3 file Mimesis 2013.04.08 3648
111 이동 및 탈것 Galv’s Character Animations V.2.0 캐릭터 애니메이션 2 yellowcat 2013.04.08 2517
110 이동 및 탈것 Etude87_Mouse_Move_Ex ver.1.00 9 습작 2013.03.29 1643
109 스킬 VXAce 스킬포인트 스크립트 5 file 아이미르 2013.03.21 4186
108 아이템 VXAce 셋트장비 스크립트 9 file 아이미르 2013.03.08 3649
107 상태/속성 상태를 해제하는 상태 3 file 레미티 2013.03.07 1560
106 스킬 VXAce 아츠장착 스킬습득 스크립트 1 file 아이미르 2013.02.24 2796
105 HUD SpriteIcon - 화면에 아이콘 그리기 4 file 허걱 2013.02.24 3659
104 오디오 Extended Music Script (for VXA) by Zhek Alkaid 2013.02.22 1614
103 전투 Basic Enemy HP Bars 2.1 by V.M 10 Alkaid 2013.02.21 4239
102 전투 Etude87_SRPG_converter_for_Ace_Add_on ver.1.02 2 습작 2013.02.18 3116
101 버그픽스 Text Cache by Mithran 1 Alkaid 2013.02.16 1426
100 버그픽스 VXAce SP1 2 Alkaid 2013.02.15 2082
99 메시지 Etude87_VX_Style_Choice ver.1.00 11 file 습작 2013.02.14 3518
98 전투 CP's Battle Engine by Neon Black 20 Alkaid 2013.02.14 5013
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11