Simple Item Menu ver. 1.0
by lemongreen
Introduction
Just a very simple edit to the item menu so it only shows Items and Key Items; also the number total now only shows for regular items. It also gets rid of the help box. I made it based on the item menu from Mad Father due to liking the style and figuring it would work in a short game I'm working on.
Screenshots
SpoilerHere's what it looks like:
And here's what it's based off of:
(I know it doesn't actually look close to the same
at all , but it's what I could manage...)
How to Use
Just paste it in above Main and it'll work. (Chances are high that it won't work with other scripts that change the items menu; I haven't really tested it in such a way, anyways)
Script
Here's a Dropbox link for people who would prefer that still.
Code:
=begin #-------------------------------------------------------------------------- #Very Simple Item Menu Edit #Version 1,0 #June 6, 2014 #By smallhobbit (or lemongreen) #-------------------------------------------------------------------------- A simple edit to the item menu so it only shows Items and Key Items as well as gets rid of the Help Text; also, only regular Items have numbers. Supposed to emulate the item menu from "Mad Father" Just paste it in above Main and it'll work. (though probably not with other Item menu changing scripts) =end class Window_ItemCategory < Window_HorzCommand #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width Graphics.width/2 end #-------------------------------------------------------------------------- # * Get Digit Count (changed number) #-------------------------------------------------------------------------- def col_max return 2 end #-------------------------------------------------------------------------- # * Create Command List (Items & Key Items only) #-------------------------------------------------------------------------- def make_command_list add_command(Vocab::item, :item) add_command(Vocab::key_item, :key_item) end end class Window_ItemList < Window_Selectable #-------------------------------------------------------------------------- # * Get Digit Count (changed number) #-------------------------------------------------------------------------- def col_max return 1 end #-------------------------------------------------------------------------- # * Include in Item List? (removed weapons and armor) #-------------------------------------------------------------------------- def include?(item) case @category when :item item.is_a?(RPG::Item) && !item.key_item? when :key_item item.is_a?(RPG::Item) && item.key_item? else false end end #-------------------------------------------------------------------------- # * Draw Item (changed draw_item_number) #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] rect = item_rect(index) rect.width -= 4 draw_item_name(item, rect.x, rect.y, enable?(item)) if item.is_a?(RPG::Item) && !item.key_item? draw_item_number(rect, item) else false end end #-------------------------------------------------------------------------- # * Draw Number of Items #-------------------------------------------------------------------------- def draw_item_number(rect, item) draw_text(rect, sprintf(":%2d", $game_party.item_number(item)), 2) end end class Scene_Item < Scene_ItemBase #-------------------------------------------------------------------------- # * Start Processing (removed help window #-------------------------------------------------------------------------- def start super create_category_window create_item_window end #-------------------------------------------------------------------------- # * Create Category Window #-------------------------------------------------------------------------- def create_category_window @category_window = Window_ItemCategory.new @category_window.viewport = @viewport @category_window.y = 20 @category_window.set_handler(:ok, method(:on_category_ok)) @category_window.set_handler(:cancel, method(:return_scene)) end #-------------------------------------------------------------------------- # * Create Item Window #-------------------------------------------------------------------------- def create_item_window wy = @category_window.y + @category_window.height wh = Graphics.height - 150 @item_window = Window_ItemList.new(0, wy, Graphics.width/2, wh) @item_window.viewport = @viewport @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @category_window.item_window = @item_window end end 复制代码
Just so people know, I'm fine with either being credited as lemongreen or smallhobbit (I have both in the script header; though if this is confusing then just go with lemongreen) Also, I don't really care how you use this as long as credit is given.
Thanks
The general community here (surprisingly I think I've gotten more work done on games since I stopped lurking around on here)
Author's Notes
Even though there's really not much to this script, I'll probably come back to it later to make it better... somehow. Also, I don't know how well I'd be able to do compatibility work (though there shouldn't be much in the way of that)
本贴来自国际rpgmaker官方论坛作者:lemongreen处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/very-simple-item-menu.28342/