Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- #
- # ☆ $D13x - Hidden Skills
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Easy / Normal
- # -- Requires : N/A
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Hidden_Skills]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 15/o3/2o13 - Started, Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script simply hides a skill type from the actors usable skill list when
- # in battle. usefull for creating "passive" skills that can be seen from the
- # skill menu, but are not visible/usable in battle.
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- #===============================================================================
- # 1. You MUST give credit to "Dekita" !!
- # 2. You are NOT allowed to repost this script.(or modified versions)
- # 3. You are NOT allowed to convert this script.
- # 4. You are NOT allowed to use this script for Commercial games.
- # 5. ENJOY!
- #
- # "FINE PRINT"
- # By using this script you hereby agree to the above terms and conditions,
- # if any violation of the above terms occurs "legal action" may be taken.
- # Not understanding the above terms and conditions does NOT mean that
- # they do not apply to you.
- # If you wish to discuss the terms and conditions in further detail you can
- # contact me at http://dekitarpg.wordpress.com/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- #
- #===============================================================================
- # ☆ Notetags ( default )
- # For use with Class / Actor noteboxes !
- #-------------------------------------------------------------------------------
- # These notetags will hide a whole skill type.
- # <HIDDEN TYPES: id, id, id>...
- # <NO TYPE: id, id, id>...
- #
- # These notetags will hide an individual skill.
- # <HIDDEN SKILLS: id, id, id>..
- # <NO SKILL: id, id, id>..
- #
- # repalce id with the ids of the skill types you do not wish to be visable
- # in battle.
- #
- # Actor takes priority over class.
- #===============================================================================
- module Unusable_Skill
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Disabled Skill Default Settings
- #--------------------------------------------------------------------------
- # This is an array that hides all skill type id's within,
- # e.g [2, 3, 4] would hide skill type id 2, 3 and 4.
- Stype_id = [2]
- # This array hides specific skills id,
- # eg. [1, 2, 3] hides skills id 1, 2 and 3.
- Skill_id = [129]
- # Settings for notetags, incase they need changed.
- Notetag = {
- :types => /<(?:NO TYPE|HIDDEN TYPES):[ ](\d+(?:\s*,\s*\d+)*)>/i ,
- :skills => /<(?:no skill|hidden skills):[ ](\d+(?:\s*,\s*\d+)*)>/i ,
- }
- #####################
- # CUSTOMISATION END #
- end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- if !$D13x[:CORE]
- #===============================================================================
- module DataManager
- #===============================================================================
- #--------------------------------------------------------------------------
- # Alias List
- #--------------------------------------------------------------------------
- class << self
- alias :load_database_hide :load_database
- end
- #--------------------------------------------------------------------------
- # Load Database
- #--------------------------------------------------------------------------
- def self.load_database
- load_database_hide
- load_notetags_hide
- end
- #--------------------------------------------------------------------------
- # Load Notetags
- #--------------------------------------------------------------------------
- def self.load_notetags_hide
- for obj in $data_classes
- next if obj.nil?
- obj.load_skill_hide
- end
- for obj in $data_actors
- next if obj.nil?
- obj.load_skill_hide
- end
- end
- end # DataManager
- end # if !$D13x[:CORE]
- #==============================================================================
- class RPG::Class < RPG::BaseItem
- #==============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- alias :deki__hide_load :load_unique_shit if $D13x[:CORE]
- #---------------------------------------------------------------------------
- # Pi Variables
- #---------------------------------------------------------------------------
- attr_accessor :hidden_skill_types
- attr_accessor :hidden_skills
- #---------------------------------------------------------------------------
- # load unique shit
- #---------------------------------------------------------------------------
- def load_unique_shit
- deki__hide_load if $D13x[:CORE]
- load_skill_hide
- end
- #--------------------------------------------------------------------------
- # Load All Hidden Skills
- #--------------------------------------------------------------------------
- def load_skill_hide
- @hidden_skill_types = []
- @hidden_skills = []
- Unusable_Skill::Stype_id.each do |this|
- @hidden_skill_types << this
- end
- Unusable_Skill::Skill_id.each do |this|
- @hidden_skills << this
- end
- self.note.split(/[\r\n]+/).each do |line|
- case line
- when Unusable_Skill::Notetag[:types]
- @hidden_skill_types = []
- $1.scan(/\d+/).each { |num|
- @hidden_skill_types << num.to_i if num.to_i > 0 }
- when Unusable_Skill::Notetag[:skills]
- @hidden_skills = []
- $1.scan(/\d+/).each { |num|
- @hidden_skills << num.to_i if num.to_i > 0 }
- end
- end
- end
- end # RPG::Class
- #==============================================================================
- class RPG::Actor < RPG::BaseItem
- #==============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- alias :deki__hide_load :load_unique_shit if $D13x[:CORE]
- #---------------------------------------------------------------------------
- # Pi Variables
- #---------------------------------------------------------------------------
- attr_accessor :hidden_skill_types
- attr_accessor :hidden_skills
- #---------------------------------------------------------------------------
- # load unique shit
- #---------------------------------------------------------------------------
- def load_unique_shit
- deki__hide_load if $D13x[:CORE]
- load_skill_hide
- end
- #--------------------------------------------------------------------------
- # Load All Hidden Skills
- #--------------------------------------------------------------------------
- def load_skill_hide
- @hidden_skill_types = []
- @hidden_skills = []
- Unusable_Skill::Stype_id.each do |this|
- @hidden_skill_types << this
- end
- Unusable_Skill::Skill_id.each do |this|
- @hidden_skills << this
- end
- self.note.split(/[\r\n]+/).each do |line|
- case line
- when Unusable_Skill::Notetag[:types]
- @hidden_skill_types = []
- $1.scan(/\d+/).each { |num|
- @hidden_skill_types << num.to_i if num.to_i > 0 }
- when Unusable_Skill::Notetag[:skills]
- @hidden_skills = []
- $1.scan(/\d+/).each { |num|
- @hidden_skills << num.to_i if num.to_i > 0 }
- end
- end
- end
- end # RPG::Actor
- #==============================================================================
- class Game_Actor < Game_Battler
- #==============================================================================
- #---------------------------------------------------------------------------
- # Get hidden_skill_types
- #---------------------------------------------------------------------------
- def hidden_skill_types
- set = self.class.hidden_skill_types
- if actor.hidden_skill_types != set
- set = actor.hidden_skill_types
- end
- set
- end
- #---------------------------------------------------------------------------
- # Get hidden_skills
- #---------------------------------------------------------------------------
- def hidden_skills
- set = self.class.hidden_skills
- if actor.hidden_skills != set
- set = actor.hidden_skills
- end
- set
- end
- end
- #==============================================================================
- class Window_ActorCommand < Window_Command
- #==============================================================================
- #--------------------------------------------------------------------------
- # Add Skill Command to List
- #--------------------------------------------------------------------------
- def add_skill_commands
- @actor.added_skill_types.sort.each do |stype_id|
- next if @actor.hidden_skill_types.include?(stype_id)
- name = $data_system.skill_types[stype_id]
- add_command(name, :skill, true, stype_id)
- end
- end
- end
- #==============================================================================
- class Window_BattleSkill < Window_SkillList
- #==============================================================================
- #--------------------------------------------------------------------------
- # Include in Skill List?
- #--------------------------------------------------------------------------
- def include?(item)
- super && !@actor.hidden_skills.include?(item.id)
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement