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

[转载发布] Hidden Skill/ Item Switch

[复制链接]
累计送礼:
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 13:10:27 | 显示全部楼层 |阅读模式
    Hidden Skill Switch 2019/12/15

    Creator name: Ru/むっくRu (Rutan)

    Introduction
    Possible to create hidden skill/items with a switch through note tag.

    Feature
    If specified switch is ON, certain skill/ item won't show in the list (unusable)

    <Usage>
    Put the following tag in the Note box for skill or item:

    <hidskill: 1>
    <hiditem: 1>

    By using this tag,
    When switch ID: 1 is ON, the item won't show in the list. (If you want to change the switch ID, change 1)

    How to Use
    Paste this script above Main.

    Script link
    https://raw.githubusercontent.com/ovate/torigoya-rgss3/main/torigoya_HiddenSkill.rb

                    Code:       
    1. # encoding: utf-8
    2. #===============================================================================
    3. # ■ Hidden Skill Switch
    4. #-------------------------------------------------------------------------------
    5. # 2019/12/15 Ruたん
    6. # License - Public Domain, allows commercial use and credit is not necessary
    7. #-------------------------------------------------------------------------------
    8. # If specified switch is ON, certain skill/ item won't show in the list (unusable)
    9. # Possible to create hidden skill/items with a switch through note tag
    10. #
    11. # <Usage>
    12. # Put the following tag in the Note box for skill or item
    13. #
    14. # <hidskill: 1>
    15. #
    16. #  Or
    17. #
    18. # <hiditem: 1>
    19. #
    20. # By using this tag,
    21. # When switch ID: 1 is ON, the item won't show in the list.
    22. # (If you want to change the switch ID, change 1)
    23. #-------------------------------------------------------------------------------
    24. # 【Changelog】
    25. # 2019/12/15 Released
    26. #-------------------------------------------------------------------------------
    27. module Torigoya
    28.   module HiddenSkillSwitch
    29.     module Config
    30.       # [Advanced setting] Regular expression in Note box
    31.       # Play here if you want to change the setting method
    32.       NOTE_REGEXP = /<(?:HiddenSkillSwitch|HiddenItemSwitch|hidskill|hiditem):\s*(?<switch_id>\d+)\s*>/
    33.     end
    34.   end
    35. end
    36. class RPG::BaseItem
    37.   #--------------------------------------------------------------------------
    38.   # ● Are item switchable in the list?
    39.   #--------------------------------------------------------------------------
    40.   def torigoya_visible_in_list?
    41.     unless instance_variable_defined?(:@torigoya_visible_in_list_switch)
    42.       match = note.match(Torigoya::HiddenSkillSwitch::Config::NOTE_REGEXP)
    43.       @torigoya_visible_in_list_switch = match ? match[:switch_id].to_i : 0
    44.     end
    45.     @torigoya_visible_in_list_switch ? !$game_switches[@torigoya_visible_in_list_switch] : true
    46.   end
    47. end
    48. class Game_BattlerBase
    49.   #--------------------------------------------------------------------------
    50.   # ● Skill/Item availability (alias)
    51.   #--------------------------------------------------------------------------
    52.   alias torigoya_hidden_skill_switch_usable? usable?
    53.   def usable?(item)
    54.     return false unless torigoya_hidden_skill_switch_usable?(item)
    55.     item.torigoya_visible_in_list?
    56.   end
    57. end
    58. class Window_ItemList < Window_Selectable
    59.   #--------------------------------------------------------------------------
    60.   # ● Whether to include items in the list (alias)
    61.   #--------------------------------------------------------------------------
    62.   alias torigoya_hidden_skill_switch_include? include?
    63.   def include?(item)
    64.     return false unless torigoya_hidden_skill_switch_include?(item)
    65.     item && item.torigoya_visible_in_list?
    66.   end
    67. end
    68. class Window_SkillList < Window_Selectable
    69.   #--------------------------------------------------------------------------
    70.   # ● Whether to include items in the list (alias)
    71.   #--------------------------------------------------------------------------
    72.   alias torigoya_hidden_skill_switch_include? include?
    73.   def include?(item)
    74.     return false unless torigoya_hidden_skill_switch_include?(item)
    75.     item && item.torigoya_visible_in_list?
    76.   end
    77. end
    复制代码


    Credit and Thanks
    - Original Author: Rutan

    License - Public Domain, this means commercial use is allow and credit is not necessary

    Source
    https://github.com/rutan/torigoya_rpg_maker_vxace_rgss3


    本贴来自国际rpgmaker官方论坛作者:ovate处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/hidden-skill-item-switch.117633/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 11:36 , Processed in 0.102929 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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