设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 122|回复: 0

[转载发布] Very Simple Item Menu

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-2 08:50:41 | 显示全部楼层 |阅读模式
    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 linkfor people who would prefer that still.

                    Code:       
    1. =begin
    2. #--------------------------------------------------------------------------
    3. #Very Simple Item Menu Edit
    4. #Version 1,0
    5. #June 6, 2014
    6. #By smallhobbit (or lemongreen)
    7. #--------------------------------------------------------------------------
    8. A simple edit to the item menu so it only shows Items and Key Items as well as
    9. gets rid of the Help Text; also, only regular Items have numbers. Supposed to
    10. emulate the item menu from "Mad Father"
    11. Just paste it in above Main and it'll work. (though probably not with other
    12. Item menu changing scripts)
    13. =end
    14. class Window_ItemCategory < Window_HorzCommand
    15.   #--------------------------------------------------------------------------
    16.   # * Get Window Width
    17.   #--------------------------------------------------------------------------
    18.   def window_width
    19.     Graphics.width/2
    20.   end
    21.   #--------------------------------------------------------------------------
    22.   # * Get Digit Count (changed number)
    23.   #--------------------------------------------------------------------------
    24.   def col_max
    25.     return 2
    26.   end
    27.   #--------------------------------------------------------------------------
    28.   # * Create Command List (Items & Key Items only)
    29.   #--------------------------------------------------------------------------
    30.   def make_command_list
    31.     add_command(Vocab::item,     :item)
    32.     add_command(Vocab::key_item, :key_item)
    33.   end
    34. end
    35. class Window_ItemList < Window_Selectable
    36.   #--------------------------------------------------------------------------
    37.   # * Get Digit Count (changed number)
    38.   #--------------------------------------------------------------------------
    39.   def col_max
    40.     return 1
    41.   end
    42.   #--------------------------------------------------------------------------
    43.   # * Include in Item List? (removed weapons and armor)
    44.   #--------------------------------------------------------------------------
    45.   def include?(item)
    46.     case @category
    47.     when :item
    48.       item.is_a?(RPG::Item) && !item.key_item?
    49.     when :key_item
    50.       item.is_a?(RPG::Item) && item.key_item?
    51.     else
    52.       false
    53.     end
    54.   end
    55.   #--------------------------------------------------------------------------
    56.   # * Draw Item (changed draw_item_number)
    57.   #--------------------------------------------------------------------------
    58.   def draw_item(index)
    59.     item = @data[index]
    60.       rect = item_rect(index)
    61.       rect.width -= 4
    62.       draw_item_name(item, rect.x, rect.y, enable?(item))
    63.      if item.is_a?(RPG::Item) && !item.key_item?
    64.       draw_item_number(rect, item)
    65.     else
    66.       false
    67.     end
    68.   end
    69.   #--------------------------------------------------------------------------
    70.   # * Draw Number of Items
    71.   #--------------------------------------------------------------------------
    72.   def draw_item_number(rect, item)
    73.     draw_text(rect, sprintf(":%2d", $game_party.item_number(item)), 2)
    74.   end
    75. end
    76. class Scene_Item < Scene_ItemBase
    77.   #--------------------------------------------------------------------------
    78.   # * Start Processing (removed help window
    79.   #--------------------------------------------------------------------------
    80.   def start
    81.     super
    82.     create_category_window
    83.     create_item_window
    84.   end
    85.   #--------------------------------------------------------------------------
    86.   # * Create Category Window
    87.   #--------------------------------------------------------------------------
    88.   def create_category_window
    89.     @category_window = Window_ItemCategory.new
    90.     @category_window.viewport = @viewport
    91.     @category_window.y = 20
    92.     @category_window.set_handler(:ok,     method(:on_category_ok))
    93.     @category_window.set_handler(:cancel, method(:return_scene))
    94.   end
    95.   #--------------------------------------------------------------------------
    96.   # * Create Item Window
    97.   #--------------------------------------------------------------------------
    98.   def create_item_window
    99.     wy = @category_window.y + @category_window.height
    100.     wh = Graphics.height - 150
    101.     @item_window = Window_ItemList.new(0, wy, Graphics.width/2, wh)
    102.     @item_window.viewport = @viewport
    103.     @item_window.set_handler(:ok,     method(:on_item_ok))
    104.     @item_window.set_handler(:cancel, method(:on_item_cancel))
    105.     @category_window.item_window = @item_window
    106.   end
    107. 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/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 12:44 , Processed in 0.090575 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表