Blue Mage Script help
#1
So i'm trying to create a blue mage character. I've got a script for that allows me to choose the id numbers for blue magic and choose the ids of the sctors that are blue mages. The blue mage will learn a skill when attacked only. To get around the issue of enemy's not using helping skills on the mage (such as white wind from final fantasy) i have a script for a skill that controls the enemy (actually they just become an ally and can't be controlled) and they will use the healling skill, but the Blue Mage wont learn it even though it's working on them. Looking at the blue mage script it looks like it only set up to learn on a "hit", but i don't know how to add it for other skills like healling or status changing ones. Here the script im using

Code:
=begin
Fomar0153's Blue Mages Script

Changle Log
----------------------
1.0 -> 1.1 : Added notification when learning a new Skill
----------------------
Known bugs
----------------------
None
=end

class Game_Actor < Game_Battler

  # Edit to include the actor (character) id
  BlueMages = [1]
  # Edit to include all the skill ids of the skills you want your
  # blue mages to learn
  BlueMagic = [23, 26]

  #--------------------------------------------------------------------------
  # ● Aliased make_damage_value
  #--------------------------------------------------------------------------
  alias bluemagic_make_damage_value make_damage_value
  def make_damage_value(user, item)
    bluemagic_make_damage_value(user, item)
    if @result.hit? and item.class == RPG::Skill
      if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
        i = @skills.size
        learn_skill(item.id)
        if !(i == @skills.size)
          SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
        end
      end
    end
  end
end

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # ● New method add_text
  #--------------------------------------------------------------------------
  def add_text(text)
    @log_window.add_text(text)
  end
end
Reply }
#2
Anyone? Echo.... echo........ echo........ echo..........
Reply }
#3
you should ask DerVVulfmann bout this maybe?
"Turning iron ore into iron swords is a hard process, for one must first dig out the rock, and melt it to refine it, then one must pour that metal into a mould, let it cool a bit, and pound on it while it cools even further. Games are no different." - Ahzoh

Universal Declaration of Human Rights in Vrkhazhian
ʾEšol ḵavud ʾelẕakud lav ʾezʾaẕud zwazaršeru ya lit žalneru lav lit t͛enud. Ṗal sa-ražheru lav raržižu paplam lav ṗal widsaṟam bemaḵu šuku lit ʾeyṭu waẏnilaẇ.
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Reply }
#4
I've figured it out on my own. adding the following gave me what i was looking for:

Code:
#--------------------------------------------------------------------------
  # ● Aliased item_effect_recover_hp
  #--------------------------------------------------------------------------
  alias bluemagic_item_effect_recover_hp item_effect_recover_hp
  def item_effect_recover_hp(user, item, effect)
    bluemagic_item_effect_recover_hp(user, item, effect)
    if @result.hit? and item.class == RPG::Skill
      if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
        i = @skills.size
        learn_skill(item.id)
        if !(i == @skills.size)
          SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
        end
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # ● Aliased item_effect_recover_mp
  #--------------------------------------------------------------------------
  alias bluemagic_item_effect_recover_mp item_effect_recover_mp
  def item_effect_recover_mp(user, item, effect)
    bluemagic_item_effect_recover_mp(user, item, effect)
    if @result.hit? and item.class == RPG::Skill
      if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
        i = @skills.size
        learn_skill(item.id)
        if !(i == @skills.size)
          SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
        end
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # ● Aliased item_effect_gain_tp
  #--------------------------------------------------------------------------
  alias bluemagic_item_effect_gain_tp item_effect_gain_tp
  def item_effect_gain_tp(user, item, effect)
    bluemagic_item_effect_gain_tp(user, item, effect)
    if @result.hit? and item.class == RPG::Skill
      if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
        i = @skills.size
        learn_skill(item.id)
        if !(i == @skills.size)
          SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
        end
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # ● Aliased item_effect_add_state
  #--------------------------------------------------------------------------
  alias bluemagic_item_effect_add_state item_effect_add_state
  def item_effect_add_state(user, item, effect)
    bluemagic_item_effect_add_state(user, item, effect)
    if @result.hit? and item.class == RPG::Skill
      if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
        i = @skills.size
        learn_skill(item.id)
        if !(i == @skills.size)
          SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
        end
      end
    end
  end
    
  #--------------------------------------------------------------------------
  # ● Aliased item_effect_remove_state
  #--------------------------------------------------------------------------
  alias bluemagic_item_effect_remove_state item_effect_remove_state
  def item_effect_remove_state(user, item, effect)
    bluemagic_item_effect_remove_state(user, item, effect)
    if @result.hit? and item.class == RPG::Skill
      if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
        i = @skills.size
        learn_skill(item.id)
        if !(i == @skills.size)
          SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
        end
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # ● Aliased item_effect_add_buff
  #--------------------------------------------------------------------------
  alias bluemagic_item_effect_add_buff item_effect_add_buff
  def item_effect_add_buff(user, item, effect)
    bluemagic_item_effect_add_buff(user, item, effect)
    if @result.hit? and item.class == RPG::Skill
      if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
        i = @skills.size
        learn_skill(item.id)
        if !(i == @skills.size)
          SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
        end
      end
    end
  end
    
  #--------------------------------------------------------------------------
  # ● Aliased item_effect_add_debuff
  #--------------------------------------------------------------------------
  alias bluemagic_item_effect_add_debuff item_effect_add_debuff
  def item_effect_add_debuff(user, item, effect)
    bluemagic_item_effect_add_debuff(user, item, effect)
    if @result.hit? and item.class == RPG::Skill
      if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
        i = @skills.size
        learn_skill(item.id)
        if !(i == @skills.size)
          SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
        end
      end
    end
  end
