Blue, Geomancy E Level Skills

9 de dezembro de 2011

Blue, Geomancy E Level Skills é um script para o RPG Maker XP, feito por SephirothSpawn que incrementa bastante o sistema de habilidades (skills) em um jogo feito neste maker.

Blue Skills permitem que o herói aprenda novas skills quando o personagem é alvo de habilidade. Você pode controlar quais habilidades são Blue, quando os personagens podem aprendâ-las, que as classes a aprendem ou também você pode controlar manualmente os actors que aprendem os Blue Skills.

Geomancy dá aos personagens, habilidades determinadas pelo mapa atual ou tag do terreno. É customizável para cada actor mapa e terreno.

Level skills só vão fazer de alvo heróis que são divisíveis por este level. Ele lhe dá a opção de definir o nível de habilidades para todas as skills.

Níveis dos inimigos serão aleatoriamente definidos de acordo com a média do grupo ou de alguns poucos níveis. Se Dynamic Enemies System está presente, o nível é baseado disto.

Instruções: Coloque o script embaixo do SDK e acima do Main. O script tem maiores informações sobre como customizar os skills.

#==============================================================================
# ** Blue, Geomancy & Level Skills
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1
# 2006-08-24
#------------------------------------------------------------------------------
# * Description :
#
#   Blue Skills Allow you to learn new skills when character is targeted by
#   skill. You can control which skills are blue, when characters can learn
#   blue skills, which classes learn blue skills or manually control the
#   actors that learn blue skills.
#
#   Geomancy will give characters skills determinded by the current map or
#   terrain tags. Is customizable for each actor, map and terrain.
#
#   Level skills will only target people that are divisable by that level.
#   It gives you the option to set the skills level for any skills.
#
#   Enemy Levels - Enemy Levels will be randomly set depending on average
#                  party levels give or take a few levels. If Dynamic Enemies
#                  System exist, the level is based off that.
#------------------------------------------------------------------------------
# * Instructions :
#
#   Place The Script Below the SDK and Above Main.
#   To Customize your skills, refer to the customization instructions.
#------------------------------------------------------------------------------
# * Customization :
#
#   ** Blue Magic **
#
#   Setting Up "Blue Skills"
#    - Blue_Skills = [skill_id, skill_id, ...]
#   Setting Up Actors That Learn Blue Skills
#    - Blue_Skill_Actors = [actor_id, actor_id, ...]
#   Setting Up Classes That Learn Blue Skills
#    - Blue_Skill_Classes = [class_id, class_id, ...]
#   Setting Specific Actor During Game Play to Learn Blue Skills
#    - <game_actor>.learn_blue_skills = true (LEARN) or false (DON'T LEARN)
#
#   ** Geomancy **
#
#   Setting Up Map ID Skills (For Specific Actors)
#    - Geomancy_Actor_Map_ID_Skills = { 
#        actor_id => { map_id => [skill_id, ...], ... },
#        ...
#      }
#   Setting Up Terrain ID Skills (For Specific Actors)
#    - Geomancy_Actor_Terrain_Skills = {
#        actor_id => { terrain_id => [skill_id, ...], ...},
#        ...
#      }
#   Setting Up Up Map ID Class Skills (For Specific Class)
#    - Geomancy_Class_Map_ID_Skills = { 
#        class_id => { map_id => [skill_id, ...], ... },
#        ...
#      }
#   Setting Up Terrain ID Skills (For Specific Class)
#    - Geomancy_Class_Terrain_Skills = {
#        class_id => { terrain_id => [skill_id, ...], ...},
#        ...
#      }
#
#   ** Level Skills **
#
#   Setting Up Skills That Use Level
#    - Level_Based_Skills = { skill_id => skill_level, ... }
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Blue, Geomancy & Level Skills', 'SephirothSpawn', 1, '2006-08-24')

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Blue, Geomancy & Level Skills')

#==============================================================================
# ** BGL_Skills
#==============================================================================

module BGL_Skills
  #--------------------------------------------------------------------------
  # ** Blue Skills
  #
  # * Blue Skills
  #  ~ Blue_Skills = [skill_id, skill_id, ...]
  # * Actors that Learn Blue Magic
  #  ~ Blue_Skill_Actors = [actor_id, ...]
  # * Classes that Learn Blue Magic
  #  ~ Blue_Skill_Classes = [class_id, class_id, ...]
  #--------------------------------------------------------------------------
  Blue_Skills = []
  Blue_Skill_Actors = []
  Blue_Skill_Classes = []
  #--------------------------------------------------------------------------
  # ** Geomancy
  #
  # * Actor Map ID Skills
  #  ~ actor_id => { map_id => [skill_id, ...], ... }
  #
  # * Actor Terrain Skills
  #  ~ actor_id => { terrain_id => [skill_id, ...], ... }
  #
  # * Class Map ID Skills
  #  ~ class_id => { map_id => [skill_id, ...], ... }
  #
  # * Class Terrain Skills
  #  ~ class => { terrain_id => [skill_id, ...], ... }
  #--------------------------------------------------------------------------
  Geomancy_Actor_Map_ID_Skills = {
  }
  Geomancy_Actor_Terrain_Skills = {
  }
  Geomancy_Class_Map_ID_Skills = {
  }
  Geomancy_Class_Terrain_Skills = {
  }
  #--------------------------------------------------------------------------
  # ** Level Based Skills
  #
  # * Level Based Skills
  #  ~ skill_id => level
  #--------------------------------------------------------------------------
  Level_Based_Skills = {
  }
