Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Skill Amount

Misea

Member

Hello, first post, long time lurker.:D

Now to the point.;)
I'm using a Blue Mage script, and I would like to know how to turn on an in-game swith when you learn all the skills in the game. Help would be appreciated!

Thanks in advance!
 

Misea

Member

Code:
#==============================================================================
# Individual Character Development - Blue Mage by Fomar0153
#==============================================================================
class Game_Party
  attr_accessor :icd_blue_mages
  attr_accessor :icd_blue_mages_all_skills
  attr_accessor :icd_blue_mages_skills
 
  alias fomar_icd_blue_mage_initialize initialize
  def initialize
    fomar_icd_blue_mage_initialize
    @icd_blue_mages = [1]
    @icd_blue_mages_all_skills = true
    @icd_blue_mages_skills = []
  end
end
class Game_Actor < Game_Battler
 
  def skill_effect(user, skill)
    super(user, skill)
    if $game_party.icd_blue_mages.include?(self.id)
      unless $game_party.icd_blue_mages_all_skills == true
        if $game_party.icd_blue_mages_skills.include?(skill.id)
          self.learn_skill(skill.id)
        end
      else
        self.learn_skill(skill.id)
      end
    end
  end
 
end

Credit goes to Fomar0153 for making this script.

And Actor 1 (Hero with ID#1 in the database) is the only Blue Mage.


I know I could do it with Fork conditions, but that's going to take forever, so is there some scripting snippet that's an advanced Fork Condition? It's might be simple, but I'm not so great in scripting:$ .
 
Or just make a method like this:
Code:
def blue_magic_learned_all?
  amount = 0
  for i in 1...$data_skills.size
    if @skills.include?(i)
      amount += 1
    end
  end
  if amount == $data_skills.size - 1
    return true
  else
    return false
  end
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top