Reply }
#5
Happy Ahhh... we learn by doing. And you got to it before anyone here had a CHANCE to help. Nice.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#6
what makes a blue wizard different than any other?
"Turning iron ore into iron swords is a hard process, for one must first dig out the rock, and melt it to refine it, then one must pour that metal into a mould, let it cool a bit, and pound on it while it cools even further. Games are no different." - Ahzoh

Universal Declaration of Human Rights in Vrkhazhian
ʾEšol ḵavud ʾelẕakud lav ʾezʾaẕud zwazaršeru ya lit žalneru lav lit t͛enud. Ṗal sa-ražheru lav raržižu paplam lav ṗal widsaṟam bemaḵu šuku lit ʾeyṭu waẏnilaẇ.
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Reply }
#7
They learn the skills they're attacked by. Dunno why they call it Blue Mage.... just sum it up as a Skill Learning script.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#8
it should be called move-mimic, and this sound pretty cool then.
"Turning iron ore into iron swords is a hard process, for one must first dig out the rock, and melt it to refine it, then one must pour that metal into a mould, let it cool a bit, and pound on it while it cools even further. Games are no different." - Ahzoh

Universal Declaration of Human Rights in Vrkhazhian
ʾEšol ḵavud ʾelẕakud lav ʾezʾaẕud zwazaršeru ya lit žalneru lav lit t͛enud. Ṗal sa-ražheru lav raržižu paplam lav ṗal widsaṟam bemaḵu šuku lit ʾeyṭu waẏnilaẇ.
All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.
Reply }
#9
http://finalfantasy.wikia.com/wiki/Blue_Mage
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 2 71 11-20-2024, 03:09 AM
Last Post: JayRay
   Script compatibility help Lord Vectra 3 4,605 07-25-2021, 11:42 PM
Last Post: DerVVulfman
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 15,854 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   "Wait" in the script Whisper 13 16,172 04-28-2020, 04:06 PM
Last Post: Whisper
   Skill Cooldown script Fenriswolf 11 16,457 12-10-2019, 11:10 AM
Last Post: Fenriswolf
   Help iwth script (RGSS Player crash) Whisper 3 8,535 06-17-2017, 05:03 PM
Last Post: Whisper
   Help modifying a script Keeroh 7 10,222 06-11-2017, 04:43 PM
Last Post: DerVVulfman
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 9,859 05-31-2017, 05:10 AM
Last Post: Zachariad
   Actor names in Quest Script jreagan406 5 8,644 03-07-2017, 08:06 AM
Last Post: JayRay
   Bizarre issue with Lanzer counter script. Steel Beast 6Beets 2 7,249 10-04-2016, 11:46 AM
Last Post: Steel Beast 6Beets



Users browsing this thread: 1 Guest(s)