Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if true
- #===============================================================================
- #
- # ☆ $D13x - Equipment - Random Stats
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Extreme
- # -- Requires : $D13x - Unique Equipment
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Equip_Randomize] = true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 22/o2/2o13 - Finished,
- # 16/o2/2o13 - Started,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script allows the creation of advanced equipment. what i mean by this is..
- # You can set up each equip to have various teirs, a teir is basically a grade
- # teir 0 is ALWAYS default ( whatever the item does in the database )
- # teir 1, 2, 3 & higher are all defined by you, the user..
- # you can define as many different teirs as you want, remember to add
- # a chance for that teir to be gained, or it will never be gained..
- # (unless you use script call to gain X teir item)
- #
- # each weapons teir can have different features than the default item
- # features in this case are things like..
- # name
- # description
- # icon
- # price
- # params
- # features (the ones in the database eg, x-param rates)
- # equipment type id
- # weapon type id
- # armor type id
- #
- # name : replaces the features name with the name you set
- # description : replaces the items description
- # icon : replaces the items icon id
- # price : adds to the default price of this item
- # params : adds to the default param values for this item
- # features : adds/replaces to the default features for this item
- # equipment type id : changes the items equipment type
- # NOTE ~ turning weapon into armor (or armor > weapon) wont work !
- # weapon type id : changes the items weapon type (Weapons Only)
- # armor type id : changes the items armor type (Armors Only)
- #
- # there is also variations of the way you can add these features onto items..
- #
- # guaranteed features:
- # name, description, icon, price, e_type id, w_type id
- # these will be added if they are defined, nothing will happen if they are not.
- #
- # possible features :
- # params, features
- # these must be defined within an array, there are 3 possible ways to add these
- # kind of features
- # 1 ~ :random_features
- # :random_features is an array of possible features that this item
- # can have, features will be chosen at random depending on
- # the :max_random_features set for this item
- # these kind of features may or may not be added
- # 2 ~ :fixed_features
- # :fixed_features again is an array of features, ALL of the features
- # defined in this array will be added, regardless of how many features this
- # item currently has
- # 3 ~ :one_of_these_features
- # :one_of_these_features again is an array of features, this time only
- # 1 of the features defined will be added, it will be guaranteed regardless
- # of the items current features
- #
- # if using this system you SHOULD NOT attempt to gain equip by using the script
- # call $game_party.gain_item in any sort of way.
- # This does not include my effect block script's effects (v1.1+)
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ 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/ or DekitaRPG@gmail.com
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- # Place Below $D13x - Core and $D13x - Equip Individualize Scripts.
- # Place Above ALL Other $D13x Equipment Related Scripts.
- #
- # All Customisation for this is within the following modules :
- # module [ weapons ]
- # module [ armors ]
- # this is to make keeping track of all your items is slightly easier
- # when the customisation has been vastly enlarged .
- #===============================================================================
- # ☆ Script Calls
- #-------------------------------------------------------------------------------
- # The following script calls are very similar to the script calls created by the
- # individualize script, the only difference is you are now allowed various teirs.
- #
- # make_weapon(id, teir)
- # make_armor(id, teir)
- # This script call will create a cloned weapon/armor and add it to the party
- # teir wil be random unless you set the teir.
- #
- # actor_has_weapon_teir?(actor_id, weapon id, teir)
- # actor_has_armor_teir?(actor_id, armor id, teir)
- # This script call will check if actor_id has weapon_id/armor_id equipped
- # it will return true if yes and false if no, should be used for things like
- # conditional branch checks as the default checks wont work.
- #
- # party_has_weapon_teir?(weapon id, teir)
- # party_has_armor_teir?(armor_id, teir)
- # Similar to the above script calls but checks if the item exists within the
- # party, ie includes inventory.
- #
- # change_eqp_to_this(actor_id, slot_id, item_id, teir)
- # use this script call to change an actors equipment to a specific
- # teir of an item. (if the party has the item)
- #
- # change_eqp_to_this_or_bet(actor_id, slot_id, item_id, teir)
- # This one will equip a specific item if the party has one that meets the teir
- # requirement or has a higher teir.
- #
- =begin #=======================================================================#
- FEATURE CODES AND IDS :
- ========================
- param rates
- [:feature, 21, 0, increase, item price inc, chance range] # MHP
- [:feature, 21, 1, increase, item price inc, chance range] # MMP
- [:feature, 21, 2, increase, item price inc, chance range] # ATK
- [:feature, 21, 3, increase, item price inc, chance range] # DEF
- [:feature, 21, 4, increase, item price inc, chance range] # MAT
- [:feature, 21, 5, increase, item price inc, chance range] # MDF
- [:feature, 21, 6, increase, item price inc, chance range] # AGI
- [:feature, 21, 7, increase, item price inc, chance range] # LUK
- x-param rates
- [:feature, 22, 0, increase, item price inc, chance range] # HIT
- [:feature, 22, 1, increase, item price inc, chance range] # EVA
- [:feature, 22, 2, increase, item price inc, chance range] # CRI
- [:feature, 22, 3, increase, item price inc, chance range] # CEV
- [:feature, 22, 4, increase, item price inc, chance range] # MEV
- [:feature, 22, 5, increase, item price inc, chance range] # MRF
- [:feature, 22, 6, increase, item price inc, chance range] # CNT
- [:feature, 22, 7, increase, item price inc, chance range] # HRG
- [:feature, 22, 8, increase, item price inc, chance range] # MRG
- [:feature, 22, 9, increase, item price inc, chance range] # TRG
- s-param rates
- [:feature, 23, 0, decrease, item price inc, chance range] # TGR
- [:feature, 23, 1, decrease, item price inc, chance range] # GRD
- [:feature, 23, 2, decrease, item price inc, chance range] # REC
- [:feature, 23, 3, decrease, item price inc, chance range] # PHA
- [:feature, 23, 4, decrease, item price inc, chance range] # MCR
- [:feature, 23, 5, decrease, item price inc, chance range] # TCR
- [:feature, 23, 6, decrease, item price inc, chance range] # PDR
- [:feature, 23, 7, decrease, item price inc, chance range] # MDR
- [:feature, 23, 8, decrease, item price inc, chance range] # FDR
- [:feature, 23, 9, decrease, item price inc, chance range] # EXR
- NOTE : s param default is 1.0, so decrease values should be set
- according to this, eg. if you want to reduce by 2% put 0.98 as the
- decrease value because the calculations would be..
- default rate(1.0) * weapon rate(0.98) = total rate(0.98) (to decrease)
- default rate(1.0) * weapon rate(1.2.) = total rate(1.02) (to increase)
- 1.0 = 100%
- dpbz-params REQUIRES My PSPDS Script
- [:feature, 1989, 0, increase, item price inc, chance range] # VIT
- [:feature, 1989, 1, increase, item price inc, chance range] # STR
- [:feature, 1989, 2, increase, item price inc, chance range] # DEX
- [:feature, 1989, 3, increase, item price inc, chance range] # MAG
- atl/dfl rates
- [:feature, 1990, 0, increase, item price inc, chance range] # ATL
- [:feature, 1990, 1, increase, item price inc, chance range] # DFL
- def ele rates
- [:feature, 11, 1, increase, item price inc, chance range] # Elment id 1
- [:feature, 11, 2, increase, item price inc, chance range] # Elment id 2
- [:feature, 11, 3, increase, item price inc, chance range] # Elment id 3
- [:feature, 11, 4, increase, item price inc, chance range] # Elment id 4
- and so on..
- atk ele rates
- [:feature, 31, 1, increase, item price inc, chance range] # Elment id 1
- [:feature, 31, 2, increase, item price inc, chance range] # Elment id 2
- [:feature, 31, 3, increase, item price inc, chance range] # Elment id 3
- [:feature, 31, 4, increase, item price inc, chance range] # Elment id 4
- and so on..
- debuff rates
- [:feature, 12, 0, chance inc, item price inc, chance range] # MHP
- [:feature, 12, 1, chance inc, item price inc, chance range] # MMP
- [:feature, 12, 2, chance inc, item price inc, chance range] # ATK
- [:feature, 12, 3, chance inc, item price inc, chance range] # DEF
- [:feature, 12, 4, chance inc, item price inc, chance range] # MAT
- [:feature, 12, 5, chance inc, item price inc, chance range] # MDF
- [:feature, 12, 6, chance inc, item price inc, chance range] # AGI
- [:feature, 12, 7, chance inc, item price inc, chance range] # LUK
- def states rates
- [:feature, 13, 1, success inc, item price inc, chance range] # State id 1
- [:feature, 13, 2, success inc, item price inc, chance range] # State id 2
- [:feature, 13, 3, success inc, item price inc, chance range] # State id 3
- [:feature, 13, 4, success inc, item price inc, chance range] # State id 4
- and so on..
- resist states rates
- [:feature, 14, 1, chance inc, item price inc, chance range] # State id 1
- [:feature, 14, 2, chance inc, item price inc, chance range] # State id 2
- [:feature, 14, 3, chance inc, item price inc, chance range] # State id 3
- [:feature, 14, 4, chance inc, item price inc, chance range] # State id 4
- and so on..
- atk state success rate
- [:feature, 32, 1, success inc, item price inc, chance range] # State id 1
- [:feature, 32, 2, success inc, item price inc, chance range] # State id 2
- [:feature, 32, 3, success inc, item price inc, chance range] # State id 3
- [:feature, 32, 4, success inc, item price inc, chance range] # State id 4
- and so on..
- atk speed
- [:feature, 33, 0, amount, item price inc, chance range]
- atk times
- [:feature, 34, 0, amount, item price inc, chance range]
- skill type add
- [:feature, 41, skill type id, 0, item price inc, chance range]
- skill type seal
- [:feature, 42, skill type id, 0, item price inc, chance range]
- skill add
- [:feature, 43, skill id, 0, item price inc, chance range]
- skill seal
- [:feature, 44, skill id, 0, item price inc, chance range]
- equip w type
- [:feature, 51, equip wep type id, 0, item price inc, chance range]
- equip a type
- [:feature, 52, equip armr type id, 0, item price inc, chance range]
- fix equip type
- [:feature, 53, equip type id, 0, item price inc, chance range]
- seal equip type
- [:feature, 54, equip type id, 0, item price inc, chance range]
- slot type
- [:feature, 55, 1, 0, item price inc, chance range] # will make dual weild
- Action Times Plus
- [:feature, 61, 0, amount, item price inc, chance range]
- Special
- [:feature, 62, value, 0, item price inc, chance range]
- value = 0 = autobattle
- 1 = guard
- 2 = substitue
- 3 = preserve tp
- Collapse Type
- [:feature, 63, value, 0, item price inc, chance range]
- value = 0 = boss
- 1 = instant
- 2 = not dissapear
- Party ability
- [:feature, 64, value, 0, item price inc, chance range]
- value = 0 = encounter half
- 1 = encounter none
- 2 = cancel surprise
- 3 = raise preemtive
- 4 = gold double
- 5 = drop item double
- Equipment_Exp_Rate
- Requires Equip Exp Addon
- changes equipment exp gain rate
- [:exp_rate, rate, price inc, chance range]
- Equipment Durability Rate
- Requires Equip Durability Addon
- changes items endurance (longevity of item durability)
- [:durability_rate, amount, price inc, chance range]
- =end #==========================================================================#
- # This is the module that defines all the random stat bonuses for weapons
- # NOTE: ID[x] - x MUST be the database id for the weapon,
- # for example, ID[1] will be for weapon[1] only
- # This MUST be placed below ":Equip ' randomize'"
- #
- #==============================================================================
- module Weapons
- #==============================================================================
- # Used for when a default weapon is gained, changes the name from the database
- # this way the default equip can be made to look like a teir 1 equip with no
- # random stats.
- # Note, default weapons are only gained from the shop or script calls !!
- Default_Name_Addon = "☆ %s"
- #===========================================================================
- # Weapon ID[ 1 ] Begin
- #===========================================================================
- #===========================================================================
- ID[1]={# IMPORTANT !!
- # items teirs are random, for a teir to be chosen a random number between
- # 0 - 999 is generated, then a check is performed to see which teir chance
- # includes that number , eg..
- # if the random number generated was 67 the game would choose whichever
- # :teir_chances array position includes that number, in the below setting
- # that would be teir 2, there MUST be a chance set for each teir you use.
- # If you dont know what any of this means, just copy this and keep the
- # default values.
- # NOTE: no two array positions should include the same numbers
- :teir_chances => [
- 0..599, # teir 1 chance ( 60% )
- 600..849, # teir 2 chance ( 30% )
- 850..989, # teir 3 chance ( 14.9% )
- 990..999, # teir 4 chance ( 0.1% )
- ],
- #---------------------------------------------------------------------------
- # Weapon ID[ 1 ] Teir 1 settings
- #---------------------------------------------------------------------------
- # :teir_1 => {
- 1 => {
- # Changes items icon for this teir
- # :icon => 544,
- # Changes items name for this teir ( sprintf )
- :name => "☆ %s",
- # Adds this value onto the price of this item
- :price => 10,
- # changes the description of the item
- # :description => "A cheap axe, used in wood farming.",
- # Changes items exp rate (REQUIRES Equip Levels ADDON)
- # :exp_rate => 1.5,
- # Changes the weapon type
- # :w_type => 1, # weapon type id WEAPONS ONLY
- # Changes the weapons attack animation
- # :animation => 2, # animation id, WEAPONS ONLY
- # Sets the max amount of random features this item can have
- :random_features_max => 3,
- # sets the chance for each feature being added, A random number is generated
- # between 0 - 99, if the feature chance is larger than the random number
- # then a random feature will be chosen from :random features
- # if not, no feature will be added.
- :random_features_chance =>{
- 1 => 75,
- 2 => 50,
- 3 => 25,
- },
- # sets the available random featurs for this item
- # a random number between 0-999 will be generated,
- # the feature chosen will be the feature whose
- # chance range includes the random number created..
- # eg. if the random number created was 279, it would add the feature
- # that has chance range of 0..600
- # NOTE no two features should include the same number (in its chance range)
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..199], # 20% chance
- [:param , 0, 15, 25, 25, 200..399], # 20% chance
- [:param , 2, 1, 4, 10, 400..599], # 20% chance
- [:param , 2, 4, 8, 25, 600..699], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 0, 0.01, 10, 700..799], # 10% chance
- [:x_param, 0, 0.025, 25, 800..849], # 5% chance
- [:x_param, 2, 0.01, 10, 850..949], # 10% chance
- [:x_param, 2, 0.025, 25, 950..999], # 5% chance
- ],# end random_features
- },# end teir 1
- #---------------------------------------------------------------------------
- # Weapon ID[ 1 ] Teir 2 settings
- #---------------------------------------------------------------------------
- 2 => {
- # Changes the icon image.
- :icon => 545,
- :name => "☆☆ %s",
- # :description => "A strong axe, used in wood farming.",
- :price => 10,
- # :durability_inc => 5.00,
- :text_color => Text_Color::Light_Blue,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 75,
- 3 => 50,
- 4 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..199], # 20% chance
- [:param , 0, 15, 25, 25, 200..399], # 20% chance
- [:param , 2, 1, 4, 10, 400..599], # 20% chance
- [:param , 2, 4, 8, 25, 600..699], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 0, 0.01, 10, 700..799], # 10% chance
- [:x_param, 0, 0.025, 25, 800..849], # 5% chance
- [:x_param, 2, 0.01, 10, 850..949], # 10% chance
- [:x_param, 2, 0.025, 25, 950..999], # 5% chance
- ],# end random_features
- }, #end teir 2
- #---------------------------------------------------------------------------
- # Weapon ID[ 1 ] Teir 3 settings
- #---------------------------------------------------------------------------
- 3 => {
- :icon => 546,
- :name => "☆☆☆ %s",
- :description => "A strong axe, used on the battlefield.",
- :price => 30,
- :durability_inc => 10.00,
- :text_color => Text_Color::Purple,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..199], # 20% chance
- [:param , 0, 15, 25, 25, 200..399], # 20% chance
- [:param , 2, 1, 4, 10, 400..599], # 20% chance
- [:param , 2, 4, 8, 25, 600..699], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 0, 0.01, 10, 700..799], # 10% chance
- [:x_param, 0, 0.025, 25, 800..849], # 5% chance
- [:x_param, 2, 0.01, 10, 850..949], # 10% chance
- [:x_param, 2, 0.025, 25, 950..999], # 5% chance
- ],# end random_features
- }, #end teir 3
- #---------------------------------------------------------------------------
- # Weapon ID[ 1 ] Teir 4 settings
- #---------------------------------------------------------------------------
- 4 => {
- :icon => 547,
- :name => "★★ Epyx Blood Axe",
- :description => "Blood stained axe, has been used on the battlefield \n" +
- "by many famous warriors. Most notably, Epyx The Brave.",
- :price => 100,
- :durability_inc => 20.00,
- :text_color => Color.new(212,64,0),
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 30, 40, 50, 0..199], # 20% chance
- [:param , 0, 50, 60, 75, 200..399], # 20% chance
- [:param , 2, 10, 14, 50, 400..599], # 20% chance
- [:param , 2, 14, 18, 75, 600..699], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 0, 0.025, 50, 700..799], # 10% chance
- [:x_param, 0, 0.05, 75, 800..849], # 5% chance
- [:x_param, 2, 0.025, 50, 850..949], # 10% chance
- [:x_param, 2, 0.05, 75, 950..999], # 5% chance
- ],# end random_features
- # :fixed_features => [
- # [:feature, 32, 27, 0.25, 100, nil],# State id 1
- # ],# end fixed features
- }, #end teir 4
- ######
- }# End unique weapon ID[ 1 ]
- ######
- end # Module Weapons ; end
- #===============================================================================
- # This is the module that defines all the random stat bonuses for armors
- # NOTE: ID[x] - x MUST be the database id for the armor,
- # for example, ID[1] will be for armor id [1] only
- # This MUST be placed below ":Equip ' randomize'"
- #
- #==============================================================================
- module Armors
- #==============================================================================
- # Used for when a default weapon is gained, changes the name from the database
- # this way the default equip can be made to look like a teir 1 equip with no
- # random stats.
- # Note, default weapons are only gained from the shop or script calls !!
- Default_Name_Addon = "☆ %s"
- #===========================================================================
- #===========================================================================
- # Armor ID[ 1 ] Begin
- #===========================================================================
- #===========================================================================
- ID[1]={# IMPORTANT !!
- :teir_chances => [
- 0..599, # teir 1 chance ( 60% )
- 600..849, # teir 2 chance ( 35% )
- 850..999, # teir 3 chance ( 15% )
- ],
- #---------------------------------------------------------------------------
- # Armor ID[1] Teir 1 settings
- #---------------------------------------------------------------------------
- 1 => {
- :name => "☆ %s",
- :price => 50,
- :random_features_max => 3,
- :random_features_chance =>{
- 1 => 75,
- 2 => 50,
- 3 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 5% chance
- [:s_param, 6, -0.02, 40, 800..899], # 5% chance
- [:s_param, 7, -0.02, 40, 900..999], # 5% chance
- ], # << Random Features
- }, #end teir 1
- #---------------------------------------------------------------------------
- # Armor ID[1] Teir 2 settings
- #---------------------------------------------------------------------------
- 2 => {
- :name => "☆☆ %s",
- :icon => 561,
- :price => 10,
- :durability_inc => 5.00,
- :text_color => Text_Color::Light_Blue,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 75,
- 3 => 50,
- 4 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 5% chance
- [:s_param, 6, -0.02, 40, 800..899], # 5% chance
- [:s_param, 7, -0.02, 40, 900..999], # 5% chance
- ], # << Random Features
- }, #end teir 2
- #---------------------------------------------------------------------------
- # Armor ID[1] Teir 3 settings
- #---------------------------------------------------------------------------
- 3 => {
- :name => "☆☆☆ %s",
- :icon => 562,
- :price => 50,
- :durability_inc => 10.00,
- :text_color => Text_Color::Purple,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 3
- #---------------------------------------------------------------------------
- # Armor ID[1] Teir 4 settings
- #---------------------------------------------------------------------------
- 4 => {
- :name => "★★ Epyx' Blood Helm",
- :icon => 563,
- :price => 50,
- :description => "Blood stained helm, has been used on the battlefield \n" +
- "by many famous warriors. Most notably, Epyx The Brave.",
- :durability_inc => 20.00,
- :text_color => Color.new(212,64,0),
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 40, 60, 20, 0..99 ], # 10% chance
- [:param , 1, 40, 60, 20, 100..199], # 10% chance
- [:param , 3, 4, 12, 20, 200..299], # 10% chance
- [:param , 5, 4, 12, 20, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.02, 20, 400..499], # 10% chance
- [:x_param, 3, 0.02, 20, 500..599], # 10% chance
- [:x_param, 4, 0.02, 20, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.04, 60, 700..799], # 10% chance
- [:s_param, 6, -0.04, 60, 800..899], # 10% chance
- [:s_param, 7, -0.04, 60, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 4
- }# End unique Armor ID[1]
- #===========================================================================
- #===========================================================================
- # Armor ID[ 2 ] Begin
- #===========================================================================
- #===========================================================================
- ID[2]={# IMPORTANT !!
- :teir_chances => [
- 0..599, # teir 1 chance ( 60% )
- 600..849, # teir 2 chance ( 35% )
- 850..999, # teir 3 chance ( 15% )
- ],
- #---------------------------------------------------------------------------
- # Armor ID[2] Teir 1 settings
- #---------------------------------------------------------------------------
- 1 => {
- :name => "☆ %s",
- :price => 50,
- :random_features_max => 3,
- :random_features_chance =>{
- 1 => 75,
- 2 => 50,
- 3 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 1
- #---------------------------------------------------------------------------
- # Armor ID[2] Teir 2 settings
- #---------------------------------------------------------------------------
- 2 => {
- :name => "☆☆ %s",
- :icon => 577,
- :price => 10,
- :durability_inc => 5.00,
- :text_color => Text_Color::Light_Blue,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 75,
- 3 => 50,
- 4 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 2
- #---------------------------------------------------------------------------
- # Armor ID[2] Teir 3 settings
- #---------------------------------------------------------------------------
- 3 => {
- :name => "☆☆☆ %s",
- :icon => 578,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 3
- #---------------------------------------------------------------------------
- # Armor ID[2] Teir 4 settings
- #---------------------------------------------------------------------------
- 4 => {
- :name => "★★ Epyx' Blood Robe",
- :icon => 579,
- :price => 50,
- :description => "Blood stained robe, has been used on the battlefield \n" +
- "by many famous warriors. Most notably, Epyx The Brave.",
- :durability_inc => 20.00,
- :text_color => Color.new(212,64,0),
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 40, 60, 20, 0..99 ], # 10% chance
- [:param , 1, 40, 60, 20, 100..199], # 10% chance
- [:param , 3, 4, 12, 20, 200..299], # 10% chance
- [:param , 5, 4, 12, 20, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.02, 20, 400..499], # 10% chance
- [:x_param, 3, 0.02, 20, 500..599], # 10% chance
- [:x_param, 4, 0.02, 20, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.04, 60, 700..799], # 10% chance
- [:s_param, 6, -0.04, 60, 800..899], # 10% chance
- [:s_param, 7, -0.04, 60, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 4
- }# End unique Armor ID[2]
- #===========================================================================
- #===========================================================================
- # Armor ID[ 3 ] Begin
- #===========================================================================
- #===========================================================================
- ID[3]={# IMPORTANT !!
- :teir_chances => [
- 0..599, # teir 1 chance ( 60% )
- 600..849, # teir 2 chance ( 35% )
- 850..999, # teir 3 chance ( 15% )
- ],
- #---------------------------------------------------------------------------
- # Armor ID[3] Teir 1 settings
- #---------------------------------------------------------------------------
- 1 => {
- :name => "☆ %s",
- :price => 50,
- :random_features_max => 3,
- :random_features_chance =>{
- 1 => 75,
- 2 => 50,
- 3 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 1
- #---------------------------------------------------------------------------
- # Armor ID[3] Teir 2 settings
- #---------------------------------------------------------------------------
- 2 => {
- :name => "☆☆ %s",
- :icon => 593,
- :price => 10,
- :durability_inc => 5.00,
- :text_color => Text_Color::Light_Blue,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 75,
- 3 => 50,
- 4 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 2
- #---------------------------------------------------------------------------
- # Armor ID[3] Teir 3 settings
- #---------------------------------------------------------------------------
- 3 => {
- :name => "☆☆☆ %s",
- :icon => 594,
- :price => 50,
- :durability_inc => 10.00,
- :text_color => Text_Color::Purple,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 3
- #---------------------------------------------------------------------------
- # Armor ID[3] Teir 4 settings
- #---------------------------------------------------------------------------
- 4 => {
- :name => "★★ Epyx' Blood Chest",
- :icon => 595,
- :price => 50,
- :description => "Blood stained chest, has been used on the battlefield \n" +
- "by many famous warriors. Most notably, Epyx The Brave.",
- :durability_inc => 20.00,
- :text_color => Color.new(212,64,0),
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 40, 60, 20, 0..99 ], # 10% chance
- [:param , 1, 40, 60, 20, 100..199], # 10% chance
- [:param , 3, 4, 12, 20, 200..299], # 10% chance
- [:param , 5, 4, 12, 20, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.02, 20, 400..499], # 10% chance
- [:x_param, 3, 0.02, 20, 500..599], # 10% chance
- [:x_param, 4, 0.02, 20, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.04, 60, 700..799], # 10% chance
- [:s_param, 6, -0.04, 60, 800..899], # 10% chance
- [:s_param, 7, -0.04, 60, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 4
- }# End unique Armor ID[3]
- #===========================================================================
- #===========================================================================
- # Armor ID[ 4 ] Begin
- #===========================================================================
- #===========================================================================
- ID[4]={# IMPORTANT !!
- :teir_chances => [
- 0..599, # teir 1 chance ( 60% )
- 600..849, # teir 2 chance ( 35% )
- 850..999, # teir 3 chance ( 15% )
- ],
- #---------------------------------------------------------------------------
- # Armor ID[4] Teir 1 settings
- #---------------------------------------------------------------------------
- 1 => {
- :name => "☆ %s",
- :price => 50,
- :random_features_max => 3,
- :random_features_chance =>{
- 1 => 75,
- 2 => 50,
- 3 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 1
- #---------------------------------------------------------------------------
- # Armor ID[4] Teir 2 settings
- #---------------------------------------------------------------------------
- 2 => {
- :name => "☆☆ %s",
- :icon => 609,
- :price => 10,
- :durability_inc => 5.00,
- :text_color => Text_Color::Light_Blue,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 75,
- 3 => 50,
- 4 => 25,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 2
- #---------------------------------------------------------------------------
- # Armor ID[4] Teir 3 settings
- #---------------------------------------------------------------------------
- 3 => {
- :name => "☆☆☆ %s",
- :icon => 610,
- :price => 50,
- :durability_inc => 10.00,
- :text_color => Text_Color::Purple,
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 10, 15, 10, 0..99 ], # 10% chance
- [:param , 1, 10, 15, 10, 100..199], # 10% chance
- [:param , 3, 1, 5, 10, 200..299], # 10% chance
- [:param , 5, 1, 5, 10, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.01, 10, 400..499], # 10% chance
- [:x_param, 3, 0.01, 10, 500..599], # 10% chance
- [:x_param, 4, 0.01, 10, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.02, 40, 700..799], # 10% chance
- [:s_param, 6, -0.02, 40, 800..899], # 10% chance
- [:s_param, 7, -0.02, 40, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 3
- #---------------------------------------------------------------------------
- # Armor ID[1] Teir 4 settings
- #---------------------------------------------------------------------------
- 4 => {
- :name => "★★ Epyx' Blood Boots",
- :icon => 611,
- :price => 50,
- :description => "Blood stained boots, has been used on the battlefield \n" +
- "by many famous warriors. Most notably, Epyx The Brave.",
- :durability_inc => 20.00,
- :text_color => Color.new(212,64,0),
- :random_features_max => 4,
- :random_features_chance =>{
- 1 => 100,
- 2 => 100,
- 3 => 100,
- 4 => 100,
- },
- :random_features => [
- # [:param, id, gain min, gain max, price inc, chance range]
- [:param , 0, 40, 60, 20, 0..99 ], # 10% chance
- [:param , 1, 40, 60, 20, 100..199], # 10% chance
- [:param , 3, 4, 12, 20, 200..299], # 10% chance
- [:param , 5, 4, 12, 20, 300..399], # 10% chance
- # [:x_param, id, gain, price inc, chance range]
- [:x_param, 1, 0.02, 20, 400..499], # 10% chance
- [:x_param, 3, 0.02, 20, 500..599], # 10% chance
- [:x_param, 4, 0.02, 20, 600..699], # 10% chance
- # [:s_param, id, gain, price inc, chance range]
- [:s_param, 1, -0.04, 60, 700..799], # 10% chance
- [:s_param, 6, -0.04, 60, 800..899], # 10% chance
- [:s_param, 7, -0.04, 60, 900..999], # 10% chance
- ], # << Random Features
- }, #end teir 4
- }# End unique Armor ID[4]
- end # << module Armor
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # 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.\..\.. #
- #===============================================================================#
- module Cloning_101 # A.K.A ~ Cloning for Dummies
- #===============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- class << self
- alias :randomize_shits :get_random_teir
- alias :getunique_shits :get_unique_stats
- end
- #---------------------------------------------------------------------------
- # Get Teir
- #---------------------------------------------------------------------------
- def self.get_random_teir(mod, id, new, set_teir)
- randomize_shits(mod, id, new, set_teir)
- random = rand(1000)
- to_r = 0
- ind = 0
- if mod::ID != nil
- mod::ID[id][:teir_chances].each do |tcs|
- to_r = (ind+1) if tcs.include?(random)
- ind += 1
- end
- end
- to_r = set_teir if set_teir != nil
- new.teir = to_r
- return to_r
- end
- #---------------------------------------------------------------------------
- # Make Item Unique
- #---------------------------------------------------------------------------
- def self.get_unique_stats(new, mod, vi, id, teir)
- getunique_shits(new, mod, vi, id, teir)
- new_uni_fs = 0
- if teir != 0
- mit = mod::ID[id][teir]
- mit.each do |l|
- case l[0]
- when :name ; new.name = sprintf(l[1], vi[id].name)
- when :icon ; new.icon_index = l[1]
- when :description ; new.description = l[1]
- when :price ; new.price += l[1]
- when :random_features
- mit[:random_features_max].times do |counter|
- next unless rand(100) < mit[:random_features_chance][counter+1]
- old_new = new.clone
- new = rand_equip_stats(new, l, new_uni_fs, mit)
- new_uni_fs += 1 if old_new != new
- end
- when :fixed_features
- mit[:fixed_features].each do |feat|
- new = fixed_equip_stats(new, feat, mit)
- end
- when :one_of_these_features
- fid = rand( mit[:one_of_these_features].size - 1)
- feat = mit[:one_of_these_features][fid]
- new = fixed_equip_stats(new, feat, mit)
- when :e_type
- new.etype_id = l[1]
- when :a_type
- next unless new.is_a?(RPG::Armor)
- new.atype_id = l[1]
- when :w_type
- next unless new.is_a?(RPG::Weapon)
- new.wtype_id = l[1]
- when :animation
- next unless new.is_a?(RPG::Weapon)
- new.animation_id = l[1]
- when :exp_rate
- next unless $imported[:Equip_Levels]
- new.exp_rate = l[1]
- when :text_color
- new.item_disp_color = l[1]
- when :durability_inc
- next unless $D13x[:Equip_Durability]
- new.durability += l[1]
- new.max_durability += l[1]
- end
- end
- elsif teir == 0
- new.name = sprintf(mod::Default_Name_Addon, vi[id].name)
- end
- return new
- end
- #---------------------------------------------------------------------------
- # Random Equipment Stats
- #---------------------------------------------------------------------------
- def self.rand_equip_stats(new, l, new_uni_fs, mit)
- val = rand(1000)
- l[1].each do |b|
- next if new_uni_fs >= mit[:random_features_max]
- case b[0]
- when :param
- if b[5].include?(val)
- uni_amnt = (b[2] + rand(b[3]-b[2]+1)).to_i
- new.params[b[1]] += uni_amnt
- uni_feat = [:param, b[1], uni_amnt]
- new.price += b[4]
- new.uni_feats.push(uni_feat)
- end
- when :x_param
- next unless $D13x[:Stats_Control]
- if b[4].include?(val)
- uni_amnt = (b[2]).to_f
- new.xpars[b[1]] += uni_amnt
- uni_feat = [:x_param, b[1], uni_amnt]
- new.price += b[3]
- new.uni_feats.push(uni_feat)
- end
- when :s_param
- next unless $D13x[:Stats_Control]
- if b[4].include?(val)
- uni_amnt = (b[2]).to_f
- new.spars[b[1]] += uni_amnt
- uni_feat = [:s_param, b[1], uni_amnt]
- new.price += b[3]
- new.uni_feats.push(uni_feat)
- end
- when :feature
- if b[5].include?(val)
- new.features.push(RPG::BaseItem::Feature.new(b[1], b[2], b[3]))
- uni_feat = [:feature, b[1], b[2], b[3]]
- new.price += b[4]
- new.uni_feats.push(uni_feat)
- end
- when :exp_rate
- next unless $D13x[:Equip_Levels] && Equip_Exp::Gain_Exp_From_Battle
- if b[3].include?(val)
- new.exp_rate = b[1]
- uni_feat = [:exp_rate, b[1]]
- new.price += b[2]
- new.uni_feats.push(uni_feat)
- end
- when :durability_rate
- next unless $D13x[:Equip_Durability]
- if b[3].include?(val)
- new.durab_rate = b[1]
- uni_feat = [:durab_rate, b[1]]
- new.price += b[2]
- new.uni_feats.push(uni_feat)
- end
- end
- end
- return new
- end
- #---------------------------------------------------------------------------
- # Fixed Equipment Stats
- #---------------------------------------------------------------------------
- def self.fixed_equip_stats(new, b, mit)
- case b[0]
- when :param
- uni_amnt = (b[2] + rand(b[3]-b[2]+1)).to_i
- new.params[b[1]] += uni_amnt
- new.price += b[4] if b[4] != nil
- uni_feat = [:param, b[1], uni_amnt]
- new.uni_feats.push(uni_feat)
- when :x_param
- if $D13x[:Stats_Control]
- uni_amnt = (b[2] + rand(b[3]-b[2]+1)).to_f
- new.xpars[b[1]] += uni_amnt
- uni_feat = [:x_param, b[1], uni_amnt]
- new.price += b[4]
- new.uni_feats.push(uni_feat)
- end
- when :s_param
- if $D13x[:Stats_Control]
- uni_amnt = (b[2] + rand(b[3]-b[2]+1)).to_f
- new.spars[b[1]] += uni_amnt
- uni_feat = [:s_param, b[1], uni_amnt]
- new.price += b[4]
- new.uni_feats.push(uni_feat)
- end
- when :feature
- new.features.push(RPG::BaseItem::Feature.new(b[1], b[2], b[3]))
- new.price += b[4] if b[4] != nil
- uni_feat = [:feature, b[1], b[2], b[3]]
- new.uni_feats.push(uni_feat)
- when :exp_rate
- if $D13x[:Equip_Levels] && Equip_Exp::Gain_Exp_From_Battle
- new.exp_rate = b[1]
- uni_feat = [:exp_rate, b[1]]
- new.price += b[2]
- new.uni_feats.push(uni_feat)
- end
- when :durability_rate
- if $D13x[:Equip_Durability]
- new.durab_rate = b[1]
- uni_feat = [:durab_rate, b[1]]
- new.price += b[2]
- new.uni_feats.push(uni_feat)
- end
- end
- return new
- end
- end # end Cloning_101
- #==============================================================================
- class Game_Actor < Game_Battler
- #==============================================================================
- #--------------------------------------------------------------------------
- # Change equipment by id and teir ( new )
- #--------------------------------------------------------------------------
- def change_equip_by_id_and_teir(slot_id, item_id, teir = 0)
- item = nil
- if equip_slots[slot_id] == 0
- $game_party.weapons.each do |weap|
- item = weap if weap.database_id == item_id &&
- weap.teir == teir && item == nil
- end
- else
- $game_party.armors.each do |arms|
- item = arms if arms.database_id == item_id &&
- arms.teir == teir && item == nil
- end
- end
- change_equip(slot_id, item) if item != nil
- end
- #--------------------------------------------------------------------------
- # Change equipment by id and teir (or a higher teir) ( new )
- #--------------------------------------------------------------------------
- def change_equip_by_id_and_teir_II(slot_id, item_id, teir = 0)
- item = nil
- if equip_slots[slot_id] == 0
- $game_party.weapons.each do |weap|
- item = weap if weap.database_id == item_id &&
- weap.teir >= teir && item == nil
- end
- else
- $game_party.armors.each do |arms|
- item = arms if arms.database_id == item_id &&
- arms.teir >= teir && item == nil
- end
- end
- p "#{item.name}, #{slot_id}"
- change_equip(slot_id, item) if item != nil
- end
- end # end Game_Actor
- #==============================================================================
- class Game_Interpreter
- #==============================================================================
- #---------------------------------------------------------------------------
- # Changes an actors equipment to X with X teir (or higher)
- #---------------------------------------------------------------------------
- def change_eqp_to_this_or_bet(actor_id, slot_id, item_id, teir = 0)
- return if actor_id == (nil || 0)
- $game_actors[actor_id].change_equip_by_id_and_teir_II(slot_id, item_id, teir)
- end
- #---------------------------------------------------------------------------
- # Checks if actor has specific teir weapon equipped
- #---------------------------------------------------------------------------
- def actor_has_weapon_teir?(aid, wid, teir)
- bool = false
- $game_actors[aid].weapons.each do |wep|
- bool = true if $data_weapons[wep.id].database_id == wid &&
- $data_weapons[wep.id].teir == teir
- end
- return bool
- end
- #---------------------------------------------------------------------------
- # Checks if actor has specific teir armor equipped
- #---------------------------------------------------------------------------
- def actor_has_armor_teir?(aid, wid, teir)
- bool = false
- $game_actors[aid].armor.each do |wep|
- bool = true if $data_armor[wep.id].database_id == wid &&
- $data_armor[wep.id].teir == teir
- end
- return bool
- end
- #---------------------------------------------------------------------------
- # Checks if party has specific teir weapon
- #---------------------------------------------------------------------------
- def party_has_weapon_teir?(wid, teir)
- bool = false
- $game_party.weapons.each do |wep|
- bool = true if $data_weapons[wep.id].database_id == wid &&
- $data_weapons[wep.id].teir == teir
- end
- return bool
- end
- #---------------------------------------------------------------------------
- # Checks if party has specific teir armor
- #---------------------------------------------------------------------------
- def party_has_weapon_teir?(wid, teir)
- bool = false
- $game_party.armors.each do |wep|
- bool = true if $data_armors[wep.id].database_id == wid &&
- $data_armors[wep.id].teir == teir
- end
- return bool
- end
- end # end interpreter
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement