Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if true # << Make true to use this script, false to disable.
- #===============================================================================
- #
- # ☆ $D13x - Stat Formulas
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Hard
- # -- Requires : Various scripts depending on features used. Details below.
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Stat_Formulas]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 21/o2/2o14 - Started, Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This Script is simply my own interpretation of Yanflys - Extra Param Formula
- # Script. It was requested by simplestchaos, on my blog, that I make the two
- # scripts compatable. It was easier to write my own.
- #
- # The main difference between mine and yanflys script is that this one offers
- # MUCH more control over other statistics, such as; params, xparams, sparams,
- # attack elements, defence elements, max tp, attack level, defence level
- # && ALL Parent stats created using the ISPDS...
- #
- # The credit for the formula's goes to Yanfly, I simply used his formulas to
- # save time testing.
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- #===============================================================================
- # 1. You MUST give credit to "Dekita" !!
- # 2. You are NOT allowed to repost this script.(or modified versions)
- # 3. You are NOT allowed to convert this script.
- # 4. You are NOT allowed to use this script for Commercial games.
- # 5. ENJOY!
- #
- # "FINE PRINT"
- # By using this script you hereby agree to the above terms and conditions,
- # if any violation of the above terms occurs "legal action" may be taken.
- # Not understanding the above terms and conditions does NOT mean that
- # they do not apply to you.
- # If you wish to discuss the terms and conditions in further detail you can
- # contact me at http://dekitarpg.wordpress.com/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- # Place Below My $D13x - Core Script. (if used)
- # Place Below My $D13x - Stats Control Script. (if used)
- # Place Below My $D13x - Element Control Script. (if used)
- # Place Below My $D13x - Max TP Control Script. (if used)
- # Place Below My $D13x - ATK/DFL Script. (if used)
- #
- #===============================================================================
- # ☆ HELP
- #-------------------------------------------------------------------------------
- # PARAMS : # XPARAMS : # SPARAMS : #
- # stat = id # stat = id # stat = id #
- # mhp = 0 # hit = 0 # tgr = 0 #
- # mmp = 1 # eva = 1 # grd = 1 #
- # atk = 2 # cri = 2 # rec = 2 #
- # def = 3 # cev = 3 # pha = 3 #
- # mat = 4 # mev = 4 # mcr = 4 #
- # mdf = 5 # mrf = 5 # tcr = 5 #
- # agi = 6 # cnt = 6 # pdr = 6 #
- # luk = 7 # hrg = 7 # mdr = 7 #
- # # mrg = 8 # fdr = 8 #
- # # trg = 9 # exr = 9 #
- #-------------------------------------------------------------------------------
- # Remember :
- # All Params work with integer values, eg. 1, 5, 123, 653, 198123
- # All x/s-Params work with float values, eg. 1.0, 0.5, 0.1, 0.05, 0.01
- # 1.0 = 100%, 0.01 = 1%,
- #
- #===============================================================================
- module StatsFomula
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Parameters (requires $D13x - Statistic Control)
- #-----------------------------------------------------------------------------
- Params={
- 0 => { :n => "0", :f => "base", }, # MHP
- 1 => { :n => "0", :f => "base", }, # MMP
- 2 => { :n => "0", :f => "base", }, # ATK
- 3 => { :n => "0", :f => "base", }, # DEF
- 4 => { :n => "0", :f => "base", }, # MAT
- 5 => { :n => "0", :f => "base", }, # MDF
- 6 => { :n => "0", :f => "base", }, # AGI
- 7 => { :n => "0", :f => "base", }, # LUK
- } # << END Params
- #-----------------------------------------------------------------------------
- # x-Parameters (requires $D13x - Statistic Control)
- #-----------------------------------------------------------------------------
- X_Params={
- 0 => { # HIT
- :n => "(atk + agi) / 2",
- :f => "(n / (100.0 + n)) * 0.250 + 0.050 + base * 2/3",
- }, # <<
- 1 => { # EVA
- :n => "(agi + luk) / 2",
- :f => "(n / (256.0 + n)) * 0.250 + 0.000 + base",
- }, # <<
- 2 => { # CRI
- :n => "luk",
- :f => "(n / (100.0 + n)) * 0.333 + 0.000 + base",
- }, # <<
- 3 => { # CEV
- :n => "agi * 0.75 + luk * 0.25",
- :f => "(n / (512.0 + n)) * 0.167 + 0.000 + base",
- }, # <<
- 4 => { # MEV
- :n => "(mdf + luk) / 2",
- :f => "(n / (256.0 + n)) * 0.250 + 0.000 + base",
- }, # <<
- 5 => { :n => "0", :f => "base", }, # MRF
- 6 => { :n => "0", :f => "base", }, # CNT
- 7 => { :n => "0", :f => "base", }, # HRG
- 8 => { :n => "0", :f => "base", }, # MRG
- 9 => { :n => "0", :f => "base", }, # TRG
- } # << END X_Params
- #-----------------------------------------------------------------------------
- # s-Parameters (requires $D13x - Statistic Control)
- #-----------------------------------------------------------------------------
- S_Params={
- 0 => { :n => "0", :f => "base", }, # TGR
- 1 => {
- :n => "(self.def + mdf) / 2",
- :f => "(n / (256.0 + n)) * 0.333 + 0.000 + base",
- }, # GRD
- 2 => { :n => "0", :f => "base", }, # REC
- 3 => { :n => "0", :f => "base", }, # PHA
- 4 => { :n => "0", :f => "base", }, # MCR
- 5 => { :n => "0", :f => "base", }, # TCR
- 6 => { # PDR
- :n => "self.def",
- :f => "base - (n / (256.0 + n)) * 0.500 - 0.000",
- }, # <<
- 7 => { # MDR
- :n => "mdf",
- :f => "base - (n / (256.0 + n)) * 0.500 - 0.000",
- }, # <<
- 8 => { :n => "0", :f => "base", }, # FDR
- 9 => { :n => "0", :f => "base", }, # EXR
- } # << END S_Params
- #-----------------------------------------------------------------------------
- # Defence Element Formulas (requires $D13x - Elements Control)
- #-----------------------------------------------------------------------------
- Def_Ele={
- 0 => { :n => "0", :f => "base", }, # Element 0
- 1 => { :n => "0", :f => "base", }, # Element 1
- 2 => { :n => "0", :f => "base", }, # Element 2
- 3 => { :n => "0", :f => "base", }, # Element 3...
- 4 => { :n => "0", :f => "base", },
- 5 => { :n => "0", :f => "base", },
- 6 => { :n => "0", :f => "base", },
- 7 => { :n => "0", :f => "base", },
- 8 => { :n => "0", :f => "base", },
- 9 => { :n => "0", :f => "base", },
- 10 => { :n => "0", :f => "base", },
- } # << END Def_Ele
- #-----------------------------------------------------------------------------
- # Attack Element Formulas (requires $D13x - Elements Control)
- #-----------------------------------------------------------------------------
- Atk_Ele={
- 0 => { :n => "0", :f => "base", }, # Element 0
- 1 => { :n => "0", :f => "base", }, # Element 1
- 2 => { :n => "0", :f => "base", }, # Element 2
- 3 => { :n => "0", :f => "base", }, # Element 3...
- 4 => { :n => "0", :f => "base", },
- 5 => { :n => "0", :f => "base", },
- 6 => { :n => "0", :f => "base", },
- 7 => { :n => "0", :f => "base", },
- 8 => { :n => "0", :f => "base", },
- 9 => { :n => "0", :f => "base", },
- 10 => { :n => "0", :f => "base", },
- } # << END Atk_Ele
- #-----------------------------------------------------------------------------
- # Max TP Formula (requires $D13x - Max TP Control)
- #-----------------------------------------------------------------------------
- Max_TP = { :n => "0", :f => "base", }
- #-----------------------------------------------------------------------------
- # Atk / Def Level Formulas (requires $D13x - Attack | Defence Levels)
- #-----------------------------------------------------------------------------
- Atl_Dfl={
- 0 => { :n => "0", :f => "base", }, # Attack Level
- 1 => { :n => "0", :f => "base", }, # Defence Level
- } # << END Atl_Dfl
- #-----------------------------------------------------------------------------
- # Parent Stat Formulas (requires $D13x - ISPDS)
- # NOTE:
- # I have allowed for multiple parent stat formulas due to the fact that two
- # actors can have different setups.
- # If your actor has Stat_Set[0] then Parent_Stat[0] will be used for that
- # actors formulas.
- # REMEMBER, ALL parent stats need to have a formula, even if the stat is
- # not used. As the default setting is for 8 parent stats, I have used 8
- # formula's per Stat_Set.
- #-----------------------------------------------------------------------------
- Parent_Stat=[]
- Parent_Stat[0]={ # Stat_Set[0]
- 0 => { :n => "0", :f => "base", }, # Vitality
- 1 => { :n => "0", :f => "base", }, # Strength
- 2 => { :n => "0", :f => "base", }, # Dexterity
- 3 => { :n => "0", :f => "base", }, # Magic...
- 4 => { :n => "0", :f => "base", }, # NOT USED
- 5 => { :n => "0", :f => "base", }, # NOT USED
- 6 => { :n => "0", :f => "base", }, # NOT USED
- 7 => { :n => "0", :f => "base", }, # NOT USED
- } # << END Parent_Stat[0]
- Parent_Stat[1]={ # Stat_Set[1]
- 0 => { :n => "0", :f => "base", }, # Ifrit
- 1 => { :n => "0", :f => "base", }, # Shiva
- 2 => { :n => "0", :f => "base", }, # Ramuh
- 3 => { :n => "0", :f => "base", }, # Levithon
- 4 => { :n => "0", :f => "base", }, # Titan
- 5 => { :n => "0", :f => "base", }, # Bahamut
- 6 => { :n => "0", :f => "base", }, # Ashura
- 7 => { :n => "0", :f => "base", }, # Hades
- } # << END Parent_Stat[0]
- #####################
- # CUSTOMISATION END #
- end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- class Game_BattlerBase
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Alias List
- #-----------------------------------------------------------------------------
- alias :epf_param_plus :param_plus if $D13x[:Stats_Control]
- alias :epf_xparam_plus :xparam_plus if $D13x[:Stats_Control]
- alias :epf_sparam_plus :sparam_plus if $D13x[:Stats_Control]
- alias :epf_def_ele_plus :def_ele_plus if $D13x[:Elems_Control]
- alias :epf_atk_ele_plus :atk_ele_plus if $D13x[:Elems_Control]
- alias :epf_max_tp_plus :max_tp_plus if $D13x[:TP_Control]
- alias :epf_atl_dfl_plus :atl_dfl_plus if $D13x[:Atk_Def_Lvs]
- alias :epf_spds_plus :spds_plus if $D13x[:ISPDS]
- #-----------------------------------------------------------------------------
- if $D13x[:Stats_Control]
- #---------------------------------------------------------------------------
- # Param Plus
- #---------------------------------------------------------------------------
- def param_plus(param_id)
- base = epf_param_plus(param_id)
- n = eval( StatsFomula::Params[param_id][:n] )
- r = eval( StatsFomula::Params[param_id][:f] )
- return r
- end
- #---------------------------------------------------------------------------
- # xParam Plus
- #---------------------------------------------------------------------------
- def xparam_plus(xparam_id)
- base = epf_xparam_plus(xparam_id)
- n = eval( StatsFomula::X_Params[xparam_id][:n] )
- r = eval( StatsFomula::X_Params[xparam_id][:f] )
- return r
- end
- #---------------------------------------------------------------------------
- # sParam Plus
- #---------------------------------------------------------------------------
- def sparam_plus(sparam_id)
- base = epf_sparam_plus(sparam_id)
- n = eval( StatsFomula::S_Params[sparam_id][:n] )
- r = eval( StatsFomula::S_Params[sparam_id][:f] )
- return r
- end
- end # if $D13x[:Stats_Control]
- if $D13x[:Elems_Control]
- #---------------------------------------------------------------------------
- # Defencive Elements Plus
- #---------------------------------------------------------------------------
- def def_ele_plus(element_id)
- base = epf_def_ele_plus(element_id)
- n = eval( StatsFomula::Def_Ele[element_id][:n] )
- r = eval( StatsFomula::Def_Ele[element_id][:f] )
- return r
- end
- #---------------------------------------------------------------------------
- # Attack Elements Plus
- #---------------------------------------------------------------------------
- def atk_ele_plus(element_id)
- base = epf_atk_ele_plus(element_id)
- n = eval( StatsFomula::Atk_Ele[element_id][:n] )
- r = eval( StatsFomula::Atk_Ele[element_id][:f] )
- return r
- end
- end # if $D13x[:Elems_Control]
- if $D13x[:TP_Control]
- #---------------------------------------------------------------------------
- # Max TP Plus
- #---------------------------------------------------------------------------
- def max_tp_plus
- base = epf_max_tp_plus
- n = eval( StatsFomula::Max_TP[:n] )
- r = eval( StatsFomula::Max_TP[:f] )
- return r
- end
- end # if $D13x[:TP_Control]
- if $D13x[:Atk_Def_Lvs]
- #---------------------------------------------------------------------------
- # Atk Lv | Def Lv ++
- #---------------------------------------------------------------------------
- def atl_dfl_plus(id)
- base = epf_atl_dfl_plus(id)
- n = eval( StatsFomula::Atl_Dfl[id][:n] )
- r = eval( StatsFomula::Atl_Dfl[id][:f] )
- return r
- end
- end # if $D13x[:Atk_Def_Lvs]
- if $D13x[:ISPDS]
- #---------------------------------------------------------------------------
- # Get SPDS Stats Plus
- #---------------------------------------------------------------------------
- def spds_plus(id)
- base = epf_spds_plus(id)
- n = eval( StatsFomula::Parent_Stat[@spds_set][id][:n] )
- r = eval( StatsFomula::Parent_Stat[@spds_set][id][:f] )
- return r
- end
- end # if $D13x[:ISPDS]
- end
- #===============================================================================
- # http://dekitarpg.wordpress.com/
- #===============================================================================
- end # if true / false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement