设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

關於這個物品MENU腳本. 能否更改分類項目??

查看数: 1805 | 评论数: 4 | 收藏 1
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2013-8-4 10:41

正文摘要:

本帖最后由 a000b1745 于 2013-8-4 15:24 编辑 小妹最近在搜尋簡單的物品分類腳本, (Yanfly Channel的分類腳本會和 wyongcan的装备帮助增强腳本衝突...只好不考慮了) 在國外網找了個比較看似簡單的物品菜單分類 ...

回复

a000b1745 发表于 2013-8-5 09:49:18
5ion 发表于 2013-8-5 09:24
把強化腳本放到上方,然後將強化腳本里的 :gem 全部替換為 :寶石 (註釋里填的話)試試
這個強化腳本我使用 ...

感謝你...照5大方法解決了問題.
我的遊戲430MB (看到什麼就加什麼的壞榜樣)...
不知道哪種網盤或免費空間比較容易上傳/下載?

点评

既然解決了就不必傳了吧 :)  发表于 2013-8-5 10:46
百度网盘速度很好!  发表于 2013-8-5 10:14
5ion 发表于 2013-8-5 09:24:47
本帖最后由 5ion 于 2013-8-5 09:40 编辑

把強化腳本放到上方,然後將強化腳本里的 :gem 全部替換為 :寶石 (註釋里填<type: 寶石>的話)試試
這個強化腳本我使用會報錯,不知是不是有缺失?可以提供一個範本嗎?

评分

参与人数 1星屑 +7 收起 理由
a000b1745 + 7 认可答案

查看全部评分

