RPG maker VX
Últimos temas
» Script de menu
por maxi Jue 04 Dic 2014, 1:44 pm

» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm

» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am

» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am

» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm

» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm

» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am

» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am

» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am

» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am

» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am

» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm

» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am

» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am

» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm

¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado

Ninguno

[ Ver toda la lista ]


La mayor cantidad de usuarios en línea fue 117 el Mar 09 Ago 2011, 3:39 pm.

[Aporte]Tecnicas pasivas

Ir abajo

RPG Maker Vx [Aporte]Tecnicas pasivas

Mensaje por luistop12 el Lun 04 Feb 2013, 12:52 am

Este script te permite tener una gama de skill que te suban stats

como se usa, colocar tags en las notas del skill


[cambiar x por parametro a subir ejem passive param+100]
[reduce parametro ejemplo passive param-100]
[Multiplica parametro ejem passive param%]
hp, mp, atk, def, spi, agi, dex, res, hit, eva, cri,


le da estados a dicho skill

[para un estado remplazar x por estado]
[para mas estados remplazar x por estado]





Código:
#===============================================================================
#
# Shanghai Simple Script - Passive Skills
# Last Date Updated: 2010.05.19
# Level: Normal
#
# Skills learned by actors can now give stat bonuses or apply autostates.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
#
# <passive param: +x>
# <passive param: -x>
# <passive param: x%>
# Replace param with hp, mp, atk, def, spi, agi, dex, res, hit, eva, cri, or
# odds, and this tag will increase or decrease the base stat by that much. %
# will increase by a percent.
#
# <passive state: x>
# <passive state: x, x, x>
# Gives the skill with state x always applied. Unremovable until the skill has
# been forgotten.
#
# Insert multiple of these tags if you want more than one passive effect
# applied for a single skill.
#===============================================================================
 
$imported = {} if $imported == nil
$imported["PassiveSkills"] = true
 
#==============================================================================
# RPG::BaseItem
#==============================================================================
 
class RPG::BaseItem
 
  #--------------------------------------------------------------------------
  # passive_traits
  #--------------------------------------------------------------------------
  def passive_traits
    return @passive_traits if @passive_traits != nil
    @passive_traits = { :maxhp => 0, :maxmp => 0, :atk => 0, :def => 0,
      :spi => 0, :agi => 0, :dex => 0, :res => 0, :hit => 0, :eva => 0,
      :cri => 0, :odds => 0, :maxhpp => 100, :maxmpp => 100, :atkp => 100,
      :defp => 100, :spip => 100, :agip => 100, :dexp => 100, :resp => 100,
      :hitp => 100, :evap => 100, :crip => 100, :oddsp => 100, :states => []}
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when /<(?:PASSIVE|pas)[ ](.*):[ ]([\+\-]\d+)>/i
        case $1.upcase
        when "MAXHP", "HP"
          @passive_traits[:maxhp] = $2.to_i
        when "MAXMP", "MP"
          @passive_traits[:maxmp] = $2.to_i
        when "ATK"
          @passive_traits[:atk] = $2.to_i
        when "DEF"
          @passive_traits[:def] = $2.to_i
        when "SPI"
          @passive_traits[:spi] = $2.to_i
        when "AGI"
          @passive_traits[:agi] = $2.to_i
        when "DEX"
          @passive_traits[:dex] = $2.to_i
        when "RES"
          @passive_traits[:res] = $2.to_i
        when "HIT"
          @passive_traits[:hit] = $2.to_i
        when "EVA"
          @passive_traits[:eva] = $2.to_i
        when "CRI"
          @passive_traits[:cri] = $2.to_i
        when "ODDS"
          @passive_traits[:odds] = $2.to_i
        end
      when /<(?:PASSIVE|pas)[ ](.*):[ ](\d+)([%%])>/i
        case $1.upcase
        when "MAXHP", "HP"
          @passive_traits[:maxhpp] = $2.to_i
        when "MAXMP", "MP"
          @passive_traits[:maxmpp] = $2.to_i
        when "ATK"
          @passive_traits[:atkp] = $2.to_i
        when "DEF"
          @passive_traits[:defp] = $2.to_i
        when "SPI"
          @passive_traits[:spip] = $2.to_i
        when "AGI"
          @passive_traits[:agip] = $2.to_i
        when "DEX"
          @passive_traits[:dexp] = $2.to_i
        when "RES"
          @passive_traits[:resp] = $2.to_i
        when "HIT"
          @passive_traits[:hitp] = $2.to_i
        when "EVA"
          @passive_traits[:evap] = $2.to_i
        when "CRI"
          @passive_traits[:crip] = $2.to_i
        when "ODDS"
          @passive_traits[:oddsp] = $2.to_i
        end
      when /<(?:PASSIVE_STATE|passive state):[ ](\d+(?:\s*,\s*\d+)*)>/i
        $1.scan(/\d+/).each { |num|
        @passive_traits[:states].push($data_states[num.to_i]) if num.to_i > 0 }
      end
    }
    return @passive_traits
  end
 