end

#==============================================================================
# ** Game_Battler
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias seph_bglskills_gmbtlr_se skill_effect
  #--------------------------------------------------------------------------
  # * Apply Skill Effects
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    # If Skill is Level Based Skills
    if BGL_Skills::Level_Based_Skills.has_key?(skill.id)
      # If Level is isn't divisible
      unless self.level % BGL_Skills::Level_Based_Skills[skill.id] == 0
        # Sets Miss
        self.damage = "Miss"
        return
      end
    end
    # Original Skill Effects
    seph_bglskills_gmbtlr_se(user, skill)
  end
end

#==============================================================================
# ** Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :learn_blue_skills
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias seph_bglskills_gmactr_scu? skill_can_use?
  alias seph_bglskills_gmactr_skills skills
  alias seph_bglskills_gmactr_se skill_effect
  #--------------------------------------------------------------------------
  # * Skill Can Use Test
  #--------------------------------------------------------------------------
  def skill_can_use?(skill_id)
    # If Skill Known
    if self.skills.include?(skill_id)
      return super
    end
    # Return Original Skill Can Use Test
    return seph_bglskills_gmactr_scu?(skill_id)
  end
  #--------------------------------------------------------------------------
  # * Skills
  #--------------------------------------------------------------------------
  def skills
    # Get Original Skills
    n = seph_bglskills_gmactr_skills.dup
    # Adds Geomancy Skills
    n << get_geomancy_skills
    # Returns Skills
    return n.flatten.uniq.sort
  end
  #--------------------------------------------------------------------------
  # * Geomancy Skills
  #--------------------------------------------------------------------------
  def get_geomancy_skills
    # Creates Skills Array
    skills = []
    # Checks Actor Based Geomancy Map Skills
    if (gams = BGL_Skills::Geomancy_Actor_Map_ID_Skills).has_key?(@actor_id)
      # If Current Map
      if gams[@actor_id].has_key?($game_map.id)
        # Adds Map Skill(s)
        skills << gams[@actor_id][$game_map.id]
      end
    end
    # Checks Actor Based Terrain Skills
    if (gats = BGL_Skills::Geomancy_Actor_Terrain_Skills).has_key?(@actor_id)
      # If Current Terrain
      if gats[@actor_id].has_key?($game_player.terrain_tag)
        # Adds Terrain Skill(s)
        skills << gats[@actor_id][$game_player.terrain_tag]
      end
    end
    # Checks Class Based Geomancy Map Skills
    if (gcms = BGL_Skills::Geomancy_Class_Map_ID_Skills).has_key?(@class_id)
      # If Current Map
      if gams[@class_id].has_key?($game_map.id)
        # Adds Map Skill(s)
        skills << gams[@class_id][$game_map.id]
      end
    end
    # Checks Actor Based Terrain Skills
    if (gcts = BGL_Skills::Geomancy_Class_Terrain_Skills).has_key?(@class_id)
      # If Current Terrain
      if gats[@class_id].has_key?($game_player.terrain_tag)
        # Adds Terrain Skill(s)
        skills << gats[@class_id][$game_player.terrain_tag]
      end
    end
    # Returns Skills
    return skills.flatten
  end
  #--------------------------------------------------------------------------
  # * Skill Effect
  #--------------------------------------------------------------------------
  def skill_effect(user, skill)
    # If Actor / Class Can Learn Skill or Actor Can Learn Skill
    if BGL_Skills::Blue_Skill_Classes.include?(@class_id) || 
       BGL_Skills::Blue_Skill_Actors.include?(@actor_id) ||
       self.learn_blue_skills
      # If Skill is a Blue Skill
      if BGL_Skills::Blue_Skills.include?(skill.id)
        # If Skill Not Known
        unless self.skills.include?(skill.id)
          # Display Skill Learned
          self.damage = "Learned Skill #{skill.name}"
          # Learn Skill
          learn_skill(skill.id)
        end
      end
    end
    # Original Skill Effect
    seph_bglskills_gmactr_se(user, skill)
  end
end

#==============================================================================
# ** Game_Enemy
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader :level
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias seph_bglskills_gmeny_init initialize
  def initialize(troop_id, member_index)
    # Original Initialization
    seph_bglskills_gmeny_init(troop_id, member_index)
    # If Dynamic Enemies Not Enabled
    if SDK.state('Dynamic Enemy Stats')
      # Sets Up Random Level
      n = 0
      $game_party.actors.each {|a| n += a.level}
      n /= $game_party.actors.size
      range = (-3..3).to_a
      n = [1, (n + range[rand(range.size)])].max
      @level = n
    end
  end
end

#------------------------------------------------------------------------------
# * End SDK Enable Test
#------------------------------------------------------------------------------
end

Deixe um comentário

  • Inscreva-se na nossa newsletter!

  • Nos siga nas redes sociais!

  • Páginas

  • Áreas especiais

  • eXTReMe Tracker
    Copyright © 2001 - 2019 Gaming Room. Todos os Direitos Reservados - É expressamente proibida a reprodução total ou parcial deste site sem o consentimento dos autores.