5ion 发表于 2013-8-4 14:43:54
註釋框寫  <type: 食物> 或 <type: 材料A> 或 <type: 材料B> 即可。(注意這裡用半角的冒號)
因為不知道你的具體分類,所以說明文字就沒有寫了。
  1. =begin
  2. ===============================================================================
  3. Expanded Item Categories (25/01/2013)
  4. -------------------------------------------------------------------------------
  5. Created By: Shadowmaster/Shadowmaster9000/Shadowpasta


  6. ===============================================================================
  7. Information
  8. -------------------------------------------------------------------------------
  9. This script adds more categories to your item and shop menus, such as
  10. seperate armor categories, and a category for all items together. This script
  11. also allows you to change the order that the categories appear in, as well
  12. as how many appear on the screen at the same time.

  13. As a bonus, this script fixes a bug with horizontal window scrolling through
  14. commands that prevented you from viewing all items if the maximum number of
  15. items was double the amount of the maximum viewable at once.

  16. ===============================================================================
  17. How to Use
  18. -------------------------------------------------------------------------------
  19. Place this script under Materials, preferably below any item altering scripts.

  20. Further down are some options you can change to your liking.

  21. ===============================================================================
  22. Required
  23. -------------------------------------------------------------------------------
  24. Nothing.

  25. ===============================================================================
  26. Change log
  27. -------------------------------------------------------------------------------
  28. v1.0: First release. (25/01/2013)

  29. ===============================================================================
  30. Terms of Use
  31. -------------------------------------------------------------------------------
  32. * Free to use for both commercial and non-commerical projects.
  33. * Do not claim this as your own.
  34. * You're free to post this on other websites, but please credit me and keep
  35. the header intact.
  36. * Creditting me in the game's credits would be appreciated.

  37. ===============================================================================
  38. =end
  39. $imported = {} if $imported.nil?
  40. $imported["ExpandedItemCategories"] = true

  41. module Itemlist

  42. #==============================================================================
  43. # ** List of Categories
  44. #------------------------------------------------------------------------------
  45. #  Below are the list of categories available in this script. You can change
  46. #  the order of the categories to your pleasing, as well as their names and
  47. #  even remove any categories you don't want. I will record the list of all
  48. #  available categories here if in case you forget any of them.
  49. #
  50. #  :all_item         (Displays all items)
  51. #  :item             (Displays normal items)
  52. #  :weapon           (Displays all weapons)
  53. #  :armor            (Displays all armor gear)
  54. #  :armor_shield     (Displays shields only)
  55. #  :armor_head       (Displays head gear only)
  56. #  :armor_body       (Displays body gear only)
  57. #  :armor_accessory  (Displays accessories only)
  58. #  :key_item         (Displays key items)
  59. #==============================================================================

  60.   Categories =[ # Do not remove this.
  61.       [:item, "Items"],
  62.       [:weapon, "Weapons"],  
  63.       [:armor, "Armors"],
  64.       [:armor_shield, "Shields"],
  65.       [:armor_head, "Head Gear"],
  66.       [:armor_body, "Body Gear"],
  67.       [:armor_accessory, "Accessories"],
  68.       [:key_item, "Key Items"],
  69.       [:all_item, "All"],
  70.     ] # Do not remove this.

  71. #==============================================================================
  72. # ** Category Help Descriptions
  73. #------------------------------------------------------------------------------
  74. #  These set what text appears in the help window when you are viewing the
  75. #  item categories. If you want to leave them blank, just leave empty ""
  76. #  behind.
  77. #==============================================================================

  78.   All_Item_Help_Info = "Viewing all items."
  79.   Item_Help_Info = "Viewing normal items."
  80.   Weapon_Help_Info = "Viewing all weapons."
  81.   Armor_Help_Info = "Viewing all armors."
  82.   Armor_Shield_Help_Info = "Viewing all shields."
  83.   Armor_Head_Help_Info = "Viewing head gear."
  84.   Armor_Body_Help_Info = "Viewing body gear."
  85.   Armor_Accessory_Help_Info = "Viewing accessories."
  86.   Key_Item_Help_Info = "Viewing important items."

  87. #==============================================================================
  88. # ** Max Columns
  89. #------------------------------------------------------------------------------
  90. #  This sets how many item categories you can view on the screen at one time.
  91. #  If the number of item categories exceed the number of maximum columns, you
  92. #  will be able to scroll through the window to see the rest of the item
  93. #  categories.
  94. #==============================================================================

  95.   Max_Columns = 4

  96. end

  97. #==============================================================================
  98. # ** DO NOT edit anything below this unless if you know what you're doing!
  99. #==============================================================================

  100. class RPG::Armor

  101.   def armor_shield?
  102.     @etype_id == 1
  103.   end
  104.   def armor_head?
  105.     @etype_id == 2
  106.   end
  107.   def armor_body?
  108.     @etype_id == 3
  109.   end
  110.   def armor_accessory?
  111.     @etype_id == 4
  112.   end

  113. end

  114. #==============================================================================
  115. # ** Window_HorzCommand
  116. #------------------------------------------------------------------------------
  117. #  This is a command window for the horizontal selection format.
  118. #==============================================================================

  119. class Window_HorzCommand < Window_Command
  120.   #--------------------------------------------------------------------------
  121.   # * Set Leading Digits
  122.   #--------------------------------------------------------------------------
  123.   def top_col=(col)
  124.     col = 0 if col < 0
  125.     self.ox = col * (item_width + spacing)
  126.   end
  127. end

  128. #==============================================================================
  129. # ** Window_ItemCategory
  130. #------------------------------------------------------------------------------
  131. #  This window is for selecting a category of normal items and equipment
  132. # on the item screen or shop screen.
  133. #==============================================================================

  134. class Window_ItemCategory < Window_HorzCommand
  135.   #--------------------------------------------------------------------------
  136.   # * Get Digit Count
  137.   #--------------------------------------------------------------------------
  138.   def col_max
  139.     return Itemlist::Max_Columns
  140.   end
  141.   #--------------------------------------------------------------------------
  142.   # * Create Command List
  143.   #--------------------------------------------------------------------------
  144.   def make_command_list
  145.     $game_party.all_items.each {|item|
  146.       next unless item.is_a?(RPG::Item) && !item.key_item?
  147.       setup_item_category(item)
  148.     }
  149.     Itemlist::Categories.each { |symbol, label| add_command(label, symbol)}
  150.   end
  151.   def setup_item_category(item)
  152.     if item && /<type: *(\S+)>/ =~ item.note
  153.       @list.each {|command| return if command[:name] == $1}
  154.       add_command($1, $1.to_sym)
  155.     end
  156.   end
  157.   #--------------------------------------------------------------------------
  158.   # * Update Help Text
  159.   #--------------------------------------------------------------------------
  160.   def update_help
  161.     @help_window.clear
  162.     case current_symbol
  163.     when :all_item
  164.       @help_window.set_text(Itemlist::All_Item_Help_Info)
  165.     when :item
  166.       @help_window.set_text(Itemlist::Item_Help_Info)
  167.     when :weapon
  168.       @help_window.set_text(Itemlist::Weapon_Help_Info)
  169.     when :armor
  170.       @help_window.set_text(Itemlist::Armor_Help_Info)
  171.     when :armor_shield
  172.       @help_window.set_text(Itemlist::Armor_Shield_Help_Info)
  173.     when :armor_head
  174.       @help_window.set_text(Itemlist::Armor_Head_Help_Info)
  175.     when :armor_body
  176.       @help_window.set_text(Itemlist::Armor_Body_Help_Info)
  177.     when :armor_accessory
  178.       @help_window.set_text(Itemlist::Armor_Accessory_Help_Info)
  179.     when :key_item
  180.       @help_window.set_text(Itemlist::Key_Item_Help_Info)
  181.     else
  182.       @help_window.clear
  183.     end
  184.   end
  185. end

  186. #==============================================================================
  187. # ** Window_ItemList
  188. #------------------------------------------------------------------------------
  189. #  This window displays a list of party items on the item screen.
  190. #==============================================================================

  191. class Window_ItemList < Window_Selectable
  192.   #--------------------------------------------------------------------------
  193.   # * Include in Item List?
  194.   #--------------------------------------------------------------------------
  195.   def include?(item)
  196.     case @category
  197.     when :all_item
  198.       item.is_a?(RPG::Item) || item.is_a?(RPG::Armor) || item.is_a?(RPG::Weapon)
  199.     when :item
  200.       item.is_a?(RPG::Item) && !item.key_item?
  201.     when :weapon
  202.       item.is_a?(RPG::Weapon)
  203.     when :armor
  204.       item.is_a?(RPG::Armor)
  205.     when :armor_shield
  206.       item.is_a?(RPG::Armor) && item.armor_shield?
  207.     when :armor_head
  208.       item.is_a?(RPG::Armor) && item.armor_head?
  209.     when :armor_body
  210.       item.is_a?(RPG::Armor) && item.armor_body?
  211.     when :armor_accessory
  212.       item.is_a?(RPG::Armor) && item.armor_accessory?
  213.     when :key_item
  214.       item.is_a?(RPG::Item) && item.key_item?
  215.     else
  216.       if item && /<type: *(\S+)>/ =~ item.note
  217.         @category == $1.to_sym
  218.       else
  219.         false
  220.       end
  221.     end
  222.   end
  223. end

  224. #==============================================================================
  225. # ** Scene_Shop
  226. #------------------------------------------------------------------------------
  227. #  This class performs shop screen processing.
  228. #==============================================================================

  229. class Scene_Shop < Scene_MenuBase
  230.   #--------------------------------------------------------------------------
  231.   # * Start Processing
  232.   #--------------------------------------------------------------------------
  233.   alias start_itemlist start
  234.   def start
  235.     super
  236.     start_itemlist
  237.     @help_window.clear
  238.   end
  239.   #--------------------------------------------------------------------------
  240.   # * Category [Cancel]
  241.   #--------------------------------------------------------------------------
  242.   alias on_category_cancel_itemlist on_category_cancel
  243.   def on_category_cancel
  244.     on_category_cancel_itemlist
  245.     @help_window.clear
  246.   end
  247. end
复制代码

点评

這名字和頭像很熟悉啊!! 感謝"5大"幫忙. 來去試試看^^  发表于 2013-8-4 15:15
这名字……  发表于 2013-8-4 14:45

评分

参与人数 1星屑 +7 收起 理由
a000b1745 + 7 认可答案(好實用!)

查看全部评分

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-18 02:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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