Main Menu
  • Welcome to The RPG Maker Resource Kit.

[REQUEST] Adapting Blue Magic to GTBS

Started by merryjest, May 22, 2011, 08:16:07 AM

0 Members and 1 Guest are viewing this topic.

merryjest

I've found Fomar's lovely Blue Magic script, as posted by Jet in his collection. However, the script as it is doesn't work with GubiD's Tactical Battle System. Would anyone be willing to undertake the task to adapt the Blue Magic script (posted here) to the system?

#===============================================================================
# Blue Magic Snippet
# By Jet10985 (Jet)
# Original Code by: Fomar0153
#===============================================================================
# This snippet will allow you to use to create a blue mage-type character. This
# means that the character will learn special enemy skills when they are used on
# the blue mage.
# This script has: 2 customization option.
#===============================================================================
=begin
How To Make Blue Skills:

In the database, go to the "Skills Tab". In the bottom-right corner is the note
box. Input the following text into the notebox on it's own seperate line:

<blue magic>

Be sure to include the <>

=end


module BlueMagic
 
  BLUE_ACTORS = [2, 5] # What actors are blue mages? Leave as [] for none.
 
  BLUE_CLASSES = [] # What classes are blue mages? Leave as [] for none.
 
end

#===============================================================================
# DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
#===============================================================================
class Game_Actor
 
  include BlueMagic
 
  def blue_mage?
    return true if BLUE_ACTORS.include?(self.id)
    return true if BLUE_CLASSES.include?(self.class_id)
    return false
  end
end

module Jet
  def self.check_note_tags(obj, tag)
    obj.note.each_line { |notetag|
    case notetag
    when tag
      return true
    end
    }
    return false
  end
end

module RPG
  class Skill
   
    def blue_magic?
      if @blue.nil?
        txt = Jet.check_note_tags(self, /<(?:blue magic)>/i)
        @blue = txt
      end
      return @blue
    end
  end
end
   
class Scene_Battle
 
  alias jet3243_execute_action_skill execute_action_skill unless $@
  def execute_action_skill
    jet3243_execute_action_skill   
    skill = @active_battler.action.skill
    targets = @active_battler.action.make_targets
    for target in targets
      if target.actor? && target.blue_mage? && skill.blue_magic?
        target.learn_skill(skill.id) unless target.skill_learn?(skill)
        @message_window.add_instant_text(target.name + " learns " + skill.name)
        wait(60)
      end
    end
  end
end

unless $engine_scripts.nil?
  JetEngine.active("Blue Magic", 1)
end 


Infinate X

I know with some script edit all you do is take the module name of the battle system (near the top, may say something like Module Gubid) and adding it near the top of blue magic snippet

pacdiggity

No, that wouldn't do any good because the script refers to the module. All that'd do is have more constants wandering around in the module that aren't used at all. You'd actually need to change the script.
it's like a metaphor or something i don't know