end
 
#==============================================================================
# ** Game_Battler
#==============================================================================
 
class Game_Battler
  #--------------------------------------------------------------------------
  # * Get Current States as an Object Array
  #--------------------------------------------------------------------------
  alias states_sss_passive_skills states unless $@
  def states
    array = states_sss_passive_skills
    if actor?
      for skill in skills do array |= skill.passive_traits[:states] end
    end
    return array.compact
  end
end
 
#==============================================================================
# Game Actor
#==============================================================================
 
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Get Basic Maximum HP
  #--------------------------------------------------------------------------
  alias base_maxhp_sss_passive_skills base_maxhp unless $@
  def base_maxhp
    n = base_maxhp_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:maxhpp] / 100.0 end
    for skill in skills do n += skill.passive_traits[:maxhp] end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # * Get Basic Maximum MP
  #--------------------------------------------------------------------------
  alias base_maxmp_sss_passive_skills base_maxmp unless $@
  def base_maxmp
    n = base_maxmp_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:maxmpp] / 100.0 end
    for skill in skills do n += skill.passive_traits[:maxmp] end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # * Get Basic Attack
  #--------------------------------------------------------------------------
  alias base_atk_sss_passive_skills base_atk unless $@
  def base_atk
    n = base_atk_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:atkp] / 100.0 end
    for skill in skills do n += skill.passive_traits[:atk] end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # * Get Basic Defense
  #--------------------------------------------------------------------------
  alias base_def_sss_passive_skills base_def unless $@
  def base_def
    n = base_def_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:defp] / 100.0 end
    for skill in skills do n += skill.passive_traits[:def] end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # * Get Basic Spirit
  #--------------------------------------------------------------------------
  alias base_spi_sss_passive_skills base_spi unless $@
  def base_spi
    n = base_spi_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:spip] / 100.0 end
    for skill in skills do n += skill.passive_traits[:spi] end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # * Get Basic Agility
  #--------------------------------------------------------------------------
  alias base_agi_sss_passive_skills base_agi unless $@
  def base_agi
    n = base_agi_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:agip] / 100.0 end
    for skill in skills do n += skill.passive_traits[:agi] end
    return Integer(n)
  end
  #--------------------------------------------------------------------------
  # * Get Basic Dexterity
  #--------------------------------------------------------------------------
  if $imported["DEX Stat"]
  alias base_dex_sss_passive_skills base_dex unless $@
  def base_dex
    n = base_dex_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:dexp] / 100.0 end
    for skill in skills do n += skill.passive_traits[:dex] end
    return Integer(n)
  end
  end
  #--------------------------------------------------------------------------
  # * Get Basic Resist
  #--------------------------------------------------------------------------
  if $imported["RES Stat"]
  alias base_res_sss_passive_skills base_res unless $@
  def base_res
    n = base_res_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:resp] / 100.0 end
    for skill in skills do n += skill.passive_traits[:res] end
    return Integer(n)
  end
  end
  #--------------------------------------------------------------------------
  # * Get Hit Rate
  #--------------------------------------------------------------------------
  alias hit_sss_passive_skills hit unless $@
  def hit
    n = hit_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:hitp] / 100.0 end
    for skill in skills do n += skill.passive_traits[:hit] end
    return [Integer(n), 0].max
  end
  #--------------------------------------------------------------------------
  # * Get Evasion Rate
  #--------------------------------------------------------------------------
  alias eva_sss_passive_skills eva unless $@
  def eva
    n = eva_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:evap] / 100.0 end
    for skill in skills do n += skill.passive_traits[:eva] end
    return [Integer(n), 0].max
  end
  #--------------------------------------------------------------------------
  # * Get Critical Rate
  #--------------------------------------------------------------------------
  alias cri_sss_passive_skills cri unless $@
  def cri
    n = cri_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:crip] / 100.0 end
    for skill in skills do n += skill.passive_traits[:cri] end
    return [Integer(n), 0].max
  end
  #--------------------------------------------------------------------------
  # * Get Get Ease of Hitting
  #--------------------------------------------------------------------------
  alias odds_sss_passive_skills odds unless $@
  def odds
    n = odds_sss_passive_skills
    for skill in skills do n = n * skill.passive_traits[:oddsp] / 100.0 end
    for skill in skills do n += skill.passive_traits[:odds] end
    return [Integer(n), 1].max
  end
end
 
#===============================================================================
#
# END OF FILE
#
#===============================================================================

creditos pokethouse
avatar
luistop12
500
500

Masculino

Edad 27

Cantidad de envíos 759

Maker Cash 946

Reputación 42


Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.