Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- ==============================================================================
- ■ Holy87 - XPARAM and SPARAM changer
- version 1.0 - EN
- User difficulty: ★
- License: CC-BY. Everyone can distribute this script and use in their free
- and commercial games. Credit required.
- ■ This script allow the maker to manually change actor's
- ● xparams: hit, eva, cri, cev (critical evasion), mev (magic evasion),
- mrf (magic reflection rate), cnt, hrg, mrg, trg
- ● sparams: tgr, grd, rec, pha, mcr, tcr, pdr, mdr, fdr, exr
- ==============================================================================
- ■ Compatibility
- Game_BattlerBase -> alias initialize, xparam, sparam
- ==============================================================================
- ■ Installation
- Install this script under Materials and above Main
- ==============================================================================
- ■ Istructions
- To change an actor's parameter, use a call script like this:
- $game_actors[ACTORID].PARAM = VALUE
- wich ACTORID is the actor's ID, PARAM is the xparam or sparam and VALUE the
- value. For example:
- $game_actors[1].eva = 5 #sets the first actor's evasion to 5
- $game_actors[3].cri += 3 #adds 3 points to actor 3's critical rate
- =end
- # ------------------------- BEGIN OF THE SCRIPT -------------------------------
- #==============================================================================
- # ** Game_BattlerBase
- #------------------------------------------------------------------------------
- # Core script
- #==============================================================================
- class Game_BattlerBase
- alias h87xsparam_initialize initialize unless $@
- alias h87xsparam_xparam xparam unless $@
- alias h87xsparam_sparam sparam unless $@
- #--------------------------------------------------------------------------
- # * alias di initialize per inizializzare le tavole di xparam e sparam
- #--------------------------------------------------------------------------
- def initialize
- h87xsparam_initialize
- @sparam_changes = {0=>0,1=>0,2=>0,3=>0,4=>0,5=>0,6=>0,7=>0,8=>0,9=>0}
- @xparam_changes = {0=>0,1=>0,2=>0,3=>0,4=>0,5=>0,6=>0,7=>0,8=>0,9=>0}
- end
- #--------------------------------------------------------------------------
- # * Alias method for xparam to including xparam changes
- #--------------------------------------------------------------------------
- def xparam(n)
- return h87xsparam_xparam(n) + @xparam_changes[n]
- end
- #--------------------------------------------------------------------------
- # * Alias method for sparam to including sparam changes
- #--------------------------------------------------------------------------
- def sparam(n)
- return h87xsparam_sparam(n) + @sparam_changes[n]
- end
- #--------------------------------------------------------------------------
- # * Xparam and Sparam changing methods
- #--------------------------------------------------------------------------
- def hit=(n); @xparam_changes[0]=n; end # HIT HIT rate
- def eva=(n); @xparam_changes[1]=n; end # EVA EVAsion rate
- def cri=(n); @xparam_changes[2]=n; end # CRI CRItical rate
- def cev=(n); @xparam_changes[3]=n; end # CEV Critical EVasion rate
- def mev=(n); @xparam_changes[4]=n; end # MEV Magic EVasion rate
- def mrf=(n); @xparam_changes[5]=n; end # MRF Magic ReFlection rate
- def cnt=(n); @xparam_changes[6]=n; end # CNT CouNTer attack rate
- def hrg=(n); @xparam_changes[7]=n; end # HRG Hp ReGeneration rate
- def mrg=(n); @xparam_changes[8]=n; end # MRG Mp ReGeneration rate
- def trg=(n); @xparam_changes[9]=n; end # TRG Tp ReGeneration rate
- def tgr=(n); @sparam_changes[0]=n; end # TGR TarGet Rate
- def grd=(n); @sparam_changes[1]=n; end # GRD GuaRD effect rate
- def rec=(n); @sparam_changes[2]=n; end # REC RECovery effect rate
- def pha=(n); @sparam_changes[3]=n; end # PHA PHArmacology
- def mcr=(n); @sparam_changes[4]=n; end # MCR Mp Cost Rate
- def tcr=(n); @sparam_changes[5]=n; end # TCR Tp Charge Rate
- def pdr=(n); @sparam_changes[6]=n; end # PDR Physical Damage Rate
- def mdr=(n); @sparam_changes[7]=n; end # MDR Magical Damage Rate
- def fdr=(n); @sparam_changes[8]=n; end # FDR Floor Damage Rate
- def exr=(n); @sparam_changes[9]=n; end # EXR EXperience Rate
- end #script end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement