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 - Statistic Level Up Distribution
- # -- Author : Dekita
- # -- Version : 1.5
- # -- Level : Easy / Normal
- # -- Requires : $D13x - Statistic Control
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Dev_SLUD]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 21/o5/2o13 - Compatability, ($D13x ISPDS)
- # 2o/o5/2o13 - Compatability, ($D13x Atk & Def Lvs)
- # 17/o5/2o13 - Small Update,
- # 25/o3/2o13 - Compatibility, (Elements Control)
- # - Improved Efficiency,
- # 13/o3/2o13 - Improved Import Method,
- # 12/o3/2o13 - Finished,
- # 1o/o3/2o13 - Started
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This Script allows for regular/x/s-Params to be increased by a set value
- # for each level, just like params are done in the database, but for x/s-params.
- # It Also offers a substantial increase in the control Dev's have over their
- # actors / classes statistic increases.
- #
- # Obviously you are able to set the params to go way above the normal
- # limits for each level, as well as provide ways to increase/decrease
- # stats that are not normally changable from level.
- #
- # You can also have all stats decrease upon level down. (not normally possible)
- #
- # The Database' Parameter curve feature will still be used, to turn this off
- # make all stats lv 1-99 the same value, ie. 1
- #
- # NOTICE :
- # v1.2+ allows for Elemental values to be increased / decreased upon level
- # (attack and defence values) IF used in conjunction with my
- # $D13x Elements Control Script :p
- #
- # Plug - Customise - Play
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ 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 Under My $D13x - Statistic Control Script.
- #
- #===============================================================================
- # ☆ Notetags ( default )
- # For use with Actors / Classes
- #-------------------------------------------------------------------------------
- # <stat set: ID>
- # <dyst set: ID>
- # ID = the id of the Stat_Set(or Dyst_Set) you wish to use for this
- # actor / class
- # All Stat_Set and Dyst_Set settings are defined below
- # Actor Notes will take priority over Class Notes !
- #
- #===============================================================================
- # ☆ 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 Actor_Stat_Inc
- Stat_Set=[]# << Keep
- Dyst_Set=[]# << Keep
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ General Settings
- #--------------------------------------------------------------------------
- Level_Down_Removes_Stats = true
- Norm_Notetag = /<stat set:(.*)>/i
- Dyst_Notetag = /<dyst set:(.*)>/i
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Stat increase Set - Settings
- #--------------------------------------------------------------------------
- # This is a fixed stat increase per level setting.
- # can be any of the following stat types :
- # [:param , id, change],
- # [:x_param , id, change],
- # [:s_param , id, change],
- # [:atk_ele , id, change],
- # [:def_ele , id, change],
- # [:atk_lvl , change],
- # [:def_lvl , change],
- # [:spds_stat , id, change]
- Stat_Set[0]=[
- # [stat_type, id, change],
- [:atk_lvl , 10],
- [:def_lvl , 10],
- [:param , 0, 20],
- [:param , 1, 20],
- [:param , 2, 2],
- [:param , 3, 2],
- [:param , 4, 2],
- [:param , 5, 2],
- [:param , 6, 2],
- [:param , 7, 2],
- [:x_param , 0, 0.01],
- [:x_param , 1, 0.01],
- [:x_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.01],
- [:spds_stat , 0, 1]
- [:spds_stat , 1, 1]
- [:spds_stat , 2, 1]
- [:spds_stat , 3, 1]
- # Insert other regular/x/s-param codes here (codes found above)
- # Rememer to put a comma , after each line.
- ]# << End Stat_Set[0]
- Stat_Set[1]=[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:param , 1, 20],
- [:param , 2, 2],
- [:param , 3, 2],
- [:param , 4, 2],
- [:param , 5, 2],
- [:param , 6, 2],
- [:param , 7, 2],
- [:x_param , 0, 0.01],
- [:x_param , 1, 0.01],
- [:x_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- # Insert other x/s-param codes here (codes found above)
- # Rememer to put a comma , after each line.
- ]# << End Stat_Set[1]
- # << Add more Stat_Set[id] By Following The Same Method As Above,
- # Remember [id] is The id Of The Stat Set The Actor/Class Will Have.
- # Also, You Can Change All Stats / Increases(or decreases)
- # Within the hash.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Dynamic Stat Increase Settings
- #--------------------------------------------------------------------------
- # This is a more flexible stat set type, by allowing for each level
- # to have its own unique stat increase.
- # NOTE: I could not be bothered thinking up loads of various stat growth types,
- # so i barley filled out these settings, you should cusomtize these to suit
- # your needs before use.
- Dyst_Set[0]={ # << Initialize Dynamic Stat Set id [0]
- 1 =>[], # << End Lv 1 (inital level must be kept)
- 2 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ], # << End Lv 2
- 3 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ], # << End Lv 3
- 4 =>[
- # Stats go here
- ], # << End Lv 4
- 5 =>[
- # Stats go here
- ], # << End Lv 5
- 6 =>[
- # Stats go here
- ], # << End Lv 6
- 7 =>[
- # Stats go here
- ], # << End Lv 7
- 8 =>[
- # Stats go here
- ], # << End Lv 8
- 9 =>[
- # Stats go here
- ], # << End Lv 9
- 10 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ], # << End Lv 10
- 11 =>[
- # Stats go here
- ],
- 12 =>[
- # Stats go here
- ],
- 13 =>[
- # Stats go here
- ],
- 14 =>[
- # Stats go here
- ],
- 15 =>[
- # Stats go here
- ],
- 16 =>[
- # Stats go here
- ],
- 17 =>[
- # Stats go here
- ],
- 18 =>[
- # Stats go here
- ],
- 19 =>[
- # Stats go here
- ],
- 20 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- 21 =>[
- # Stats go here
- ],
- 22 =>[
- # Stats go here
- ],
- 23 =>[
- # Stats go here
- ],
- 24 =>[
- # Stats go here
- ],
- 25 =>[
- # Stats go here
- ],
- 26 =>[
- # Stats go here
- ],
- 27 =>[
- # Stats go here
- ],
- 28 =>[
- # Stats go here
- ],
- 29 =>[
- # Stats go here
- ],
- 30 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- 31 =>[
- # Stats go here
- ],
- 32 =>[
- # Stats go here
- ],
- 33 =>[
- # Stats go here
- ],
- 34 =>[
- # Stats go here
- ],
- 35 =>[
- # Stats go here
- ],
- 36 =>[
- # Stats go here
- ],
- 37 =>[
- # Stats go here
- ],
- 38 =>[
- # Stats go here
- ],
- 39 =>[
- # Stats go here
- ],
- 40 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- 41 =>[
- # Stats go here
- ],
- 42 =>[
- # Stats go here
- ],
- 43 =>[
- # Stats go here
- ],
- 44 =>[
- # Stats go here
- ],
- 45 =>[
- # Stats go here
- ],
- 46 =>[
- # Stats go here
- ],
- 47 =>[
- # Stats go here
- ],
- 48 =>[
- # Stats go here
- ],
- 49 =>[
- # Stats go here
- ],
- 50 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- 51 =>[
- # Stats go here
- ],
- 52 =>[
- # Stats go here
- ],
- 53 =>[
- # Stats go here
- ],
- 54 =>[
- # Stats go here
- ],
- 55 =>[
- # Stats go here
- ],
- 56 =>[
- # Stats go here
- ],
- 57 =>[
- # Stats go here
- ],
- 58 =>[
- # Stats go here
- ],
- 59 =>[
- # Stats go here
- ],
- 60 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- 61 =>[
- # Stats go here
- ],
- 62 =>[
- # Stats go here
- ],
- 63 =>[
- # Stats go here
- ],
- 64 =>[
- # Stats go here
- ],
- 65 =>[
- # Stats go here
- ],
- 66 =>[
- # Stats go here
- ],
- 67 =>[
- # Stats go here
- ],
- 68 =>[
- # Stats go here
- ],
- 69 =>[
- # Stats go here
- ],
- 70 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- 71 =>[
- # Stats go here
- ],
- 72 =>[
- # Stats go here
- ],
- 73 =>[
- # Stats go here
- ],
- 74 =>[
- # Stats go here
- ],
- 75 =>[
- # Stats go here
- ],
- 76 =>[
- # Stats go here
- ],
- 77 =>[
- # Stats go here
- ],
- 78 =>[
- # Stats go here
- ],
- 79 =>[
- # Stats go here
- ],
- 80 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- 81 =>[
- # Stats go here
- ],
- 82 =>[
- # Stats go here
- ],
- 83 =>[
- # Stats go here
- ],
- 84 =>[
- # Stats go here
- ],
- 85 =>[
- # Stats go here
- ],
- 86 =>[
- # Stats go here
- ],
- 87 =>[
- # Stats go here
- ],
- 88 =>[
- # Stats go here
- ],
- 89 =>[
- # Stats go here
- ],
- 90 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- 91 =>[
- # Stats go here
- ],
- 92 =>[
- # Stats go here
- ],
- 93 =>[
- # Stats go here
- ],
- 94 =>[
- # Stats go here
- ],
- 95 =>[
- # Stats go here
- ],
- 96 =>[
- # Stats go here
- ],
- 97 =>[
- # Stats go here
- ],
- 98 =>[
- # Stats go here
- ],
- 99 =>[
- # Stats go here
- ],
- 100 =>[
- # [stat_type, id, change]
- [:param , 0, 20],
- [:x_param , 0, 0.01],
- [:s_param , 2, 0.01],
- [:atk_ele , 4, 0.01],
- [:def_ele , 4, -0.11],
- ],
- # If for some reason you can reach more than level 100
- # insert more stat changes for each possible level to avoid errors.
- } # << End Dynamic Stat Set id [0] << KEEP !!
- # << Add More Dynamic Stat Sets Below This Point.
- # Simply Copy The Code From Above And Change The
- # Id Number And Stats To Suit Your Needs.
- #####################
- # CUSTOMISATION END #
- end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # The following code is protected under the 2013 Dekita Data Protection Act. #
- # Ie. The “Do Not Fucking Look” Law. #
- # Breaking This One And Only Rule WILL Result in ERECTILE DYSFUNCTION. #
- # That is all ! #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- module DataManager
- #===============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- class << self
- alias :lbd_unique_lv_up_stat :load_database
- end
- #---------------------------------------------------------------------------
- # Load Database (alias)
- #---------------------------------------------------------------------------
- def self.load_database
- lbd_unique_lv_up_stat
- loa_unique_lv_up_stat
- end
- #---------------------------------------------------------------------------
- # Load Unique Shit
- #---------------------------------------------------------------------------
- def self.loa_unique_lv_up_stat
- gr = [$data_actors,$data_classes]
- for g in gr
- for o in g
- next if o == nil
- o.load__lv_up_stat
- end
- end
- end
- end # DataManager
- #===============================================================================
- class RPG::Actor < RPG::BaseItem
- #===============================================================================
- #---------------------------------------------------------------------------
- # Pi Variables
- #---------------------------------------------------------------------------
- attr_accessor :stat_set_id
- #---------------------------------------------------------------------------
- # Load Level Stat Notes
- #---------------------------------------------------------------------------
- def load__lv_up_stat
- @stat_set_id = [ nil , nil ]
- self.note.split(/[\r\n]+/).each do |line|
- case line
- when Actor_Stat_Inc::Norm_Notetag then @stat_set_id = [:steady , $1.to_i]
- when Actor_Stat_Inc::Dyst_Notetag then @stat_set_id = [:dynamic, $1.to_i]
- end
- end
- end
- end
- #===============================================================================
- class RPG::Class < RPG::BaseItem
- #===============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- alias :deki_lvupstats :load_unique_shit if $D13x[:CORE]
- #---------------------------------------------------------------------------
- # Pi Variables
- #---------------------------------------------------------------------------
- attr_accessor :stat_set_id
- #---------------------------------------------------------------------------
- # load unique shit
- #---------------------------------------------------------------------------
- def load_unique_shit
- deki_lvupstats if $D13x[:CORE]
- load__lv_up_stat
- end
- #---------------------------------------------------------------------------
- # Load Level Stat Notes
- #---------------------------------------------------------------------------
- def load__lv_up_stat
- @stat_set_id = [ nil , nil ]
- self.note.split(/[\r\n]+/).each do |line|
- case line
- when Actor_Stat_Inc::Norm_Notetag then @stat_set_id = [:steady , $1.to_i]
- when Actor_Stat_Inc::Dyst_Notetag then @stat_set_id = [:dynamic, $1.to_i]
- end
- end
- end
- end
- #===============================================================================
- class Game_Actor < Game_Battler
- #===============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- alias :lv_down_rem_stats_sD13x :lv_down_extra
- #---------------------------------------------------------------------------
- # Get Stat Increase Type (and do it)
- #---------------------------------------------------------------------------
- def determine_stat_inc_type
- type = stat_set_type
- id = stat_set_id
- case type
- when :steady then doda_stat_inc(Actor_Stat_Inc::Stat_Set[id])
- when :dynamic then doda_stat_inc(Actor_Stat_Inc::Dyst_Set[id][@level])
- end
- end
- #---------------------------------------------------------------------------
- # Do Stat Increase
- #---------------------------------------------------------------------------
- def doda_stat_inc(type)
- return if type == nil
- type.each do |stat|
- case stat[0]
- when :param
- next unless $D13x[:Stats_Control]
- add_param(stat[1], stat[2], false)
- when :x_param
- next unless $D13x[:Stats_Control]
- add_xparam(stat[1], stat[2], false)
- when :s_param
- next unless $D13x[:Stats_Control]
- add_sparam(stat[1], stat[2], false)
- when :atk_ele
- next unless $D13x[:Elems_Control]
- add_atk_ele(stat[1], stat[2], false)
- when :def_ele
- next unless $D13x[:Elems_Control]
- add_def_ele(stat[1], stat[2], false)
- when :atk_lvl
- next unless $D13x[:Atk_Def_Lvs]
- add_atl(stat[1],false)
- when :def_lvl
- next unless $D13x[:Atk_Def_Lvs]
- add_dfl(stat[1],false)
- when :spds_stat
- next unless $D13x[:ISPDS]
- add_spds_stats(stat[1],stat[2],false)
- end
- end
- refresh
- end
- #--------------------------------------------------------------------------
- # Level Down Extra Shit
- #--------------------------------------------------------------------------
- def lv_down_extra
- lv_down_rem_stats_sD13x
- determine_stat_dec_type
- end
- #---------------------------------------------------------------------------
- # Get Stat Increase Type (and do it)
- #---------------------------------------------------------------------------
- def determine_stat_dec_type
- return unless Actor_Stat_Inc::Level_Down_Removes_Stats
- type = stat_set_type
- id = stat_set_id
- case type
- when :steady then doda_stat_dec(Actor_Stat_Inc::Stat_Set[id])
- when :dynamic then doda_stat_dec(Actor_Stat_Inc::Dyst_Set[id][@level])
- end
- end
- #---------------------------------------------------------------------------
- # Do Stat Decrease
- #---------------------------------------------------------------------------
- def doda_stat_dec(type)
- return if type == nil
- type.each do |stat|
- case stat[0]
- when :param
- next unless $D13x[:Stats_Control]
- sub_param(stat[1], stat[2], false)
- when :x_param
- next unless $D13x[:Stats_Control]
- sub_xparam(stat[1], stat[2], false)
- when :s_param
- next unless $D13x[:Stats_Control]
- sub_sparam(stat[1], stat[2], false)
- when :atk_ele
- next unless $D13x[:Elems_Control]
- sub_atk_ele(stat[1], stat[2], false)
- when :def_ele
- next unless $D13x[:Elems_Control]
- sub_def_ele(stat[1], stat[2], false)
- when :atk_lvl
- next unless $D13x[:Atk_Def_Lvs]
- sub_atl(stat[1],false)
- when :def_lvl
- next unless $D13x[:Atk_Def_Lvs]
- sub_dfl(stat[1],false)
- when :spds_stat
- next unless $D13x[:ISPDS]
- sub_spds_stats(stat[1],stat[2],false)
- end
- end
- refresh
- end
- #---------------------------------------------------------------------------
- # Get Stat Increase Type
- #---------------------------------------------------------------------------
- def stat_set_type
- set = self.class.stat_set_id[0]
- if actor.stat_set_id[0] != nil
- set = actor.stat_set_id[0]
- end
- set
- end
- #---------------------------------------------------------------------------
- # Get Stat Increase ID
- #---------------------------------------------------------------------------
- def stat_set_id
- set = self.class.stat_set_id[1]
- if actor.stat_set_id[1] != nil
- set = actor.stat_set_id[1]
- end
- set
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement