Help by editing a Yanfly scrip (Steal skill)

Binder28

Veteran
Veteran
Joined
Sep 15, 2020
Messages
38
Reaction score
6
First Language
Portuguese
Primarily Uses
RMVXA
Hello...I am making a game where you would have a class like FF's blue mage/fencer class, the one where you can steal enemies skill..and I've found a script for it...Yanfly's steal skill


The problem is thatwhen you steal the skill only one actor gets the stolen skill, and I want that when you use the steal skill every actor learns it...I don't wantavery actor to steal the same skill...

Anyway here is the script...thanks for the help

Edit: I've tried posting the script directly here but it didn't work...so please use the link above...I don't know how to do stuff yet =( )
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,574
Reaction score
542
First Language
English
Primarily Uses
RMVXA
every actor learns it
Tested
Ruby:
class Scene_Battle < Scene_Base
 
  def apply_skill_steal(target, item)
    return unless item.skill_steal
    return if target.actor?
    return unless @subject.actor?
    for skill in target.stealable_skills
      for i in 0...$game_party.battle_members.size
        @subject = $game_party.battle_members[i]
        next if @subject.skill_learn?(skill)
        @subject.learn_skill(skill.id)
        string = YEA::SKILL_STEAL::MSG_SKILL_STEAL
        skill_text = sprintf("\\i[%d]%s", skill.icon_index, skill.name)
        text = sprintf(string, @subject.name, skill_text, target.name)
        @log_window.add_text(text)
        YEA::SKILL_STEAL::MSG_DURATION.times do @log_window.wait end
        @log_window.back_one
      end
    end
  end
 
end
 

Binder28

Veteran
Veteran
Joined
Sep 15, 2020
Messages
38
Reaction score
6
First Language
Portuguese
Primarily Uses
RMVXA

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I really get the feeling I should be doing regular YouTube videos whenever I make something cool in my game, instead of waiting for massive changes. But not going to lie... I always feel like it's never quite enough to merit an update, until it's a drastic change. :kaoswt:
Going to submit to this game jam...struggling with the time crunch...
Have to keep compromising...
Just released a new OST for my game and a new place to purchase it!

Ah, things to do when you finish a game.
Ami
Me: It's dark cloudy! I hope it's Rain…
(2-3 Hours Later,Changed To Sunny)
Me: :kaolivid:
EpicFILE wrote on Dr_Bonehead's profile.
Dr_Bonehead? You're in this forum too? :D

Forum statistics

Threads
104,537
Messages
1,007,011
Members
136,031
Latest member
fontschoice
Top