TywinLannister2
Member
Breath of Fire 3 - Enemy Skill System
Version 1.0
By TywinLannister
Screenshots
None needed this time!
What it does
This script emulates the "watch enemy" system in Breath of Fire 3. That is, if an enemy uses a skill which you can learn in battle and one or more of your party is defending, there is a chance that one of your defending party members will learn the skill being used.
Version History
Version 1.0
Initial Release
Download Link
http://www.sendspace.com/file/fg5gr2
Thanks
ElementalCrisis for a simple yet effective side view battle system!
Fomar 0153 - the blue mage script came in handy.
Customising
Create a new element and call it enemy skill or whatever - make note of its id!
On line 46 of the script - ENEMY_SKILL_ELEMENT_ID = 17; change the number to your element id
on line 47 of the script - CHANCE_TO_LEARN = 100; change this to what you want the percentage chance of learning the skill to be.
Now for the skills, create a skill that your party will be able to learn and give it the enemy skill element.
Script
Version 1.0
By TywinLannister
Screenshots
None needed this time!
What it does
This script emulates the "watch enemy" system in Breath of Fire 3. That is, if an enemy uses a skill which you can learn in battle and one or more of your party is defending, there is a chance that one of your defending party members will learn the skill being used.
Version History
Version 1.0
Initial Release
Download Link
http://www.sendspace.com/file/fg5gr2
Thanks
ElementalCrisis for a simple yet effective side view battle system!
Fomar 0153 - the blue mage script came in handy.
Customising
Create a new element and call it enemy skill or whatever - make note of its id!
On line 46 of the script - ENEMY_SKILL_ELEMENT_ID = 17; change the number to your element id
on line 47 of the script - CHANCE_TO_LEARN = 100; change this to what you want the percentage chance of learning the skill to be.
Now for the skills, create a skill that your party will be able to learn and give it the enemy skill element.
Script
Code:
#==============================================================================
# ** Tywin_Enemy_Skills
#------------------------------------------------------------------------------
# © TywinLannister, 2008
# 27/03/08
# Version 1.0
#------------------------------------------------------------------------------
# INSTRUCTIONS:
# - Paste this above main
# VERSION HISTORY:
# - 1.0 (27/03/08), Initial release.
#==============================================================================
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
class Game_Party
#--------------------------------------------------------------------------
# * Alias listings
#--------------------------------------------------------------------------
alias tywin_skill_initialize initialize
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :enemy_skills_learned # enemy skills already learned by the party.
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
tywin_skill_initialize
@enemy_skills_learned = []
end
end
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
class Scene_Battle
#--------------------------------------------------------------------------
# * Constants
#--------------------------------------------------------------------------
ENEMY_SKILL_ELEMENT_ID = 17
CHANCE_TO_LEARN = 100
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias tywin_skill_execute_action_skill execute_action_skill
#--------------------------------------------------------------------------
# * Execute Battle Action: Skill
#--------------------------------------------------------------------------
def execute_action_skill
tywin_skill_execute_action_skill
defending_members = []
chance_to_learn = CHANCE_TO_LEARN
skill = @active_battler.action.skill
if skill.element_set.include?(ENEMY_SKILL_ELEMENT_ID)
if not $game_party.enemy_skills_learned.include?(skill.id)
for member in $game_party.existing_members
if member.guarding?
defending_members.push(member)
end
end
end
end
if defending_members.size > 0
learn_chance = rand(100)
if learn_chance < chance_to_learn
member_to_learn = defending_members[rand(defending_members.size)]
member_to_learn.learn_skill(skill.id)
$game_party.enemy_skills_learned.push(skill.id)
wait(10)
@message_window.add_instant_text(member_to_learn.name + " learns " + skill.name)
wait(60)
end
end
end
end