Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Breath of Fire 3 - Enemy Skill System
TywinLannister
post Mar 27 2008, 02:29 PM
Post #1


Level 3
Group Icon

Group: Member
Posts: 34
Type: Scripter
RM Skill: Skilled




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
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
Go to the top of the page
 
+Quote Post
   
SarunPhin
post Mar 29 2008, 05:55 AM
Post #2



Group Icon

Group: Member
Posts: 1
Type: None
RM Skill: Undisclosed




Very nice cuz i was going to do a BOF spin off as well.... But can u give skills u learn to other party members and can one person learn it only?!!

Once agin Good job
Go to the top of the page
 
+Quote Post
   
Kinnison
post Mar 29 2008, 05:57 AM
Post #3


The not-so-revolutionary guy
Group Icon

Group: Revolutionary
Posts: 162
Type: Event Designer
RM Skill: Masterful




Awesome, I think BOF4 also have the same kind of feature.


__________________________
[Show/Hide] Current Game Project:

[Show/Hide] On Hold:
Go to the top of the page
 
+Quote Post
   
illustrationism
post Mar 29 2008, 09:38 PM
Post #4


Level 3
Group Icon

Group: Member
Posts: 40
Type: Musician
RM Skill: Advanced




This is very cool. A nice simple little addition (my favorite kind). smile.gif


__________________________
Go to the top of the page
 
+Quote Post
   
LrdOfNightmares
post Mar 30 2008, 01:34 AM
Post #5


Level 4
Group Icon

Group: Member
Posts: 51
Type: Developer
RM Skill: Skilled




BREATH OF FIRE RULES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Warned for spamming. Thanks!


__________________________


"A dragon unto you is like you unto an insect. To an insect, you are as powerful as a god. Do you really believe that you can defeat a god?"
Go to the top of the page
 
+Quote Post
   
luciddose
post Mar 30 2008, 02:01 PM
Post #6



Group Icon

Group: Member
Posts: 4
Type: None
RM Skill: Undisclosed




Wow truly amazing script - thanks and keep up the good work!
Go to the top of the page
 
+Quote Post
   
TywinLannister
post Mar 30 2008, 03:45 PM
Post #7


Level 3
Group Icon

Group: Member
Posts: 34
Type: Scripter
RM Skill: Skilled




@SarunPhin: Yup, i'm going to implement the feature where you can change skills between different party members at some point! working on another BOF script at the mo though which i want to finish and get out there!

@illustrationism: I wish all of the additions i have planned were as simple, lol! unfortunately not though!!!!!

@all: cheers for the remarks! and keep an eye for future updates!
Go to the top of the page
 
+Quote Post
   
Tomo009
post Mar 30 2008, 08:54 PM
Post #8


Level 2
Group Icon

Group: Member
Posts: 26
Type: None
RM Skill: Undisclosed




my only question is, does this affect every party member? or can you chose which characters can learn them?
Go to the top of the page
 
+Quote Post
   
TywinLannister
post Mar 31 2008, 02:42 AM
Post #9


Level 3
Group Icon

Group: Member
Posts: 34
Type: Scripter
RM Skill: Skilled




@Tomo009: Only characters who are currently guarding are able to learn the skill. So if you want to guarantee only one party member will try and learn the skill, only defend with that member. Each skill can only be learned once.
Go to the top of the page
 
+Quote Post
   
Tomo009
post Mar 31 2008, 06:58 AM
Post #10


Level 2
Group Icon

Group: Member
Posts: 26
Type: None
RM Skill: Undisclosed




what i want to know is can u exempt someone from learning skills through that system using the script?
Go to the top of the page
 
+Quote Post
   
TywinLannister
post Mar 31 2008, 07:32 AM
Post #11


Level 3
Group Icon

Group: Member
Posts: 34
Type: Scripter
RM Skill: Skilled




@Tomo009: As it stands no. I never considered it as breath of fire doesn't exclude members from learning the skill, however, i have no problem at all inserting that functionality into the script for the next update!
Go to the top of the page
 
+Quote Post
   
Mefisno
post Apr 18 2008, 03:26 AM
Post #12


Is most likly drunk somewhere. But I'm sure he will get back
Group Icon

Group: Revolutionary
Posts: 165
Type: Event Designer
RM Skill: Advanced




can someone help me for some reason the script is not working ive created the Enemy skill element and inserted the script but i don't know whats going wrong.
i may have put it in the wrong place though i put it right at the top of Main.


__________________________
Go to the top of the page
 
+Quote Post
   
Mefisno
post Apr 18 2008, 03:53 AM
Post #13


Is most likly drunk somewhere. But I'm sure he will get back
Group Icon

Group: Revolutionary
Posts: 165
Type: Event Designer
RM Skill: Advanced




QUOTE (Mefisno @ Apr 18 2008, 02:40 AM) *
can someone help me for some reason the script is not working ive created the Enemy skill element and inserted the script but i don't know whats going wrong.
i may have put it in the wrong place though i put it right at the top of Main.



ok i have fixed my previous problem but now i get this error when my enemies use the enemy skill moves

Script "Main" line 63: NoMethodError occurred.
undefined method `include?" for nil:NilClass

can someone help me?

Hmm sorted it now it was just doing one of it's weird and wonderful things happy.gif

This post has been edited by Mefisno: Aug 14 2008, 11:50 AM


__________________________
Go to the top of the page
 
+Quote Post
   
Ahegil
post Dec 24 2008, 12:42 PM
Post #14



Group Icon

Group: Member
Posts: 1
Type: Artist
RM Skill: Skilled




when using this do you have to replicate the script for each enemy skill or can you just add a new line?
Go to the top of the page
 
+Quote Post
   
nevious
post Dec 29 2008, 04:42 PM
Post #15


Hyperfunctional Drive Modulator?
Group Icon

Group: Revolutionary
Posts: 337
Type: Artist
RM Skill: Advanced




this is a great script and i would love to use it.... save for one problem.... the fact that anyone defending can learn the skill... if there was a way to implement something in to the script to make it one person able to use it or maybe a certian class or someone using certian matiria or such things then that would be great... but i guess it will suffice for now... (not trying to imply the script is bad becouse its not its a great script) if someone could fix something like this please let me kno...


__________________________
Artist: Advanced
Musician: None
Scripter: Undisclosed
Writer: Beginner
Developer: None
Event Designer: Intermediate







[Show/Hide] Signatures








necroking nevious


Check out my Gallery!! (please leave comments constructive critizism helps. but please dont be rude.
My Gallery!!

Omegazions rougelike battlesystem in action


Go to the top of the page
 
+Quote Post
   
xtoothpickx
post Oct 22 2011, 07:04 PM
Post #16



Group Icon

Group: Member
Posts: 1
Type: None
RM Skill: Undisclosed




I too would like for this one to be more character specific. Maybe add a section that includes character id so only those characters can learn them. I THINK it would be a simple addition but im only still learning ruby.

Hope this isn't necroposting!
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 26th May 2013 - 01:29 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker