State Requirement Skills
Authors: [Faint]
Version: 1.0
Type: Skill Add-On
Key Term: Custom Skill System
IntroductionSimple script that allows you to set state requirements for skills.
Features
ScreenshotsN/A
DemoN/A
Script
#*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=#
# State Requirement Skills #
# Author: [Faint] #
# Version: 1.0 #
# Date: 11/10/2009 #
#*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=#
# #
# This Add-on allows you to make skills require a specified state to be #
# inflicted upon the actor before they can use said skill. #
#*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=#
module SRConfigs
def self.req_state(id)
case id
#*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=#
# Configs #
# #
# when SKILL_ID then return REQUIRED_STATE_ID #
# SKILL_ID - ID of the Skill. #
# REQUIRED_STATE_ID - ID of the State required to use the Skill. #
#*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=#
when 1 then return 17
end
return
end
end
#==============================================================================#
# Game_Battler #
#==============================================================================#
class Game_Battler
alias state_met? skill_can_use?
def skill_can_use?(skill_id)
data = SRConfigs.req_state(skill_id)
return data != nil && !self.state?(data) ? false : state_met?(skill_id)
end
end
InstructionsPlace above Main.
CompatibilityNo none compatibility issues.
Credits and Thanks
- Everyone here at chaos-project that has helped me out in understanding RGSS.
Author's NotesWoot for first working script.