zornsthorne
Member
Ive just been able to get this KGC script to be compatible with my other scripts.
But I am now asking if there are any good scripters out there that would be able to tell me where to put
the skill ids and status id so that the script will take effect.
here is the script
and here is the link to the script:
http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/tech_xp/skill/conditional_skill_xp.html
I am in no way advertising this website it is just there for additional information for people try to help me out.
But I am now asking if there are any good scripters out there that would be able to tell me where to put
the skill ids and status id so that the script will take effect.
here is the script
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆æ¡ä»¶ä»˜ãスã‚ル ï¼ KGC_ConditionalSkillâ—†
#_/----------------------------------------------------------------------------
#_/ スã‚ルã«ç‰¹æ®Šãªä½¿ç”¨æ¡ä»¶ã‚’è¿½åŠ ã—ã¾ã™ã€‚
#_/ Adding special requirements to skills.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
$imported = {} if $imported == nil
$imported["ConditionalSkill"] = true
if $game_special_elements == nil
$game_special_elements = {}
$data_system = load_data("Data/System.rxdata")
end
# 使用æ¡ä»¶å±žæ€§
$game_special_elements["skill_condition"] =
/スã‚ルæ¡ä»¶([AHSW])[ ]*((?:[+\-]?\d+[ ]*(?:,)?[ ]*)+)([A])?/i
#==============================================================================
# ■Game_Actor, Game_Enemy 共用モジュール
#==============================================================================
module KGC_Game_AE
#--------------------------------------------------------------------------
# ◠スã‚ルã®ä½¿ç”¨å¯èƒ½åˆ¤å®š
#--------------------------------------------------------------------------
if defined?(skill_can_use?) && !@_skill_can_use_conditionalskill
alias skill_can_use_KGC_ConditionalSkill? skill_can_use?
else
@_skill_can_use_conditionalskill = true
end
def skill_can_use?(skill_id)
result = true
# 使用æ¡ä»¶ç¢ºèª
$data_skills[skill_id].element_set.compact.each { |element|
if $game_special_elements["skill_condition"] =~ $data_system.elements[element]
result &= judge_skill_requirement($1.upcase, $2, $3 == "A" || $3 == "a")
end
}
if defined?(skill_can_use_KGC_ConditionalSkill?)
return result & skill_can_use_KGC_ConditionalSkill?(skill_id)
else
return result & super
end
end
#--------------------------------------------------------------------------
# â— æ¡ä»¶å‡¦ç†
# type : æ¡ä»¶å½¢å¼
# string : æ¡ä»¶æ–‡å—列
# all : å…¨æ¡ä»¶åˆ¤å®š
#--------------------------------------------------------------------------
def judge_skill_requirement(type, string, all)
result = all
conditions = (string.gsub(/ /) {""}).split(/,/)
case type
when "H" # HP
conditions.each { |c|
if c =~ /([+\-])?(\d+)/
result2 = true
if $1 != "-" # HP○%以上
result2 = false if self.hp * 100 / self.maxhp < $2.to_i
else # HP○%以下
result2 = false if self.hp * 100 / self.maxhp > $2.to_i
end
if all
result &= result2
else
result |= result2
end
end
}
when "W" # æ¦å™¨
if self.is_a?(Game_Actor)
# 装備æ¦å™¨ã‚’å–å¾—
if $imported["EquipExtension"]
if self.two_swords?
weapons = []
(0...self.ts_number).each { |i|
weapons << self.weapon_id(i)
}
else
weapons = [self.weapon_id]
end
else
weapons = [@weapon_id]
end
conditions.each { |c|
if c =~ /([+\-])?(\d+)/
result2 = true
# "-"ã§è£…å‚™ã—ã¦ã„ã‚‹ã€ã¾ãŸã¯"+"ã§è£…å‚™ã—ã¦ã„ãªã„å ´åˆã¯ä½¿ç”¨ä¸å¯
if ($1 == "-" && weapons.include?($2.to_i)) ||
($1 != "-" && !weapons.include?($2.to_i))
result2 = false
end
if all
result &= result2
else
result |= result2
end
end
}
end
when "A" # 防具
if self.is_a?(Game_Actor)
# 装備防具をå–å¾—
armors = []
(1...($imported["EquipExtension"] ? self.equip_type.size : 5)).each {|i|
armors = ($imported["EquipExtension"] ? self.armor_id : eval("@armor#{i}_id"))
}
conditions.each { |c|
if c =~ /([+\-])?(\d+)/
result2 = true
# "-"ã§è£…å‚™ã—ã¦ã„ã‚‹ã€ã¾ãŸã¯"+"ã§è£…å‚™ã—ã¦ã„ãªã„å ´åˆã¯ä½¿ç”¨ä¸å¯
if ($1 == "-" && armors.include?($2.to_i)) ||
($1 != "-" && !armors.include?($2.to_i))
result2 = false
end
if all
result &= result2
else
result |= result2
end
end
}
end
when "S" # ステート
conditions.each { |c|
if c =~ /([+\-])?(\d+)/
result2 = true
# "-"ã§ã‚¹ãƒ†ãƒ¼ãƒˆã«ã‹ã‹ã£ã¦ã„ã‚‹ã€ã¾ãŸã¯"+"ã§ã‹ã‹ã£ã¦ã„ãªã„å ´åˆã¯ä½¿ç”¨ä¸å¯
if ($1 == "-" && self.state?($2.to_i)) ||
($1 != "-" && !self.state?($2.to_i))
result2 = false
end
if all
result &= result2
else
result |= result2
end
end
}
end
return result
end
end
#==============================================================================
# â– Game_Actor
#==============================================================================
class Game_Actor
include KGC_Game_AE
end
#==============================================================================
# â– Game_Enemy
#==============================================================================
class Game_Enemy
include KGC_Game_AE
end
#_/  ◆æ¡ä»¶ä»˜ãスã‚ル ï¼ KGC_ConditionalSkillâ—†
#_/----------------------------------------------------------------------------
#_/ スã‚ルã«ç‰¹æ®Šãªä½¿ç”¨æ¡ä»¶ã‚’è¿½åŠ ã—ã¾ã™ã€‚
#_/ Adding special requirements to skills.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
$imported = {} if $imported == nil
$imported["ConditionalSkill"] = true
if $game_special_elements == nil
$game_special_elements = {}
$data_system = load_data("Data/System.rxdata")
end
# 使用æ¡ä»¶å±žæ€§
$game_special_elements["skill_condition"] =
/スã‚ルæ¡ä»¶([AHSW])[ ]*((?:[+\-]?\d+[ ]*(?:,)?[ ]*)+)([A])?/i
#==============================================================================
# ■Game_Actor, Game_Enemy 共用モジュール
#==============================================================================
module KGC_Game_AE
#--------------------------------------------------------------------------
# ◠スã‚ルã®ä½¿ç”¨å¯èƒ½åˆ¤å®š
#--------------------------------------------------------------------------
if defined?(skill_can_use?) && !@_skill_can_use_conditionalskill
alias skill_can_use_KGC_ConditionalSkill? skill_can_use?
else
@_skill_can_use_conditionalskill = true
end
def skill_can_use?(skill_id)
result = true
# 使用æ¡ä»¶ç¢ºèª
$data_skills[skill_id].element_set.compact.each { |element|
if $game_special_elements["skill_condition"] =~ $data_system.elements[element]
result &= judge_skill_requirement($1.upcase, $2, $3 == "A" || $3 == "a")
end
}
if defined?(skill_can_use_KGC_ConditionalSkill?)
return result & skill_can_use_KGC_ConditionalSkill?(skill_id)
else
return result & super
end
end
#--------------------------------------------------------------------------
# â— æ¡ä»¶å‡¦ç†
# type : æ¡ä»¶å½¢å¼
# string : æ¡ä»¶æ–‡å—列
# all : å…¨æ¡ä»¶åˆ¤å®š
#--------------------------------------------------------------------------
def judge_skill_requirement(type, string, all)
result = all
conditions = (string.gsub(/ /) {""}).split(/,/)
case type
when "H" # HP
conditions.each { |c|
if c =~ /([+\-])?(\d+)/
result2 = true
if $1 != "-" # HP○%以上
result2 = false if self.hp * 100 / self.maxhp < $2.to_i
else # HP○%以下
result2 = false if self.hp * 100 / self.maxhp > $2.to_i
end
if all
result &= result2
else
result |= result2
end
end
}
when "W" # æ¦å™¨
if self.is_a?(Game_Actor)
# 装備æ¦å™¨ã‚’å–å¾—
if $imported["EquipExtension"]
if self.two_swords?
weapons = []
(0...self.ts_number).each { |i|
weapons << self.weapon_id(i)
}
else
weapons = [self.weapon_id]
end
else
weapons = [@weapon_id]
end
conditions.each { |c|
if c =~ /([+\-])?(\d+)/
result2 = true
# "-"ã§è£…å‚™ã—ã¦ã„ã‚‹ã€ã¾ãŸã¯"+"ã§è£…å‚™ã—ã¦ã„ãªã„å ´åˆã¯ä½¿ç”¨ä¸å¯
if ($1 == "-" && weapons.include?($2.to_i)) ||
($1 != "-" && !weapons.include?($2.to_i))
result2 = false
end
if all
result &= result2
else
result |= result2
end
end
}
end
when "A" # 防具
if self.is_a?(Game_Actor)
# 装備防具をå–å¾—
armors = []
(1...($imported["EquipExtension"] ? self.equip_type.size : 5)).each {|i|
armors = ($imported["EquipExtension"] ? self.armor_id : eval("@armor#{i}_id"))
}
conditions.each { |c|
if c =~ /([+\-])?(\d+)/
result2 = true
# "-"ã§è£…å‚™ã—ã¦ã„ã‚‹ã€ã¾ãŸã¯"+"ã§è£…å‚™ã—ã¦ã„ãªã„å ´åˆã¯ä½¿ç”¨ä¸å¯
if ($1 == "-" && armors.include?($2.to_i)) ||
($1 != "-" && !armors.include?($2.to_i))
result2 = false
end
if all
result &= result2
else
result |= result2
end
end
}
end
when "S" # ステート
conditions.each { |c|
if c =~ /([+\-])?(\d+)/
result2 = true
# "-"ã§ã‚¹ãƒ†ãƒ¼ãƒˆã«ã‹ã‹ã£ã¦ã„ã‚‹ã€ã¾ãŸã¯"+"ã§ã‹ã‹ã£ã¦ã„ãªã„å ´åˆã¯ä½¿ç”¨ä¸å¯
if ($1 == "-" && self.state?($2.to_i)) ||
($1 != "-" && !self.state?($2.to_i))
result2 = false
end
if all
result &= result2
else
result |= result2
end
end
}
end
return result
end
end
#==============================================================================
# â– Game_Actor
#==============================================================================
class Game_Actor
include KGC_Game_AE
end
#==============================================================================
# â– Game_Enemy
#==============================================================================
class Game_Enemy
include KGC_Game_AE
end
and here is the link to the script:
http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/tech_xp/skill/conditional_skill_xp.html
I am in no way advertising this website it is just there for additional information for people try to help me out.