Original Source
- Original title: Hidden Skill/ Item Switch
- Original author: ovate
- Original date: January 26, 2020
- Source thread: https://forums.rpgmakerweb.com/threads/hidden-skill-item-switch.117633/
- Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSS3 Scripts (RMVX Ace)
Summary
Hidden Skill Switch 2019/12/15 Creator name: Ru/むっくRu (Rutan)Introduction Possible to create hidden skill/items with a switch through note tag. If specified switch is ON, certain skill/ item won't show in the list (unusable)
Archived First Post
Creator name: Ru/むっくRu (Rutan)
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
# encoding: utf-8
#===============================================================================
# ■ Hidden Skill Switch
#-------------------------------------------------------------------------------
# 2019/12/15 Ruたん
# License - Public Domain, allows commercial use and credit is not necessary
#-------------------------------------------------------------------------------
# If specified switch is ON, certain skill/ item won't show in the list (unusable)
# Possible to create hidden skill/items with a switch through note tag
#
# <Usage>
# Put the following tag in the Note box for skill or item
#
# <hidskill: 1>
#
# Or
#
# <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)
#-------------------------------------------------------------------------------
# 【Changelog】
# 2019/12/15 Released
#-------------------------------------------------------------------------------
module Torigoya
module HiddenSkillSwitch
module Config
# [Advanced setting] Regular expression in Note box
# Play here if you want to change the setting method
NOTE_REGEXP = /<(?:HiddenSkillSwitch|HiddenItemSwitch|hidskill|hiditem):\s*(?<switch_id>\d+)\s*>/
end
end
end
class RPG::BaseItem
#--------------------------------------------------------------------------
# ● Are item switchable in the list?
#--------------------------------------------------------------------------
def torigoya_visible_in_list?
unless instance_variable_defined?(:@torigoya_visible_in_list_switch)
match = note.match(Torigoya::HiddenSkillSwitch::Config::NOTE_REGEXP)
@torigoya_visible_in_list_switch = match ? match[:switch_id].to_i : 0
end
@torigoya_visible_in_list_switch ? !$game_switches[@torigoya_visible_in_list_switch] : true
end
end
class Game_BattlerBase
#--------------------------------------------------------------------------
# ● Skill/Item availability (alias)
#--------------------------------------------------------------------------
alias torigoya_hidden_skill_switch_usable? usable?
def usable?(item)
return false unless torigoya_hidden_skill_switch_usable?(item)
item.torigoya_visible_in_list?
end
end
class Window_ItemList < Window_Selectable
#--------------------------------------------------------------------------
# ● Whether to include items in the list (alias)
#--------------------------------------------------------------------------
alias torigoya_hidden_skill_switch_include? include?
def include?(item)
return false unless torigoya_hidden_skill_switch_include?(item)
item && item.torigoya_visible_in_list?
end
end
class Window_SkillList < Window_Selectable
#--------------------------------------------------------------------------
# ● Whether to include items in the list (alias)
#--------------------------------------------------------------------------
alias torigoya_hidden_skill_switch_include? include?
def include?(item)
return false unless torigoya_hidden_skill_switch_include?(item)
item && item.torigoya_visible_in_list?
end
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
Features Mentioned
- 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:
- 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)
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
# License - Public Domain, allows commercial use and credit is not necessary #------------------------------------------------------------------------------- # If specified switch is ON, certain skill/ item won't show in the list (unusable) # Possible to create hidden skill/items with a switch through note tag
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...